/* ==========================================================
   Soerabaja45 Tracking System
   Putih dominan, aksen cyan & magenta dari logo (CMYK).
   Layout: menu putih di kiri, area kerja abu sangat muda, panel putih.
   ========================================================== */
:root {
  --bg: #f4f6f9;            /* latar area kerja */
  --surface: #ffffff;       /* panel, menu */
  --soft: #f1f4f8;          /* isian lembut di dalam panel */
  --line: #e4e8ee;
  --line-soft: #eef1f5;
  --ink: #16202c;
  --ink-2: #364150;
  --muted: #5d6876;
  --faint: #8a94a1;
  --cyan: #00aeef;          /* cyan logo: penanda aktif, grafik */
  --cyan-ink: #0072a3;      /* cyan gelap: tombol & teks */
  --cyan-soft: #e6f6fd;
  --magenta: #ec008c;       /* magenta logo: perhatian */
  --magenta-ink: #b0006a;
  --magenta-soft: #fdeaf4;
  --black: #141414;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 32, 44, .05), 0 6px 20px -8px rgba(22, 32, 44, .10);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.mono, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.late { color: var(--magenta-ink); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kerangka ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex: 0 0 248px; background: var(--surface); border-right: 1px solid var(--line);
  padding: 26px 14px 16px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.main { flex: 1; min-width: 0; padding: 30px 36px 56px; display: flex; flex-direction: column; gap: 22px; max-width: 1320px; }

.brand { display: flex; flex-direction: column; gap: 5px; padding: 0 12px; color: var(--black); text-decoration: none !important; }
.brand img { max-width: 176px; height: auto; display: block; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.brand-sub { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.c { background: var(--cyan); }
.dot.m { background: var(--magenta); margin-left: -9px; mix-blend-mode: multiply; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-parent { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; text-decoration: none; }
.nav a:hover { background: var(--soft); }
.nav a.on { background: var(--cyan-soft); color: var(--cyan-ink); font-weight: 700; }
.nav-ico { flex: none; color: var(--faint); }
.nav a.on .nav-ico { color: var(--cyan-ink); }
.nav-head { margin: 16px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.nav-group.open .nav-parent { color: var(--ink); font-weight: 700; }
.nav-group.open .nav-parent .nav-ico { color: var(--cyan-ink); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 21px; padding-left: 12px; border-left: 2px solid var(--line); }
.nav-sub a { padding: 8px 12px; font-size: 14px; }

.me { margin-top: auto; background: var(--soft); border-radius: 12px; padding: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.me-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--black); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none !important; }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; }
.me-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.me-info span { font-size: 12px; color: var(--muted); }
.me-edit { flex-basis: 100%; font-size: 13px; font-weight: 600; padding-left: 46px; }
.me form { margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--magenta-soft); color: var(--magenta-ink); }

/* ---------- Kepala halaman ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.eyebrow { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hint { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 80ch; }
.h2 { font-size: 16px; font-weight: 700; }

/* ---------- Tombol & form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14.5px/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--cyan-ink); color: #fff; box-shadow: 0 1px 2px rgba(0, 80, 120, .25); }
.btn-primary:hover { background: #005f88; }
.btn-accent { background: var(--black); color: #fff; }
.btn-accent:hover { background: #2c2c2c; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { background: var(--surface); border-color: #f2b8d6; color: var(--magenta-ink); }
.btn-danger:hover { background: var(--magenta-soft); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 9px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--cyan-ink); cursor: pointer; }
button.link:hover { text-decoration: underline; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel.pad, .form { padding: 22px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 18px 20px 10px; font-size: 13.5px; }

.form { display: flex; flex-direction: column; gap: 16px; max-width: 660px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; color: #2b3542; }
.req { font-size: 11px; font-weight: 700; color: var(--magenta-ink); margin-left: 4px; text-transform: uppercase; letter-spacing: .06em; }
.opt { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd6df; border-radius: 10px;
  font: 15px/1.4 var(--font); color: var(--ink); background: var(--surface);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
input:disabled { background: var(--soft); color: var(--muted); }
.err { color: var(--magenta-ink); font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; padding: 12px 14px; background: var(--cyan-soft); border-radius: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--cyan-ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pw-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pw-box legend { padding: 0 6px; font-size: 13.5px; font-weight: 700; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters .field { flex: 1 1 160px; }
.filters .field:first-of-type { flex-basis: 220px; }
.filter-btns { display: flex; gap: 8px; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 11px; align-self: flex-end; }
.seg a { padding: 9px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 30, 45, .14); }

/* ---------- Pesan ---------- */
.flash { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.flash-success { background: var(--cyan-soft); color: #00506f; }
.flash-error { background: var(--magenta-soft); color: #7a0049; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fafbfd; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .empty { text-align: center; color: var(--muted); padding: 28px; }
.tbl tr.dim td { color: #9aa3ae; }
.tbl tr.day-row td { background: var(--soft); font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 7px 16px; }
.row-actions { display: flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }
.row-actions form { margin: 0; }
.code { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.tag { display: inline-block; font-family: var(--font); font-size: 11.5px; background: var(--magenta-soft); color: var(--magenta-ink); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.lvl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); text-decoration: none; }
.pager a.on { background: var(--cyan-ink); border-color: var(--cyan-ink); color: #fff; }

/* ---------- Status ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-antre_desain, .badge-antre_produksi { background: #eef1f5; color: #3a4553; }
.badge-proses_desain { background: var(--cyan-soft); color: #005a80; }
.badge-proses_produksi { background: var(--magenta-soft); color: var(--magenta-ink); }
.badge-selesai { background: var(--black); color: #fff; }
.role { font-size: 12.5px; font-weight: 600; }
.role-admin { color: var(--black); }
.role-designer { color: var(--cyan-ink); }
.role-produksi { color: var(--magenta-ink); }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 2px 10px 2px 8px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.lvl::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lvl); }

/* ---------- Dashboard admin ---------- */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.flow-step { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none !important; position: relative; }
.flow-step:last-child { border-right: 0; background: var(--soft); }
.flow-step:hover { background: #f8fafc; }
.flow-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #c9d1da; }
.flow-proses_desain::before { background: var(--cyan); }
.flow-proses_produksi::before { background: var(--magenta); }
.flow-selesai::before { background: var(--black); }
.flow-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.flow-num { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }

.alert-box { background: var(--magenta-soft); border-radius: var(--radius); padding: 16px 20px; color: #5c1238; }
.alert-box .h2 { color: var(--magenta-ink); font-size: 15px; margin-bottom: 8px; }
.alert-box ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.alert-box .code { color: var(--magenta-ink); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.grid-side { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }

.stats, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stats b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Dashboard Desain / Produksi ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "total gauge" "week legend"; gap: 18px; }
.home-total { grid-area: total; display: flex; flex-direction: column; gap: 6px; }
.home-gauge { grid-area: gauge; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.home-week { grid-area: week; }
.home-legend { grid-area: legend; }
.sum-label { font-size: 13.5px; font-weight: 700; color: #2b3542; }
.hero-num { font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-num small { font-size: 18px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.quick { margin-top: auto; padding-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.quick-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--ink); text-decoration: none !important; transition: background .15s; }
.quick-item:hover { background: var(--cyan-soft); }
.quick-item b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.quick-item span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.quick-item.is-alert { background: var(--magenta-soft); }
.quick-item.is-alert b { color: var(--magenta-ink); }

.legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13.5px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.legend-note { margin: 10px 0 0; }

.gauge { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge-read { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gauge-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.gauge-num small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.gauge-chip { font-size: 12.5px; font-weight: 700; padding: 4px 14px; border-radius: 999px; background: var(--soft); color: var(--muted); }

/* ---------- Kerjakan Desain / Produksi ---------- */
.work { display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow-x: auto; box-shadow: var(--shadow); }
.tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; text-decoration: none !important; transition: background .15s; }
.tab:hover { background: var(--soft); color: var(--ink); }
.tab.on { background: var(--ink); color: #fff; }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: #c2cad4; }
.tab-kerja .tab-dot { background: var(--cyan); }
.tab-revisi .tab-dot { background: var(--magenta); }
.tab-selesai .tab-dot { background: #3db67f; }
.count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.tab.on .count { background: rgba(255, 255, 255, .18); color: #fff; }
.tab-alert:not(.on) .count { background: var(--magenta-soft); color: var(--magenta-ink); }
.tab-hint { margin: 2px 4px 0; font-size: 13px; color: var(--muted); }
.empty { margin: 0; padding: 30px 16px; color: var(--muted); font-size: 14px; text-align: center; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list > .empty { background: var(--surface); border: 1px dashed #cfd6df; border-radius: var(--radius); }
.row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 180px auto; gap: 18px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s; }
.row:hover { border-color: #cfd8e2; }
.row-late { border-color: #f2a9cf; background: #fffafd; }
.r-code, .r-main, .r-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.r-code .code { display: inline-block; align-self: flex-start; padding: 3px 9px; border-radius: 8px; background: var(--soft); color: var(--ink); }
.r-main strong { font-size: 15.5px; }
.prod { font-size: 13px; font-weight: 600; color: var(--cyan-ink); }
.r-notes { font-size: 13px; color: #3a4553; }
.r-notes summary { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.r-notes[open] summary { color: var(--cyan-ink); }
.r-notes div { margin-top: 6px; padding: 8px 10px; background: var(--soft); border-radius: 8px; overflow-wrap: anywhere; }
.r-info { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.r-act { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.r-act form { margin: 0; }

/* ---------- Grafik ---------- */
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 14px; }
.cols { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: 180px auto; column-gap: 8px; }
.cols-grid { grid-column: 1 / -1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.cols-tick { position: relative; height: 0; border-top: 1px solid var(--line-soft); }
.cols-tick:last-child { border-top-color: #cfd6df; }
.cols-tick span { position: absolute; left: 0; top: -9px; width: 24px; text-align: right; font-size: 11px; color: var(--faint); background: var(--surface); font-variant-numeric: tabular-nums; }
.cols-plot { grid-column: 2; grid-row: 1; display: flex; align-items: flex-end; gap: 2px; position: relative; }
.col-slot { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; border-radius: 6px; outline-offset: 0; }
.col-slot:hover { background: rgba(0, 174, 239, .06); }
.col-bar { display: block; width: min(70%, 26px); min-height: 0; background: #9fdcf6; border-radius: 4px 4px 0 0; }
.col-bar.is-current { background: var(--cyan); }
.col-slot:hover .col-bar { background: var(--cyan-ink); }
.col-val { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.cols-x { grid-column: 2; grid-row: 2; display: flex; gap: 2px; padding-top: 8px; }
.cols-x span { flex: 1 1 0; text-align: center; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: visible; }

.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(70px, 120px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.hbar-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-name a { color: var(--ink); }
.hbar-track { position: relative; height: 22px; border-radius: 6px; background: var(--soft); }
.hbar-fill { display: block; height: 100%; border-radius: 0 6px 6px 0; min-width: 4px; }
.hbar-val { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar.is-empty .hbar-name { color: var(--faint); }

/* tooltip untuk elemen ber-data-tip */
[data-tip] { cursor: default; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  padding: 7px 10px; border-radius: 8px; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.col-slot[data-tip]:hover::after { bottom: auto; top: -6px; transform: translate(-50%, -100%); }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-num { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-num small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); background: var(--cyan-soft); color: #08415c; }
.insight svg { flex: none; margin-top: 2px; color: var(--cyan-ink); }
.insight p { margin: 0; font-size: 14.5px; }

/* ---------- Detail brief ---------- */
.kv { margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.kv .full { grid-column: 1 / -1; }
.kv dt { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 2px 0 0; font-size: 15px; }
.notes-full { white-space: normal; overflow-wrap: anywhere; }

.steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: #9aa3ae; }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c9d1da; justify-self: center; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--cyan); border-color: var(--cyan); }
.steps li.done:last-child::before { background: var(--black); border-color: var(--black); }
.step-label { font-weight: 600; }
.step-at { font-size: 13px; }

.log { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.danger-zone { display: flex; justify-content: flex-end; }

/* ---------- Login ---------- */
body.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 390px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 34px 30px; display: flex; flex-direction: column; gap: 18px; }
.auth-card .brand { padding: 0 0 6px; }

/* ---------- Layar sedang & kecil (HP) ---------- */
@media (max-width: 1080px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "total" "gauge" "week" "legend"; }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .r-info { grid-column: 2; }
  .r-act { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; height: auto; position: static; padding: 14px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { padding: 0; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -4px; }
  .nav a, .nav-parent { white-space: nowrap; padding: 8px 12px; }
  .nav-head, .nav-parent { display: none; }
  .nav-group { display: contents; }
  .nav-sub { display: contents; }
  .nav-sub a::before { content: "Laporan "; }
  .main { padding: 20px 16px 48px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .r-code { flex-direction: row; gap: 10px; align-items: center; }
  .r-main { grid-column: 1 / -1; }
  .r-info { grid-column: 1; }
  .r-act { grid-column: 2; grid-row: 3; }
  .tab { flex: 0 0 auto; }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step { border-bottom: 1px solid var(--line); }
  .flow-step:nth-child(2n) { border-right: 0; }
  .flow-step:last-child { grid-column: 1 / -1; }
  .steps li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .step-who { grid-column: 2; grid-row: 2; font-size: 13px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .hbar { grid-template-columns: 80px minmax(0, 1fr); }
  .hbar-val { grid-column: 2; justify-content: flex-start; }
  .hero-num { font-size: 46px; }
  .cols-x span { font-size: 10.5px; }
}

/* Perbaikan kecil */
.code, .r-code .muted { white-space: nowrap; }
@media (min-width: 761px) {
  .shell { background: linear-gradient(to right, var(--surface) 248px, var(--bg) 248px); }
}
