:root {
  --ink: #101828;
  --muted: #667085;
  --paper: #f3f5f8;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --sidebar: #0b1220;
  --sidebar-2: #121a2b;
  --text-on-dark: #e8edf5;
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --warn-soft: #ffedd5;
  --ok: #067647;
  --ok-soft: #d1fadf;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --live: #175cd3;
  --live-soft: #d1e9ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.04);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.01em;
}

a { color: var(--accent); }
button, input, select, textarea { font: inherit; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--text-on-dark);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 4px 8px;
}
.brand strong { display: block; font-size: 0.98rem; }
.brand em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: #98a2b3;
  font-weight: 500;
}
.mark {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
  color: #c5cddb;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.on {
  background: rgba(15, 118, 110, 0.28);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.who {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #98a2b3;
  font-size: 0.88rem;
}
.who button {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.workspace { min-width: 0; }
.page { padding: 32px 36px 72px; max-width: 1280px; }
.page.board { max-width: none; }

.day-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-nav input[type="date"] {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.tt-wrap {
  overflow: auto;
  max-height: calc(100vh - 210px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.tt {
  width: max(100%, 1180px);
  border-collapse: collapse;
  font-size: 0.78rem;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}
.tt th, .tt td {
  border: 1px solid var(--line);
  padding: 6px 7px;
  vertical-align: top;
}
.tt thead th {
  background: #0b1220;
  color: #fff;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.8rem;
}
.tt thead .tt-va th {
  background: #1c2538;
  font-weight: 500;
  font-size: 0.68rem;
  top: 34px;
}
.tt .tt-time {
  width: 72px;
  min-width: 72px;
  background: #f8fafc;
  color: var(--ink);
  position: sticky;
  left: 0;
  z-index: 1;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}
.tt thead .tt-time { z-index: 4; background: #0b1220; color: #fff; }
.tt tbody .tt-time span { display: block; color: var(--muted); font-size: 0.65rem; font-weight: 500; }
.tt td { min-width: 92px; height: 46px; background: #fff; }
.tt td.break { background: #fff7ed; }
.tt td.lunch { background: #eef2f6; }
.tt td.booked { background: #ccfbf1; }
.tt tr.now td { box-shadow: inset 0 0 0 2px var(--accent); }
.tt tr.past td { opacity: 0.62; }
.slot-book { display: flex; flex-direction: column; gap: 2px; }
.slot-book strong { font-size: 0.75rem; }
.slot-off { color: var(--muted); font-weight: 600; }
.docs { display: grid; gap: 14px; max-width: 860px; }
.docs-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.docs-card h2 { margin-top: 0; }
.docs-card .pill { margin: 0 6px 6px 0; }
.docs-card pre {
  background: #f2f4f7;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}
.hero-row h1, h1, h2 {
  margin: 4px 0 0;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-row h1 { font-size: 1.85rem; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stats article, .cal-card, .card-form, .list-wrap, table {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stats article {
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}
.stats article::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.stats p { margin: 0; color: var(--muted); font-size: 0.84rem; font-weight: 500; }
.stats strong { display: block; margin-top: 8px; font-size: 1.85rem; letter-spacing: -0.04em; }

table { width: 100%; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}
.pill.pending, .pill.queued, .pill.new,
.pill.no-answer-1, .pill.no-answer-2, .pill.no-answer-3,
.pill.no-answer-4, .pill.no-answer-5 { background: var(--warn-soft); color: var(--warn); }
.pill.confirmed, .pill.quoted, .pill.email, .pill.new-lead { background: var(--live-soft); color: var(--live); }
.pill.en-route, .pill.contacted, .pill.sms, .pill.old-lead { background: #eef2ff; color: #3730a3; }
.pill.completed, .pill.won, .pill.sent, .pill.booked, .pill.ok,
.pill.updated, .pill.created { background: var(--ok-soft); color: var(--ok); }
.pill.missing-info { background: var(--warn-soft); color: var(--warn); }
.pill.non-uk { background: #f4e8ff; color: #6d28d9; }

.lead-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 22px;
  max-width: 720px;
}
.lead-box {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.lead-box span { font-weight: 600; }
.lead-box strong { font-size: 1.6rem; letter-spacing: -0.04em; }
.lead-box em { font-style: normal; color: var(--muted); font-size: 0.82rem; }
.lead-box.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.lead-box:first-child.on { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.lead-box:last-child.on { border-color: #6d28d9; box-shadow: inset 3px 0 0 #6d28d9; }

@media (max-width: 800px) {
  .lead-boxes { grid-template-columns: 1fr; }
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split section, .card-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 8px;
}

.list-wrap { overflow: auto; border-radius: var(--radius); }
.list-table { margin: 0; box-shadow: none; border: 0; }
.list-table th, .list-table td { padding: 9px 12px; white-space: nowrap; vertical-align: middle; }
.list-table thead th { position: sticky; top: 0; }
.list-table .sort { color: var(--muted); text-decoration: none; }
.list-table .sort.on { color: var(--ink); }
.click-row { cursor: pointer; }
.click-row:hover { background: #f0fdfa; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; }
.pager a, .pager span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
  font-size: 0.86rem;
}
.pager span.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.cal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 28px; }
.cal-card { border-radius: var(--radius); padding: 16px; }
.cal-card h3 { margin: 0 0 6px; font-size: 1rem; }
.cal-card ul { margin: 0; padding-left: 1.05rem; color: var(--muted); }
.cal-card li { margin-bottom: 8px; }
.group-stats { margin: 10px 0 8px; color: var(--ink); }
.booking-list { list-style: none; padding: 0; margin: 8px 0 0; }
.booking-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(15,118,110,0.35), transparent 55%),
    linear-gradient(165deg, #071018 0%, #0b1220 55%, #12332f 100%);
}
.login-shell { width: min(420px, 100%); }
.login-card {
  background: #fff;
  color: var(--ink);
  padding: 32px 28px 28px;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin: 0 0 18px;
}
.login-card h2 { margin: 6px 0 16px; font-size: 1.6rem; }
.login-card form { display: grid; gap: 8px; }
.login-card input, .stack input, .stack select, .stack textarea, .filters input, .filters select {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
}
.login-card input:focus, .stack input:focus, .stack select:focus, .stack textarea:focus, .filters input:focus, .filters select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.login-card button, .btn, .stack button, .filters button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
}
.login-card button:hover, .btn:hover, .stack button:hover, .filters button:hover {
  background: var(--accent-2);
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover { background: #f8fafc; }

.error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 10px;
  margin: 0 0 12px;
  border-radius: 10px;
}
.flash {
  background: var(--ok-soft);
  color: var(--ok);
  padding: 10px 12px;
  border-radius: 10px;
}
.muted { color: var(--muted); font-size: 0.9rem; }
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { flex: 1; min-width: 140px; }
.page > form.stack {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 10px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.stack label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.stack input, .stack select, .stack textarea { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.modal {
  border: 0;
  padding: 22px;
  max-width: 640px;
  width: 92vw;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(16,24,40,0.28);
}
.modal::backdrop { background: rgba(11, 18, 32, 0.55); }
.hidden { position: absolute; left: -9999px; }
.thread-list { list-style: none; padding: 0; }
.thread-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  text-decoration: none;
  background: #fff;
  color: inherit;
  border-radius: 10px;
}
.thread-list li.on a { border-color: var(--accent); background: var(--accent-soft); }
.chat { max-height: 360px; overflow: auto; margin-bottom: 12px; }
.bubble { background: #f8fafc; border: 1px solid var(--line); padding: 8px 10px; border-radius: 12px; }
.bubble.in { border-left: 4px solid var(--live); }
.bubble.out { border-left: 4px solid var(--accent); }
code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .stats, .grid2, .split, .cal-grid { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 48px; }
}

.app:has(.page.jarvis) .workspace {
  min-height: 100vh;
  background: #01040a;
}
.page.jarvis {
  max-width: none;
  padding: 0;
  min-height: 100vh;
  color: #b8f4ff;
  background:
    radial-gradient(900px 420px at 18% 12%, rgba(0, 196, 255, 0.14), transparent 58%),
    radial-gradient(700px 380px at 88% 88%, rgba(80, 90, 255, 0.12), transparent 52%),
    linear-gradient(180deg, #030712 0%, #01040a 100%);
  overflow: hidden;
  font-family: Rajdhani, "DM Sans", sans-serif;
}
.hud {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) 280px minmax(360px, 1.15fr);
  grid-template-rows: auto 1fr;
  gap: 0;
  padding: 10px 12px 12px;
}
.hud-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(120, 230, 255, 0.035) 0 1px,
    transparent 1px 4px
  );
  z-index: 4;
  mix-blend-mode: screen;
  animation: hud-scan 9s linear infinite;
}
.hud-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
}
@keyframes hud-scan {
  from { transform: translateY(-12px); }
  to { transform: translateY(12px); }
}
.hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 5;
  border: 2px solid rgba(90, 240, 255, 0.7);
  pointer-events: none;
}
.hud-corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.hud-top, .hud-stage, .hud-rail, .hud-chat { position: relative; z-index: 2; }
.hud-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 12px;
  border: 1px solid rgba(90, 240, 255, 0.18);
  background: linear-gradient(90deg, rgba(8, 28, 44, 0.7), rgba(4, 10, 20, 0.4));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.hud-kicker {
  margin: 0 0 2px;
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: #5ce1f2;
}
.hud h1 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.38em;
  color: #f4feff;
  text-shadow: 0 0 22px rgba(90, 240, 255, 0.55), 0 0 40px rgba(40, 120, 255, 0.25);
}
.hud-sub {
  margin: 4px 0 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  color: #7aa8b6;
  letter-spacing: 0.08em;
}
.hud-clock-wrap {
  text-align: center;
  padding: 4px 18px;
  border-left: 1px solid rgba(90, 240, 255, 0.2);
  border-right: 1px solid rgba(90, 240, 255, 0.2);
}
.hud-clock-wrap em {
  display: block;
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: #ffd36a;
}
.hud-clock {
  font-family: Orbitron, sans-serif;
  font-size: 1.7rem;
  color: #ffd36a;
  text-shadow: 0 0 16px rgba(255, 211, 106, 0.4);
}
.hud-power {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.power {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  padding: 12px 18px;
  cursor: pointer;
  min-width: 188px;
}
.power.start {
  background: linear-gradient(180deg, #0b6 0%, #064 100%);
  color: #d8ffe8;
  border-color: #3dff9a;
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.35);
}
.power.stop {
  background: linear-gradient(180deg, #c23131 0%, #6b1010 100%);
  color: #ffe0e0;
  border-color: #ff6b6b;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.4);
  animation: hud-blink 1.2s ease-in-out infinite;
}
#power-note {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: #6aa8b4;
  text-transform: uppercase;
}
.hud-stats { display: flex; gap: 10px; justify-content: center; }
.hud-stats div {
  min-width: 70px;
  padding: 6px 10px 8px;
  text-align: center;
  border: 1px solid rgba(90, 240, 255, 0.2);
  background: rgba(0, 30, 48, 0.45);
}
.hud-stats em {
  display: block;
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: #6aa8b4;
}
.hud-stats strong {
  font-family: Orbitron, sans-serif;
  font-size: 1.2rem;
  color: #7af7ff;
  text-shadow: 0 0 10px rgba(122, 247, 255, 0.5);
}
.hud-stage { position: relative; min-height: 420px; }
.hud-svg { width: 100%; height: calc(100vh - 118px); min-height: 380px; }
.hud-svg .ring {
  fill: none;
  stroke: rgba(90, 240, 255, 0.22);
  stroke-width: 1;
}
.hud-svg .ticks { stroke-dasharray: 2 14; }
.hud-svg .faint { stroke: rgba(90, 240, 255, 0.1); }
.hud-svg .hex {
  fill: none;
  stroke: url(#hexStroke);
  stroke-width: 1.4;
  transform-origin: 0 0;
}
.hud-svg .hex.inner { stroke: rgba(122, 247, 255, 0.55); }
.hud-svg .hex.core {
  fill: rgba(10, 40, 60, 0.4);
  stroke: #9cffff;
  stroke-width: 2;
}
.hud-svg .sweep {
  fill: rgba(26, 212, 255, 0.1);
  transform-origin: 0 0;
  animation: hud-spin 7s linear infinite;
}
.spin { animation: hud-spin 26s linear infinite; }
.spin-slow { animation: hud-spin 42s linear infinite; }
.spin-rev { animation: hud-spin-rev 32s linear infinite; }
@keyframes hud-spin { to { transform: rotate(360deg); } }
@keyframes hud-spin-rev { to { transform: rotate(-360deg); } }
.hud-core-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.hud-core-label strong {
  display: block;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.32em;
  font-size: 1.05rem;
  color: #fff;
}
.hud-core-label em {
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  color: #ffd36a;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
}
.hud-pulse {
  display: block;
  width: 11px;
  height: 11px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #1ad4ff;
  box-shadow: 0 0 14px #1ad4ff, 0 0 28px #1ad4ff;
  animation: hud-blink 1.6s ease-in-out infinite;
}
.hud.hot .hud-pulse {
  background: #ffd36a;
  box-shadow: 0 0 16px #ffd36a;
  animation: hud-blink 0.45s ease-in-out infinite;
}
@keyframes hud-blink { 50% { opacity: 0.3; } }
.hud-node .dock {
  fill: rgba(2, 12, 22, 0.9);
  stroke: #5ce1f2;
  stroke-width: 1.6;
}
.hud-node.busy .dock {
  stroke: #ffd36a;
  fill: rgba(255, 211, 106, 0.12);
}
.hud-node text {
  fill: #c8f7ff;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
}
.hud-node .slot {
  fill: #7af7ff;
  font-size: 11px;
  letter-spacing: 1px;
}
.hud-node.busy .slot { fill: #ffd36a; }
.hud-beam {
  stroke: rgba(255, 211, 106, 0.7);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
  animation: hud-dash 0.9s linear infinite;
  filter: drop-shadow(0 0 4px #ffd36a);
}
@keyframes hud-dash { to { stroke-dashoffset: -24; } }
.hud-rail {
  border: 1px solid rgba(90, 240, 255, 0.16);
  margin: 10px 8px 0 0;
  padding: 14px 12px 10px;
  overflow: auto;
  background: rgba(3, 14, 24, 0.72);
}
.hud-channels, .hud-recent { display: grid; gap: 8px; margin: 8px 0 16px; }
.hud-card {
  border: 1px solid rgba(26, 212, 255, 0.22);
  background: linear-gradient(180deg, rgba(10, 32, 48, 0.8), rgba(4, 12, 20, 0.8));
  padding: 10px 11px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: inherit;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.hud-card.idle { opacity: 0.72; }
.hud-card.live { border-color: #ffd36a; box-shadow: 0 0 16px rgba(255, 211, 106, 0.18); }
.hud-card.on { box-shadow: inset 3px 0 0 #7af7ff; }
.hud-card strong { display: block; color: #fff; font-size: 0.95rem; }
.hud-card span, .hud-card em {
  display: block;
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  color: #8ad7e2;
}
.hud-card .tag {
  color: #ffd36a;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hud-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 10px;
  border: 1px solid rgba(90, 240, 255, 0.16);
  background: linear-gradient(180deg, rgba(4, 16, 26, 0.92), rgba(2, 8, 14, 0.96));
}
.hud-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(26, 212, 255, 0.16);
}
.hud-chat-head strong { color: #fff; font-size: 1.05rem; }
.hud-chat-head em {
  font-style: normal;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  color: #ffd36a;
  letter-spacing: 0.08em;
}
.hud-bubbles {
  flex: 1;
  overflow: auto;
  padding: 16px 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble-row { display: flex; }
.bubble-row.clara { justify-content: flex-start; }
.bubble-row.candidate { justify-content: flex-end; }
.hud-bubble {
  max-width: 84%;
  padding: 10px 12px 8px;
  background: rgba(18, 24, 32, 0.95);
  border: 1px solid rgba(122, 247, 255, 0.12);
}
.bubble-row.clara .hud-bubble {
  border-left: 3px solid #3dd68c;
  background: rgba(16, 32, 28, 0.9);
}
.bubble-row.candidate .hud-bubble {
  border-right: 3px solid #e8d36a;
  background: rgba(28, 26, 18, 0.9);
}
.hud-bubble .name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.bubble-row.clara .name { color: #3dd68c; }
.bubble-row.candidate .name { color: #e8d36a; }
.hud-bubble .said {
  color: #ececec;
  font-size: 0.94rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.hud-bubble .when {
  display: block;
  margin-top: 6px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  color: #3dd68c;
}
.bubble-row.candidate .when { color: #9a9a9a; text-align: right; }
.hud-bubble.partial { opacity: 0.7; }
.hud-empty { color: #4d7c86; font-family: "Share Tech Mono", monospace; font-size: 0.78rem; }

@media (max-width: 1100px) {
  .hud { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding: 8px; }
  .hud-top { grid-template-columns: 1fr; }
  .hud-power { align-items: flex-start; }
  .hud-svg { height: 300px; min-height: 260px; }
  .hud-bubbles { min-height: 320px; }
}
