/* ===== Dasar ===== */
:root {
  --bg: #0B1220; --panel: #121B2E; --panel2: #172238; --line: #22304A; --text: #EAF0FA; --muted: #9FB0CC;
  --ok: #5FD8AE; --ok-bg: #0F2A2B; --ok-bd: #1F6B5C;
  --down: #FF7A59; --down-bg: #3F1B16; --down-fg: #FF9C80;
  --amber: #F2C14E; --amber-bg: #3A3015; --amber-bd: #8A6F1F;
  --blue: #6AA6FF; --cyan: #7FD1F0; --purple: #C7A6FF; --purple-bg: #2A2140; --purple-bd: #5A47A0;
  --nodata: #C3CCDD; --nodata-bg: #1A2234; --nodata-bd: #7C8BA9;
  --maint-bg: #12303F; --maint-bd: #2C6E8A;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: #8FBBFF; }
a:hover { color: #BBD5FF; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ===== Kerangka halaman ===== */
.top { background: #0E172A; border-bottom: 1px solid var(--line); }
.top-in { max-width: 1440px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; align-items: center; }
nav a { padding: 7px 11px; border-radius: 8px; color: #C9D5EA; text-decoration: none; }
nav a:hover { background: #1B2740; }
nav a[aria-current="page"] { background: #223153; color: #fff; }
.nav-sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 8px; }
.who { display: flex; gap: 10px; align-items: center; }
.who a { color: var(--text); text-decoration: none; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 20px; }
.page-title { font-size: 28px; line-height: 1.2; margin: 4px 0 16px; }
h2 { font-size: 19px; margin: 0 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 18px; }
.alertbox { background: var(--down-bg); border-color: var(--down); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.grid2 > .panel { margin: 0; }
.rowhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rowhead h2 { margin: 0; }
.note { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.empty { color: var(--muted); }
.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-bd); color: #CFF5E6; }
.flash.err { background: var(--down-bg); border-color: var(--down); color: #FFE1D8; }
.flash.warn { background: var(--amber-bg); border-color: var(--amber-bd); color: #F6E7B8; }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
ol.timeline { padding-left: 20px; margin: 0 0 10px; display: grid; gap: 4px; }

/* ===== Tombol dan formulir ===== */
.btn { display: inline-block; background: #1B2740; border: 1px solid #33466B; color: var(--text); border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: #24345A; color: #fff; }
.btn.primary { background: var(--blue); color: #08121F; border-color: var(--blue); font-weight: 600; }
.btn.primary:hover { background: #8FBBFF; color: #08121F; }
.btn.danger { background: var(--down-bg); border-color: var(--down); color: #FFD9CD; }
.btn.danger:hover { background: #55231B; }
.btn.small { padding: 4px 10px; font-size: 14px; }
.btn.wide { width: 100%; text-align: center; }
.linkbtn { background: none; border: 0; color: #8FBBFF; font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
input, select, textarea { background: #0E172A; border: 1px solid #33466B; color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; min-width: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--blue); }
input::placeholder, textarea::placeholder { color: #7D8DAA; }
textarea { resize: vertical; font-family: var(--mono); font-size: 15px; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline input, .inline select { width: auto; min-width: 140px; }
.inline.filters { margin-bottom: 16px; }
.stack { display: grid; gap: 12px; max-width: 520px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; align-items: end; }
.formgrid.inner { padding: 0; }
.span2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
legend { color: var(--muted); font-size: 14px; padding: 0 6px; }
details.panel > summary { cursor: pointer; }
details > summary { cursor: pointer; padding: 4px 0; }
.secretbox { font: 600 20px var(--mono); letter-spacing: 0.06em; background: #0E172A; border: 1px dashed var(--blue); padding: 12px; border-radius: 10px; word-break: break-all; user-select: all; margin: 8px 0; }
.docbody { background: #0E172A; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font: 15px/1.6 var(--mono); max-width: 110ch; }
.vaultref { background: var(--purple-bg); border: 1px solid var(--purple-bd); border-radius: 10px; padding: 8px 12px; }
.pager { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ===== Tabel ===== */
.tablewrap { overflow-x: auto; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #1B2740; vertical-align: middle; }
td.num, th.num { text-align: right; }
tr.subrow td { border-bottom: 2px solid var(--line); padding-top: 0; }
tr.subrow .inline { display: inline-flex; margin-right: 8px; }
td input, td select { min-width: 100px; }

/* ===== Lencana dan chip ===== */
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge.big { font-size: 15px; padding: 4px 14px; }
.st-diajukan { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd); }
.st-ditugaskan { background: #162A4D; color: var(--blue); border: 1px solid #2D5190; }
.st-dikerjakan { background: #12303F; color: var(--cyan); border: 1px solid var(--maint-bd); }
.st-tertunda { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-bd); }
.st-selesai { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-bd); }
.st-ditolak { background: var(--down-bg); color: var(--down-fg); border: 1px solid var(--down); }
.sla-late { background: var(--down); color: #2A0B05; }
.sla-near { background: var(--amber); color: #2B2103; }
.sla-safe { background: var(--ok); color: #04261D; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px 3px 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.chip.small { font-size: 13px; padding: 2px 10px; }
.c-ok { background: var(--ok); color: #04261D; }
.c-down { background: var(--down); color: #2A0B05; }
.c-nodata { background: var(--nodata); color: #111A2B; }
.c-maint { background: var(--cyan); color: #06222D; }

/* ===== Kartu ringkas ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; }
.card .num { font-size: 40px; font-weight: 700; line-height: 1.1; }
.card.k-ok { background: var(--ok-bg); border-color: var(--ok-bd); } .card.k-ok .num { color: var(--ok); }
.card.k-down { background: var(--down-bg); border-color: var(--down); } .card.k-down .num { color: var(--down-fg); }
.card.k-nodata { background: var(--nodata-bg); border-color: var(--nodata-bd); } .card.k-nodata .num { color: var(--nodata); }
.card.k-maint { background: var(--maint-bg); border-color: var(--maint-bd); } .card.k-maint .num { color: var(--cyan); }
.mini { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.mini > div { display: flex; flex-direction: column; max-width: 170px; }
.mini .num { font-size: 30px; font-weight: 700; line-height: 1.15; }
.mini .warn .num { color: var(--amber); } .mini .bad .num { color: var(--down-fg); }
.mini .st-amber .num { color: var(--amber); } .mini .st-blue .num { color: var(--blue); } .mini .st-cyan .num { color: var(--cyan); }
.mini .st-purple .num { color: var(--purple); } .mini .st-teal .num { color: var(--ok); }
.mini > div[class^="st-"] { background: none; border: 0; }
.bar { height: 14px; background: #1B2740; border-radius: 8px; overflow: hidden; margin: 6px 0 10px; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.statusbig { display: flex; align-items: center; gap: 12px; }

/* ===== Antrean persetujuan, fakta, hasil cari ===== */
.queue { display: grid; gap: 10px; }
.qitem { display: grid; gap: 8px; background: var(--amber-bg); border: 1px solid var(--amber-bd); border-radius: 12px; padding: 12px 14px; }
.qmain { display: flex; flex-direction: column; gap: 2px; }
.qact { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qact select, .qact input { width: auto; min-width: 150px; }
.actions { display: grid; gap: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.results li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.snippet { margin: 6px 0 0; color: #C9D5EA; }

/* ===== Login ===== */
body.bare { margin: 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 14px; }
.login-card h1 { margin: 0; font-size: 26px; }
.login-card form { display: grid; gap: 14px; }

/* ===== Layar monitor (1920x1080, diskalakan oleh monitor.js) ===== */
body.monitor { overflow: hidden; height: 100vh; }
.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.m-root { width: 1920px; height: 1080px; padding: 28px 40px; display: flex; flex-direction: column; gap: 18px; background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; overflow: hidden; }
.m-head { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: none; }
.m-titles { display: flex; flex-direction: column; gap: 4px; flex: none; }
.m-title-row { display: flex; align-items: center; gap: 14px; }
.m-title { font-weight: 700; font-size: 36px; letter-spacing: 0.02em; }
.m-demo { border: 1.5px solid var(--amber); color: var(--amber); border-radius: 8px; padding: 2px 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.m-sub { font-size: 16px; color: var(--muted); }
.m-counters { display: flex; gap: 14px; flex: none; }
.m-counter { display: flex; align-items: baseline; gap: 10px; border-radius: 12px; padding: 6px 18px; }
.m-counter .n { font-weight: 700; font-size: 42px; line-height: 1.1; }
.m-counter span:last-child { font-size: 15px; font-weight: 600; }
.m-counter.ok { background: var(--ok-bg); color: var(--ok); }
.m-counter.down { background: var(--down-bg); color: var(--down-fg); }
.m-counter.nodata { background: var(--nodata-bg); color: var(--nodata); }
.m-counter.maint { background: var(--maint-bg); color: var(--cyan); }
.m-health { display: flex; flex-direction: column; gap: 3px; font-size: 15px; color: var(--muted); flex: none; }
.m-health strong { color: var(--text); }
.m-health svg { vertical-align: -2px; }
.m-health .js-sound.on { color: var(--ok); }
.m-health .js-sound.off { color: var(--down-fg); }
.m-health .hb-ok { color: var(--ok); }
.m-health .hb-bad { color: var(--down-fg); }
.m-clock { text-align: right; flex: none; }
.m-time { font-weight: 700; font-size: 44px; line-height: 1.05; }
.m-date { font-size: 16px; color: var(--muted); }

.m-alert { height: 104px; border-radius: 18px; padding: 0 28px; display: flex; align-items: center; gap: 28px; flex: none; overflow: hidden; }
.m-alert.slim { height: 56px; padding: 0 24px; border-radius: 14px; gap: 16px; }
.m-alert-down { background: #4A1D16; border: 2px solid var(--down); color: #FFE1D8; }
.m-alert-calm { background: var(--ok-bg); border: 2px solid var(--ok-bd); color: #BFF0DF; }
.m-alert-ico { width: 52px; height: 52px; flex: none; }
.slim .m-alert-ico { width: 30px; height: 30px; }
.m-alert-text { flex: none; }
.m-alert-title { font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: 0.02em; }
.slim .m-alert-title { font-size: 26px; }
.m-alert-sub { font-size: 17px; color: #FFC2B0; }
.m-alert-calm .m-alert-sub { color: #9FD9C5; }
.m-alert-items { flex: 1; min-width: 0; display: flex; gap: 16px; overflow: hidden; }
.m-alert-item { flex: 1; min-width: 0; background: #2A100C; border-radius: 12px; padding: 10px 18px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.m-alert-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 27px; font-weight: 700; }
.m-alert-cat { font-size: 16px; font-weight: 600; color: #FFC2B0; }
.m-alert-meta { font-size: 17px; color: #FFD9CD; }
.m-alert-meta .unacked { color: #FFE1D8; }
.m-alert-meta .acked { color: #9FE8C9; }
.slim .m-alert-items { gap: 12px; }
.slim .m-alert-item { flex: none; padding: 3px 14px; flex-direction: row; align-items: baseline; gap: 12px; }
.slim .m-alert-name { font-size: 20px; gap: 8px; }
.slim .m-alert-meta { font-size: 16px; }

.m-main1, .m-main2, .m-main3 { flex: 1; min-height: 0; display: grid; gap: 18px; }
.m-main1, .m-main2 { grid-template-columns: 1.55fr 1fr; }
.m-main3 { grid-template-columns: 1.1fr 1fr; }
.m-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.m-panel.grow { flex: 1; }
.m-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; min-height: 0; }
.m-panel-head { height: 44px; display: flex; align-items: baseline; justify-content: space-between; flex: none; gap: 12px; }
.m-panel-title { font-weight: 700; font-size: 32px; }
.m-panel-title2 { font-weight: 700; font-size: 28px; }
.m-panel-sub { font-size: 17px; color: var(--muted); }
.m-panel-head div .m-panel-sub { margin-left: 14px; }
.m-panel-sub.tight { font-size: 15px; margin-top: -8px; flex: none; }
.m-panel-sub.amber { color: var(--amber); font-weight: 600; }
.m-panel-sub.purple { color: var(--purple); font-weight: 600; }
.m-panel.ns, .m-panel.origin { height: 232px; flex: none; }
.m-panel.cat { height: 300px; flex: none; }
.m-empty { color: var(--muted); font-size: 20px; padding: 12px; display: flex; align-items: center; }
.m-foot { font-size: 15px; color: var(--muted); flex: none; }
.m-unavailable { font-size: 22px; }
.m-unavailable p { color: var(--muted); margin: 0; }

.g-aoc { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; }
.g-foc { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; }
.g-ns { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; border: 1.5px solid; }
.t-ok { background: var(--ok-bg); border-color: var(--ok-bd); }
.t-down { background: var(--down-bg); border: 2px solid var(--down); }
.t-nodata { background: var(--nodata-bg); border: 1.5px dashed var(--nodata-bd); }
.t-maint { background: var(--maint-bg); border-color: var(--maint-bd); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-no { font-weight: 500; font-size: 18px; color: var(--muted); }
.tile-name { font-size: 28px; font-weight: 600; line-height: 1.15; }
.tile-meta { font-size: 16px; color: var(--muted); }
.t-down .tile-meta { color: #FFC2B0; }
.t-nodata .tile-meta { color: var(--nodata); }
.g-foc .tile { padding: 8px 14px; border-radius: 12px; }
.g-foc .tile-name { font-size: 23px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-foc .tile-meta { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-foc .chip { font-size: 13px; padding: 2px 10px 2px 7px; }
.g-foc .tile-no { font-size: 16px; }
.g-ns .tile { padding: 10px 14px; }
.g-ns .tile-name { font-size: 40px; font-weight: 700; }

.m-kpis { height: 132px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; flex: none; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 22px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.kpi-l { font-size: 18px; font-weight: 600; color: var(--muted); }
.kpi-v { font-weight: 700; font-size: 54px; line-height: 1; }
.kpi-s { font-size: 16px; color: var(--muted); }
.k-amber { background: var(--amber-bg); border: 1.5px solid var(--amber-bd); }
.k-amber .kpi-v { color: var(--amber); } .k-amber .kpi-l, .k-amber .kpi-s { color: #E8D9A8; }
.k-red { background: var(--down-bg); border: 2px solid var(--down); }
.k-red .kpi-v { color: var(--down-fg); } .k-red .kpi-l, .k-red .kpi-s { color: #FFC2B0; }
.trow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 110px 120px 230px; gap: 14px; align-items: center; padding: 0 14px; }
.thead { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); flex: none; }
.tlist { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.tlist .trow { border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel2); font-size: 20px; color: #C9D5EA; min-width: 0; }
.tlist .t-late { background: var(--down-bg); border: 2px solid var(--down); }
.tlist .t-near { background: var(--amber-bg); border-color: var(--amber-bd); }
.tid { font-weight: 500; font-size: 22px; }
.tsys { font-size: 24px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trem { display: flex; align-items: center; gap: 10px; }
.tt { font-weight: 700; font-size: 30px; color: var(--text); }
.t-late .tt { color: var(--down-fg); } .t-near .tt { color: var(--amber); }
.tchip { border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.s-late { background: var(--down); color: #2A0B05; } .s-near { background: var(--amber); color: #2B2103; } .s-safe { background: var(--ok); color: #04261D; }
.catrows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.catrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px 112px; gap: 14px; align-items: center; }
.catrow.plan { grid-template-columns: 64px minmax(0, 1fr) 100px; }
.catname { font-weight: 700; font-size: 24px; }
.cattrack { height: 22px; background: #1B2740; border-radius: 6px; overflow: hidden; display: block; }
.catfill { display: block; height: 22px; background: var(--blue); border-radius: 6px; }
.catcount { font-weight: 700; font-size: 26px; text-align: right; }
.catcount.wide { font-weight: 600; font-size: 24px; }
.catsla { font-size: 20px; font-weight: 600; text-align: right; }
.evrows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 6px; }
.evrow { display: grid; grid-template-columns: 70px 160px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--panel2); border-radius: 10px; padding: 0 12px; }
.evrow .chip { justify-self: start; }
.evt { font-weight: 500; font-size: 20px; color: #C9D5EA; }
.evx { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.m-stcards { height: 150px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; flex: none; }
.stc { border-radius: 18px; padding: 14px 22px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; border: 1px solid var(--line); background: var(--panel); }
.stc-l { font-size: 19px; font-weight: 600; color: var(--muted); }
.stc-v { font-weight: 700; font-size: 64px; line-height: 1; }
.stc-s { font-size: 16px; color: var(--muted); }
.stc-amber { background: var(--amber-bg); border: 1.5px solid var(--amber-bd); } .stc-amber .stc-v { color: var(--amber); } .stc-amber .stc-l, .stc-amber .stc-s { color: #E8D9A8; }
.stc-blue .stc-v { color: var(--blue); } .stc-cyan .stc-v { color: var(--cyan); }
.stc-purple { background: var(--purple-bg); border: 1.5px solid var(--purple-bd); } .stc-purple .stc-v { color: var(--purple); } .stc-purple .stc-l, .stc-purple .stc-s { color: #DCCDF7; }
.stc-teal { background: var(--ok-bg); border: 1.5px solid var(--ok-bd); } .stc-teal .stc-v { color: var(--ok); }
.planhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none; }
.planbig { font-weight: 700; font-size: 64px; line-height: 1; margin-right: 14px; }
.plansub { font-size: 20px; color: #C9D5EA; }
.extrachip { background: var(--amber); color: #2B2103; border-radius: 999px; padding: 6px 16px; font-size: 18px; font-weight: 700; }
.planbar { display: flex; align-items: center; gap: 14px; flex: none; }
.pb-track { flex: 1; height: 34px; background: #1B2740; border-radius: 10px; overflow: hidden; display: block; }
.pb-fill { display: block; height: 34px; background: var(--ok); border-radius: 10px; }
.pb-pct { font-weight: 700; font-size: 32px; width: 80px; text-align: right; }
.stack-bar { display: flex; height: 38px; border-radius: 10px; overflow: hidden; gap: 2px; flex: none; }
.seg { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: #0B1220; }
.o1 { background: #6AA6FF; } .o2 { background: #A9C9FF; } .o3 { background: #5FD8AE; } .o4 { background: #A5EBD3; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; flex: 1; min-height: 0; align-content: center; }
.leg { display: flex; align-items: center; gap: 10px; font-size: 18px; color: #C9D5EA; }
.sw { width: 16px; height: 16px; border-radius: 4px; flex: none; display: block; }
.lrows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 10px; }
.lrow { border-radius: 12px; padding: 0 16px; display: grid; grid-template-columns: 124px minmax(0, 1fr) 110px; gap: 14px; align-items: center; min-width: 0; }
.l-amber { background: var(--amber-bg); border: 1.5px solid var(--amber-bd); }
.l-purple { background: var(--purple-bg); border: 1.5px solid var(--purple-bd); }
.ltype { justify-self: start; background: #1B2A47; color: #BFD4FF; border: 1px solid #3A568F; border-radius: 8px; padding: 3px 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.lmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lname { font-size: 25px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmeta { font-size: 17px; color: #E8D9A8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-purple .lmeta { color: #DCCDF7; }
.lwait { font-weight: 700; font-size: 26px; text-align: right; color: var(--amber); }
.l-purple .lwait { color: var(--purple); }

.offline { position: fixed; left: 0; right: 0; top: 0; background: var(--down); color: #2A0B05; font-weight: 700; font-size: 24px; text-align: center; padding: 14px; z-index: 20; }
.enable-sound { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 21; background: var(--amber); color: #2B2103; font: 700 22px var(--font); border: 0; border-radius: 14px; padding: 16px 28px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
