:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --wash: rgba(42, 120, 214, 0.10);
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --critical: #d03b3b;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px -12px rgba(11, 11, 11, 0.10);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --accent: #3987e5;
    --wash: rgba(57, 135, 229, 0.16);
    --good-text: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232321;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --accent: #3987e5;
  --wash: rgba(57, 135, 229, 0.16);
  --good-text: #0ca30c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
}

@font-face {
  font-family: "Archivo"; src: url("/static/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- form & tombol ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.input, select.input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 550; text-decoration: none; color: var(--ink);
  transition: background .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--critical); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.icon { padding: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.err { color: var(--critical); font-size: 13px; min-height: 18px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; overflow: hidden; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #0f1e33; color: #f0efec;
}
.login-art .grid-bg {
  position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}
.login-art .sun {
  position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(57,135,229,.55), rgba(57,135,229,0) 70%);
}
.login-art h2 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; position: relative; max-width: 440px; }
.login-art p { color: #c3c2b7; max-width: 420px; position: relative; margin: 0; }
.login-art .facts { position: relative; display: flex; gap: 28px; flex-wrap: wrap; }
.login-art .facts b { display: block; font-size: 20px; color: #fff; }
.login-art .facts span { color: #c3c2b7; font-size: 13px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; position: relative; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.brand .logo svg { width: 18px; height: 18px; }
.login-form { display: grid; place-items: center; padding: 32px 16px; background: var(--surface); }
.login-form form { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
.login-form .sub { color: var(--ink-2); margin: 0 0 24px; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form { min-height: 100vh; }
}

/* ---------- layout aplikasi ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 14px; border-right: 1px solid var(--border); background: var(--surface);
}
.side .brand { padding: 4px 8px 22px; }
.nav { display: grid; gap: 2px; }
.nav .sect { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--wash); color: var(--ink); font-weight: 600; }
.nav a.on svg { color: var(--accent); }
.side .me {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 12px; border: 1px solid var(--border);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--wash); color: var(--accent); font-weight: 700; font-size: 13px;
}
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { color: var(--muted); font-size: 12px; }

.main { min-width: 0; }
.scrim { display: none; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: var(--page); border-bottom: 1px solid var(--border);
}
.top h1 { font-size: 18px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.top .crumb { color: var(--muted); font-size: 13px; }
.top .grow { flex: 1; }
.menu-btn { display: none; }
.content { padding: 22px 24px 48px; max-width: 1400px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); position: relative; }
.dot.live { background: var(--good); }
.dot.live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--good);
  opacity: 0; animation: ping 2.4s ease-out infinite; will-change: transform, opacity;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dot.live::after { animation: none; } }

/* ---------- kartu ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2 { font-size: 15px; margin: 0; font-weight: 650; }
.card-h .hint { color: var(--muted); font-size: 12.5px; }
.card-h .grow { flex: 1; }

.row { display: grid; gap: 16px; margin-bottom: 16px; }
.row.hero { grid-template-columns: minmax(280px, 1.05fr) minmax(0, 2fr); }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.kpi .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--wash); color: var(--accent); }
.kpi .ico svg { width: 16px; height: 16px; }
.kpi .val { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .val small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.kpi .foot { color: var(--muted); font-size: 12px; }
.spark { height: 44px; margin-top: 2px; }
.spark svg { width: 100%; height: 100%; display: block; overflow: visible; }

.gauge-card { display: flex; flex-direction: column; }
.gauge { position: relative; width: 100%; max-width: 300px; margin: 4px auto 0; }
.gauge svg { width: 100%; display: block; }
.gauge .g-val { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
.gauge .g-val b { display: block; font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.gauge .g-val span { color: var(--ink-2); }
.gauge-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; max-width: 300px; margin: 4px auto 0; width: 100%; padding: 0 4px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mini-stats div { background: var(--surface-2); border-radius: 10px; padding: 9px 10px; }
.mini-stats span { display: block; color: var(--muted); font-size: 12px; }
.mini-stats b { font-size: 15px; }

.phase { display: flex; flex-direction: column; gap: 10px; }
.phase .tag {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 650;
}
.phase .tag i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.phase .nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phase .nums span { display: block; color: var(--muted); font-size: 12px; }
.phase .nums b { font-size: 20px; font-weight: 650; }
.phase .nums b small { font-size: 12px; color: var(--ink-2); font-weight: 500; margin-left: 3px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; border-radius: 99px; transform-origin: left center; transform: scaleX(0); transition: transform .6s ease; will-change: transform; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); }
.seg button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer;
  color: var(--ink-2); font-weight: 500; font-size: 13px;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--grid); margin-bottom: 12px; }
.tabs button {
  border: 0; background: transparent; padding: 8px 12px; cursor: pointer; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 650; }
.chart { position: relative; height: 300px; }
.chart.sm { height: 220px; }

.notice {
  display: none; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px;
}
.notice.show { display: flex; }
.notice svg { width: 18px; height: 18px; flex: none; }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--grid); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--grid); text-align: left; white-space: nowrap; }
thead th { background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 12.5px; position: sticky; top: 0; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; }
.filters .input { width: auto; height: 40px; }
.filters .btn { height: 40px; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; color: var(--ink-2); flex-wrap: wrap; }
.role { display: inline-flex; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.role.admin { background: var(--wash); color: var(--accent); }
.state-on { color: var(--good-text); font-weight: 600; }
.state-off { color: var(--muted); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- dialog ---------- */
dialog {
  border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px -16px rgba(0,0,0,.45);
}
dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
dialog form { padding: 22px; }
dialog h3 { margin: 0 0 16px; font-size: 17px; }
dialog .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: var(--page); box-shadow: var(--shadow); font-weight: 500;
  transform: translateY(20px); opacity: 0; transition: all .25s; pointer-events: none;
}
.toast.show { transform: none; opacity: 1; }

.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.page[hidden] { display: none; }

/* ---------- responsif ---------- */
@media (max-width: 1180px) {
  .row.hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow);
  }
  .app.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; display: none; }
  .app.nav-open .scrim { display: block; }
  .menu-btn { display: inline-flex; }
  .row.two, .row.three { grid-template-columns: 1fr; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .top .crumb { display: none; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .kpi .val { font-size: 24px; }
  .top .pill .txt { display: none; }
}

/* ---------- pemilih tanggal ---------- */
.daterange {
  display: grid; gap: 12px; margin: -2px 0 14px; padding: 14px;
  border-radius: 12px; background: var(--surface-2);
}
.daterange .quick { display: flex; gap: 6px; flex-wrap: wrap; }
.daterange .quick .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--wash); }
.dr-inputs { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dr-inputs .field { margin: 0; }
.dr-inputs .field span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.dr-inputs .input, .dr-inputs .btn { height: 40px; }
.dr-inputs .input { width: auto; min-width: 150px; }
.dr-sep { padding-bottom: 10px; color: var(--muted); }
.range-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: var(--wash); color: var(--accent); font-size: 12px; font-weight: 600;
}
@media (max-width: 520px) {
  .dr-inputs .field { flex: 1 1 130px; }
  .dr-inputs .input { min-width: 0; width: 100%; }
  .dr-sep { display: none; }
  .dr-inputs .btn { width: 100%; }
}
.daterange .err:empty { display: none; }

