/* ============================================================
   DESIGN SYSTEM — dipakai semua aplikasi buatan Studio.
   Prinsip: token dulu, komponen kemudian. Jangan menebak warna
   baru di dalam halaman; pakai variabel di :root.
   ============================================================ */

:root {
  color-scheme: light;

  /* Palet — netral hangat + satu aksen kuat */
  --bg: #f6f7f9;
  --bg-soft: #eef0f4;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #131720;
  --ink-2: #3c4452;
  --muted: #6b7383;
  --line: #e3e7ee;
  --line-strong: #cfd6e2;
  --accent: #3b5bfd;
  --brand: var(--accent);
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --ok: #0f9d63;
  --ok-soft: #e4f7ee;
  --warn: #b7791f;
  --warn-soft: #fdf3e0;
  --bad: #d0342c;
  --bad-soft: #fdeceb;
  --info: #1f7ae0;
  --info-soft: #e8f2fd;

  /* Bentuk & jarak */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Elevasi */
  --sh-1: 0 1px 2px rgba(16, 24, 40, .06);
  --sh-2: 0 4px 14px rgba(16, 24, 40, .07);
  --sh-3: 0 18px 44px rgba(16, 24, 40, .14);

  /* Tipografi */
  --font: "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: 12px;
  --t-sm: 13.5px;
  --t-md: 15px;
  --t-lg: clamp(17px, 1.4vw, 19px);
  --t-xl: clamp(21px, 2.2vw, 26px);
  --t-2xl: clamp(26px, 3.4vw, 38px);

  --dur: 180ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --sidebar: 244px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f15;
  --bg-soft: #111621;
  --surface: #151a24;
  --surface-2: #1a202c;
  --ink: #eef1f7;
  --ink-2: #d3dae6;
  --muted: #a1aabc;
  --line: #242c3a;
  --line-strong: #333d4f;
  --brand: color-mix(in srgb, var(--accent) 84%, #ffffff);
  --brand-ink: #0c0f15;
  --brand-soft: color-mix(in srgb, var(--accent) 22%, #0c0f15);
  --ok: #4ade9a;
  --ok-soft: #10241c;
  --warn: #f0bd62;
  --warn-soft: #2a2113;
  --bad: #ff8078;
  --bad-soft: #2c1615;
  --info: #6cb6ff;
  --info-soft: #12233a;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 6px 18px rgba(0, 0, 0, .45);
  --sh-3: 0 22px 50px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 var(--sp-2); line-height: 1.22; letter-spacing: -.018em; font-weight: 680; }
h1 { font-size: var(--t-xl); }
h2 { font-size: var(--t-lg); }
h3 { font-size: var(--t-md); }
p { margin: 0 0 var(--sp-3); color: var(--ink-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: var(--t-sm); color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .92em; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 var(--sp-2); }
.brand-mark {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 11px; color: var(--brand-ink); font-weight: 800; font-size: 15px;
  background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #8b5cf6));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 34%, transparent);
}
.brand-mark.has-logo {
  background: none; box-shadow: none; border-radius: 0; overflow: visible;
  width: 42px; height: 42px;
}
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-weight: 700; letter-spacing: -.02em; }
.brand-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: var(--sp-3) var(--sp-2) var(--sp-1); }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 520;
  text-decoration: none; position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); font-weight: 650; }
.nav a[aria-current="page"] svg { opacity: 1; color: var(--brand-ink); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-2); }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .grow { flex: 1; }
.crumb { font-size: var(--t-sm); color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 620; }

.content { padding: var(--sp-5); max-width: 1200px; width: 100%; }
.content.flush { padding: 0; max-width: none; }

