/* =========================================================
   INFO BPJS INDONESIA — Dashboard Media Digital
   Design tokens, layout, komponen. Mobile-first.
   ========================================================= */
:root {
  color-scheme: light;
  --font: Inter, "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --navy-900: #0b1f3a;
  --navy-800: #102a4c;
  --navy-700: #17365f;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --gold-500: #c99a12;
  --gold-400: #e0b43a;
  --gold-100: #fbf1d0;

  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef2f5;
  --border: #e1e6ea;
  --border-strong: #cdd5db;
  --text: #0f1b2d;
  --text-2: #4a5666;
  --text-3: #6b7685;
  --primary: var(--emerald-600);
  --primary-hover: var(--emerald-700);
  --primary-soft: var(--emerald-50);
  --primary-ink: #ffffff;
  --accent: var(--gold-500);
  --accent-soft: var(--gold-100);
  --danger: #c93a3a;
  --danger-soft: #fdecec;
  --warn: #9a6700;
  --warn-soft: #fdf3d6;
  --info: #1c5cab;
  --info-soft: #e7f0fb;
  --ok-text: #006300;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 6px 20px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 18px 48px rgba(11, 31, 58, 0.22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-w: 268px;
  --topbar-h: 56px;
  --bottomnav-h: 64px;
  --focus: 0 0 0 3px rgba(16, 185, 129, 0.45);

  /* Warna grafik (palet kategorikal tervalidasi, slot tetap) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --muted: #898781;
  --cat-naker: #1c5cab;
  --cat-kes: #047857;
  --cat-hak: #9a6700;
  --cat-keb: #6250d6;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08121f;
  --surface: #0e1b2e;
  --surface-2: #12223a;
  --surface-3: #172a45;
  --border: #20344f;
  --border-strong: #2d4565;
  --text: #eaf0f6;
  --text-2: #b4c0cf;
  --text-3: #8a98ab;
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --primary-ink: #04261b;
  --accent: #e0b43a;
  --accent-soft: rgba(224, 180, 58, 0.16);
  --danger: #ef6b6b;
  --danger-soft: rgba(239, 107, 107, 0.14);
  --warn: #e0b43a;
  --warn-soft: rgba(224, 180, 58, 0.14);
  --info: #6da7ec;
  --info-soft: rgba(109, 167, 236, 0.14);
  --ok-text: #0ca30c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c;
  --grid: #2c2c2a;
  --axis: #383835;
  --muted: #898781;
  --cat-naker: #6da7ec;
  --cat-kes: #34d399;
  --cat-hak: #e0b43a;
  --cat-keb: #9085e9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) { color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0 0 12px; }
a { color: var(--info); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
small, .small { font-size: 13px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.sm { width: 16px; height: 16px; }
svg.ic.lg { width: 24px; height: 24px; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-w));
  background: linear-gradient(180deg, var(--navy-900), #0a1830);
  color: #dbe5f1; z-index: 60; display: flex; flex-direction: column;
  transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
  padding-top: env(safe-area-inset-top);
}
.sidebar.open { transform: none; visibility: visible; transition: transform .22s ease; box-shadow: var(--shadow-lg); }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700)); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-name { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .01em; line-height: 1.2; }
.brand-sub { font-size: 12px; color: #8fa6c2; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #7d93b0; margin: 16px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; margin-bottom: 2px;
  border-radius: 10px; color: #c5d3e5; text-decoration: none; font-weight: 500; font-size: 14.5px;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(16,185,129,.18); color: #fff; box-shadow: inset 3px 0 0 var(--emerald-500); }
.side-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #8fa6c2; }
.scrim { position: fixed; inset: 0; background: rgba(5, 12, 24, .55); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }

.topbar {
  position: sticky; top: 0; z-index: 40; height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 8px; padding-left: 8px; padding-right: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .t-title { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 16px 16px calc(var(--bottomnav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; }

.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 45; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
}
.bottomnav button, .bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0;
  color: var(--text-3); font-size: 11.5px; font-weight: 500; text-decoration: none; min-height: 44px; cursor: pointer;
}
.bottomnav [aria-current="page"] { color: var(--primary); }
.bottomnav [aria-current="page"] svg { transform: translateY(-1px); }

@media (min-width: 768px) {
  .main { padding: 24px 28px 48px; }
  .bottomnav { display: none; }
  h1 { font-size: 28px; }
}
@media (min-width: 1024px) {
  .nav a { min-height: 40px; padding: 6px 12px; }
  .nav-group { margin: 12px 10px 4px; }
  .sidebar { transform: none; visibility: visible; width: var(--sidebar-w); box-shadow: none; }
  .scrim { display: none; }
  .topbar { display: none; }
  .main-wrap { margin-left: var(--sidebar-w); }
  .main { padding: 32px 36px 56px; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.page-head .lead { color: var(--text-2); margin: 4px 0 0; max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; }
.g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .g-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .g-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stat { display: flex; flex-direction: column; gap: 6px; position: relative; }
.stat .label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .sub { font-size: 12.5px; color: var(--text-3); }
.stat .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat input.inline { width: 100%; border: 1px solid transparent; background: transparent; font-size: 26px; font-weight: 700; padding: 0; letter-spacing: -0.02em; border-radius: 6px; color: var(--text); }
.stat input.inline:hover { border-color: var(--border); }
.stat input.inline:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); background: var(--surface-2); padding: 0 6px; }

.hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 60%, #0e5a4a); color: #fff; border: 0; position: relative; overflow: hidden;
}
.hero .muted, .hero .text-2 { color: #b9c8dc; }
.hero h2 { color: #fff; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(224,180,58,.35), transparent 70%); pointer-events: none; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: #1a1300; }
.btn-gold:hover { background: var(--gold-400); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 10px; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn-sm { min-height: 40px; } }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); min-width: 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
  color: var(--text); font-size: 15px; font-weight: 400;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.form-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .form-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--text-3); font-weight: 400; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 7px 12px; min-height: 36px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
@media (pointer: coarse) { .seg button { min-height: 40px; } }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.check:hover { background: var(--surface-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; cursor: pointer; }
.check span { flex: 1; font-size: 14.5px; }
.check input:checked + span { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }

/* ---------- Badges, progress ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--primary-soft); color: var(--ok-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gold { background: var(--accent-soft); color: var(--warn); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress.gold > i { background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); }
.progress.thin { height: 6px; }
.req { padding: 10px 0; border-top: 1px solid var(--border); }
.req:first-child { border-top: 0; }
.req .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 6px; align-items: baseline; flex-wrap: wrap; }

.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-soft); color: var(--text); font-size: 14px; border: 1px solid transparent; }
.note svg { color: var(--info); margin-top: 2px; }
.note.warn { background: var(--warn-soft); } .note.warn svg { color: var(--warn); }
.note.err { background: var(--danger-soft); } .note.err svg { color: var(--danger); }
.note.ok { background: var(--primary-soft); } .note.ok svg { color: var(--primary); }
.note > div { min-width: 0; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .tbl.stackable thead { display: none; }
  .tbl.stackable, .tbl.stackable tbody, .tbl.stackable tr, .tbl.stackable td { display: block; width: 100%; }
  .tbl.stackable tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .tbl.stackable td { border: 0; padding: 3px 0; text-align: left !important; }
  .tbl.stackable td[data-label]::before { content: attr(data-label) ": "; font-size: 12px; color: var(--text-3); font-weight: 600; }
}

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 12, 24, .6); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal {
  width: 100%; max-width: 720px; max-height: 92dvh; background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.sm { max-width: 460px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 8px 12px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: 17px; min-width: 0; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
@media (min-width: 720px) { .modal-back { align-items: center; padding: 24px; } .modal { border-radius: 18px; } }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--bottomnav-h) + 14px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-md); animation: fade .2s; max-width: 92vw; }
.toast.err { background: var(--danger); }
@media (min-width: 768px) { .toasts { bottom: 24px; } }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-head h2 { min-width: 0; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-dow { padding: 6px 2px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-3); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); text-transform: uppercase; }
.cal-cell {
  min-height: 58px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface);
  position: relative; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 3px; border-top: 0; border-left: 0; min-width: 0;
}
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out { background: var(--surface-2); color: var(--text-3); }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-cell .d { font-size: 12.5px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .d { background: var(--primary); color: var(--primary-ink); }
.cal-cell .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-chip { display: none; }
@media (min-width: 720px) {
  .cal-cell { min-height: 108px; padding: 6px; }
  .cal-cell .dots { display: none; }
  .cal-chip {
    display: flex; align-items: center; gap: 5px; width: 100%; border: 0; text-align: left; padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3;
    background: var(--surface-3); color: var(--text); cursor: pointer; overflow: hidden; border-left: 3px solid var(--text-3);
  }
  .cal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .cal-chip.naker { border-left-color: var(--cat-naker); } .cal-chip.kes { border-left-color: var(--cat-kes); }
  .cal-chip.hak { border-left-color: var(--cat-hak); } .cal-chip.keb { border-left-color: var(--cat-keb); }
  .cal-chip.done { opacity: .6; text-decoration: line-through; }
  .cal-chip.prod { background: var(--warn-soft); }
  .cal-more { font-size: 11.5px; color: var(--text-3); padding-left: 4px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.c-naker { background: var(--cat-naker); } .c-kes { background: var(--cat-kes); } .c-hak { background: var(--cat-hak); } .c-keb { background: var(--cat-keb); }
.st-rencana { background: var(--border-strong); } .st-produksi { background: var(--gold-400); } .st-selesai { background: var(--emerald-500); }

.agenda-item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); width: 100%; text-align: left; cursor: pointer; align-items: flex-start; }
.agenda-item:hover { background: var(--surface-2); }
.agenda-item .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; }

/* ---------- Charts ---------- */
.chart { width: 100%; position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; z-index: 5; min-width: 120px; opacity: 0; transition: opacity .08s; }
.chart-tip b { display: block; margin-bottom: 4px; }
.chart-tip .r { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chart-tip .r i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.chart-empty { text-align: center; color: var(--text-3); padding: 32px 12px; font-size: 14px; }

/* ---------- Misc blocks ---------- */
pre.block, .block {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: var(--font); font-size: 14px; white-space: pre-wrap; word-wrap: break-word; margin: 0; line-height: 1.6;
}
pre.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--navy-900); color: #d8e6f7; border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps > li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.steps > li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; }
.steps > li > div { min-width: 0; flex: 1; }
.kv { display: grid; gap: 4px 12px; grid-template-columns: minmax(0, 1fr); font-size: 14px; }
@media (min-width: 640px) { .kv { grid-template-columns: 160px minmax(0, 1fr); } .kv dt { padding-top: 2px; } }
.kv dt { color: var(--text-3); font-weight: 600; font-size: 13px; }
.kv dd { margin: 0 0 8px; min-width: 0; overflow-wrap: anywhere; }
ul.clean { margin: 0; padding-left: 18px; } ul.clean li { margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; background: var(--surface-3); border-radius: 999px; font-size: 12.5px; color: var(--text-2); }
.empty { text-align: center; color: var(--text-3); padding: 28px 12px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; border: 0; }
.link-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--surface); }
.link-card:hover { border-color: var(--primary); background: var(--surface-2); }
.link-card .u { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
details.acc { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
details.acc > summary { padding: 12px 14px; font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; flex: none; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc > .acc-body { padding: 0 14px 14px; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; }
.copy-row .block { flex: 1; min-width: 0; }

/* Thumbnail mockups */
.thumb-wrap { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 720px) { .thumb-wrap { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, .7fr)); } }
.thumb { position: relative; border-radius: 12px; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 6%; box-shadow: var(--shadow-md); isolation: isolate; }
.thumb.r169 { aspect-ratio: 16 / 9; } .thumb.r916 { aspect-ratio: 9 / 16; max-width: 240px; width: 100%; margin: 0 auto; }
.thumb .tt { font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: -0.01em; text-shadow: 0 2px 10px rgba(0,0,0,.35); font-size: clamp(20px, 4.6vw, 38px); position: relative; z-index: 2; word-break: break-word; }
.thumb.r916 .tt { font-size: clamp(18px, 5vw, 26px); }
.thumb .ti { position: absolute; z-index: 1; opacity: .95; }
.thumb .zone { position: absolute; border: 1.5px dashed rgba(255,255,255,.6); border-radius: 6px; font-size: 10px; padding: 1px 5px; color: rgba(255,255,255,.9); z-index: 3; background: rgba(0,0,0,.18); }
.thumb.naker { background: linear-gradient(135deg, #0d366b, #1c5cab 55%, #10b981); }
.thumb.kes { background: linear-gradient(135deg, #0a4a52, #0e8f95 55%, #34d399); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; background: var(--surface); cursor: pointer; min-height: 36px; }
.swatch i { width: 28px; height: 28px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
noscript .card { margin: 24px; }

@media print { .sidebar, .topbar, .bottomnav, .page-actions, .toasts { display: none !important; } .main-wrap { margin: 0 !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .progress > i { background: Highlight; } .cal-chip { border: 1px solid CanvasText; } }
