/* ============================================================
   屏藩 PINGFAN · 集团网络安全智能运营中枢
   设计语言：墨黑值守台 + 琥珀仪表 + 终端等宽字
   离线运行，无 CDN、无外部字体
   ============================================================ */

:root {
  --bg: #070a09;
  --bg-2: #0a0e0c;
  --panel: #0e1411;
  --panel-2: #121a16;
  --panel-3: #17211c;
  --line: #222c26;
  --line-2: #2d3a33;
  --line-3: #3a4a40;
  --ink: #e9eee9;
  --ink-2: #c3cec6;
  --muted: #85938a;
  --muted-2: #647168;
  --muted-3: #4d5a52;
  --amber: #e0a63c;
  --amber-2: #f2c877;
  --amber-dim: #8a6a24;
  --danger: #e2543c;
  --danger-2: #ff8a72;
  --safe: #3fa383;
  --safe-2: #7fd0b3;
  --info: #5b9ec6;
  --violet: #9b8ad6;
  --red-bg: #26120f;
  --amber-bg: #251d0e;
  --safe-bg: #0e211a;
  --info-bg: #101e26;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Courier New", monospace;
  --display: "Bahnschrift SemiCondensed", "Bahnschrift", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "SimSun", Georgia, serif;
  --shadow: 0 12px 34px rgba(0, 0, 0, .45);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .68);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% -6%, rgba(224, 166, 60, .07), transparent 40%),
    radial-gradient(ellipse at 92% 4%, rgba(63, 163, 131, .05), transparent 36%),
    radial-gradient(ellipse at 50% 120%, rgba(224, 166, 60, .04), transparent 50%),
    linear-gradient(180deg, #080b09, #060907 60%, #070a08);
  overflow: hidden;
}