.page-head { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head p { margin: 0; }
.eyebrow { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 640; margin-bottom: 4px; }

/* ---------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.card-pad { padding: var(--sp-5); }
.card-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .grow { flex: 1; }
.card-foot { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }

.grid { display: grid; gap: var(--sp-4); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.span-2 { grid-column: span 2; }

/* Hero / header bergradasi halus (jangan norak) */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-6); margin-bottom: var(--sp-5);
  background: var(--surface);
  box-shadow: var(--sh-1);
}
.hero::after {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 62%),
              radial-gradient(circle at 70% 70%, color-mix(in srgb, #8b5cf6 20%, transparent), transparent 60%);
  filter: blur(8px); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero { display: flex; align-items: center; gap: var(--sp-5); }
.hero-main { flex: 1; min-width: 0; }
.hero h1 { font-size: var(--t-2xl); max-width: 620px; }
.hero p { max-width: 560px; margin-bottom: 0; }

/* stat */
.stat { padding: var(--sp-5); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat .k { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat .v { font-size: clamp(22px, 2.6vw, 30px); font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: var(--t-sm); color: var(--muted); }
.stat .ico {
  position: absolute; right: var(--sp-4); top: var(--sp-4);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat .ico svg { width: 18px; height: 18px; }
.stat.up .v { color: var(--ok); }
.stat.down .v { color: var(--bad); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary {
  background: var(--brand); border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent);
}
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 86%, #000); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-xs); }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 550; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="search"], input[type="tel"], input[type="time"],
select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--ink-2)); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-4); }
.search {
  position: relative; display: flex; align-items: center; min-width: 200px;
}
.search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }

/* ---------------------------------------------------------- table */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; padding: 10px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--ink); }
thead th .arrow { opacity: .35; margin-left: 4px; }
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-title { font-weight: 600; }
.row-sub { font-size: 12.5px; color: var(--muted); }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 620; white-space: nowrap;
  background: var(--bg-soft); color: var(--ink-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.plain::before { display: none; }

/* ---------------------------------------------------------- empty & skeleton */
.empty { padding: var(--sp-7) var(--sp-5); text-align: center; color: var(--muted); }
.empty svg { width: 88px; height: 88px; margin-bottom: var(--sp-3); opacity: .9; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto var(--sp-4); }
.skel { background: linear-gradient(90deg, var(--bg-soft) 25%, var(--surface-2) 37%, var(--bg-soft) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-xs); height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------------------------------------- chart */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 168px; padding-top: var(--sp-3); }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart .bar i {
  display: block; width: 100%; max-width: 44px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand));
  transform-origin: bottom; animation: grow .7s var(--ease) both;
}
.chart .bar span { font-size: 11.5px; color: var(--muted); }
.chart .bar b { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart { position: relative; }
.chart-grid { position: absolute; left: 4px; right: 4px; top: 30px; bottom: 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; border-top: 1px dashed var(--line); }
.chart .bar { position: relative; z-index: 1; }
.chart-foot { font-size: 12px; color: var(--muted); text-align: right; margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px dashed var(--line); }
@keyframes grow { from { transform: scaleY(.04); opacity: .3; } to { transform: scaleY(1); opacity: 1; } }

.progress { height: 8px; border-radius: var(--r-full); background: var(--bg-soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .5s var(--ease); }

/* ---------------------------------------------------------- toast */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 260px; max-width: 360px;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-3); font-size: 14px;
  animation: toastIn .26s var(--ease) both;
}
.toast.out { animation: toastOut .2s var(--ease) both; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--info); }
.toast.ok .dot { background: var(--ok); }
.toast.bad .dot { background: var(--bad); }
.toast.warn .dot { background: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------------------------------------------------------- modal */
dialog.modal {
  border: 0; padding: 0; background: transparent; max-width: 560px; width: calc(100% - 32px);
}
dialog.modal::backdrop { background: rgba(9, 12, 20, .48); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: modalIn .22s var(--ease) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-box { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden; border: 1px solid var(--line); }
.modal-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: var(--t-lg); }
.modal-body { padding: var(--sp-5); max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); background: var(--surface-2); }

