/* ===== Token ===== */
:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --panel-3: #eef1f6;
  --border: #e4e8ef;
  --border-strong: #d3d9e3;
  --text: #0f172a;
  --text-2: #3b4658;
  --muted: #6b7587;
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --accent-soft: #e8f1fc;
  --accent-ink: #1c5cab;
  --good: #0a7d36;
  --good-soft: #e3f5e9;
  --bad: #c62f2f;
  --bad-soft: #fce8e8;
  --warn: #9a6100;
  --warn-soft: #fdf2dc;
  --violet: #6250d6;
  --grid: #edf0f4;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --compare: #a3abb8;
  --side-bg: #0c1424;
  --side-bg-2: #131d31;
  --side-text: #aab5c8;
  --side-text-strong: #ffffff;
  --side-border: rgba(255, 255, 255, .07);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -8px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .28);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0e16;
  --panel: #121826;
  --panel-2: #161d2d;
  --panel-3: #1c2436;
  --border: #232c40;
  --border-strong: #2f3a52;
  --text: #e8ecf4;
  --text-2: #c2cad8;
  --muted: #8a95aa;
  --accent: #3987e5;
  --accent-hover: #5598e7;
  --accent-soft: #172a47;
  --accent-ink: #86b6ef;
  --good: #34c46a;
  --good-soft: #10291c;
  --bad: #f07272;
  --bad-soft: #341818;
  --warn: #f0b44c;
  --warn-soft: #33270f;
  --violet: #9085e9;
  --grid: #1d2537;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --compare: #5b6578;
  --side-bg: #080c14;
  --side-bg-2: #0f1626;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .6);
}

