:root {
  color-scheme: dark;
  --page: #081225;
  --panel: #172438;
  --panel-2: #22314a;
  --panel-3: #2a3952;
  --line: #334660;
  --line-strong: #4a5d78;
  --text: #f7f9fc;
  --muted: #9eacc0;
  --muted-2: #71829d;
  --blue: #3b8cff;
  --cyan: #20d5f5;
  --green: #00e783;
  --amber: #ffcc00;
  --red: #ff3548;
  --purple: #b45cff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--text); }
button { font: inherit; }
.showroom-shell { max-width: 1840px; margin: 0 auto; padding: 28px 32px 40px; }
.tower-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 38px; }
.brand { display: flex; gap: 18px; align-items: flex-start; min-width: 0; }
.brand-icon { flex: 0 0 auto; width: 48px; height: 48px; color: var(--blue); }
h1 { margin: 0; font-size: clamp(32px, 3vw, 48px); line-height: 1.05; letter-spacing: 0; font-weight: 820; }
h2 { margin: 0; font-size: clamp(22px, 2vw, 32px); line-height: 1.2; letter-spacing: 0; font-weight: 820; }
h3 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: 0; font-weight: 820; }
p { margin: 14px 0 0; color: var(--muted); line-height: 1.48; font-size: 23px; font-weight: 650; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.nav-button, .system-pill, .chip, .status-pill { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 14px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 24px; color: var(--text); background: linear-gradient(180deg, #22314a, #172438); font-weight: 800; white-space: nowrap; text-decoration: none; }
.system-pill { border-color: #00c874; color: var(--green); background: rgba(0, 231, 131, .08); font-size: 24px; }
.chip { border-radius: 999px; color: var(--muted); padding: 7px 14px; min-height: 34px; }
.panel { margin-top: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 36px; box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.label, .kpi span, .metric-box span, .ledger-box span { color: var(--muted); font-size: 17px; font-weight: 720; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { min-height: 92px; border-radius: 14px; border: 1px solid var(--line); background: #101b2e; padding: 18px; }
.kpi strong { display: block; margin-top: 8px; font-size: 28px; line-height: 1; font-weight: 840; font-variant-numeric: tabular-nums; }
.kpi small { display: block; margin-top: 8px; color: var(--muted-2); font-weight: 700; }
.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mission-card { position: relative; min-height: 216px; border-radius: 14px; border: 3px solid var(--line-strong); background: var(--panel-2); padding: 26px; text-align: left; color: var(--text); }
.mission-card .dot { position: absolute; top: 26px; right: 26px; width: 12px; height: 12px; border-radius: 999px; background: var(--green); }
.mission-card.blue .dot { background: var(--blue); }
.mission-card.amber .dot { background: var(--amber); }
.mission-card.red .dot { background: var(--red); }
.mission-card.purple .dot { background: var(--purple); }
.mission-card.cyan .dot { background: var(--cyan); }
.mission-icon { width: 36px; height: 36px; margin-bottom: 24px; color: var(--blue); }
.mission-card.amber .mission-icon { color: var(--amber); }
.mission-card.red .mission-icon { color: var(--red); }
.mission-card.purple .mission-icon { color: var(--purple); }
.mission-card.cyan .mission-icon { color: var(--cyan); }
.mission-desc { color: var(--muted); font-size: 17px; font-weight: 700; margin-top: 10px; }
.mission-status { margin-top: 16px; color: var(--muted-2); font-size: 18px; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; }
.metrics-panel { overflow: hidden; padding: 0; }
.tab-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tab-button { min-height: 72px; border: 0; background: #172438; color: var(--muted); font-size: 24px; font-weight: 820; cursor: pointer; }
.tab-button.active { background: #33435b; color: var(--text); }
.tab-pane { padding: 42px 38px 36px; }
.tab-pane[hidden] { display: none; }
.finops-panel.abort { background: linear-gradient(180deg, rgba(255,53,72,.12), rgba(255,53,72,.06)); }
.finops-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.abort-badge { border: 0; border-radius: 999px; padding: 12px 22px; color: #fff; background: #f10f22; font-size: 22px; font-weight: 900; }
.finops-chart { width: 100%; height: 310px; display: block; }
.threshold-label { fill: var(--red); font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.metric-pair, .compression-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.metric-box, .compression-card { min-height: 108px; border-radius: 12px; background: var(--panel-3); padding: 20px; }
.metric-box strong, .compression-card strong { display: block; margin-top: 10px; color: var(--blue); font-size: 30px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.metric-box strong.danger-text { color: #ff6b74; }
.compression-card.wide { grid-column: 1 / -1; }
.velocity-alert { margin-top: 26px; border: 3px solid var(--red); border-radius: 12px; background: rgba(255,53,72,.22); padding: 28px; }
.velocity-alert strong { color: #ff7c84; display: block; font-size: 25px; letter-spacing: .04em; margin-bottom: 16px; }
.lookbook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.lookbook-card { min-height: 342px; border-radius: 14px; border: 3px solid var(--blue); background: #172438; padding: 38px; display: flex; flex-direction: column; justify-content: space-between; }
.lookbook-card.purple { border-color: var(--purple); }
.lookbook-card.green { border-color: var(--green); }
.lookbook-card p { font-size: 21px; font-weight: 720; }
.lookbook-card button { border: 0; background: transparent; color: var(--blue); padding: 0; text-align: left; font-size: 21px; font-weight: 820; cursor: pointer; }
.lookbook-card.purple button { color: #cf7cff; }
.lookbook-card.green button { color: var(--green); }
.events { display: grid; gap: 12px; }
.event-row { min-height: 86px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; border-radius: 14px; border: 1px solid rgba(0,231,131,.28); background: rgba(0,231,131,.055); padding: 22px 24px; }
.event-row.deny { border-color: rgba(255,53,72,.72); background: rgba(255,53,72,.055); }
.event-row.hold { border-color: rgba(255,204,0,.72); background: rgba(255,204,0,.07); }
.event-kind, .event-time { color: var(--muted-2); font-size: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 760; }
.event-name { margin-left: 22px; color: var(--text); font-size: 22px; font-weight: 820; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.event-reason { margin-top: 10px; color: var(--muted); font-size: 16px; font-weight: 720; }
.status-pill { min-height: 36px; border: 0; border-radius: 999px; padding: 7px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.status-pill.allow { color: var(--green); background: rgba(0,231,131,.16); }
.status-pill.deny { color: #ff737d; background: rgba(255,53,72,.23); }
.status-pill.hold { color: var(--amber); background: rgba(255,204,0,.20); }
.ledger-box { margin-top: 36px; border: 1px solid var(--line); border-radius: 14px; background: #101b2e; padding: 28px; }
.ledger-box code { display: block; margin-top: 18px; color: var(--cyan); font-size: 17px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; overflow-wrap: anywhere; }
.mcp-lab-grid { display: grid; grid-template-columns: 1.05fr 1.25fr .9fr; gap: 18px; align-items: stretch; }
.lab-card { min-height: 270px; border: 1px solid var(--line); border-radius: 14px; background: #101b2e; padding: 22px; }
.lab-card.accent { border-color: rgba(59,140,255,.72); background: rgba(59,140,255,.055); }
.lab-card.abort { border-color: rgba(255,53,72,.72); background: rgba(255,53,72,.08); }
.lab-card h3 { margin-top: 10px; }
.lab-command { width: 100%; min-height: 122px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 12px; background: #07101f; color: var(--text); padding: 14px; margin-top: 16px; font: 700 15px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.lab-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.lab-action { border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--panel-2); min-height: 46px; padding: 10px 14px; font-weight: 820; cursor: pointer; }
.lab-action.safe { border-color: rgba(0,231,131,.58); color: var(--green); }
.lab-action.attack { border-color: rgba(255,53,72,.58); color: #ff737d; }
.trace-list { display: grid; gap: 12px; margin-top: 16px; }
.trace-item { border-radius: 12px; background: var(--panel-2); padding: 14px; border-left: 4px solid var(--blue); }
.trace-item.red { border-left-color: var(--red); }
.trace-item.green { border-left-color: var(--green); }
.trace-item.amber { border-left-color: var(--amber); }
.trace-item span { display: block; color: var(--muted); font-size: 13px; font-weight: 780; text-transform: uppercase; letter-spacing: .04em; }
.trace-item strong { display: block; margin-top: 6px; color: var(--text); font: 760 15px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; overflow-wrap: anywhere; }
.velocity-meter { margin-top: 18px; height: 18px; border-radius: 999px; background: #07101f; overflow: hidden; border: 1px solid var(--line); }
.velocity-fill { display: block; height: 100%; width: var(--fill); background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: inherit; }
.velocity-fill.abort { background: linear-gradient(90deg, var(--red), #ff8b95); }
.lab-result { margin-top: 18px; min-height: 116px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; background: #07101f; color: #dbe7f3; padding: 18px; border-radius: 10px; border: 1px solid var(--line); max-height: 420px; overflow: auto; }
@media (max-width: 980px) {
  .showroom-shell { padding: 18px; }
  .tower-header { flex-direction: column; }
  .kpi-grid, .mission-grid, .lookbook-grid, .metric-pair, .compression-grid, .mcp-lab-grid { grid-template-columns: 1fr; }
  .compression-card.wide { grid-column: auto; }
  .event-row { grid-template-columns: 1fr; }
}
