:root {
  color-scheme: dark light;
  --bg: #0f1419;
  --surface: #171f27;
  --surface-2: #1f2a35;
  --border: #2a3744;
  --fg: #ecf2f8;
  --muted: #93a4b5;
  --accent: #2dd4bf;
  --accent-bg: rgba(45, 212, 191, 0.14);
  --danger: #f87171;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.shell { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-badge {
  padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 12px;
  background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent);
}
.brand-title { font-size: 18px; font-weight: 800; }
.brand-sub { font-size: 12px; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; margin-bottom: 16px;
}
.unlock-card { max-width: 520px; margin: 36px auto; }
.unlock-card h1 { margin: 0 0 8px; font-size: 21px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--fg); font: inherit;
}
.input.small { width: auto; padding: 6px 10px; font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.btn {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--accent); color: #08201e; border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 8px; }
.alert.warn { background: rgba(251, 191, 36, 0.14); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.3); }
.alert.error { background: rgba(248, 113, 113, 0.14); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.3); }
.status-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-val { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.card-head h2 { margin: 0; font-size: 15.5px; }
.pill {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent);
}
.chart-box { min-height: 170px; display: flex; align-items: flex-end; gap: 6px; padding-top: 12px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.bar-fill { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height 0.2s; }
.bar-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bars-list { display: flex; flex-direction: column; gap: 9px; }
.app-row { display: flex; flex-direction: column; gap: 4px; }
.app-row-top { display: flex; justify-content: space-between; font-size: 13px; }
.app-track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.app-progress { height: 100%; background: var(--accent); border-radius: 999px; }
.audit-list { display: flex; flex-direction: column; gap: 8px; }
.audit-row { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