/* command palette */
#cmdk { position: fixed; inset: 0; z-index: 210; display: none; padding-top: 12vh; background: rgba(9, 12, 20, .42); backdrop-filter: blur(2px); }
#cmdk.on { display: block; }
#cmdk .box { max-width: 520px; margin: 0 auto; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sh-3); border: 1px solid var(--line); overflow: hidden; }
#cmdk input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 48px; font-size: 15px; }
#cmdk input:focus { box-shadow: none; }
#cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; }
#cmdk li { padding: 9px 11px; border-radius: var(--r-xs); font-size: 14px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
#cmdk li[aria-selected="true"], #cmdk li:hover { background: var(--brand-soft); color: var(--brand); }
#cmdk li kbd { margin-left: auto; }

kbd {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; background: var(--surface-2); color: var(--muted);
}

/* ---------------------------------------------------------- misc */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 550; margin-bottom: var(--sp-4); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.divider { height: 1px; background: var(--line); margin: var(--sp-5) 0; border: 0; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row.tight { gap: var(--sp-2); }
.right { margin-left: auto; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.mono-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* reveal on scroll */
/* Data stays readable even before the observer runs or when JS is unavailable. */
.reveal { opacity: 1; transform: none; }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto;
    flex-direction: row; align-items: center; gap: 4px; padding: 8px 10px;
    border-right: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(16, 24, 40, .08); overflow-x: auto;
  }
  .side .brand, .nav-label, .side-foot { display: none; }
  .nav { flex-direction: row; gap: 2px; overflow: visible; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 10px; min-width: 62px; text-align: center; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav a svg { width: 19px; height: 19px; }
  .content { padding: var(--sp-4); padding-bottom: 84px; }
  .topbar { padding: var(--sp-3) var(--sp-4); }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero { padding: var(--sp-5); }
  #toasts { left: 12px; right: 12px; bottom: 76px; }
  .toast { max-width: none; }
}
@media (max-width: 520px) {
  .page-head { margin-bottom: var(--sp-4); }
  .card-pad { padding: var(--sp-4); }
  thead th, tbody td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .side, .topbar, #toasts, #cmdk, .btn { display: none !important; }
  .content { padding: 0; }
}

/* ---------------------------------------------------------- ring saldo (hero) */
.hero-aside { flex: none; display: flex; justify-content: center; padding: 0 var(--sp-4); }
.hero-ring .ring { position: relative; width: 172px; height: 172px; }
.hero-ring .ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.hero-ring .track { fill: none; stroke: var(--bg-soft); stroke-width: 11; }
.hero-ring .val { fill: none; stroke: var(--brand); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.hero-ring.up .val { stroke: var(--ok); }
.hero-ring.down .val { stroke: var(--bad); }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.ring-c span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ring-c b { font-size: 15.5px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------------------------------------------------------- scrollbar senada tema */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-aside { align-self: center; padding: 0; }
}

/* ikon tema: bulan saat terang, matahari saat gelap */
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: inline-flex; }
[data-theme="dark"] .only-light { display: none; }

/* penanda field wajib + switch */
.field .req { color: var(--bad); font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background var(--dur) var(--ease); flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch em { font-style: normal; font-size: var(--t-sm); color: var(--muted); }

/* kartu modul selebar penuh saat sendirian + baris "lihat semua" */
.span-all { grid-column: 1 / -1; }
.more-row td { text-align: center; color: var(--muted); font-size: var(--t-sm); background: var(--bg-soft); border-radius: 0 0 var(--r-md) var(--r-md); }
.more-row a { color: var(--brand); font-weight: 600; }

/* ============================================================
   VARIASI BENTUK — layout, hero, dan kartu data.
   Semua dipilih lewat meta di app.config.json (accent/layout/
   dash/list) supaya dua aplikasi tidak pernah tampil kembar.
   ============================================================ */

/* -- layout "atas": menu pindah ke bilah atas, konten lebih lebar -- */
html[data-layout="top"] body { display: block; }
html[data-layout="top"] .shell { display: block; min-height: 0; }
html[data-layout="top"] .side {
  position: sticky; top: 0; z-index: 40;
  height: auto; align-self: stretch;
  flex-direction: row; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-5);
  border-right: 0; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}
html[data-layout="top"] .brand { padding: 0; }
html[data-layout="top"] .brand-sub { display: none; }
html[data-layout="top"] .nav {
  flex-direction: row; gap: var(--sp-1); overflow-x: auto; flex: 1;
  scrollbar-width: none;
}
html[data-layout="top"] .nav::-webkit-scrollbar { display: none; }
html[data-layout="top"] .nav-label { display: none; }
html[data-layout="top"] .nav a { white-space: nowrap; }
html[data-layout="top"] .side-foot {
  margin: 0; flex-direction: row; align-items: center; gap: var(--sp-2);
}
html[data-layout="top"] .side-foot kbd { display: none; }
html[data-layout="top"] .content { max-width: 1320px; }

/* -- hero/metric besar: satu angka utama, bukan empat kotak seragam -- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: var(--sp-6); align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 58%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .hk {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 650;
}
.hero .hv {
  display: block; margin: 6px 0 4px;
  font-size: clamp(34px, 5.6vw, 60px); font-weight: 780;
  letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 62%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .hs { color: var(--muted); font-size: var(--t-sm); }
.hero .hspark { color: var(--accent); }
.hero .hspark .cap {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: var(--sp-2);
}
.hero .hspark svg { display: block; overflow: visible; }

/* -- strip metrik kecil untuk mode "focus" -- */
.fstrip { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.fchip {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2);
}
.fchip .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fchip b { font-size: var(--t-md); font-variant-numeric: tabular-nums; }

/* -- stat card: garis aksen di tepi, bukan kotak polos -- */
.stat::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 18%, transparent));
  opacity: .55;
}
.stat .ico {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); border-color: transparent;
}

