/* ==========================================================================
   TAMENG — Pusat Pemantauan & Tanggap Insiden Siber
   Sistem visual: Atkinson Hyperlegible (keterbacaan IP/payload), indigo "tarum",
   peta ruang pantau bergaya chart plotting. Tanpa framework CSS, tanpa build step.
   ========================================================================== */

@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/atkinson-hyperlegible-next-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/atkinson-hyperlegible-next-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/atkinson-hyperlegible-next-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/atkinson-hyperlegible-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/atkinson-hyperlegible-mono-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Token ---------- */
:root {
  color-scheme: light;
  --font: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --plane: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --surface-3: #eaeef3;
  --ink: #121826;
  --ink-2: #3e4a5e;
  --muted: #677287;
  --line: #dce1e8;
  --line-strong: #c4ccd8;
  --accent: #2f45a0;
  --accent-hover: #26398a;
  --accent-ink: #ffffff;
  --accent-wash: #e8ecf8;
  --focus: #2f45a0;

  /* status & tingkat keparahan (tetap; selalu berpasangan ikon + label) */
  --sev-4: #d03b3b;
  --sev-3: #ec835a;
  --sev-2: #fab219;
  --sev-1: #2a78d6;
  --good: #0ca30c;
  --good-text: #006300;
  --crit-text: #a52222;
  --sev-4-wash: #fbe9e9;
  --sev-3-wash: #fdf0ea;
  --sev-2-wash: #fef6e3;
  --sev-1-wash: #e7f0fb;
  --good-wash: #e6f5e6;

  --grid: #e1e5ec;
  --radius: 8px;
  --radius-lg: 12px;
  --rail: 248px;
  --shadow-pop: 0 10px 30px rgba(18, 24, 38, .14), 0 1px 3px rgba(18, 24, 38, .08);
}

:root[data-theme='dark'], .wall {
  color-scheme: dark;
  --plane: #0b1220;
  --surface: #111a2c;
  --surface-2: #15203a;
  --surface-3: #1b2846;
  --ink: #e7ecf5;
  --ink-2: #b3bdd1;
  --muted: #8591aa;
  --line: #223050;
  --line-strong: #2e3f66;
  --accent: #8ea1ff;
  --accent-hover: #a7b6ff;
  --accent-ink: #0b1220;
  --accent-wash: rgba(142, 161, 255, .13);
  --focus: #a7b6ff;
  --sev-1: #3987e5;
  --good-text: #3cc63c;
  --crit-text: #ff8a8a;
  --sev-4-wash: rgba(208, 59, 59, .16);
  --sev-3-wash: rgba(236, 131, 90, .15);
  --sev-2-wash: rgba(250, 178, 25, .13);
  --sev-1-wash: rgba(57, 135, 229, .15);
  --good-wash: rgba(12, 163, 12, .15);
  --grid: #1f2b45;
  --shadow-pop: 0 12px 34px rgba(0, 0, 0, .5);
}

/* ---------- Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--plane); font-feature-settings: 'kern'; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.mono, code, kbd, pre { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 13px; line-height: 1.55; }
.num { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-sm { width: 15px; height: 15px; vertical-align: -2px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Kerangka aplikasi ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--rail) - 1px), var(--line) calc(var(--rail) - 1px), var(--line) var(--rail), transparent var(--rail)); }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .06em; line-height: 1; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.nav-group { margin: 6px 0 12px; }
.nav-title { font-size: 12.5px; color: var(--muted); padding: 6px 10px 4px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2);
  font-weight: 500; font-size: 14.5px; position: relative;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 10px; background: var(--sev-4); color: #fff; }
.nav .count.quiet { background: var(--surface-3); color: var(--ink-2); }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.credit { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: color-mix(in srgb, var(--plane) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar .crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; min-width: 0; }
.topbar .crumbs a { color: var(--muted); }
.topbar .spacer { flex: 1; }
.clock { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(12,163,12,.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.45); } 70% { box-shadow: 0 0 0 8px rgba(12,163,12,0); } 100% { box-shadow: 0 0 0 0 rgba(12,163,12,0); } }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { flex: 1 1 auto; }
.page-head .lede { flex: 0 0 100%; color: var(--ink-2); margin: 2px 0 0; padding-right: max(0px, calc(100% - 82ch)); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.sim-banner {
  display: flex; gap: 12px; align-items: center; padding: 8px 28px; font-size: 13.5px;
  background: repeating-linear-gradient(135deg, var(--sev-2-wash) 0 12px, transparent 12px 24px), var(--surface);
  border-bottom: 1px solid var(--line);
}
.sim-banner strong { letter-spacing: .02em; }

/* ---------- Tombol & formulir ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center; min-height: 36px; padding: 7px 14px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 14px/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--sev-4); border-color: var(--sev-4); color: #fff; }
.btn-danger:hover { background: #b52f2f; border-color: #b52f2f; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-icon { padding: 6px; min-width: 36px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-group .btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); position: relative; z-index: 1; }
:root[data-theme='dark'] .btn-group .btn.on, .wall .btn-group .btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

label, .field-label { font-weight: 600; font-size: 13.5px; display: block; margin-bottom: 5px; color: var(--ink); }
[hidden] { display: none !important; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.field .error, .error-text { color: var(--crit-text); font-size: 13px; margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local], input[type=time], input[type=file], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: 400 14.5px/1.4 var(--font);
}
textarea { min-height: 90px; resize: vertical; }
select.select-sm { width: auto; min-width: 116px; min-height: 32px; padding: 4px 8px; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
input.mono, textarea.mono { font-family: var(--mono); font-size: 13.5px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; font-size: 14px; margin-bottom: 8px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check .hint { font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }

/* Bilah filter: satu baris di atas konten yang difilter */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-height: 34px; padding: 5px 10px; font-size: 13.5px; }
.filters input[type=search] { min-width: 220px; }
.filters .check { margin: 0 4px; align-items: center; font-size: 13.5px; }
.filters .check input { margin-top: 0; }

