:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(21, 25, 34, 0.86);
  --panel-strong: #151923;
  --text: #f3f0e8;
  --muted: #a7adba;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #d9b66f;
  --gold-strong: #f1cc7d;
  --blue: #82aaff;
  --red: #ff6b6b;
  --green: #72d68b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 182, 111, 0.20), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(130, 170, 255, 0.14), transparent 30rem),
    var(--bg);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-strong);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

h1, h2, h3 { margin: 0; line-height: 1.05; }
h1 { font-size: clamp(2.1rem, 5vw, 4.8rem); letter-spacing: -0.06em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

.status-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 250px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}
.hero-side { display: grid; gap: 12px; justify-items: end; }
.dashboard-link, .ghost-link {
  color: var(--gold-strong);
  text-decoration: none;
  border: 1px solid rgba(217, 182, 111, 0.36);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(217, 182, 111, 0.10);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.dashboard-link:hover, .ghost-link:hover { border-color: var(--gold-strong); background: rgba(217, 182, 111, 0.18); }
.status-card small { color: var(--muted); display: block; margin-top: 4px; }
.dot { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
.dot.pending { background: var(--gold); box-shadow: 0 0 16px var(--gold); }
.dot.ok { background: var(--green); box-shadow: 0 0 16px var(--green); }
.dot.bad { background: var(--red); box-shadow: 0 0 16px var(--red); }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 22px;
}

.voice-panel, .workflow-panel { padding: 24px; }
.panel-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 20px; }
.toggle { color: var(--muted); font-size: 0.92rem; }
.badge {
  color: var(--gold-strong);
  border: 1px solid rgba(217, 182, 111, 0.35);
  background: rgba(217, 182, 111, 0.10);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.controls.compact { margin-top: 12px; }
button, select, textarea {
  font: inherit;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
button, select { padding: 11px 14px; }
button { cursor: pointer; transition: transform 120ms ease, border-color 120ms ease, background 120ms ease; }
button:hover { transform: translateY(-1px); border-color: rgba(217,182,111,0.65); }
button:disabled { opacity: 0.55; cursor: wait; transform: none; }
.primary { background: linear-gradient(135deg, #d9b66f, #8e6b2d); color: #16120a; font-weight: 800; }
.secondary { background: rgba(130, 170, 255, 0.12); }
.ghost { background: transparent; }

textarea {
  width: 100%;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
  outline: none;
}
textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 182, 111, 0.14); }

.transcript {
  min-height: 360px;
  max-height: 560px;
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
}
.message { margin: 0 0 14px; padding: 14px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; }
.message.user { background: rgba(217,182,111,0.12); border: 1px solid rgba(217,182,111,0.22); }
.message.assistant { background: rgba(130,170,255,0.10); border: 1px solid rgba(130,170,255,0.20); }
.message.system { color: var(--muted); background: rgba(255,255,255,0.04); }
.message strong { display: block; margin-bottom: 5px; color: var(--gold-strong); }

.workflow-card {
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}
.quick-actions { display: grid; gap: 10px; }
.quick-actions button { text-align: left; }

.command-body {
  background:
    linear-gradient(rgba(130, 170, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 170, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(0, 221, 255, 0.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(217, 182, 111, 0.14), transparent 28rem),
    #05070c;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}
.command-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(130, 170, 255, 0.22);
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(16px);
}
.brand-lockup, .command-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-mark { color: #62e6ff; font-size: 1.8rem; text-shadow: 0 0 20px rgba(98,230,255,0.75); }
.brand-lockup h1 { font-size: 1.25rem; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-lockup p { margin: 4px 0 0; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }
.system-badge {
  border: 1px solid rgba(217, 182, 111, 0.4);
  color: var(--gold-strong);
  background: rgba(217, 182, 111, 0.11);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.system-badge.ok { border-color: rgba(114, 214, 139, 0.5); color: var(--green); background: rgba(114, 214, 139, 0.10); }
.system-badge.bad { border-color: rgba(255, 107, 107, 0.5); color: var(--red); background: rgba(255, 107, 107, 0.10); }
.command-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(130, 170, 255, 0.16);
  background: rgba(8, 13, 22, 0.74);
}
.command-nav a {
  color: #9fdcff;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.command-nav a:hover { color: #fff; background: rgba(98,230,255,0.10); }
.command-shell { width: min(1440px, calc(100vw - 32px)); margin: 0 auto; padding: 20px 0 34px; }
.command-grid { display: grid; gap: 18px; }
.top-grid { grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.9fr) minmax(360px, 1fr); }
.middle-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.55fr); margin-top: 18px; }
.command-panel {
  border: 1px solid rgba(98, 230, 255, 0.22);
  background: linear-gradient(180deg, rgba(11, 22, 34, 0.90), rgba(8, 11, 18, 0.88));
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 20px 70px rgba(0,0,0,0.30);
  padding: 18px;
}
.command-panel-title {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #b8efff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 16px;
}
.command-panel-title span { color: #62e6ff; }
.orb-wrap { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: center; }
.health-orb {
  width: 168px;
  height: 168px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(114,214,139,0.16) 0 48%, transparent 49%), conic-gradient(var(--green) 0 92%, rgba(255,255,255,0.08) 92% 100%);
  box-shadow: 0 0 36px rgba(114,214,139,0.24), inset 0 0 40px rgba(0,0,0,0.55);
}
.health-orb strong { font-size: 2.5rem; letter-spacing: -0.08em; }
.health-orb small, .metric-row small, .confidence small { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.mini-status-list { display: grid; gap: 9px; }
.mini-status-list div, .platform-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 9px; align-items: center; }
.mini-status-list b, .platform-row b { font-size: 0.88rem; }
.mini-status-list em, .platform-row em { color: #9fdcff; font-size: 0.76rem; font-style: normal; }
.vault-panel { display: grid; align-content: start; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.metric-row div { border-left: 2px solid rgba(98,230,255,0.45); padding-left: 12px; }
.metric-row strong { display: block; color: #f7fbff; font-size: clamp(1.7rem, 4vw, 3rem); letter-spacing: -0.05em; }
.command-note { color: var(--muted); line-height: 1.55; margin: 24px 0 0; }
.platform-status-list { display: grid; gap: 12px; }
.platform-row { padding: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.035); }
.platform-row small { color: var(--muted); display: block; margin-top: 3px; }
.telemetry-strip {
  display: flex;
  gap: 22px;
  overflow: hidden;
  margin: 18px 0;
  padding: 11px 14px;
  border: 1px solid rgba(98,230,255,0.18);
  color: #9fdcff;
  background: rgba(98,230,255,0.06);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.route-map { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 26px; position: relative; }
.route-arrow { display: none; }
.route-column { display: grid; gap: 10px; align-content: start; }
.route-column h3 { color: var(--gold-strong); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; }
.route-column span {
  display: block;
  border: 1px solid rgba(98,230,255,0.25);
  background: rgba(98,230,255,0.065);
  padding: 12px;
  color: #dcefff;
}
.route-column.process span { border-color: rgba(217, 182, 111, 0.33); background: rgba(217, 182, 111, 0.07); }
.route-column.vault span { border-color: rgba(187, 134, 252, 0.36); background: rgba(187, 134, 252, 0.07); }
.route-column.surfaces span { border-color: rgba(114, 214, 139, 0.33); background: rgba(114, 214, 139, 0.07); }
.confidence { display: grid; gap: 4px; margin: 12px 0 22px; }
.confidence strong { color: var(--green); font-size: 3.6rem; letter-spacing: -0.08em; }
.bar-row { display: grid; gap: 7px; margin: 14px 0; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.bar-row i { display: block; height: 9px; border-radius: 999px; background: linear-gradient(90deg, #62e6ff, var(--green)) 0/var(--w) 100% no-repeat, rgba(255,255,255,0.08); }
.launchpad-panel { margin-top: 18px; }
.launchpad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.launch-card {
  min-height: 142px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(98,230,255,0.18);
  background: rgba(255,255,255,0.035);
  padding: 14px 14px 14px 16px;
  display: grid;
  gap: 7px;
  border-left: 3px solid #62e6ff;
}
.launch-card:hover { background: rgba(98,230,255,0.08); border-color: rgba(98,230,255,0.38); }
.launch-card strong { color: #f7fbff; }
.launch-card small { color: #9fdcff; overflow-wrap: anywhere; }
.launch-card span { color: var(--muted); line-height: 1.45; }
.launch-card.stripe-2 { border-left-color: var(--gold-strong); }
.launch-card.stripe-3 { border-left-color: #bb86fc; }
.launch-card.stripe-4 { border-left-color: var(--green); }
.utility-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.utility-links a {
  color: #9fdcff;
  text-decoration: none;
  border: 1px solid rgba(98,230,255,0.24);
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.utility-links a:hover { background: rgba(98,230,255,0.08); }

@media (max-width: 1100px) {
  .top-grid, .middle-grid, .launchpad-grid { grid-template-columns: 1fr; }
  .route-map { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero, .panel-header, .command-topbar { flex-direction: column; align-items: stretch; }
  .hero-side { justify-items: stretch; width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .status-card { width: 100%; }
  .orb-wrap, .route-map, .metric-row { grid-template-columns: 1fr; }
}