button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }
.ic { width: 15px; height: 15px; flex: 0 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--amber); color: #1a1204; padding: 8px 14px; font-size: 12px;
}
.skip-link:focus { top: 10px; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0e0c; }
::-webkit-scrollbar-thumb { background: #26332b; border: 1px solid #0a0e0c; }
::-webkit-scrollbar-thumb:hover { background: #34453a; }

/* ============================== Shell ============================== */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 1420px;
  position: relative;
}

/* ---------------- Top bar ---------------- */
.topbar {
  flex: 0 0 62px;
  height: 62px;
  display: grid;
  grid-template-columns: minmax(440px, 1.1fr) minmax(380px, 1fr) minmax(470px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background:
    linear-gradient(180deg, rgba(30, 40, 34, .55), rgba(9, 13, 11, .96)),
    linear-gradient(90deg, #090d0b, #0d1310);
  border-bottom: 1px solid #2a352e;
  position: relative;
  z-index: 30;
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 166, 60, .5), rgba(63, 163, 131, .28), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seal {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1a231c, #0d1310);
  border: 1px solid #4a5c4c;
  color: var(--amber-2);
  font-family: var(--serif);
  font-size: 24px; font-weight: 700; line-height: 1;
  position: relative;
  text-shadow: 0 0 14px rgba(224, 166, 60, .45);
}
.seal::after {
  content: ""; position: absolute; inset: 3px; border: 1px solid rgba(224, 166, 60, .28);
}
.brand-copy { min-width: 0; }
.brand-line { display: flex; align-items: baseline; gap: 9px; }
.brand-line strong {
  font-family: var(--serif);
  font-size: 21px; letter-spacing: .18em; color: #f4f1e6; line-height: 1;
}
.brand-line span {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .34em; color: #7b8a80;
}
.brand-sub {
  margin-top: 4px; font-size: 10.5px; color: #98a59b; letter-spacing: .06em;
}
.brand-org {
  display: flex; align-items: center; gap: 7px; margin-top: 3px;
  font-size: 9.5px; color: #6f7d74;
}
.brand-org b { color: #c8b184; font-weight: 400; }
.brand-org i { color: #435048; font-style: normal; }

.top-center { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.soc-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #cfd9d2; letter-spacing: .04em;
}
.soc-line b { color: var(--amber-2); font-weight: 400; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--safe); box-shadow: 0 0 8px var(--safe);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }
.env-line {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 9.5px; color: #76857b; letter-spacing: .03em;
}
.env-line i { color: #3d4a42; font-style: normal; }
.threat-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 18px; padding: 0 7px; font-size: 9px;
  color: #ffb59f; background: #2a120e; border: 1px solid #713326;
  letter-spacing: .08em;
}
.threat-tag b { color: #ffd0c2; font-weight: 400; }

.top-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.clock-box { text-align: right; line-height: 1.15; }
.clock-box b {
  display: block; font-family: var(--mono); font-size: 22px;
  color: #f1e8d4; letter-spacing: .04em;
}
.clock-box span { font-size: 8.5px; color: #6f7d74; letter-spacing: .1em; }
.role-picker {
  display: flex; flex-direction: column; gap: 2px;
  border-left: 1px solid #2a352e; padding-left: 12px;
}
.role-picker > span {
  font-size: 8px; letter-spacing: .16em; color: #68766d;
}
.role-picker select {
  appearance: none;
  background: #121a15;
  border: 1px solid #33433a;
  color: #e7eee6;
  font-size: 11px;
  height: 26px;
  padding: 0 24px 0 8px;
  background-image: linear-gradient(45deg, transparent 50%, #8a9a90 50%), linear-gradient(135deg, #8a9a90 50%, transparent 50%);
  background-position: calc(100% - 12px) 11px, calc(100% - 8px) 11px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.role-picker select:hover { border-color: #55705f; }

/* ---------------- Log ticker ---------------- */
.ticker {
  flex: 0 0 26px;
  height: 26px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: #050807;
  border-bottom: 1px solid #1b241f;
  overflow: hidden;
}
.tk-label {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  color: var(--amber); border: 1px solid #463718; background: #1a140a;
  padding: 1px 6px; line-height: 1.4;
}
.tk-track {
  display: flex; gap: 36px; white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; color: #6f7f75;
  animation: ticker 52s linear infinite;
}
.tk-track em { font-style: normal; color: var(--amber-2); }
.tk-track i { font-style: normal; color: var(--danger-2); }
.tk-track s { text-decoration: none; color: var(--safe-2); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- KPI strip ---------------- */
.kpis {
  flex: 0 0 86px;
  height: 86px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  background: linear-gradient(180deg, #0c1210, #090d0b);
  border-bottom: 1px solid #232d27;
}
.kpi {
  padding: 9px 14px;
  border-right: 1px solid #1b2320;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  position: relative; overflow: hidden;
}
.kpi:last-child { border-right: 0; }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 2px; background: #2a352e;
}
.kpi.risk::before { background: var(--danger); }
.kpi.warn::before { background: var(--amber); }
.kpi.ok::before { background: var(--safe); }
.kpi.info::before { background: var(--info); }
.kpi-label {
  font-size: 9.5px; color: #82908a; letter-spacing: .05em;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.kpi-label em {
  font-style: normal; font-family: var(--mono); font-size: 7.5px;
  letter-spacing: .12em; color: #55625a;
}
.kpi-value {
  font-family: var(--display);
  font-size: 27px; line-height: 1.02; letter-spacing: .01em;
  color: #eef3ec; display: flex; align-items: baseline; gap: 3px;
}
.kpi-value .unit { font-size: 10px; color: #7e8c83; font-family: var(--sans); letter-spacing: 0; }
.kpi-value .small { font-size: 14px; color: #a9b6ad; }
.kpi-sub {
  font-size: 9px; color: #65736a; display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.kpi-sub .delta { font-family: var(--mono); }
.delta.up { color: var(--danger-2); }
.delta.down { color: var(--safe-2); }
.kpi-risk .kpi-value { color: var(--amber-2); }

/* ---------------- Workbench ---------------- */
.workbench { flex: 1 1 auto; display: flex; min-height: 0; }

.rail {
  flex: 0 0 196px; width: 196px;
  background: linear-gradient(180deg, #0a0f0c, #080b09 70%);
  border-right: 1px solid #1f2823;
  display: flex; flex-direction: column;
  padding: 10px 0 0;
  min-height: 0;
}
.rail-head {
  padding: 0 14px 9px;
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 9px; letter-spacing: .18em; color: #617067;
}
.rail-head b { font-size: 10px; color: #93a198; font-weight: 400; letter-spacing: .1em; }
.rail-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 14px 9px 12px;
  background: none; border: 0; border-left: 2px solid transparent;
  color: #95a29a; text-align: left;
  transition: background .16s, color .16s, border-color .16s;
}
.rail-item:hover { background: #101713; color: #e2eae3; }
.rail-item.active {
  background: linear-gradient(90deg, rgba(224, 166, 60, .14), rgba(224, 166, 60, .02) 65%, transparent);
  border-left-color: var(--amber);
  color: #f4f6f0;
}
.ri-no {
  font-family: var(--mono); font-size: 9px; color: #59675e; width: 16px;
}
.rail-item.active .ri-no { color: var(--amber); }
.ri-copy { flex: 1; min-width: 0; }
.ri-copy b { display: block; font-size: 12px; font-weight: 400; letter-spacing: .04em; line-height: 1.35; }
.ri-copy i {
  display: block; font-style: normal; font-family: var(--mono);
  font-size: 7.5px; letter-spacing: .12em; color: #57645b; margin-top: 1px;
}
.ri-badge {
  min-width: 18px; height: 16px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px;
  background: #2a1c0c; color: var(--amber-2); border: 1px solid #5a431a;
}
.ri-badge.hot { background: #2a120e; color: #ff9d86; border-color: #6d2f24; }
.rail-side {
  margin-top: auto; padding: 12px 14px;
  border-top: 1px solid #1c2420;
  font-size: 9px; color: #6c7a71; line-height: 1.7;
}
.rail-side b { color: #a8b5ac; font-weight: 400; }
.rail-side .mono { color: #8d9c92; }
.rail-tag {
  display: inline-block; margin-bottom: 6px; padding: 1px 6px;
  font-size: 8px; letter-spacing: .12em; color: #9fd6c1;
  border: 1px solid #295a49; background: #0d201a;
}
.rail-playbook { margin-top: 8px; display: grid; gap: 3px; }
.rail-playbook span { display: flex; gap: 6px; font-size: 9px; color: #7a897f; }
.rail-playbook b { font-family: var(--mono); color: #b8933f; font-weight: 400; }

.content {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  padding: 12px 14px 14px;
  overflow: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.view { display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.view-enter { animation: viewIn .34s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; }
.c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.h-310 { height: 310px; } .h-330 { height: 330px; } .h-340 { height: 340px; }
.h-360 { height: 360px; } .h-372 { height: 372px; } .h-400 { height: 400px; }
.h-420 { height: 420px; } .h-440 { height: 440px; } .h-450 { height: 450px; } .h-470 { height: 470px; } .h-520 { height: 520px; }
.h-390 { height: 390px; }
.h-560 { height: 560px; } .h-640 { height: 640px; } .h-830 { height: 830px; }
.h-96 { height: 96px; } .h-120 { height: 120px; } .h-250 { height: 250px; } .h-290 { height: 290px; }

/* ---------------- Panels & common ---------------- */
.panel {
  background: linear-gradient(180deg, #111815, #0c120f 78%);
  border: 1px solid #232e27;
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  position: relative;
}
.panel::after {
  content: ""; position: absolute; pointer-events: none;
  right: 5px; top: 5px; width: 6px; height: 6px;
  border-top: 1px solid #3d4d42; border-right: 1px solid #3d4d42;
  opacity: .7;
}
.panel.dim { background: linear-gradient(180deg, #0e1411, #0a0f0c); }
.ph {
  flex: 0 0 38px; height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #1e2722;
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent);
}
.ph-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ph-title b { font-size: 12px; font-weight: 400; letter-spacing: .05em; color: #e9eee7; white-space: nowrap; }
.ph-title span {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; color: #5d6a61;
  white-space: nowrap;
}
.ph-title .dot {
  width: 4px; height: 4px; background: var(--amber); align-self: center;
}
.ph-tools { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #7d8b82; white-space: nowrap; }
.ph-tools a, .ph-tools button {
  background: none; border: 0; padding: 0; color: #9fb0a5; font-size: 10px;
}
.ph-tools a:hover, .ph-tools button:hover { color: var(--amber-2); text-decoration: none; }
.ph-tools .sep { color: #3b4a41; }
.pb { padding: 12px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.pb.tight { padding: 8px; }
.pb.flush { padding: 0; overflow: auto; }
.pb.col { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: #16201b; border: 1px solid #34433a; color: #dde5de;
  font-size: 11px; letter-spacing: .03em; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #1b2721; border-color: #4d6553; }
.btn.primary {
  background: linear-gradient(180deg, #3b2c11, #291e0b);
  border-color: #8a6a24; color: #f4d99f;
}
.btn.primary:hover { background: linear-gradient(180deg, #4a3813, #33250d); border-color: #c39232; }
.btn.danger { background: #2a1310; border-color: #7a3327; color: #f5a48f; }
.btn.danger:hover { background: #351712; border-color: #a2452f; }
.btn.safe { background: #0f241d; border-color: #2c6b55; color: #9fe0c8; }
.btn.safe:hover { background: #143026; border-color: #3d8a6e; }
.btn.ghost { background: transparent; border-color: #2a352f; color: #a4b3a8; }
.btn.ghost:hover { border-color: #45584c; color: #e2eae3; }
.btn.sm { height: 24px; padding: 0 9px; font-size: 10px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .38; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 6px;
  font-size: 9px; letter-spacing: .05em; white-space: nowrap;
  border: 1px solid #33423a; color: #a8b6ac; background: #131b17;
}
.chip.sev5 { color: #ff9d86; border-color: #6d2f24; background: #2a1411; }
.chip.sev3 { color: #f0c168; border-color: #6a5019; background: #251d0e; }
.chip.sev1 { color: #8fc4e0; border-color: #295166; background: #101e26; }
.chip.sev05 { color: #a3b1a7; border-color: #3a4740; background: #141b17; }
.chip.safe { color: #8dd6bb; border-color: #245c49; background: #0e211a; }
.chip.danger { color: #ff9d86; border-color: #6d2f24; background: #2a1411; }
.chip.amber { color: #f0c168; border-color: #6a5019; background: #251d0e; }
.chip.info { color: #8fc4e0; border-color: #295166; background: #101e26; }
.chip.violet { color: #bcb0ea; border-color: #4a3f74; background: #171327; }
.chip.plain { border-color: #2a352f; background: transparent; color: #92a097; }
.chip .mono { font-size: 8.5px; }

.tag {
  display: inline-block; padding: 1px 5px; font-size: 9px;
  border: 1px solid #33423a; color: #9faea4; background: #121a16;
}
.tag.dyn { border-color: #6a5019; color: #f0c168; background: #221a0c; }

.bar { height: 4px; background: #1a231e; position: relative; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); }
.bar > i.safe { background: var(--safe); }
.bar > i.danger { background: var(--danger); }
.bar > i.info { background: var(--info); }
.bar.risk > i { background: linear-gradient(90deg, #3fa383, #d9a441 55%, #e2543c); }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.amber { color: var(--amber-2); }
.danger { color: var(--danger-2); }
.safe { color: var(--safe-2); }
.info { color: var(--info); }
.tiny { font-size: 9.5px; }
.hr { height: 1px; background: #1e2722; margin: 8px 0; }
.note {
  font-size: 9.5px; color: #6f7d74; line-height: 1.7;
  border-left: 1px solid #3a4a40; padding-left: 8px;
}
.note b { color: #a9b7ad; font-weight: 400; }
.kv { display: grid; grid-template-columns: 72px 1fr; gap: 4px 10px; font-size: 10.5px; }
.kv dt { color: #718077; }
.kv dd { margin: 0; color: #cdd8d0; }
.empty { color: #6a786f; font-size: 11px; padding: 18px; text-align: center; }

/* ---------------- Tables ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.tbl th {
  position: sticky; top: 0; z-index: 2;
  background: #0d1310;
  color: #74837a; font-weight: 400; text-align: left;
  padding: 6px 8px; border-bottom: 1px solid #26312a;
  font-size: 9px; letter-spacing: .07em; white-space: nowrap;
}
.tbl td { padding: 5px 8px; border-bottom: 1px solid #19211d; color: #c5d0c8; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #121a16; }
.tbl tr.sel td { background: #17231c; }
.tbl tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--amber); }
.tbl tr.clickable { cursor: pointer; }
.tbl .strong { color: #e8eee8; }
.tbl .right { text-align: right; }
.tbl .center { text-align: center; }
.tbl .nowrap { white-space: nowrap; }
.tbl .sub { display: block; font-size: 8.5px; color: #66746b; margin-top: 1px; }
.tbl-x { overflow: auto; }

/* ============================== Overview ============================== */
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.chart-legend { display: flex; gap: 14px; font-size: 9px; color: #7e8c83; padding: 0 2px 6px; }
.chart-legend i {
  display: inline-block; width: 8px; height: 8px; margin-right: 4px; vertical-align: -1px;
}
.chart-legend i.bar { background: linear-gradient(180deg, #6d5520, #3a2c12); }
.chart-legend i.bar-hot { background: linear-gradient(180deg, #e0a63c, #7a5716); }
.chart-legend i.line { background: var(--safe); }
.chart-svg { width: 100%; height: 100%; flex: 1 1 0; min-height: 0; }
.chart-foot {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 9px; color: #6b7970; padding-top: 4px;
}
.chart-foot b { color: #b9c6bc; font-weight: 400; }

.risk-hero { display: flex; align-items: flex-end; gap: 14px; }
.risk-num {
  font-family: var(--display); font-size: 56px; line-height: .92;
  color: var(--amber-2); letter-spacing: -.01em;
  text-shadow: 0 0 26px rgba(224, 166, 60, .22);
}
.risk-num small { font-size: 16px; color: #8b7a52; }
.risk-meta { padding-bottom: 4px; }
.risk-meta .lvl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: #ff9d86;
}
.risk-meta .lvl::before {
  content: ""; width: 6px; height: 6px; background: var(--danger);
  box-shadow: 0 0 8px rgba(226, 84, 60, .7);
}
.risk-meta p { margin: 4px 0 0; font-size: 9.5px; color: #728077; }
.risk-split { display: grid; gap: 7px; margin-top: 10px; }
.rs-row { display: grid; grid-template-columns: 64px 1fr 38px; align-items: center; gap: 8px; font-size: 9.5px; color: #93a198; }
.rs-row .bar { height: 5px; }
.rs-row b { font-family: var(--mono); font-weight: 400; color: #cdd8d0; text-align: right; font-size: 9.5px; }
.risk-formula {
  margin-top: 9px; padding: 7px 8px;
  background: #0a100d; border: 1px dashed #2b3831;
  font-family: var(--mono); font-size: 9px; color: #8d9c92; line-height: 1.75;
}
.risk-formula b { color: var(--amber-2); font-weight: 400; }

.zone-rows { display: grid; gap: 8px; }
.zone-row { display: grid; grid-template-columns: 86px 1fr 74px; gap: 9px; align-items: center; }
.zone-row .zname { font-size: 10.5px; color: #c4d0c7; }
.zone-row .zname small { display: block; font-family: var(--mono); font-size: 7.5px; color: #5d6a61; letter-spacing: .1em; }
.zone-row .zmeta { text-align: right; font-family: var(--mono); font-size: 9.5px; color: #93a198; }
.zone-row .zmeta b { color: #e3ebe4; font-weight: 400; }

.queue-list { display: flex; flex-direction: column; }
.q-item {
  display: grid; grid-template-columns: 42px 1fr auto;
  gap: 8px; align-items: start;
  padding: 8px 2px; border-bottom: 1px solid #1a231e;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  text-align: left; color: inherit; width: 100%;
}
.q-item:hover { background: #121a16; }
.q-item .qt { font-family: var(--mono); font-size: 9.5px; color: #7f8d84; padding-top: 2px; }
.q-item .qc b { display: block; font-size: 10.5px; font-weight: 400; color: #d6e0d8; line-height: 1.45; }
.q-item .qc span { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-size: 9px; color: #7e8c83; }
.q-item .qr { text-align: right; }
.q-item .qr b { font-family: var(--mono); font-size: 12px; color: var(--amber-2); font-weight: 400; }
.q-item .qr span { display: block; font-size: 8px; color: #637168; }

.audit-mini { display: flex; flex-direction: column; }
.am-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #1a231e; font-size: 9.5px;
}
.am-row .at { font-family: var(--mono); color: #738178; }
.am-row .ac b { color: #ccd7cf; font-weight: 400; }
.am-row .ac span { display: block; color: #6e7c73; font-size: 9px; }
.am-row .ah { font-family: var(--mono); font-size: 8.5px; color: #5e6c63; }

.ai-strip {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 0 16px; height: 100%;
}
.ai-strip .ai-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .1em; color: var(--amber-2);
  border: 1px solid #5a431a; background: #1d160a; padding: 7px 10px;
}
.ai-strip .ai-badge .ic { width: 18px; height: 18px; }
.ai-strip p { margin: 0; font-size: 11.5px; color: #c8d3cb; line-height: 1.6; }
.ai-strip p b { color: #f0d19a; font-weight: 400; }
.ai-strip .ai-nums { display: flex; gap: 18px; }
.ai-strip .ai-nums div { text-align: right; }
.ai-strip .ai-nums b { display: block; font-family: var(--display); font-size: 20px; color: #e9eee7; line-height: 1.1; }
.ai-strip .ai-nums span { font-size: 8.5px; color: #6f7d74; letter-spacing: .06em; }

/* ============================== Assets ============================== */
.topo { width: 100%; height: 100%; }
.topo .zbox { fill: rgba(255, 255, 255, .012); stroke: #2a352e; stroke-dasharray: 3 4; }
.topo .zlabel { fill: #7b8a80; font-size: 9px; letter-spacing: .12em; font-family: var(--mono); }
.topo .zsub { fill: #52605a; font-size: 7.5px; font-family: var(--mono); }
.topo .link { stroke: #33423a; stroke-width: 1; fill: none; }
.topo .link.hot { stroke: #7a4a2a; stroke-dasharray: 3 3; }
.topo .node rect { fill: #121a16; stroke: #39493f; stroke-width: 1; cursor: pointer; }
.topo .node:hover rect { stroke: #6b8774; fill: #17211c; }
.topo .node.sel rect { stroke: var(--amber); fill: #1d2415; }
.topo .node.risk-hi rect { stroke: #8a3a2b; }
.topo .node.risk-mid rect { stroke: #7a5d1e; }
.topo .node text { fill: #c3cec6; font-size: 8px; pointer-events: none; }
.topo .node .id { fill: #5f6d64; font-size: 7px; font-family: var(--mono); }
.topo .node .r { font-family: var(--mono); font-size: 7.5px; }
.topo .dot-red { fill: var(--danger); }
.topo .dot-amber { fill: var(--amber); }
.topo .dot-safe { fill: var(--safe); }
.topo-legend { display: flex; gap: 12px; font-size: 9px; color: #7c8a81; }
.topo-legend i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; vertical-align: 0; }

.asset-dossier { display: flex; flex-direction: column; gap: 8px; }
.dossier-row {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; align-items: center;
  padding: 5px 0; border-top: 1px solid #1a231e;
  font-size: 9px; color: #75847a;
}
.dossier-row b {
  font-weight: 400; color: #c3cec6; font-size: 9.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dossier-row em { font-style: normal; font-family: var(--mono); font-size: 8.5px; color: #8d9c92; }
.dossier-row:hover b { color: #f0c168; }
.ad-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ad-head h3 { margin: 0; font-size: 15px; font-weight: 400; letter-spacing: .03em; }
.ad-head p { margin: 3px 0 0; font-size: 9.5px; color: #74837a; font-family: var(--mono); }
.risk-ring {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring-c) calc(var(--ring-p) * 1%), #1b241f 0);
}
.risk-ring::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: #0d1310; border: 1px solid #26312a;
}
.risk-ring b { position: relative; font-family: var(--display); font-size: 20px; color: #edf2eb; line-height: 1; }
.risk-ring span { position: relative; font-size: 7px; color: #74837a; letter-spacing: .1em; }
.calc-box {
  background: #0a100d; border: 1px solid #202a24; padding: 9px 10px;
  font-family: var(--mono); font-size: 9px; color: #93a198; line-height: 1.7;
}
.calc-box .cl { display: flex; justify-content: space-between; gap: 12px; }
.calc-box .cl b { color: #dbe5dc; font-weight: 400; }
.calc-box .total { border-top: 1px dashed #2b3831; margin-top: 4px; padding-top: 4px; color: #f0c168; }
.calc-box .total b { color: #f0c168; }
.mini-sec h4 {
  margin: 0 0 5px; font-size: 9.5px; font-weight: 400; color: #8b9a90;
  letter-spacing: .12em; display: flex; justify-content: space-between;
}
.mini-sec h4 span { font-family: var(--mono); font-size: 8px; color: #5f6d64; }
.mini-list { display: grid; gap: 4px; }
.mini-list .ml {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 9.5px; padding: 4px 6px; background: #0c120f;
  border: 0; border-left: 1px solid #2c3a31; color: inherit; text-align: left;
}
.mini-list .ml b { font-weight: 400; color: #c5d1c8; }
.mini-list .ml span { color: #75847a; font-family: var(--mono); font-size: 8.5px; }

.vuln-plan { display: flex; flex-direction: column; height: auto; flex: 1 1 auto; min-height: 0; }
.vuln-plan .vp-list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.vp-row {
  display: grid; grid-template-columns: 18px 1fr 44px;
  gap: 8px; align-items: start; padding: 7px 2px;
  border-bottom: 1px solid #1a231e;
}
.vp-row:hover { background: #121a16; }
.vp-row .chk {
  width: 13px; height: 13px; margin-top: 3px; appearance: none;
  border: 1px solid #3b4a41; background: #0b110e; cursor: pointer;
  display: grid; place-items: center; position: relative;
}
.vp-row .chk:checked { border-color: var(--amber); background: #2a1f0c; }
.vp-row .chk:checked::after {
  content: ""; width: 6px; height: 3px; border-left: 1.5px solid var(--amber-2);
  border-bottom: 1.5px solid var(--amber-2); transform: rotate(-45deg) translateY(-1px);
}
.vp-row .vi b { display: block; font-size: 10px; font-weight: 400; color: #d5e0d7; }
.vp-row .vi span { display: block; font-family: var(--mono); font-size: 8.5px; color: #6e7c73; margin-top: 1px; }
.vp-row .vi em { font-style: normal; color: #8fa096; }
.vp-row .vp { text-align: right; }
.vp-row .vp b { display: block; font-family: var(--mono); font-size: 13px; color: #f0c168; font-weight: 400; }
.vp-row .vp span { font-size: 8px; color: #66746b; }
.vp-sum {
  border-top: 1px solid #26312a; padding-top: 8px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.vp-sum div { text-align: center; }
.vp-sum b { display: block; font-family: var(--display); font-size: 16px; color: #e9eee7; }
.vp-sum span { font-size: 8px; color: #6f7d74; letter-spacing: .04em; }
.vp-actions { display: flex; gap: 6px; margin-top: 8px; }
.vp-actions .btn { flex: 1; }

/* ============================== Triage ============================== */
.triage { display: grid; grid-template-columns: 388px minmax(0, 1fr); gap: 12px; height: 830px; }
.ev-queue { display: flex; flex-direction: column; min-height: 0; }
.ev-filters { display: flex; gap: 5px; padding: 8px 10px 7px; border-bottom: 1px solid #1e2722; flex-wrap: wrap; }
.ev-filters button {
  height: 21px; padding: 0 8px; font-size: 9px;
  background: #101713; border: 1px solid #2a352f; color: #8d9c92;
}
.ev-filters button.on { border-color: #6a5019; color: #f0c168; background: #211a0c; }
.ev-list { flex: 1; overflow: auto; }
.ev-row {
  display: grid; grid-template-columns: 4px 1fr; gap: 10px;
  width: 100%; padding: 9px 10px 9px 0; border: 0; border-bottom: 1px solid #1a231e;
  background: none; text-align: left; color: inherit;
}
.ev-row:hover { background: #121a16; }
.ev-row.sel { background: #16211b; }
.ev-row .vb { align-self: stretch; }
.ev-row.s5 .vb { background: var(--danger); }
.ev-row.s3 .vb { background: var(--amber); }
.ev-row.s1 .vb { background: var(--info); }
.ev-row.s05 .vb { background: #4c5b52; }
.ev-row .ec { min-width: 0; }
.ev-row .ehead { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.ev-row .eid { font-family: var(--mono); font-size: 8.5px; color: #6c7a71; }
.ev-row .etime { margin-left: auto; font-family: var(--mono); font-size: 8.5px; color: #75847a; }
.ev-row b { display: block; font-size: 10.5px; font-weight: 400; line-height: 1.45; color: #d3ded5; }
.ev-row.sel b { color: #f3f6ef; }
.ev-row .efoot { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 8.5px; color: #718077; }
.ev-row .efoot .conf { margin-left: auto; font-family: var(--mono); color: #a9b7ad; }

.ev-detail { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ev-head { display: flex; align-items: flex-start; gap: 12px; }
.ev-head h2 {
  margin: 0; font-size: 16px; font-weight: 400; line-height: 1.45;
  letter-spacing: .02em; color: #f1f5ee;
}
.ev-head .meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 9.5px; color: #7b8a80; }
.ev-head .meta b { color: #b6c3b9; font-weight: 400; }
.ev-head .meta .mono { color: #9aa89e; }

.verdict-grid { display: grid; grid-template-columns: 1.05fr 1.4fr; gap: 12px; }
.verdict-card {
  border: 1px solid #3d3320; background:
    linear-gradient(135deg, rgba(224, 166, 60, .09), transparent 55%),
    #12150f;
  padding: 11px 12px; display: flex; flex-direction: column; gap: 6px;
}
.verdict-card .vc-top { display: flex; align-items: center; gap: 8px; }
.verdict-card .vc-top .ic { color: var(--amber); }
.verdict-card .vc-top span { font-size: 9px; letter-spacing: .14em; color: #8a7a54; }
.verdict-card h3 {
  margin: 0; font-size: 20px; font-weight: 400; letter-spacing: .05em; color: #f4d99f;
  display: flex; align-items: baseline; gap: 8px;
}
.verdict-card h3 small { font-size: 9.5px; color: #97865e; letter-spacing: .04em; }
.conf-bar { height: 3px; background: #262014; position: relative; }
.conf-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8a6a24, var(--amber-2)); }
.verdict-card p { margin: 0; font-size: 9.5px; color: #9a9784; line-height: 1.6; }
.verdict-card p b { color: #d9cfae; font-weight: 400; }

.reco-card { border: 1px solid #2b3a31; background: #0d1411; padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; }
.reco-card .rc-top { display: flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: .14em; color: #6f8b7c; }
.reco-card h4 { margin: 0; font-size: 13px; font-weight: 400; color: #dbe6dd; letter-spacing: .02em; }
.reco-card p { margin: 0; font-size: 9.5px; color: #7f8e84; line-height: 1.65; }
.reco-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.reco-impact div { background: #0a100d; border: 1px solid #202b24; padding: 5px 7px; }
.reco-impact b { display: block; font-family: var(--mono); font-size: 12px; color: #e6ede6; }
.reco-impact span { font-size: 8px; color: #6d7b72; }

.chain-steps { display: flex; flex-direction: column; }
.cs-row {
  display: grid; grid-template-columns: 48px 16px 1fr; gap: 8px;
  padding: 6px 0; position: relative;
}
.cs-row .cst { font-family: var(--mono); font-size: 9px; color: #7e8c83; padding-top: 1px; }
.cs-row .csd { position: relative; display: flex; justify-content: center; }
.cs-row .csd::before {
  content: ""; position: absolute; top: 0; bottom: -14px; width: 1px; background: #2c3a31;
}
.cs-row:last-child .csd::before { display: none; }
.cs-row .csd i {
  width: 7px; height: 7px; margin-top: 3px; position: relative;
  background: #0d1310; border: 1px solid var(--amber); transform: rotate(45deg); z-index: 1;
}
.cs-row .csc { font-size: 9.5px; color: #aebbb1; line-height: 1.6; }
.cs-row .csc b { color: #e2eae3; font-weight: 400; }
.cs-row .csc .num { color: #d8b271; }

.evidence-tbl td { font-size: 9.5px; }
.evidence-tbl .src { color: #a4b3a8; }
.evidence-tbl .val { color: #e1c995; font-family: var(--mono); font-size: 9px; }
.knowledge { display: flex; flex-wrap: wrap; gap: 6px; }
.knowledge button {
  font-size: 9px; padding: 3px 7px; background: #101a15;
  border: 1px solid #2b3d33; color: #9db0a4; text-align: left;
}
.knowledge button:hover { border-color: #4c6a58; color: #d6e2d8; }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ev-actions .hint { font-size: 9px; color: #76847b; }

/* ============================== Kill chain ============================== */
.kc-track {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0; padding: 6px 4px 0; position: relative;
}
.kc-foot {
  margin-top: auto; padding-top: 8px; border-top: 1px solid #1e2722;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 9px; color: #7c8b81;
}
.kc-foot b { color: #d3ded5; font-weight: 400; }
.kc-track::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 32px; height: 1px;
  background: linear-gradient(90deg, #6d5520, #8a3a2b);
}
.kc-node {
  position: relative; padding: 0 6px; background: none; border: 0; text-align: left; color: inherit;
}
.kc-node .kn-top { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 8.5px; color: #718077; }
.kc-node .kn-dot {
  width: 15px; height: 15px; margin: 12px auto; position: relative; z-index: 1;
  display: grid; place-items: center; background: #0d1310;
  border: 1px solid var(--amber); transform: rotate(45deg);
}
.kc-node .kn-dot i { width: 5px; height: 5px; background: var(--amber); }
.kc-node.hot .kn-dot { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(226, 84, 60, .1); }
.kc-node.hot .kn-dot i { background: var(--danger); }
.kc-node.sel .kn-dot { box-shadow: 0 0 0 4px rgba(224, 166, 60, .16); }
.kc-node.sel .kn-body { border-color: #6a5019; background: #171307; }
.kc-node .kn-body {
  border: 1px solid #26312a; background: #0e1512; padding: 7px 8px;
  min-height: 92px; display: flex; flex-direction: column; gap: 3px;
}
.kc-node:hover .kn-body { border-color: #3f5446; }
.kc-node .kn-body b { font-size: 10.5px; font-weight: 400; color: #dde6de; }
.kc-node .kn-body span { font-size: 8.5px; color: #75847a; line-height: 1.55; }
.kc-node .kn-body .kn-meta { margin-top: auto; display: flex; gap: 8px; font-family: var(--mono); font-size: 8px; color: #6d7b72; }

.sandbox { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; height: 100%; }
.sb-controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sb-block label { display: flex; justify-content: space-between; font-size: 9.5px; color: #8b9a90; margin-bottom: 6px; }
.sb-block label b { font-family: var(--mono); color: var(--amber-2); font-weight: 400; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: linear-gradient(90deg, #8a6a24 var(--p, 40%), #222d26 var(--p, 40%));
  outline: none; margin: 6px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px;
  background: #1a241d; border: 1px solid var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 166, 60, .1); cursor: ew-resize;
}
.sb-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8px; color: #5f6d64; }
.scope-opts { display: grid; gap: 6px; }
.scope-opt {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: start;
  padding: 7px 8px; border: 1px solid #26312a; background: #0d1411;
  text-align: left; color: inherit;
}
.scope-opt:hover { border-color: #3f5446; }
.scope-opt.on { border-color: #6a5019; background: #171307; }
.scope-opt .radio {
  width: 12px; height: 12px; margin-top: 2px; border-radius: 50%;
  border: 1px solid #3f4d45; display: grid; place-items: center;
}
.scope-opt.on .radio { border-color: var(--amber); }
.scope-opt.on .radio::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.scope-opt .so-copy { min-width: 0; }
.scope-opt b { display: block; font-size: 10.5px; font-weight: 400; color: #d7e2d9; }
.scope-opt span { display: block; font-size: 8.5px; color: #728077; line-height: 1.5; margin-top: 1px; }
.scope-opt em { font-family: var(--mono); font-style: normal; font-size: 9.5px; color: #f0c168; white-space: nowrap; }

.sb-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; }
.sb-metric { background: #0a100d; border: 1px solid #202b24; padding: 8px 10px; }
.sb-metric span { display: block; font-size: 8.5px; color: #6f7d74; letter-spacing: .05em; }
.sb-metric b { display: block; font-family: var(--display); font-size: 21px; color: #eaf0e9; line-height: 1.2; margin-top: 2px; }
.sb-metric b small { font-family: var(--sans); font-size: 9px; color: #75847a; }
.sb-metric.hot b { color: var(--danger-2); }
.sb-metric.warn b { color: var(--amber-2); }
.sb-metric.ok b { color: var(--safe-2); }
.sb-wide { grid-column: span 2; }
.sb-formula {
  border-top: 1px dashed #2b3831; padding-top: 8px; margin-top: 2px;
  font-family: var(--mono); font-size: 8.5px; color: #7e8d83; line-height: 1.85;
}
.sb-formula b { color: #b9c6bc; font-weight: 400; }

.stage-logs { display: flex; flex-direction: column; gap: 6px; }
.slog {
  display: grid; grid-template-columns: 62px 1fr; gap: 8px;
  padding: 5px 7px; background: #080d0a; border-left: 1px solid #2c3a31;
  font-family: var(--mono); font-size: 8.5px; color: #93a198; line-height: 1.6;
}
.slog .st { color: #6d7b72; }
.slog em { font-style: normal; color: #d8b271; }

/* ============================== Response ============================== */
.orders-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.order-list { flex: 0 1 auto; overflow: auto; }
.orders-closed { flex: 0 0 auto; padding: 8px 12px; border-top: 1px solid #1e2722; background: #0a0f0c; }
.orders-closed .oc { display: grid; grid-template-columns: 56px 1fr auto; gap: 7px; align-items: center; font-size: 8.5px; padding: 3px 0; }
.orders-closed .oc b { font-family: var(--mono); color: #8d9c92; font-weight: 400; }
.orders-closed .oc span { color: #7c8b81; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-closed .oc em { font-style: normal; color: #8dd6bb; font-size: 8px; }
.orders-stats {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: #1e2722; border-top: 1px solid #1e2722;
}
.orders-stats div { background: #0b100d; padding: 7px 9px; }
.orders-stats b { display: block; font-family: var(--display); font-size: 16px; color: #e9eee7; line-height: 1.15; }
.orders-stats span { font-size: 8px; color: #6f7d74; letter-spacing: .02em; white-space: nowrap; }
.orders-play {
  flex: 0 0 auto; padding: 8px 12px; border-top: 1px solid #1e2722; background: #0a0f0c;
}
.orders-play ol { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.orders-play li { font-size: 8.5px; color: #7c8b81; display: flex; gap: 6px; line-height: 1.55; align-items: flex-start; }
.orders-play li span { flex: 1; min-width: 0; }
.orders-play li b { font-family: var(--mono); color: #b8933f; font-weight: 400; flex: 0 0 auto; }
.order-rules {
  flex: 0 0 auto; padding: 9px 12px; border-top: 1px solid #1e2722;
  background: #0a0f0c; font-size: 9px; color: #75847a; line-height: 1.85;
}
.order-rules b { color: #a9b7ad; font-weight: 400; }
.order-rules .or-t { font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em; color: #5c6a61; margin-bottom: 3px; }
.order-row {
  display: grid; grid-template-columns: 4px 1fr; gap: 9px; width: 100%;
  padding: 9px 10px 9px 0; border: 0; border-bottom: 1px solid #1a231e;
  background: none; text-align: left; color: inherit;
}
.order-row:hover { background: #121a16; }
.order-row.sel { background: #16211b; }
.order-row .ob { align-self: stretch; background: #3c4b42; }
.order-row.pending .ob { background: var(--amber); }
.order-row.executed .ob { background: var(--safe); }
.order-row .oid { font-family: var(--mono); font-size: 8.5px; color: #6c7a71; display: flex; gap: 6px; }
.order-row b { display: block; font-size: 10.5px; font-weight: 400; color: #d3ded5; margin-top: 2px; line-height: 1.45; }
.order-row .ofoot { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 8.5px; color: #718077; }

.order-detail { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.od-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.od-head h2 { margin: 0; font-size: 16px; font-weight: 400; letter-spacing: .02em; }
.od-head .meta { margin-top: 5px; font-size: 9.5px; color: #7b8a80; display: flex; flex-wrap: wrap; gap: 5px 12px; }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.imp { background: #0a100d; border: 1px solid #202b24; padding: 7px 9px; }
.imp span { display: block; font-size: 8.5px; color: #6f7d74; }
.imp b { display: block; font-family: var(--display); font-size: 18px; color: #e9eee7; margin-top: 2px; }
.imp b small { font-size: 9px; color: #75847a; font-family: var(--sans); }
.imp.total { border-color: #4a3b18; background: #151105; }
.imp.total b { color: var(--amber-2); }

.approval-flow { display: grid; gap: 8px; }
.ap-step {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 10px; border: 1px solid #26312a; background: #0d1411;
}
.ap-step.done { border-color: #245c49; background: #0c1713; }
.ap-step.current { border-color: #6a5019; background: #171307; }
.ap-step .api {
  width: 20px; height: 20px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; color: #8d9c92;
  border: 1px solid #3b4a41;
}
.ap-step.done .api { border-color: #3f8a6e; color: #9fe0c8; background: #10241c; }
.ap-step.current .api { border-color: var(--amber); color: var(--amber-2); background: #241b0b; }
.ap-step .apc b { display: block; font-size: 11px; font-weight: 400; color: #dbe5dd; }
.ap-step .apc span { display: block; font-size: 9px; color: #7a897f; margin-top: 1px; }
.ap-step .apc span.mono { font-family: var(--mono); font-size: 8.5px; }
.ap-step .apa { text-align: right; min-width: 96px; }
.stamp {
  display: inline-block; padding: 2px 8px; font-size: 9px; letter-spacing: .12em;
  border: 1px solid #3f8a6e; color: #9fe0c8; background: #0f241c;
  transform: rotate(-3deg);
}
.stamp.pending { border-color: #4a5a50; color: #7d8b82; background: #101713; transform: none; }
.stamp.deny { border-color: #8a4a35; color: #ffb59f; background: #241310; transform: none; }
.gate-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px dashed #4a3b18; background: #141005;
  font-size: 9.5px; color: #b9a677; line-height: 1.6;
}
.gate-note .ic { color: var(--amber); flex: 0 0 15px; }
.gate-note b { color: #f0c168; font-weight: 400; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================== Compliance ============================== */
.comp-hero { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 2px; }
.comp-score {
  font-family: var(--display); font-size: 46px; line-height: .9; color: var(--safe-2);
  text-shadow: 0 0 26px rgba(63, 163, 131, .18);
}
.comp-score small { font-size: 16px; color: #5d8a78; }
.comp-hero p { margin: 0; font-size: 9.5px; color: #74837a; line-height: 1.65; }
.comp-hero p b { color: #b6c3b9; font-weight: 400; }
.cat-rows { display: flex; flex-direction: column; }
.cat-row {
  display: grid; grid-template-columns: 160px 1fr 40px 42px; gap: 8px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid #19211d;
}
.cat-row .cname { font-size: 9.5px; color: #c3cec6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row .cname small { display: inline; margin-left: 5px; font-family: var(--mono); font-size: 7px; color: #5b6960; letter-spacing: .06em; }
.cat-row .cbar { display: flex; height: 6px; background: #1a231e; overflow: hidden; }
.cat-row .cbar i { height: 100%; }
.cat-row .cbar i.p { background: #2f7a62; }
.cat-row .cbar i.q { background: #a8812b; }
.cat-row .cbar i.f { background: #8a3a2b; }
.cat-row .cnum { font-family: var(--mono); font-size: 9.5px; color: #c8d4cb; text-align: right; }
.cat-row .cdyn { text-align: right; }
.dyn-note {
  display: grid; gap: 4px; margin-top: 6px; padding: 6px 8px;
  border: 1px dashed #3a3320; background: #12100a;
}
.dyn-note .dn { display: grid; grid-template-columns: 170px 1fr auto; gap: 8px; align-items: center; font-size: 9px; }
.dyn-note .dn b { font-weight: 400; color: #d8cfae; }
.dyn-note .dn span { color: #8b8168; }
.dyn-note .dn em { font-style: normal; font-family: var(--mono); font-size: 8.5px; color: #b8a678; }

.gap-list { display: flex; flex-direction: column; gap: 0; }
.gap-row { padding: 6px 0; border-bottom: 1px solid #1a231e; }
.gap-row .gt { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.gap-row .gt .mono { font-size: 8.5px; color: #718077; }
.gap-row b { font-size: 10.5px; font-weight: 400; color: #d3ded5; }
.gap-row span { display: block; font-size: 9px; color: #728077; margin-top: 2px; }
.gap-row .gd { display: flex; gap: 10px; font-family: var(--mono); font-size: 8.5px; color: #7a897f; margin-top: 3px; }

.chain-table td { font-size: 9px; }
.chain-table .hash { font-family: var(--mono); color: #b7c6bc; font-size: 8.5px; }
.chain-table .prev { font-family: var(--mono); color: #5f6d64; font-size: 8px; }
.chain-table tr.deny td { background: #1b0f0c; }
.chain-table tr.deny td:first-child { box-shadow: inset 2px 0 0 #8a4a35; }
.chain-table tr.fresh td { background: #14200f; }
.chain-status {
  display: flex; align-items: center; gap: 10px; font-size: 10px; color: #9fb0a5;
}
.chain-status .ok { color: var(--safe-2); font-family: var(--mono); }
.chain-status .bad { color: var(--danger-2); font-family: var(--mono); }

/* ============================== Drawer / modal / toast ============================== */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(3, 6, 5, .62);
  backdrop-filter: blur(2px); z-index: 90; animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px;
  background: linear-gradient(180deg, #0f1613, #0a0f0c);
  border-left: 1px solid #35443a; box-shadow: var(--shadow-lg);
  z-index: 100; display: flex; flex-direction: column;
  animation: slideIn .24s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes slideIn { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-head {
  flex: 0 0 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid #26312a;
}
.drawer-head .dh-t { display: flex; align-items: baseline; gap: 9px; }
.drawer-head b { font-size: 13px; font-weight: 400; color: #e9eee7; }
.drawer-head span { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: #6a786f; }
.drawer-close {
  width: 28px; height: 28px; display: grid; place-items: center;
  background: transparent; border: 1px solid #2f3d34; color: #9aa89e;
}
.drawer-close:hover { border-color: #55705f; color: #e6eee7; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 16px 20px; }
.dr-sec { margin-bottom: 16px; }
.dr-sec h4 {
  margin: 0 0 7px; font-size: 9.5px; letter-spacing: .14em; color: #8b9a90;
  display: flex; align-items: center; gap: 7px;
}
.dr-sec h4::after { content: ""; flex: 1; height: 1px; background: #26312a; }
.dr-conclusion {
  padding: 10px 12px; border: 1px solid #4a3b18; background: #151105;
  font-size: 11px; color: #e4d5ae; line-height: 1.7;
}
.dr-conclusion b { color: #f7dda4; font-weight: 400; }
.dr-kv { display: grid; grid-template-columns: 88px 1fr; gap: 5px 12px; font-size: 10.5px; }
.dr-kv dt { color: #718077; }
.dr-kv dd { margin: 0; color: #d1dcd3; }
.dr-kv dd.mono { font-family: var(--mono); font-size: 10px; }
.dr-calc { width: 100%; border-collapse: collapse; font-size: 10px; }
.dr-calc th { text-align: left; color: #74837a; font-weight: 400; padding: 5px 7px; border-bottom: 1px solid #26312a; font-size: 9px; }
.dr-calc td { padding: 5px 7px; border-bottom: 1px solid #1a231e; color: #c3cec6; }
.dr-calc td.mono { font-family: var(--mono); font-size: 9.5px; }
.dr-calc tr.total td { border-top: 1px solid #3a4a40; border-bottom: 0; color: #f0c168; }
.dr-quote {
  border-left: 2px solid #4a5f50; padding: 6px 10px; background: #0c1310;
  font-size: 10px; color: #a9b7ad; line-height: 1.75;
}
.dr-quote b { color: #d7e2d9; font-weight: 400; }
.dr-quote span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8.5px; color: #6d7b72; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 14px);
  max-width: 760px; padding: 9px 16px; z-index: 200;
  background: #121a15; border: 1px solid #3d5144; color: #dbe5dd;
  font-size: 11px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: #2f6b55; color: #bfe8d6; }
.toast.warn { border-color: #6a5019; color: #f4d99f; }
.toast.bad { border-color: #7a3327; color: #ffb59f; }

.no-script {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: #070a09; color: #ffb59f; font-size: 14px; z-index: 300;
}

/* ---------------- Footer ---------------- */
.site-foot {
  flex: 0 0 28px; height: 28px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-top: 1px solid #1d2621;
  background: #080c0a; font-size: 9px; color: #5f6d64; letter-spacing: .03em;
}
.site-foot .mid { color: #6f7d74; }
.site-foot a { color: #8d9c92; }
.site-foot a:hover { color: var(--amber-2); }

/* ---------------- Static / motion ---------------- */
.static *, .static *::before, .static *::after {
  animation: none !important; transition: none !important;
}
.static .tk-track { transform: none; }
.static .live-dot { opacity: 1; }

/* ---------------- Small screens (demo floor) ---------------- */
@media (max-width: 1500px) {
  .app { min-width: 1380px; }
  .kpi-value { font-size: 24px; }
  .triage { grid-template-columns: 350px minmax(0, 1fr); }
}