/* ===== Dasar ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Form ===== */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 11px; min-height: 38px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--accent); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > select, .field > input, .field > textarea { max-width: 100%; min-width: 0; }
.form-grid > *, .stack > * { min-width: 0; }
.field > label, .label-sm { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13.5px; }
.input-group { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.input-group input { border: 0 !important; flex: 1; box-shadow: none !important; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.ghost-toggle { border: 0; background: transparent; color: var(--muted); padding: 0 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 8px 15px; min-height: 38px; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--panel); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; }
.btn.icon { padding: 0; width: 38px; }
.btn.sm.icon { width: 30px; }
.btn-block { width: 100%; min-height: 44px; font-size: 14.5px; }

/* ===== Login ===== */
.auth-body { background: var(--panel); }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-hero {
  background: radial-gradient(1200px 600px at -10% -10%, #1d3b6e 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #2b1f63 0%, transparent 55%), #0b1323;
  color: #dbe4f3; padding: 44px 56px; display: flex; flex-direction: column; gap: 40px; position: relative; overflow: hidden;
}
.auth-copy h1 { font-size: 34px; line-height: 1.18; color: #fff; margin: 0 0 14px; max-width: 520px; font-weight: 800; letter-spacing: -.02em; }
.auth-copy p { color: #a9b6cc; max-width: 500px; font-size: 15px; margin: 0 0 22px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #cfd8e6; }
.auth-points li > span { width: 22px; height: 22px; border-radius: 50%; background: rgba(85, 152, 231, .18); color: #86b6ef; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.auth-mock { margin-top: auto; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 18px; max-width: 520px; backdrop-filter: blur(6px); }
.auth-mock svg { width: 100%; height: 90px; display: block; margin-top: 14px; }
.am-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.am-kpi { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.am-kpi i { display: block; height: 6px; width: 50%; background: rgba(255, 255, 255, .14); border-radius: 4px; }
.am-kpi b { color: #fff; font-size: 16px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--panel); }
.auth-card { width: 100%; max-width: 440px; display: grid; gap: 22px; }
.auth-card h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.auth-card h2 + p { margin: 0; }
.auth-form { display: grid; gap: 16px; }
.auth-tabs { display: flex; background: var(--panel-3); border-radius: 12px; padding: 4px; gap: 2px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.auth-tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.auth-points li div { flex: 1; }
.auth-points li strong { color: #fff; }
.note-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--text-2); }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 26px; font-weight: 800; margin: 0 auto; }
textarea { resize: vertical; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; font-weight: 500; }

/* ===== Brand ===== */
.brand { display: flex; gap: 11px; align-items: center; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #3987e5, #6250d6); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(57, 135, 229, .7); flex-shrink: 0; }
.brand .logo svg { width: 20px; height: 20px; }
.brand strong { display: block; color: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.brand small { display: block; color: #7f8ba1; font-size: 11.5px; }
.brand-lg .logo { width: 42px; height: 42px; }
.brand-lg strong { font-size: 17px; }

/* ===== Layout aplikasi ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex-shrink: 0; background: var(--side-bg); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.sidebar .brand { padding: 20px 18px 18px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #5f6b82; font-weight: 700; padding: 16px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; color: var(--side-text); padding: 8px 10px; border-radius: 9px;
  font-weight: 500; font-size: 13.5px; position: relative; transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(255, 255, 255, .05); color: var(--side-text-strong); text-decoration: none; }
.nav a.active { background: rgba(57, 135, 229, .16); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #5598e7; }
.nav a.active svg { color: #86b6ef; }
.side-foot { padding: 12px; border-top: 1px solid var(--side-border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--side-bg-2); }
.user-card .who { flex: 1; min-width: 0; }
.user-card .who strong { display: block; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .who span { font-size: 11.5px; color: #7f8ba1; }
.side-btn { background: transparent; border: 0; color: var(--side-text); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.side-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; flex-shrink: 0; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border);
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; line-height: 1.3; }
.crumb { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); line-height: 1.4; }
.crumb:empty { display: none; }
.topbar .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; align-items: center; }
#menuBtn { display: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--panel-3); color: var(--text-2); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { background: var(--good-soft); color: var(--good); }
.pill.demo { background: var(--warn-soft); color: var(--warn); }
.pill.off { background: var(--bad-soft); color: var(--bad); }
.pill.admin { background: color-mix(in srgb, var(--violet) 15%, transparent); color: var(--violet); }
.pill.user { background: var(--accent-soft); color: var(--accent-ink); }

/* Date range picker */
.range-wrap { position: relative; }
.range-btn { gap: 9px; }
.range-btn .caret { opacity: .6; }
.range-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.range-pop button.opt { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 13.5px; text-align: left; }
.range-pop button.opt:hover { background: var(--panel-2); }
.range-pop button.opt.on { font-weight: 700; }
.range-pop button.opt .ck { color: var(--accent); font-weight: 800; }
.range-custom { border-top: 1px solid var(--border); margin-top: 6px; padding: 10px 8px 6px; display: grid; gap: 8px; }
.range-custom .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-custom input { width: 100%; min-width: 0; }

.view { padding: 24px 28px 32px; display: grid; gap: 20px; max-width: 1480px; width: 100%; flex: 1; align-content: start; }
.view:focus { outline: none; }
.app-foot { display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; max-width: 1480px; width: 100%; padding: 14px 28px 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.app-foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; text-decoration: none; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.brand:hover { text-decoration: none; }
.page-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.page-alert.err { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

/* ===== Kartu ===== */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head .desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card.flush { padding: 0; }
.card.flush .card-head { padding: 18px 20px 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kpi .ic svg { width: 17px; height: 17px; }
.kpi .label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.kpi .value { font-size: 27px; font-weight: 750; letter-spacing: -.02em; margin-top: 8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .value.sm { font-size: 19px; }
.kpi .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); min-height: 20px; }
.kpi .spark { height: 38px; margin: 8px -4px -6px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.delta.up { color: var(--good); background: var(--good-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.delta.flat { color: var(--muted); background: var(--panel-3); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; }
.grid-2e { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.chart-box { position: relative; height: 320px; }
/* Kartu grafik berdampingan: grafik mengisi sisa tinggi supaya tidak ada ruang kosong di bawahnya. */
.grid-2 > .card, .grid-2e > .card { display: flex; flex-direction: column; }
.grid-2 > .card > .chart-box, .grid-2e > .card > .chart-box { flex: 1 1 auto; }
.chart-box.sm { height: 250px; }

.seg { display: inline-flex; background: var(--panel-3); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.src-seg { flex-wrap: nowrap; }
.src-seg button { white-space: nowrap; padding: 7px 12px; }
.src-seg button[data-src="own"].on { color: var(--accent); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--compare) 0 4px, transparent 4px 7px) !important; }

/* ===== Tabel ===== */
.table-tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 34px !important; width: 260px; max-width: 100%; }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; user-select: none; background: var(--panel-2); }
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
thead tr th { border-bottom-color: var(--border); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }
th .arrow { font-size: 9px; margin-left: 4px; color: var(--accent); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.clickable { cursor: pointer; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 0; background: var(--panel-2); }
.bar-cell { position: relative; }
.bar-cell .bar { position: absolute; right: 12px; bottom: 5px; height: 3px; background: var(--series-1); border-radius: 2px; opacity: .55; }
.share { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share .track { width: 56px; height: 6px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.share .track b { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.truncate { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.id { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.cell-main { font-weight: 600; }
.cell-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.user-cell { display: flex; align-items: center; gap: 11px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ===== Toolbar & chip ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border-strong); background: var(--panel); border-radius: 999px; padding: 5px 13px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip .ord { font-size: 10.5px; background: rgba(255, 255, 255, .28); border-radius: 999px; padding: 0 6px; font-weight: 700; }

.multi { position: relative; }
.multi-list { position: absolute; z-index: 25; top: 100%; left: 0; margin-top: 6px; width: 340px; max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.multi-list label { display: flex; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; align-items: center; }
.multi-list label:hover { background: var(--panel-2); }

.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; }
.empty-state h3 { color: var(--text); margin: 0 0 6px; }

.skeleton { background: linear-gradient(90deg, var(--panel-3) 0%, var(--panel-2) 50%, var(--panel-3) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.loading-grid { display: grid; gap: 20px; }
.loading-grid .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.loading { color: var(--muted); padding: 30px; text-align: center; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--good); background: var(--good-soft); }
.status.inactive { color: var(--muted); background: var(--panel-3); }
.status.rejected { color: var(--bad); background: var(--bad-soft); }

.trial-banner { display: flex; gap: 10px; align-items: flex-start; margin: 20px 28px 0; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: 13.5px; max-width: 1424px; }
.trial-banner svg { color: var(--warn); margin-top: 1px; }
@media (max-width: 800px) { .trial-banner { margin: 16px 16px 0; } }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e34948; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; vertical-align: middle; }
.card-head .nav-badge { margin-left: 6px; }
.guest-cta { margin: 18px 4px 4px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(57, 135, 229, .18), rgba(98, 80, 214, .18)); border: 1px solid rgba(134, 182, 239, .18); display: grid; gap: 6px; }
.guest-cta strong { color: #fff; font-size: 13px; }
.guest-cta span { font-size: 12px; color: var(--side-text); line-height: 1.45; }
.guest-cta .btn { justify-self: start; margin-top: 4px; text-decoration: none; }
.pending-card { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.pending-list { display: grid; gap: 10px; }
.pending-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.pending-note { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); font-style: italic; order: 3; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; background: rgba(8, 12, 22, .55); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal-card { background: var(--bg); border-radius: 18px; width: 100%; max-width: 1000px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .18s; overflow: hidden; }
.modal-card.narrow { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: var(--panel); border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 22px; display: grid; gap: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--panel); border-top: 1px solid var(--border); position: sticky; bottom: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 60; font-weight: 500; box-shadow: var(--shadow-lg); font-size: 13.5px; }

/* ===== Editor user ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; margin: 0 0 4px; }
.section-title svg { color: var(--accent); }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.opt-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--panel); font-size: 13px; font-weight: 500; }
.opt-card:hover { border-color: var(--accent); }
.opt-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt-card svg { color: var(--muted); }
.opt-card:has(input:checked) svg { color: var(--accent); }
.scope-box { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.scope-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.scope-list { border-top: 1px solid var(--border); max-height: 230px; overflow: auto; padding: 6px; }
.scope-list .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 8px 4px; }
.scope-list label { display: flex; gap: 9px; align-items: center; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.scope-list label:hover { background: var(--panel-2); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.share-row { display: flex; align-items: center; gap: 14px; }
.share-row input[type=range] { flex: 1; }
.share-row input[type=number] { width: 90px; }
.summary { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 500; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 14px; }
pre { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow: auto; max-height: 380px; font-size: 12px; margin: 0; }

/* ===== Halaman panduan ===== */
.doc-body { background: var(--bg); }
.doc-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: var(--side-bg); }
.doc-top .brand { text-decoration: none; }
.doc-top-actions { display: flex; gap: 8px; }
.doc-top .btn.ghost { background: transparent; color: #dbe4f3; border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.doc-top .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.doc-top .btn { text-decoration: none; }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; max-width: 1180px; margin: 0 auto; padding: 32px 28px 64px; }
.doc-toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; font-size: 13.5px; }
.doc-toc strong { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 8px; }
.doc-toc a { color: var(--text-2); padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.doc-toc a:hover { background: var(--panel-3); text-decoration: none; }
.doc-toc a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.doc { min-width: 0; max-width: 820px; line-height: 1.65; font-size: 15px; }
.doc section { scroll-margin-top: 84px; padding-bottom: 12px; }
.doc section + section { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 16px; }
.doc h1 { font-size: 34px; line-height: 1.2; margin: 12px 0 12px; font-weight: 800; letter-spacing: -.02em; }
.doc h2 { font-size: 22px; margin: 0 0 12px; font-weight: 750; }
.doc h3 { font-size: 16px; margin: 22px 0 6px; font-weight: 650; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.lead { font-size: 17px; color: var(--text-2); }
.doc-hero { padding-bottom: 8px; }
ol.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 10px; }
ol.steps li { counter-increment: s; position: relative; padding-left: 40px; margin: 0; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; }
.doc-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.doc-card h3 { margin: 4px 0 0; }
.doc-card p { margin: 0; font-size: 14px; flex: 1; }
.doc-card a { font-size: 13.5px; font-weight: 600; }
.num-badge { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #3987e5, #6250d6); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.doc-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 14px; margin: 14px 0; }
.doc-table th, .doc-table td { padding: 10px 14px; vertical-align: top; }
.doc-table td { color: var(--text-2); }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover { background: transparent; }
.doc-table td:first-child { white-space: nowrap; }
.callout { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: 14px; color: var(--text-2); margin: 14px 0; }
.callout.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.tag { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.tag.up { color: var(--good); background: var(--good-soft); }
.tag.down { color: var(--bad); background: var(--bad-soft); }
.doc-defs { display: grid; gap: 4px; }
.doc-defs > div { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px 10px; }
.doc-defs h3 { margin-top: 12px; }
.doc-defs p { margin: 4px 0; font-size: 14.5px; }
.doc details { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; margin: 8px 0; }
.doc summary { cursor: pointer; padding: 13px 0; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; }
.doc details[open] summary::after { content: "−"; }
.doc details p { margin: 0 0 14px; font-size: 14.5px; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.auth-help { text-align: center; font-size: 13px; }

/* ===== Beranda: navigasi atas & hero ===== */
.home-body { background: var(--bg); }
.home-body main { display: block; }
.home-body .landing-sec, .home-body .landing-foot { max-width: 1160px; }
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 19, 35, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.site-nav-in { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.site-links { display: flex; gap: 4px; flex: 1; }
.site-links a { color: #b8c4d8; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px; }
.site-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.site-actions { display: flex; gap: 8px; margin-left: auto; }
.btn.ghost-dark { background: transparent; color: #e6ecf6; border-color: rgba(255, 255, 255, .22); }
.btn.ghost-dark:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); }
.btn-lg { min-height: 46px; padding: 11px 22px; font-size: 15px; border-radius: 11px; }
.hero {
  background: radial-gradient(1100px 620px at 0% -10%, #1d3b6e 0%, transparent 60%), radial-gradient(900px 520px at 100% 110%, #2b1f63 0%, transparent 55%), #0b1323;
  color: #dbe4f3; margin-top: -61px; padding-top: 61px;
}
.hero-in { max-width: 1160px; margin: 0 auto; padding: 72px 24px 88px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px; border-radius: 999px; background: rgba(85, 152, 231, .14); border: 1px solid rgba(85, 152, 231, .28); color: #b5d0f3; font-size: 12.5px; font-weight: 600; }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #34c46a; box-shadow: 0 0 0 3px rgba(52, 196, 106, .2); }
.hero h1 { font-size: 46px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; color: #fff; margin: 0 0 18px; }
.hero-lead { font-size: 17px; line-height: 1.6; color: #a9b6cc; margin: 0 0 28px; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #9fb0c9; font-size: 13.5px; }
.hero-points li::before { content: "✓"; color: #34c46a; font-weight: 800; margin-right: 7px; }
.hero-mock { margin: 0; max-width: none; padding: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.hm-head { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.hm-head span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.hm-head b { margin-left: 8px; font-size: 12.5px; color: #9fb0c9; font-weight: 600; }
.hero-mock .am-kpi small { color: #8d9bb3; font-size: 11.5px; }
.hm-bars { display: grid; gap: 9px; margin-top: 16px; }
.hm-bars div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; font-size: 12px; color: #9fb0c9; }
.hm-bars i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3987e5, #5598e7); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, #12274a, #1d1a4d); color: #dbe4f3; border-radius: 18px; padding: 32px 36px; }
.cta-band h2 { color: #fff; margin: 0 0 6px !important; }
.cta-band p { margin: 0; color: #a9b6cc; }

.site-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-toggle { display: none; width: 38px; height: 34px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 9px; background: transparent; cursor: pointer; padding: 0 9px; flex-direction: column; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: #e6ecf6; }

/* Footer situs publik */
.site-foot { background: #0b1323; color: #9fb0c9; margin-top: 56px; font-size: 13.5px; }
.site-foot-in { max-width: 1160px; margin: 0 auto; padding: 44px 24px 28px; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.site-foot-brand p { margin: 12px 0 0; max-width: 320px; line-height: 1.6; }
.site-foot nav { display: grid; gap: 8px; align-content: start; }
.site-foot nav strong { color: #fff; font-size: 13px; margin-bottom: 4px; }
.site-foot a { color: #9fb0c9; }
.site-foot a:hover { color: #fff; }
.site-foot-bottom { max-width: 1160px; margin: 0 auto; padding: 18px 24px 28px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; font-size: 12.5px; color: #7f8ba1; }
.home-body .landing + .site-foot, .home-body main + .site-foot { margin-top: 64px; }

/* Halaman konten: artikel, kebijakan, kontak */
.page { max-width: 1160px; margin: 0 auto; padding: 28px 24px 0; display: block; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.page-head { max-width: 760px; margin-bottom: 26px; }
.page-head h1, .prose h1 { font-size: 36px; line-height: 1.18; letter-spacing: -.025em; font-weight: 800; margin: 0 0 12px; }
.lead { font-size: 17px; line-height: 1.65; color: var(--text-2); margin: 0 0 20px; }
.page-meta { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.prose { max-width: 760px; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.prose h2 { font-size: 23px; line-height: 1.3; color: var(--text); margin: 36px 0 10px; letter-spacing: -.015em; }
.prose h3 { font-size: 18px; color: var(--text); margin: 24px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; display: grid; gap: 6px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose a.btn { text-decoration: none; }
.prose code { background: var(--panel-3); padding: 1px 6px; border-radius: 5px; }
.prose table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 14.5px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: table; }
.prose th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
.prose td { vertical-align: top; }
.formula { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 12px 16px; margin: 4px 0 18px; font-weight: 700; font-size: 15.5px; }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 0; padding: 20px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.article-cta div { display: grid; gap: 2px; }
.article-cta strong { font-size: 16px; }
.article-cta span { font-size: 14px; color: var(--muted); }
.related { margin-top: 48px; }
.related h2 { font-size: 22px; margin: 0 0 14px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.article-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; color: var(--text-2); transition: border-color .15s, transform .15s, box-shadow .15s; }
.article-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.article-card h3 { margin: 0; font-size: 17px; line-height: 1.35; color: var(--text); }
.article-card p { margin: 0; font-size: 14px; line-height: 1.55; flex: 1; }
.article-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.article-more { font-size: 13px; font-weight: 600; color: var(--accent); }
.contact-form { display: grid; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 4px 0 24px; font-size: 14px; }
.contact-form .btn { justify-self: start; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { background: var(--good-soft); color: var(--good); border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600; }
.notfound { text-align: center; padding: 48px 0 24px; }
.notfound-code { font-size: 72px; font-weight: 800; color: var(--accent); margin: 0; line-height: 1; }
.notfound h1 { font-size: 30px; margin: 12px 0 8px; }
.notfound p { color: var(--muted); }

/* Pengaturan Umum (gaya formulir seperti WordPress) */
.set-form { display: grid; gap: 0; padding: 8px 24px 20px; max-width: 980px; }
.set-head { font-size: 15px !important; margin: 18px 0 4px !important; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.set-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 24px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.set-row:last-of-type { border-bottom: 0; }
.set-label { font-weight: 600; font-size: 13.5px; padding-top: 9px; color: var(--text); }
.set-field { display: grid; gap: 6px; max-width: 560px; }
.set-field > input, .set-field > select, .set-field > textarea { width: 100%; }
.set-radios { display: grid; gap: 8px; padding-top: 8px; }
.set-actions { display: flex; gap: 14px; align-items: center; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--panel); padding-bottom: 4px; }
.brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
@media (max-width: 800px) {
  .set-form { padding: 4px 16px 16px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .set-label { padding-top: 0; }
}

/* Editor artikel (dashboard admin) */
.art-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.art-top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.art-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.art-main { display: flex; flex-direction: column; gap: 12px; }
.art-title { font-size: 24px !important; font-weight: 750; border: 0 !important; box-shadow: none !important; padding: 4px 2px !important; letter-spacing: -.02em; background: transparent !important; }
.art-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); position: sticky; top: 76px; z-index: 5; }
.art-toolbar button { border: 0; background: transparent; color: var(--text-2); min-width: 32px; height: 30px; padding: 0 8px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.art-toolbar button:hover:not(:disabled), .art-toolbar button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.art-toolbar button:disabled { opacity: .35; cursor: default; }
.art-toolbar button svg { width: 15px; height: 15px; }
.art-toolbar .sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }
.art-body { max-width: none; min-height: 420px; padding: 6px 2px; outline: none; font-size: 16px; }
.art-body:empty::before { content: "Mulai menulis di sini…"; color: var(--muted); }
.art-body img { max-width: 100%; height: auto; border-radius: 10px; }
.art-body blockquote, .prose blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--text-2); }
.prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 6px 0 16px; }
.art-html { min-height: 420px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.art-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.ig-prefix { display: grid; place-items: center; padding: 0 0 0 11px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.input-group .ig-prefix + input { padding-left: 2px !important; min-width: 0; }
.serp { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); font-family: Arial, sans-serif; }
.serp-url { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 17px; color: #1a0dab; line-height: 1.3; }
:root[data-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.art-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 13px; }
.art-checks li.ok { color: var(--good); }
.art-checks li.warn { color: var(--warn); }
.art-checks li.no { color: var(--muted); }
.art-checks li.note { color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
@media (max-width: 1100px) { .art-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .art-toolbar { top: 0; }
  .art-title { font-size: 20px !important; }
  .art-top-actions { width: 100%; }
  .art-top-actions .btn { flex: 1 1 auto; }
}

/* ===== Landing (konten yang diindeks mesin pencari) ===== */
.landing { display: block; background: var(--bg); border-top: 1px solid var(--border); }
.landing-sec { max-width: 1040px; margin: 0 auto; padding: 56px 24px 8px; }
.landing-sec h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 800; }
.landing-sec > p { color: var(--text-2); margin: 0 0 20px; max-width: 680px; }
.landing-sec > p .btn { margin-right: 8px; }
.landing-eyebrow { color: var(--accent-ink) !important; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px !important; }
.landing-lead { font-size: 15.5px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.feature h3 { margin: 0 0 6px; font-size: 15.5px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; }
.how-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how-steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; }
.how-steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.how-steps li span { color: var(--text-2); font-size: 14px; }
.faq { display: grid; gap: 8px; max-width: 780px; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--text-2); font-size: 14.5px; }
.landing-foot { max-width: 1040px; margin: 48px auto 0; padding: 22px 24px 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ===== Responsif ===== */
@media (max-width: 1100px) {
  .grid-2, .grid-2e, .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
.auth-mobile-brand { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { place-items: start center; padding: 28px 18px 40px; }
  .auth-card { gap: 18px; }
  .auth-mobile-brand { display: flex; }
  .auth-mobile-brand strong { color: var(--text); }
  .auth-mobile-brand small { color: var(--muted); }
  .auth-card h2 { font-size: 21px; }
  .site-nav-in { padding: 10px 16px; gap: 10px; position: relative; }
  .site-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.open .site-links { display: grid; position: absolute; left: 0; right: 0; top: 100%; background: #0b1323; padding: 8px 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5); }
  .site-nav.open .site-links a { padding: 11px 12px; font-size: 15px; }
  .site-foot-in { grid-template-columns: 1fr 1fr; padding: 32px 16px 20px; gap: 22px; }
  .site-foot-brand { grid-column: 1 / -1; }
  .site-foot-bottom { padding: 16px 16px 24px; flex-direction: column; }
  .page { padding: 18px 16px 0; }
  .page-head h1, .prose h1 { font-size: 27px; }
  .lead { font-size: 15.5px; }
  .prose { font-size: 15.5px; }
  .prose h2 { font-size: 20px; margin-top: 28px; }
  .prose table { font-size: 13.5px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-form { padding: 16px; }
  .site-nav .brand strong { font-size: 13.5px; }
  .site-actions .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
  .hero { margin-top: -55px; padding-top: 55px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); padding: 40px 16px 52px; gap: 32px; }
  .hero h1 { font-size: 31px; }
  .hero-lead { font-size: 15.5px; margin-bottom: 22px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-points { flex-direction: column; margin-top: 20px; }
  .cta-band { padding: 24px 20px; }
  .cta-band .btn { width: 100%; }
  .landing-sec { padding: 40px 16px 4px; }
  .landing-sec h2 { font-size: 22px; }
  .feature-grid, .how-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .feature, .how-steps li { padding: 14px 16px; }
  .landing-foot { margin-top: 36px; padding: 18px 16px 28px; flex-direction: column; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 48px; gap: 16px; }
  .doc-toc { position: static; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 6px; }
  .doc-cards { grid-template-columns: minmax(0, 1fr); }
  .doc-top { padding: 10px 16px; }
  .doc-top .brand small { display: none; }
  .doc h1 { font-size: 27px; }
  .doc-table { display: block; overflow-x: auto; }
  .doc-table td:first-child { white-space: normal; }
}
@media (max-width: 420px) {
  .site-nav .brand > div { display: none; }
}
/* Pilihan "Urutkan" hanya untuk layar kecil (di desktop pengurutan lewat judul kolom). */
.tbl-sort { display: none; }
.page-hidden { display: none !important; }
.table-tools.sort-only { display: none; }

@media (max-width: 800px) {
  /* Menu samping: laci yang menimpa halaman, dengan latar gelap saat terbuka. */
  .sidebar { position: fixed; left: 0; top: 0; height: 100dvh; transform: translateX(-100%); transition: transform .2s; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(8, 12, 22, .5); }
  #menuBtn { display: inline-flex; }

  /* Bagian atas ringkas dan ikut tergulir, supaya tidak memakan layar. */
  .topbar { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 12px 16px 14px; backdrop-filter: none; background: var(--bg); }
  .topbar .titles { min-width: 0; align-self: center; }
  .topbar h1 { font-size: 17px; line-height: 1.25; }
  .topbar .sub { font-size: 12px; }
  .top-actions { grid-column: 1 / -1; width: 100%; min-width: 0; flex-wrap: wrap; gap: 8px; }
  .topbar.no-range { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar.no-range .top-actions { grid-column: auto; width: auto; flex-wrap: nowrap; }
  .src-seg { order: -1; width: 100%; }
  .src-seg button { flex: 1; }
  .top-actions .range-wrap { flex: 1; min-width: 0; }
  .top-actions .range-btn { width: 100%; justify-content: space-between; min-width: 0; overflow: hidden; }
  .range-btn > span:not(.caret) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .range-btn .muted { display: none; }
  #modePill { display: none; }
  .range-pop { left: 0; right: auto; width: min(320px, calc(100vw - 32px)); }

  .view { padding: 4px 16px 28px; gap: 14px; }
  .app-foot { padding: 14px 16px 20px; flex-direction: column; }
  .crumb { display: none; }
  .card { padding: 16px; border-radius: 12px; }
  .card-head { margin-bottom: 12px; gap: 10px; }
  .card-head h3 { font-size: 14.5px; }

  /* Kartu angka: dua kolom, lebih pendek. */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > :first-child:nth-last-child(2n+1) { grid-column: span 2; }
  .kpi { padding: 12px 14px; gap: 2px; }
  .kpi .kpi-top { gap: 8px; }
  .kpi .ic { width: 26px; height: 26px; border-radius: 8px; }
  .kpi .ic svg { width: 15px; height: 15px; }
  .kpi .label { font-size: 12.5px; }
  .kpi .value { font-size: 20px; margin-top: 4px; }
  .kpi .value.sm { font-size: 15.5px; }
  .kpi .foot { font-size: 11.5px; min-height: 0; }
  .kpi .foot > span:not(.delta):not(.status) { display: none; }
  .kpi .spark { height: 28px; margin-top: 6px; }

  /* Deretan tombol (pilihan metrik, pengelompokan, unduhan): satu baris yang bisa digeser. */
  .seg:not(.src-seg), .card-head > .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg:not(.src-seg)::-webkit-scrollbar, .card-head > .chips::-webkit-scrollbar { display: none; }
  .seg button, .chip { flex-shrink: 0; white-space: nowrap; }
  .card-head > .seg { width: 100%; }

  .chart-box { height: 240px; }
  .chart-box.sm { height: 210px; }
  .legend { gap: 6px 12px; font-size: 12px; }

  /* Formulir filter: tiap isian selebar layar. */
  .toolbar { gap: 10px; }
  .toolbar > .field { flex: 1 1 100%; }
  .toolbar > .field input, .toolbar > .field select, .toolbar > .field > .btn { width: 100% !important; }
  .toolbar > .field > .btn { justify-content: space-between; font-weight: 500; }
  .toolbar > .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .multi-list { width: min(340px, calc(100vw - 32px)); }

  .table-tools .search { flex: 1 1 100%; }
  .search input { width: 100%; }
  .pager { flex-wrap: wrap; justify-content: center; }
  .pending-item { grid-template-columns: minmax(0, 1fr); }
  .pending-item .row-actions { justify-content: flex-start; }

  .modal { padding: 0; }
  .modal-card { border-radius: 0; min-height: 100vh; }
  .modal-head { position: sticky; top: 0; z-index: 3; padding: 14px 16px; }
  .modal-body { padding: 14px; gap: 14px; }
  .modal-foot { padding: 12px 16px; }
  .modal-foot .btn { flex: 1; }
  .page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .opt-card { padding: 9px 10px; font-size: 12.5px; gap: 8px; }
  .opt-card svg { display: none; }
  .scope-head { padding: 10px 12px; }
}

/* Tabel menjadi kartu di layar sempit: setiap baris tampil sebagai "label: nilai". */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .tbl-sort { display: block; flex: 1 1 auto; min-width: 0; font-size: 13px; }
  .table-tools.sort-only { display: flex; }
  .table-tools { gap: 8px; margin-bottom: 10px; }
  .table-tools .chips { margin-left: auto; }
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tfoot, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  /* Setiap baris: judul selebar kartu, lalu nilai-nilai dalam dua kolom (label kecil di atas angka). */
  .table-wrap tbody tr, .table-wrap tfoot tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--panel); }
  .table-wrap tbody tr:hover { background: var(--panel); }
  .table-wrap tbody tr.clickable:active { background: var(--panel-2); }
  .table-wrap td { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 0; border: 0; text-align: left; font-size: 14px; font-weight: 600; min-width: 0; white-space: normal; }
  .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  .table-wrap td.td-main { grid-column: 1 / -1; padding: 0 0 10px; border-bottom: 1px solid var(--border) !important; font-size: 14.5px; }
  .table-wrap td.td-main::before, .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td[data-label=""] { grid-column: 1 / -1; align-items: flex-end; }
  .table-wrap td.td-empty { display: none; }
  .table-wrap td.empty { grid-column: 1 / -1; align-items: center; font-weight: 400; }
  .table-wrap td.empty::before { display: none; }
  .table-wrap tbody tr:has(td.empty) { display: block; border-style: dashed; }
  .table-wrap tfoot tr { border-color: var(--border-strong); background: var(--panel-2); }
  .table-wrap tfoot td { background: transparent; border-top: 0; }
  .table-wrap .share { justify-content: flex-start; }
  .table-wrap td .cell-sub { font-weight: 400; }
  .table-wrap .bar-cell .bar { display: none; }
  .table-wrap td.td-wide, .table-wrap td:has(.truncate) { grid-column: 1 / -1; }
  .table-wrap td.td-wide { font-weight: 500; }
  .table-wrap td:has(.truncate) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .table-wrap td:has(.truncate)::before { flex-basis: 100%; }
  .table-wrap .truncate { max-width: calc(100% - 44px) !important; font-weight: 400; }  .table-wrap .row-actions { justify-content: flex-end; }
}