/* -- tampilan kartu untuk daftar data (selain tabel) -- */
/* Dashboard tables have no card alternative; only hide on list pages. */
html[data-list="cards"] .card:has(> .cards) > .table-wrap { display: none; }
.cards {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  padding: var(--sp-4);
}
.dcard {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2);
  padding: var(--sp-4);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.dcard:hover {
  transform: translateY(-2px); box-shadow: var(--sh-2);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.dcard .dt {
  font-weight: 680; letter-spacing: -.01em;
  display: flex; align-items: center; gap: var(--sp-2);
}
.dcard .dt::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.dcard .dkv { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.dcard .dkv span { font-size: var(--t-sm); color: var(--ink-2); }
.dcard .dkv b { color: var(--ink); font-weight: 620; }
.dcard .foot {
  margin-top: var(--sp-2); padding-top: var(--sp-2);
  border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: var(--sp-5); gap: var(--sp-4); }
  html[data-layout="top"] .side { flex-wrap: wrap; }
}
@media print {
  html[data-layout="top"] .side { display: none; }
}

/* ============================================================
   RUPA — tiga keluarga tampilan (meta.style):
   editorial  : kertas hangat, judul serif, garis rambut   (Notion/Sanity)
   workbench  : padat, sudut tegak, rel aksen, mono label (IBM Carbon)
   minimal    : netral lapang, sudut lembut, bayangan tipis (Cal.com)
   Hanya mengubah rupa; modul, route, data, dan logo tetap.
   ============================================================ */

/* ---------- minimal: Cal-like neutral workspace ---------- */
html[data-style="minimal"] { --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --bg: #fafafa; --surface-2: #fafafa; --line: #e7e7e7; --ink: #242424; --ink-2: #444; --muted: #737373; }
html[data-style="minimal"][data-theme="dark"] { --bg: #111; --surface-2: #202020; --line: #303030; --ink: #f5f5f5; --ink-2: #ddd; --muted: #aaa; }
html[data-style="minimal"] h1 { letter-spacing: -.045em; font-weight: 750; }
html[data-style="minimal"] .brand-mark:not(.has-logo) { background: var(--ink); color: var(--bg); box-shadow: none; border-radius: 8px; }
html[data-style="minimal"] .nav a[aria-current="page"] { background: var(--bg-soft); color: var(--ink); }
html[data-style="minimal"] .nav a[aria-current="page"] svg { color: var(--ink); }
html[data-style="minimal"] .hero::before, html[data-style="minimal"] .hero::after, html[data-style="minimal"] .stat::after { display: none; }
html[data-style="minimal"] .hero .hv { background: none; color: var(--ink); }
html[data-style="minimal"] .btn.primary { background: var(--ink); color: var(--bg); box-shadow: none; }
html[data-style="minimal"] .btn.primary:hover { background: var(--ink-2); }
html[data-style="minimal"] .stat { border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.035); }

/* ---------- editorial ---------- */
html[data-style="editorial"] {
  --r-xs: 3px; --r-sm: 4px; --r-md: 6px; --r-lg: 8px;
  --sh-1: none; --sh-2: none; --sh-3: 0 18px 44px rgba(30, 26, 20, .16);
  --bg: #faf8f4; --bg-soft: #f1ede5; --surface: #fffdf9; --surface-2: #f7f3ec;
  --line: #e6dfd2; --line-strong: #cec4b3;
  --ink: #201d18; --ink-2: #423c33; --muted: #7a7266;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --t-md: 15.5px;
}
html[data-style="editorial"][data-theme="dark"] {
  --bg: #171613; --bg-soft: #1f1d19; --surface: #1c1a16; --surface-2: #232019;
  --line: #322e27; --line-strong: #443e34;
  --ink: #f3eee4; --ink-2: #ded6c8; --muted: #a79d8d;
  --sh-3: 0 22px 50px rgba(0, 0, 0, .6);
}
html[data-style="editorial"] body { font-size: 15.5px; line-height: 1.62; }
html[data-style="editorial"] h1,
html[data-style="editorial"] h2,
html[data-style="editorial"] h3 { font-weight: 600; letter-spacing: -.012em; }
html[data-style="editorial"] h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.14; }
html[data-style="editorial"] .brand-name { font-weight: 600; letter-spacing: 0; font-size: 16.5px; }
html[data-style="editorial"] .brand-sub { text-transform: none; letter-spacing: .01em; font-size: 12px; font-style: italic; }
html[data-style="editorial"] .brand-mark:not(.has-logo) {
  background: none; box-shadow: none; border: 1px solid var(--line-strong); border-radius: 50%;
  color: var(--accent); font-family: var(--font); font-weight: 600; font-size: 15px;
}
html[data-style="editorial"] .side { background: var(--bg); border-right: 1px solid var(--line); padding-top: var(--sp-6); }
html[data-style="editorial"] .nav-label { letter-spacing: .16em; font-size: 10.5px; }
html[data-style="editorial"] .nav a {
  border-radius: 0; padding: 7px 2px; font-family: var(--font); font-size: 15px; font-weight: 500;
  color: var(--ink-2); border-bottom: 1px solid transparent;
}
html[data-style="editorial"] .nav a:hover { background: none; color: var(--ink); border-bottom-color: var(--line-strong); }
html[data-style="editorial"] .nav a[aria-current="page"] {
  background: none; color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); padding-left: 10px;
}
html[data-style="editorial"] .nav a svg { opacity: .55; }
html[data-style="editorial"] .topbar { background: var(--bg); backdrop-filter: none; border-bottom: 3px double var(--line-strong); }
html[data-style="editorial"] .crumb { font-size: 12.5px; letter-spacing: .04em; }
html[data-style="editorial"] .content { max-width: 1080px; padding: var(--sp-6); }
html[data-style="editorial"] .eyebrow { letter-spacing: .18em; font-size: 10.5px; font-weight: 600; }
html[data-style="editorial"] .page-head { border-bottom: 1px solid var(--line); padding-bottom: var(--sp-4); }
html[data-style="editorial"] .page-head p { font-size: 15px; }
html[data-style="editorial"] .card { box-shadow: none; background: var(--surface); }
html[data-style="editorial"] .card-head { padding: var(--sp-3) var(--sp-4); }
html[data-style="editorial"] .card-head .badge.plain { background: none; padding: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[data-style="editorial"] .hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  border-radius: 0; border: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
  background: transparent; padding: var(--sp-5) 0 var(--sp-6); margin-bottom: var(--sp-5);
}
html[data-style="editorial"] .hero::before, html[data-style="editorial"] .hero::after { display: none; }
html[data-style="editorial"] .hero .hv {
  background: none; -webkit-text-fill-color: currentColor; color: var(--ink);
  font-family: var(--font); font-weight: 600; letter-spacing: -.035em;
}
html[data-style="editorial"] .hero .hk { letter-spacing: .18em; font-size: 10.5px; }
html[data-style="editorial"] .stat { padding: var(--sp-4); border: 0; border-top: 1px solid var(--line-strong); background: transparent; }
html[data-style="editorial"] .stat::after { display: none; }
html[data-style="editorial"] .stat .ico { background: none; color: var(--muted); top: var(--sp-3); right: 0; }
html[data-style="editorial"] .stat .k { font-size: 10.5px; letter-spacing: .14em; }
html[data-style="editorial"] .stat .v { font-family: var(--font); font-weight: 600; letter-spacing: -.025em; }
html[data-style="editorial"] .stat:hover { transform: none; box-shadow: none; }
html[data-style="editorial"] .btn {
  border-radius: 2px; font-family: var(--font); font-weight: 600; box-shadow: none;
  border-color: var(--ink); color: var(--ink); background: transparent;
}
html[data-style="editorial"] .btn:hover { background: var(--bg-soft); transform: none; box-shadow: none; }
html[data-style="editorial"] .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: none; }
html[data-style="editorial"] .btn.primary:hover { background: var(--ink-2); }
html[data-style="editorial"] .btn.ghost { border-color: transparent; }
html[data-style="editorial"] thead th {
  background: transparent; border-bottom: 1px solid var(--ink); text-transform: none;
  letter-spacing: .1em; font-size: 10.5px; font-weight: 600; padding: 8px 14px;
}
html[data-style="editorial"] tbody td { padding: 9px 14px; }
html[data-style="editorial"] .badge { border-radius: 2px; font-weight: 600; }
html[data-style="editorial"] .dcard { background: transparent; border-radius: 0; border: 0; border-top: 1px solid var(--line-strong); padding: var(--sp-3) 0; }
html[data-style="editorial"] .dcard:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
html[data-style="editorial"] input, html[data-style="editorial"] select, html[data-style="editorial"] textarea { border-radius: 2px; background: var(--surface); }