/* ===================== Halaman depan publik ===================== */
.home { background: var(--surface); }
.h-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.btn.lg { padding: 12px 18px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.22); color: #f0efec; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }

.h-nav { position: sticky; top: 0; z-index: 10; background: #0f1e33; border-bottom: 1px solid rgba(255,255,255,.08); }
.h-nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.h-nav .brand { color: #fff; text-decoration: none; }
.h-links { display: flex; align-items: center; gap: 22px; }
.h-links a:not(.btn) { color: #c3c2b7; text-decoration: none; font-weight: 500; }
.h-links a:not(.btn):hover { color: #fff; }

.h-hero { position: relative; overflow: hidden; background: #0f1e33; color: #f0efec; padding: 88px 0 96px; }
.h-hero .grid-bg {
  position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}
.h-hero .sun { position: absolute; right: -140px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(57,135,229,.5), rgba(57,135,229,0) 70%); }
.h-hero-in { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #86b6ef; font-weight: 650; margin-bottom: 14px; }
.h-copy h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -0.03em; font-weight: 750; }
.h-copy .lead { font-size: 18px; color: #c3c2b7; max-width: 520px; margin: 0 0 28px; }
.h-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.h-live { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 22px; }
.h-live-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.pill.dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #f0efec; }
.h-live-time { color: #898781; font-size: 12.5px; }
.h-live-main span, .h-live-grid span { display: block; color: #c3c2b7; font-size: 13px; }
.h-live-main b { display: block; font-size: 46px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; }
.h-live small { font-size: 16px; font-weight: 500; color: #c3c2b7; }
.h-live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.h-live-grid div { background: rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; }
.h-live-grid b { font-size: 22px; font-weight: 700; }

.h-visual { display: grid; gap: 0; }
.vis-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); font-weight: 600; }
.vis-row.on { background: rgba(57,135,229,.22); border: 1px solid rgba(57,135,229,.5); }
.vis-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(57,135,229,.25); color: #86b6ef; }
.vis-line { width: 2px; height: 18px; margin-left: 30px; background: linear-gradient(#3987e5, rgba(57,135,229,.2)); }

.h-sec { padding: 80px 0; }
.h-sec.alt { background: var(--page); }
.h-sec h2 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 8px; }
.h-sub { color: var(--ink-2); font-size: 16px; margin: 0 0 32px; max-width: 620px; }
.h-cards { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.h-cards .card { padding: 22px; }
.h-cards h3, .h-steps h3 { font-size: 16px; margin: 14px 0 6px; }
.h-cards p, .h-steps p { margin: 0; color: var(--ink-2); }
.kico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--accent); flex: none; }
.kico svg { width: 20px; height: 20px; }
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: s; }
.h-steps li { display: flex; flex-direction: column; gap: 4px; position: relative; }
.h-steps .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.h-steps h3 { margin-top: 12px; }
.h-final { display: flex; align-items: center; gap: 20px; padding: 28px; flex-wrap: wrap; }
.h-final > div { flex: 1; min-width: 240px; }
.h-final h2 { font-size: 22px; margin: 0 0 4px; }
.h-foot { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 13px; background: var(--surface); }

@media (max-width: 900px) {
  .h-hero { padding: 56px 0 64px; }
  .h-hero-in { grid-template-columns: 1fr; gap: 32px; }
  .h-cards, .h-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-links a:not(.btn) { display: none; }
}
@media (max-width: 520px) {
  .h-cards, .h-steps { grid-template-columns: 1fr; }
  .h-sec { padding: 56px 0; }
  .h-copy .lead { font-size: 16px; }
  .h-cta .btn { flex: 1 1 100%; }
}

/* ---------- logo instansi ---------- */
.org-logo { width: 38px; height: 38px; flex: none; object-fit: contain; display: block; }
.org-logo.lg { width: 56px; height: 56px; }
.org-logo.xl { width: 64px; height: 64px; }
.h-org { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

/* ---------- role editor, export & edit data ---------- */
.role.editor { background: rgba(27,175,122,.14); color: var(--s3); }
.export-btns { display: inline-flex; gap: 8px; }
.edited { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(250,178,25,.18); color: var(--ink-2); cursor: help; }
th.sticky-act, td.sticky-act { position: sticky; right: 0; background: var(--surface); width: 44px; padding: 6px 8px; }
thead th.sticky-act { background: var(--surface-2); }
tbody tr:hover td.sticky-act { background: var(--surface-2); }
dialog.wide { width: min(720px, calc(100vw - 32px)); }
.r-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; max-height: 56vh; overflow: auto; padding-right: 4px; }
.r-grid .field { margin-bottom: 10px; }
.r-grid .field label { font-size: 12px; }
.r-grid .input { padding: 8px 10px; }
@media (max-width: 600px) { .r-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- foto profil ---------- */
img.avatar { object-fit: cover; padding: 0; background: var(--surface-2); }
.avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.profile-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-meta { display: grid; gap: 6px; min-width: 0; }
.profile-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.profile-btns label.btn { cursor: pointer; }


/* =====================================================================
   Login "medali surya": logo di tengah cincin emas + 24 garis jam matahari
   ===================================================================== */
.lx {
  --night: #12143a;  --night-2: #1a1d52;  --brand: #2e3192;
  --gold: #e8b84a;   --gold-2: #f3d88a;   --gold-dim: rgba(232,184,74,.22);
  --mist: #f4f5fb;   --line: #d9dceb;     --slate: #5b5f86;  --ink-x: #12143a;
  --danger: #c8202a;
  margin: 0; min-height: 100vh; background: var(--night); color: #f2f1ec;
  font-family: "Archivo", system-ui, sans-serif;
}
.lx-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 500px); min-height: 100vh; }

.lx-stage {
  position: relative; display: grid; place-items: center; padding: 56px 32px; overflow: hidden;
  background: radial-gradient(circle at 50% 44%, rgba(46,49,146,.55), transparent 62%), var(--night);
}
.lx-home {
  position: absolute; top: 28px; left: 32px; color: #b9bbd9; text-decoration: none; font-size: 14px;
  padding: 6px 2px; border-bottom: 1px solid transparent;
}
.lx-home:hover { color: #fff; border-bottom-color: var(--gold); }
.lx-center { display: grid; justify-items: center; text-align: center; max-width: 560px; }
.lx-title {
  margin: 26px 0 6px; font-weight: 800; font-stretch: 125%; letter-spacing: .01em;
  font-size: clamp(38px, 4.6vw, 64px); line-height: 1; color: #fbfaf5;
}
.lx-org { margin: 0; font-size: 18px; font-weight: 500; color: var(--gold-2); }
.lx-caption { margin: 22px 0 0; max-width: 40ch; font-size: 13.5px; line-height: 1.55; color: #9a9dc4; }

/* ---------- medali ---------- */
.medal { position: relative; width: clamp(260px, 30vw, 400px); aspect-ratio: 1; margin: 0; }
.medal-dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.medal .ring { fill: none; stroke: var(--gold); }
.medal .ring-a { stroke-width: 1.5; opacity: .9; }
.medal .ring-b { stroke-width: .75; opacity: .45; stroke-dasharray: 2 5; }
.medal .ring-c { stroke-width: .75; opacity: .3; }
.medal .tick { stroke: #4a4e8a; stroke-width: 2; stroke-linecap: round; }
.medal .tick.major { stroke-width: 3; }
.medal .tick.day { stroke: var(--gold); }
.medal .hours text { fill: #8f92bd; font: 600 12px "Archivo", sans-serif; text-anchor: middle; letter-spacing: .04em; }
.medal .now circle { fill: var(--gold-2); stroke: var(--night); stroke-width: 3; }
.medal.is-night .now circle { fill: #8f92bd; }
.medal-core {
  position: absolute; inset: 22%; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(232,184,74,.08), 0 0 80px 10px rgba(232,184,74,.18), 0 24px 60px -10px rgba(0,0,0,.55);
}
.medal-core img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
.medal-sun { width: 62%; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }

/* satu momen gerak saat halaman dibuka */
@media (prefers-reduced-motion: no-preference) {
  .medal .ring { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.4s cubic-bezier(.3,.7,.2,1); }
  .medal .ring-b { stroke-dasharray: 2 5; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s .6s; }
  .medal.is-ready .ring { stroke-dashoffset: 0; }
  .medal.is-ready .ring-b { opacity: .45; }
  .medal .tick.day { animation: tick-on .5s both; }
  .medal .now { opacity: 0; transition: opacity .6s 1.2s; }
  .medal.is-ready .now { opacity: 1; }
  .medal-core { opacity: 0; transform: scale(.94); transition: opacity .8s .15s, transform .8s .15s cubic-bezier(.3,.7,.2,1); }
  .medal.is-ready .medal-core { opacity: 1; transform: none; }
  @keyframes tick-on { from { stroke: #4a4e8a; } to { stroke: var(--gold); } }
}

/* ---------- panel form ---------- */
.lx-panel { background: var(--mist); color: var(--ink-x); display: flex; flex-direction: column; justify-content: center; padding: 48px 56px 28px; }
.lx-form { width: 100%; max-width: 360px; margin: auto; }
.lx-form h2 { margin: 0 0 8px; font-size: 28px; font-weight: 750; font-stretch: 108%; letter-spacing: -.01em; line-height: 1.15; }
.lx-sub { margin: 0 0 32px; color: var(--slate); font-size: 15px; }
.lx-field { display: grid; gap: 8px; margin-bottom: 18px; }
.lx-field > span:first-child { font-size: 14px; font-weight: 600; color: #2b2e5c; }
.lx-field input {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-x); font: 500 16px "Archivo", sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lx-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,184,74,.45); }
.lx-pass { position: relative; display: block; }
.lx-pass input { padding-right: 50px; }
.lx-pass button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  border: 0; border-radius: 8px; background: transparent; color: var(--slate); cursor: pointer; display: grid; place-items: center;
}
.lx-pass button:hover { background: #eceef8; color: var(--ink-x); }
.lx-pass button[aria-pressed="true"] { color: var(--brand); }
.lx-pass svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lx-err {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: #fdecec; color: var(--danger);
  font-size: 14px; border-left: 3px solid var(--danger);
}
.lx-btn {
  width: 100%; height: 52px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--gold); color: var(--night); font: 700 16px "Archivo", sans-serif; font-stretch: 110%;
  letter-spacing: .01em; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 24px -12px rgba(160,110,10,.7);
  transition: background .15s, transform .1s;
}
.lx-btn:hover { background: #dfab35; }
.lx-btn:active { transform: translateY(1px); }
.lx-btn:disabled { opacity: .7; cursor: progress; }
.lx :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lx-field input:focus-visible { outline: none; }
.lx-help { margin: 18px 0 0; color: var(--slate); font-size: 13.5px; }
.lx-foot { margin: 32px 0 0; color: #8b8fb3; font-size: 12.5px; text-align: center; }

@media (max-width: 900px) {
  .lx-wrap { grid-template-columns: 1fr; }
  .lx-stage { padding: 72px 20px 40px; }
  .medal { width: min(64vw, 260px); }
  .lx-title { margin-top: 18px; }
  .lx-caption { display: none; }
  .lx-panel { padding: 36px 20px 24px; border-radius: 22px 22px 0 0; margin-top: -18px; position: relative; }
  .lx-home { top: 20px; left: 20px; }
}

/* ---------- halaman depan memakai gaya medali ---------- */
.home .h-nav { background: #12143a; }
.lx-hero { --night: #12143a; --night-2: #1a1d52; --brand: #2e3192; --gold: #e8b84a; --gold-2: #f3d88a; color: #f2f1ec; }
.lx-hero { background: radial-gradient(circle at 74% 46%, rgba(46,49,146,.6), transparent 55%), #12143a; padding: 80px 0 88px; }
.lx-hero .h-hero-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.lx-title.hero { margin: 0 0 12px; text-align: left; font-size: clamp(44px, 6vw, 84px); }
.lx-hero .lx-org { margin: 0 0 22px; }
.lx-hero .lead { color: #b9bbd9; max-width: 46ch; }
.h-medal { display: grid; justify-items: center; text-align: center; }
.h-medal .lx-caption { margin-top: 18px; }
.lx-hero .medal { --night: #12143a; --gold: #e8b84a; --gold-2: #f3d88a; width: clamp(260px, 32vw, 420px); }
.lx-btn.inline { width: auto; display: inline-flex; align-items: center; padding: 0 22px; text-decoration: none; }
.lx-hero .h-live { margin-top: 28px; max-width: 520px; }
.h-live-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.h-live-grid.three b { font-size: 20px; }
@media (max-width: 900px) {
  .lx-hero { padding: 48px 0 56px; }
  .lx-hero .h-hero-in { grid-template-columns: 1fr; }
  .h-medal { order: -1; }
  .lx-hero .medal { width: min(70vw, 280px); }
  .h-medal .lx-caption { display: none; }
  .lx-title.hero { font-size: clamp(40px, 12vw, 56px); }
}
@media (max-width: 520px) { .h-live-grid.three { grid-template-columns: 1fr 1fr; } }
.home .h-nav { --night: #12143a; --gold: #e8b84a; }
.lx-btn.nav { width: auto; height: 38px; padding: 0 16px; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; box-shadow: none; }
@media (max-width: 520px) { .h-cta .lx-btn.inline { flex: 1 1 100%; justify-content: center; height: 52px; } }


/* =====================================================================
   Dashboard: identitas indigo & emas (sama dengan login & halaman depan)
   ===================================================================== */
:root {
  --page: #f4f5fb; --surface: #ffffff; --surface-2: #eef0f8;
  --ink: #12143a; --ink-2: #4a4e78; --muted: #7b7fa6;
  --grid: #e3e5f1; --axis: #c9cce0; --border: rgba(18,20,58,.10);
  --s1: #4a4fd0; --s2: #eb6834; --s3: #169e6d;
  --accent: #2e3192; --wash: rgba(46,49,146,.08);
  --gold: #e8b84a; --gold-2: #f3d88a; --night: #12143a;
  --g-track: rgba(255,255,255,.10); --g-tick: rgba(232,184,74,.45);
  --shadow: 0 1px 2px rgba(18,20,58,.05), 0 10px 28px -16px rgba(18,20,58,.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d0f2e; --surface: #171a45; --surface-2: #1f2358;
    --ink: #f2f1ec; --ink-2: #c3c4e0; --muted: #8f92bd;
    --grid: #262a62; --axis: #363b7c; --border: rgba(255,255,255,.09);
    --s1: #7b80f0; --s2: #d95926; --s3: #199e70;
    --accent: #e8b84a; --wash: rgba(232,184,74,.13);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -18px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --page: #0d0f2e; --surface: #171a45; --surface-2: #1f2358;
  --ink: #f2f1ec; --ink-2: #c3c4e0; --muted: #8f92bd;
  --grid: #262a62; --axis: #363b7c; --border: rgba(255,255,255,.09);
  --s1: #7b80f0; --s2: #d95926; --s3: #199e70;
  --accent: #e8b84a; --wash: rgba(232,184,74,.13);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -18px rgba(0,0,0,.7);
}

/* sidebar indigo malam */
.side { background: var(--night); border-right: 0; color: #d7d8ee; }
.side .brand { color: #fff; font-stretch: 110%; }
.side .brand a { color: #fff !important; }
.nav .sect { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: #7e82b0; padding-top: 18px; }
.nav a { color: #c3c4e0; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(232,184,74,.12); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav a.on svg { color: var(--gold); }
.side .me { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.side .me .who b { color: #fff; }
.side .me .who span { color: #8f92bd; }
.side .me .btn { background: transparent; border-color: rgba(255,255,255,.16); color: #d7d8ee; }
.side .me .btn:hover { background: rgba(255,255,255,.08); }
.side .avatar { background: rgba(232,184,74,.16); color: var(--gold); }

/* tombol utama emas */
.btn.primary { background: var(--gold); color: #12143a; font-weight: 650; }
.btn.primary:hover { background: #dfab35; filter: none; }
.top h1 { font-stretch: 112%; font-weight: 750; letter-spacing: -.005em; }
.kpi .val { font-stretch: 108%; }
.card-h h2 { font-weight: 700; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.tabs button[aria-selected="true"] { border-bottom-color: var(--gold); }
.dot.live { background: #2fbf71; }

/* kartu gauge = medali */
.medal-card {
  background: radial-gradient(circle at 50% 58%, rgba(46,49,146,.65), transparent 70%), var(--night);
  border-color: transparent; color: #f2f1ec;
}
.medal-card .card-h h2 { color: #fff; }
.medal-card .pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.medal-card .gauge .g-val b { color: #fff; font-stretch: 115%; font-weight: 800; }
.medal-card .gauge .g-val span { color: #c3c4e0; }
.medal-card .gauge-scale { color: #8f92bd; }
.medal-card #g-pct { color: var(--gold-2); }
.medal-card .mini-stats div { background: rgba(255,255,255,.06); }
.medal-card .mini-stats span { color: #8f92bd; }
.medal-card .mini-stats b { color: #fff; }
#g-arc { filter: drop-shadow(0 0 6px rgba(232,184,74,.45)); }