/* ---------- Panel & bagian ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; flex: 1; }
.panel-head .sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.panel-body { padding: 16px 18px; }
.panel-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.cols-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.cols-4 { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.cols-even { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 17px; }

/* ---------- Kalimat status utama (hero dasbor) ---------- */
.headline {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 22px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.headline::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--good); }
.headline.tone-critical::before { background: var(--sev-4); }
.headline.tone-serious::before { background: var(--sev-3); }
.headline.tone-warning::before { background: var(--sev-2); }
.headline .statement { font-size: 30px; font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; margin: 0 0 6px; max-width: 30ch; }
.headline .detail { color: var(--ink-2); margin: 0 0 14px; max-width: 70ch; }
.headline .side { display: grid; gap: 10px; min-width: 250px; border-left: 1px solid var(--line); padding-left: 24px; }
.kv { display: flex; justify-content: space-between; gap: 18px; font-size: 14px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Strip angka: satu baris, dipisah garis tipis (bukan kartu) */
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stat-strip.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-strip.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.15; margin-top: 4px; }
.stat .note { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.stat a.value { color: var(--ink); display: inline-block; }

/* ---------- Chip tingkat keparahan & status ---------- */
.sev, .chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); background: var(--surface-3); line-height: 1;
}
.sev .icon, .chip .icon { width: 14px; height: 14px; }
.sev-4 { background: var(--sev-4-wash); } .sev-4 .icon { color: var(--sev-4); }
.sev-3 { background: var(--sev-3-wash); } .sev-3 .icon { color: var(--sev-3); }
.sev-2 { background: var(--sev-2-wash); } .sev-2 .icon { color: #b07700; }
:root[data-theme='dark'] .sev-2 .icon, .wall .sev-2 .icon { color: var(--sev-2); }
.sev-1 { background: var(--sev-1-wash); } .sev-1 .icon { color: var(--sev-1); }
.chip.good { background: var(--good-wash); } .chip.good .icon { color: var(--good); }
.chip.critical { background: var(--sev-4-wash); } .chip.critical .icon { color: var(--sev-4); }
.chip.serious { background: var(--sev-3-wash); } .chip.serious .icon { color: var(--sev-3); }
.chip.warning { background: var(--sev-2-wash); } .chip.warning .icon { color: #b07700; }
.chip.info { background: var(--sev-1-wash); } .chip.info .icon { color: var(--sev-1); }
.chip.muted { color: var(--ink-2); }
.chip.outline { background: transparent; border: 1px solid var(--line-strong); }
.chip.sim { background: repeating-linear-gradient(135deg, var(--sev-2-wash) 0 6px, var(--surface) 6px 12px); border: 1px dashed #c99100; }
.tag { display: inline-block; font-size: 12px; padding: 2px 7px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); font-weight: 500; margin: 1px 2px 1px 0; }
.tag.mitre { font-family: var(--mono); font-size: 11.5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.d4 { background: var(--sev-4); } .dot.d3 { background: var(--sev-3); } .dot.d2 { background: var(--sev-2); } .dot.d1 { background: var(--sev-1); } .dot.good { background: var(--good); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .tight { width: 1%; white-space: nowrap; }
.table.compact td, .table.compact th { padding-left: 9px; padding-right: 9px; }
.table td:first-child:not(.tight) { min-width: 200px; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .title { font-weight: 600; color: var(--ink); }
.table a.title:hover { color: var(--accent); }
.table .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.table .path { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; max-width: 520px; }
.row-crit td:first-child { box-shadow: inset 3px 0 0 var(--sev-4); }
.row-sim { background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--sev-2-wash) 70%, transparent) 10px 20px); }

/* ---------- Daftar peringkat (pengganti grafik batang kecil; tetap terbaca sebagai tabel) ---------- */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.rank .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.rank .n { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.rank .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rank .bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 2px; }
.rank .bar i.b4 { background: var(--sev-4); } .rank .bar i.b3 { background: var(--sev-3); } .rank .bar i.b2 { background: var(--sev-2); } .rank .bar i.b1 { background: var(--sev-1); }

/* ---------- Grid status aplikasi ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.asset-tile { display: block; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); position: relative; }
.asset-tile:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.asset-tile .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.asset-tile .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; margin-top: 3px; }
.asset-tile .dot { position: absolute; top: 13px; right: 11px; }
.asset-tile.st-down, .asset-tile.st-defaced { border-color: color-mix(in srgb, var(--sev-4) 55%, var(--line)); background: var(--sev-4-wash); }
.asset-tile.st-degraded { border-color: color-mix(in srgb, var(--sev-2) 60%, var(--line)); }

/* Meter risiko */
.meter { display: inline-flex; align-items: center; gap: 8px; min-width: 96px; }
.meter .track { flex: 1; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; min-width: 48px; }
.meter .fill { height: 100%; border-radius: 4px; background: var(--good); }
.meter .fill.m2 { background: var(--sev-2); } .meter .fill.m3 { background: var(--sev-3); } .meter .fill.m4 { background: var(--sev-4); }
.meter b { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; }
.stat .note .meter { display: flex; width: 100%; max-width: 160px; }
.stat .note .meter b { display: none; }
.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-weight: 800; font-size: 13px; background: var(--surface-3); }
.grade.gA, .grade.gB { background: var(--good-wash); color: var(--good-text); }
.grade.gC { background: var(--sev-2-wash); }
.grade.gD, .grade.gE { background: var(--sev-3-wash); }
.grade.gF { background: var(--sev-4-wash); color: var(--crit-text); }

/* ---------- Tab ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Pesan & keadaan kosong ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.flash.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: var(--good-wash); }
.flash.err { border-color: color-mix(in srgb, var(--sev-4) 45%, var(--line)); background: var(--sev-4-wash); }
.flash .icon { margin-top: 1px; }
.empty { text-align: center; padding: 34px 20px; color: var(--ink-2); }
.empty .icon { width: 30px; height: 30px; color: var(--muted); margin-bottom: 8px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; color: var(--ink); }
.callout { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.callout.warn { background: var(--sev-2-wash); border-color: color-mix(in srgb, var(--sev-2) 50%, var(--line)); }
.callout.crit { background: var(--sev-4-wash); border-color: color-mix(in srgb, var(--sev-4) 45%, var(--line)); }

/* ---------- Lini waktu insiden ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 16px 34px; }
.timeline .mark { position: absolute; left: 3px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); display: grid; place-items: center; }
.timeline .mark .icon { width: 11px; height: 11px; color: var(--ink-2); }
.timeline li.t-status .mark { border-color: var(--accent); } .timeline li.t-status .mark .icon { color: var(--accent); }
.timeline li.t-eskalasi .mark { border-color: var(--sev-4); } .timeline li.t-eskalasi .mark .icon { color: var(--sev-4); }
.timeline li.t-otomatis .mark { border-color: var(--sev-1); } .timeline li.t-otomatis .mark .icon { color: var(--sev-1); }
.timeline .who { font-size: 12.5px; color: var(--muted); }
.timeline .body { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Playbook ---------- */
.playbook { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.playbook li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 10px; border-radius: 8px; }
.playbook li:hover { background: var(--surface-2); }
.playbook input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--good); }
.playbook .phase { font-size: 12px; font-weight: 700; color: var(--accent); }
.playbook .txt { font-size: 14px; overflow-wrap: anywhere; }
.playbook li.done .txt { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.playbook .by { font-size: 12px; color: var(--muted); }

/* ---------- Definisi (detail) ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Menu & dialog ---------- */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 7px; background: none; border: 0; color: var(--ink); font: 500 14px var(--font); cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop .sep { height: 1px; background: var(--line); margin: 5px 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); font-weight: 700; font-size: 13px; }
dialog.modal { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog.modal::backdrop { background: rgba(11, 18, 32, .45); }
dialog.modal .panel-head { border-bottom: 1px solid var(--line); }
dialog.modal form.body { padding: 18px; }

/* ---------- Paginasi ---------- */
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 4px 0; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager a, .pager span.cur { min-width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.pager span.cur { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; }
.pager .gap { border: 0; background: none; }

/* ---------- Grafik ---------- */
.chart { width: 100%; height: 260px; }
.chart.tall { height: 320px; }
.chart.short { height: 190px; }
.chart.loading { opacity: .55; transition: opacity .2s; }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Matriks MITRE ---------- */
.mitre-matrix { display: grid; grid-template-columns: repeat(8, minmax(126px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.mitre-cell { overflow-wrap: anywhere; }
.mitre-col h3 { font-size: 13px; padding: 8px 10px; background: var(--ink); color: var(--surface); border-radius: 8px 8px 0 0; }
:root[data-theme='dark'] .mitre-col h3 { background: var(--surface-3); color: var(--ink); }
.mitre-cell { border: 1px solid var(--line); border-top: 0; padding: 9px 10px; font-size: 13px; background: var(--surface); }
.mitre-cell:last-child { border-radius: 0 0 8px 8px; }
.mitre-cell .id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.mitre-cell .cnt { font-weight: 700; font-variant-numeric: tabular-nums; }
.mitre-cell.h1 { background: #e7edfb; } .mitre-cell.h2 { background: #c8d4f5; } .mitre-cell.h3 { background: #9fb2ec; } .mitre-cell.h4 { background: #6f87dc; color: #fff; } .mitre-cell.h4 .id { color: #e8ecff; }
:root[data-theme='dark'] .mitre-cell.h1 { background: #18244a; } :root[data-theme='dark'] .mitre-cell.h2 { background: #22336b; } :root[data-theme='dark'] .mitre-cell.h3 { background: #2f4797; } :root[data-theme='dark'] .mitre-cell.h4 { background: #4a64c7; }

/* ---------- Halaman masuk ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--surface); }
.auth-art { position: relative; overflow: hidden; background: #0b1220; color: #e7ecf5; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art > * { position: relative; }
.auth-art .claim { font-size: 34px; font-weight: 700; line-height: 1.15; max-width: 16ch; }
.auth-art .claim-sub { color: #b3bdd1; max-width: 46ch; margin-top: 10px; }
.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.auth-credit { margin-top: 28px; text-align: center; }
.auth-form form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 24px; margin-bottom: 6px; }

/* ---------- Ruang pantau (peta live) ---------- */
.wall { background: #070d18; color: var(--ink); min-height: 100vh; overflow: hidden; }
.wall-bar { height: 58px; display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid #16213a; background: #0a1120; }
.wall-bar .brand { padding: 0; }
.wall-bar h1 { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.wall-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr) 206px; height: calc(100vh - 58px); }
.wall-map { position: relative; min-height: 0; border-right: 1px solid #16213a; }
#map { position: absolute; inset: 0; }
.wall-feed { grid-row: 1 / 3; grid-column: 2; display: flex; flex-direction: column; min-height: 0; background: #0a1120; }
.wall-feed h2 { font-size: 14px; color: var(--ink-2); padding: 14px 16px 10px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.feed { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.feed li { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; padding: 9px 8px; border-radius: 8px; border-bottom: 1px solid #121c31; animation: feed-in .5s ease-out; }
.feed li:hover { background: #111b30; }
@keyframes feed-in { from { background: #1a2848; } to { background: transparent; } }
.feed .sevbar { border-radius: 2px; background: var(--sev-1); }
.feed .sevbar.s4 { background: var(--sev-4); } .feed .sevbar.s3 { background: var(--sev-3); } .feed .sevbar.s2 { background: var(--sev-2); }
.feed .t1 { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.feed .t2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.feed .t2 .ip { font-family: var(--mono); color: var(--ink-2); }
.feed .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wall-bottom { grid-column: 1; display: grid; grid-template-columns: 1fr 1fr 1fr 1.25fr; border-top: 1px solid #16213a; min-height: 0; }
.wall-bottom section { padding: 12px 16px; border-left: 1px solid #16213a; min-width: 0; overflow: hidden; }
.wall-bottom section:first-child { border-left: 0; }
.wall-bottom h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 9px; }
.wall-bottom .rank { gap: 6px; }
.wall-bottom .rank li { font-size: 13px; }
.wall-bottom .rank .bar { height: 6px; }
.wall-stats { position: absolute; left: 18px; bottom: 16px; display: flex; gap: 2px; background: rgba(10, 17, 32, .82); border: 1px solid #1c2945; border-radius: 12px; backdrop-filter: blur(6px); }
.wall-stats > div { padding: 10px 18px; border-left: 1px solid #1c2945; }
.wall-stats > div:first-child { border-left: 0; }
.wall-stats .v { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wall-stats .k { font-size: 12px; color: var(--muted); }
.wall-tools { position: absolute; right: 16px; top: 14px; display: flex; gap: 8px; }
.wall-legend { position: absolute; left: 18px; top: 14px; display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); background: rgba(10,17,32,.7); padding: 7px 12px; border-radius: 8px; border: 1px solid #1c2945; }
.wall-legend span { display: inline-flex; gap: 6px; align-items: center; }
.wall-legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.status-pills { display: flex; flex-wrap: wrap; gap: 5px; max-height: 150px; overflow: hidden; }
.status-pills span { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: #121c31; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pills span.bad { background: rgba(208, 59, 59, .22); color: #ffd7d7; }
.status-pills span.warn { background: rgba(250, 178, 25, .14); }
.wall .sim-flag { padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; background: repeating-linear-gradient(135deg, rgba(250,178,25,.3) 0 8px, rgba(250,178,25,.12) 8px 16px); color: #ffe2a6; border: 1px dashed rgba(250,178,25,.7); }

/* ---------- Responsif ---------- */
@media (max-width: 1280px) and (min-width: 861px) {
  .stat-strip:not(.n4):not(.n5) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-strip:not(.n4):not(.n5) > .stat:nth-child(4) { border-left: 0; }
  .stat-strip:not(.n4):not(.n5) > .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1280px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .cols, .cols-3, .cols-even { grid-template-columns: minmax(0, 1fr); }
  .headline { grid-template-columns: minmax(0, 1fr); }
  .headline .side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .wall-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60vh auto auto; height: auto; }
  .wall-feed { grid-row: auto; grid-column: 1; max-height: 60vh; }
  .wall-bottom { grid-template-columns: 1fr 1fr; }
  .wall { overflow: auto; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .rail { position: fixed; z-index: 60; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .shell.nav-open .rail { transform: none; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 40px; }
  .grid-2, .grid-3, .grid-4, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .stat-strip, .stat-strip.n4, .stat-strip.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip > .stat:nth-child(odd) { border-left: 0; }
  .stat-strip > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .headline .statement { font-size: 24px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; }
  .dl { grid-template-columns: 1fr; }
  .wall-bottom { grid-template-columns: 1fr; }
}
.only-mobile { display: none; }
@media (max-width: 860px) { .only-mobile { display: inline-flex; } }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .topbar { gap: 6px; padding: 8px 12px; }
  .topbar .clock { display: none; }
  .topbar .crumbs { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
  .sim-banner { flex-wrap: wrap; }
  .panel-head { flex-wrap: wrap; row-gap: 8px; }
  .wall-bar { flex-wrap: wrap; row-gap: 8px; height: auto; min-height: 58px; padding: 8px 12px; gap: 10px; }
  .wall-bar h1 { font-size: 15px; }
  .stat .meter { min-width: 0; max-width: 100%; }
  .stat .meter .track { min-width: 24px; }
  .wall-stats { left: 8px; right: 8px; bottom: 8px; }
  .wall-stats > div { padding: 8px 10px; flex: 1 1 0; min-width: 0; }
  .wall-stats .v { font-size: 20px; }
  .wall-stats .k { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .sev, .chip { border: 1px solid CanvasText; }
  .rank .bar i { background: CanvasText; }
}

/* ---------- Cetak (laporan) ---------- */
.print-page { background: #fff; color: #111; max-width: 900px; margin: 0 auto; padding: 32px 40px; font-size: 13.5px; }
.print-page h1 { font-size: 22px; }
.print-page h2 { font-size: 15.5px; margin: 24px 0 8px; padding-bottom: 5px; border-bottom: 2px solid #111; }
.print-page .table th { background: #f1f3f6; }
.print-page .kop { display: flex; gap: 16px; align-items: center; border-bottom: 3px double #111; padding-bottom: 12px; margin-bottom: 18px; }
.print-page .kop .org { font-size: 13px; line-height: 1.35; }
.print-page .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; }
.print-page .sign .space { height: 70px; }
.print-tools { position: sticky; top: 0; background: #0b1220; color: #fff; padding: 10px 20px; display: flex; gap: 10px; align-items: center; z-index: 10; }
@media print {
  .print-tools, .no-print { display: none !important; }
  .print-page { padding: 0; max-width: none; }
  body { background: #fff; }
  .table tr, .avoid-break { break-inside: avoid; }
  @page { size: A4; margin: 16mm 14mm; }
}