/* ---------- workbench ---------- */
html[data-style="workbench"] {
  --r-xs: 0px; --r-sm: 0px; --r-md: 0px; --r-lg: 0px; --r-full: 0px;
  --sh-1: none; --sh-2: none; --sh-3: 0 20px 50px rgba(0, 0, 0, .22);
  --bg: #f4f4f4; --bg-soft: #e8e8e8; --surface: #ffffff; --surface-2: #f4f4f4;
  --line: #d8d8d8; --line-strong: #a8a8a8;
  --ink: #161616; --ink-2: #393939; --muted: #6f6f6f;
  --font: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-md: 13.5px; --t-sm: 12px; --t-xs: 11px; --t-lg: 16px; --t-xl: 19px; --t-2xl: clamp(24px, 2.6vw, 30px);
  --sidebar: 232px;
}
html[data-style="workbench"][data-theme="dark"] {
  --bg: #161616; --bg-soft: #262626; --surface: #1f1f1f; --surface-2: #262626;
  --line: #393939; --line-strong: #525252;
  --ink: #f4f4f4; --ink-2: #d0d0d0; --muted: #a8a8a8;
}
html[data-style="workbench"] body { font-size: 13.5px; line-height: 1.5; }
html[data-style="workbench"] h1, html[data-style="workbench"] h2, html[data-style="workbench"] h3 { font-weight: 600; letter-spacing: 0; }
html[data-style="workbench"] h1 { font-size: 20px; }
html[data-style="workbench"] .side { background: var(--surface); padding: var(--sp-3) 0; gap: var(--sp-3); border-right: 1px solid var(--line-strong); }
html[data-style="workbench"] .brand { padding: 0 var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line); }
html[data-style="workbench"] .brand-mark:not(.has-logo) {
  background: var(--ink); box-shadow: none; border-radius: 0; color: var(--bg); font-size: 13px; width: 28px; height: 28px;
}
html[data-style="workbench"] .brand-name { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
html[data-style="workbench"] .brand-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; }
html[data-style="workbench"] .nav { gap: 0; padding: var(--sp-2) 0; }
html[data-style="workbench"] .nav-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; padding: var(--sp-2) var(--sp-4) 4px;
  border-left: 3px solid transparent;
}
html[data-style="workbench"] .nav a {
  border-radius: 0; padding: 8px var(--sp-4) 8px calc(var(--sp-4) - 3px);
  font-size: 13px; font-weight: 500; border-left: 3px solid transparent;
}
html[data-style="workbench"] .nav a svg { width: 15px; height: 15px; opacity: .8; }
html[data-style="workbench"] .nav a:hover { background: var(--surface-2); color: var(--ink); }
html[data-style="workbench"] .nav a[aria-current="page"] {
  background: var(--surface-2); color: var(--ink); font-weight: 600; box-shadow: none; border-left-color: var(--accent);
}
html[data-style="workbench"] .nav a[aria-current="page"] svg { color: var(--accent); }
html[data-style="workbench"] .side-foot { padding: 0 var(--sp-3) var(--sp-3); }
html[data-style="workbench"] .topbar {
  background: var(--surface); backdrop-filter: none; border-bottom: 1px solid var(--line-strong);
  padding: 0 var(--sp-5); min-height: 40px;
}
html[data-style="workbench"] .crumb { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
html[data-style="workbench"] .content { padding: var(--sp-5) var(--sp-6) var(--sp-6); max-width: 1360px; }
html[data-style="workbench"] .page-head { margin-bottom: var(--sp-4); align-items: center; }
html[data-style="workbench"] .page-head p { font-size: 12.5px; color: var(--muted); }
html[data-style="workbench"] .eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-bottom: 2px; }
html[data-style="workbench"] .card { border: 1px solid var(--line); box-shadow: none; }
html[data-style="workbench"] .card-head { padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
html[data-style="workbench"] .card-head .badge.plain { background: none; padding: 0; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
html[data-style="workbench"] .hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5);
  padding: var(--sp-5); border-radius: 0; border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent); background: var(--surface); margin-bottom: var(--sp-4);
}
html[data-style="workbench"] .hero::before, html[data-style="workbench"] .hero::after { display: none; }
html[data-style="workbench"] .hero .hk { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-2); }
html[data-style="workbench"] .hero .hv {
  background: none; -webkit-text-fill-color: currentColor; color: var(--ink);
  font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; letter-spacing: -.02em;
}
html[data-style="workbench"] .hero .hs { font-family: var(--mono); font-size: 11px; }
html[data-style="workbench"] .stat { padding: var(--sp-3) var(--sp-4); border-top: 2px solid var(--ink); gap: 2px; }
html[data-style="workbench"] .stat::after { display: none; }
html[data-style="workbench"] .stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); }
html[data-style="workbench"] .stat .v { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.01em; }
html[data-style="workbench"] .stat .d { font-size: 11.5px; }
html[data-style="workbench"] .stat .ico { top: var(--sp-3); right: var(--sp-3); width: 28px; height: 28px; border-radius: 0; background: var(--surface-2); color: var(--ink-2); }
html[data-style="workbench"] .stat:hover { transform: none; box-shadow: none; }
html[data-style="workbench"] .btn { border-radius: 0; min-height: 36px; font-size: 13px; font-weight: 500; box-shadow: none; }
html[data-style="workbench"] .btn:hover { transform: none; box-shadow: none; background: var(--surface-2); }
html[data-style="workbench"] .btn.sm { min-height: 28px; font-size: 12px; }
html[data-style="workbench"] .btn.primary { box-shadow: none; }
html[data-style="workbench"] .btn-row { gap: 1px; }
html[data-style="workbench"] .btn-row .btn + .btn { margin-left: -1px; }
html[data-style="workbench"] thead th { background: var(--surface-2); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding: 7px 12px; border-bottom: 1px solid var(--line-strong); }
html[data-style="workbench"] tbody td { padding: 6px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
html[data-style="workbench"] .badge { border-radius: 0; font-size: 11px; font-weight: 500; padding: 1px 7px; }
html[data-style="workbench"] .fchip { border-radius: 0; background: var(--surface); padding: 7px 12px; }
html[data-style="workbench"] .fchip .k { font-family: var(--mono); font-size: 10px; }
html[data-style="workbench"] .dcard { border-radius: 0; background: var(--surface); padding: var(--sp-3); }
html[data-style="workbench"] .dcard:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
html[data-style="workbench"] .dcard .dt::before { border-radius: 0; width: 6px; height: 6px; }
html[data-style="workbench"] input, html[data-style="workbench"] select, html[data-style="workbench"] textarea { border-radius: 0; min-height: 36px; font-size: 13.5px; padding: 6px 10px; }
html[data-style="workbench"] .field { margin-bottom: var(--sp-3); gap: 4px; }
html[data-style="workbench"] .field > label { font-size: 12px; font-weight: 500; }
html[data-style="workbench"] .modal-box { border-radius: 0; }
html[data-style="workbench"] .progress { border-radius: 0; }
html[data-style="workbench"] .progress i { border-radius: 0; }
html[data-style="workbench"] .chart .bar i { border-radius: 0; }

/* bilah atas varian editorial / workbench */
html[data-style="editorial"][data-layout="top"] .side { padding: var(--sp-3) var(--sp-5); background: var(--bg); border-bottom: 3px double var(--line-strong); }
html[data-style="editorial"][data-layout="top"] .nav a { border-radius: 0; border-bottom: 2px solid transparent; padding: 6px 2px; }
html[data-style="editorial"][data-layout="top"] .nav a[aria-current="page"] { background: none; box-shadow: none; border-bottom-color: var(--accent); padding-left: 2px; }
html[data-style="workbench"][data-layout="top"] .side { padding: 0 var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--line-strong); }
html[data-style="workbench"][data-layout="top"] .brand { border-bottom: 0; padding: 10px 0; }
html[data-style="workbench"][data-layout="top"] .nav { gap: 0; padding: 0; }
html[data-style="workbench"][data-layout="top"] .nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 11px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
html[data-style="workbench"][data-layout="top"] .nav a[aria-current="page"] { background: none; border-bottom-color: var(--accent); }

@media (max-width: 860px) {
  html[data-style="editorial"] .side, html[data-style="workbench"] .side { background: var(--surface); }
  html[data-style="editorial"] .nav a[aria-current="page"],
  html[data-style="workbench"] .nav a[aria-current="page"] { box-shadow: none; border-left: 0; border-bottom: 2px solid var(--accent); padding: 7px 10px; }
  html[data-style="editorial"] .content, html[data-style="workbench"] .content { padding: var(--sp-4); padding-bottom: 84px; }
  html[data-style="editorial"] .hero { grid-template-columns: 1fr; padding: var(--sp-4) 0 var(--sp-5); }
  html[data-style="workbench"] .hero { grid-template-columns: 1fr; padding: var(--sp-4); }
}

/* ---------- mobile: keep fixed nav off the content (all styles) ---------- */
@media (max-width: 760px) {
  html body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 100%; }
}
