/* v1.0.3 — Gaya "Allstar Landing A": latar hitam-biru, aksen lime + toska, Space Grotesk + JetBrains Mono,
   tombol bulat (pill), kartu bersudut besar, garis "fiber" beranimasi. Warna status (jade/amber/coral) tetap. */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #0b0d12;
  --panel: #11141b;
  --panel-raised: #181c25;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --text: #eef0f3;
  --text-dim: #a9aeb8;
  --text-faint: #6d727c;

  /* Aksen identitas (Allstar) */
  --accent: #b3ee55;
  --accent-rgb: 179,238,85;
  --accent-2: #2ee0ec;
  --accent-ink: #0b0d12;

  /* Warna makna (status) */
  --amber: #f5a623;
  --jade: #34d399;
  --coral: #fb7166;
  --slate-blue: #6c8cff;

  --font-ui: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar-w: 240px;
  --radius: 22px;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* v1.0.4: variabel bantu supaya tema terang/gelap cukup mengganti nilai di sini */
  --ink-rgb: 255,255,255;      /* warna "tinta" untuk lapisan tipis (hover, garis bar) */
  --bg-rgb: 11,13,18;
  --input-bg: var(--bg);
  --on-jade: #04210f;
  --on-coral: #1a0806;
  --link-hover: #fff;
  color-scheme: dark;
}

/* ---------- v1.0.4: Tema TERANG ----------
   Dipakai bila pengguna memilih "Terang" (data-theme="light"), atau memilih "Ikuti perangkat" dan perangkatnya mode terang.
   Kedua blok di bawah sengaja berisi nilai yang sama. */
:root[data-theme="light"] {
  --bg: #f3f5f8; --bg-rgb: 243,245,248; --panel: #ffffff; --panel-raised: #eef1f5;
  --border: rgba(15,23,42,0.11); --border-strong: rgba(15,23,42,0.24);
  --text: #10141b; --text-dim: #475161; --text-faint: #687180;
  --accent: #4d7c0f; --accent-rgb: 77,124,15; --accent-2: #0e7490; --accent-ink: #ffffff;
  --amber: #b45309; --jade: #047857; --coral: #dc2626; --slate-blue: #4f46e5;
  --ink-rgb: 15,23,42; --input-bg: #ffffff; --on-jade: #ffffff; --on-coral: #ffffff; --link-hover: #10141b;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f8; --bg-rgb: 243,245,248; --panel: #ffffff; --panel-raised: #eef1f5;
    --border: rgba(15,23,42,0.11); --border-strong: rgba(15,23,42,0.24);
    --text: #10141b; --text-dim: #475161; --text-faint: #687180;
    --accent: #4d7c0f; --accent-rgb: 77,124,15; --accent-2: #0e7490; --accent-ink: #ffffff;
    --amber: #b45309; --jade: #047857; --coral: #dc2626; --slate-blue: #4f46e5;
    --ink-rgb: 15,23,42; --input-bg: #ffffff; --on-jade: #ffffff; --on-coral: #ffffff; --link-hover: #10141b;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui); font-size: 14.5px; line-height: 1.55;
  background: var(--bg); color: var(--text); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(70% 45% at 85% 0%, rgba(var(--accent-rgb),0.07), transparent 70%);
  background-attachment: fixed;
}
h1, h2, h3 { font-weight: 600; color: var(--text); margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 22px; letter-spacing: -0.03em; }
h3 { font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: none; }
@keyframes fiber { from { transform: translateX(-30vw); } to { transform: translateX(120vw); } }
@keyframes masuk { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
img, svg { max-width: 100%; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* ============================== SHELL ============================== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
/* Logo belah ketupat (gaya Allstar). Huruf di dalamnya disembunyikan; nama aplikasi tampil sebagai wordmark. */
.brand-mark {
  width: 14px; height: 14px; flex: 0 0 14px; margin: 0 4px;
  background: var(--accent); transform: rotate(45deg);
  font-size: 0; color: transparent; overflow: hidden;
  box-shadow: 0 0 18px rgba(var(--accent-rgb),0.35);
}
.brand-mark.big { width: 30px; height: 30px; flex-basis: 30px; margin: 10px auto 14px; }
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.1; letter-spacing: 0.1em; text-transform: uppercase; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-dim); line-height: 1.3; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 5px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); padding: 16px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px;
  color: var(--text-dim); font-size: 14px; font-weight: 500; border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s, border-color .2s;
}
.nav-item:hover { background: rgba(var(--ink-rgb),0.05); color: var(--text); text-decoration: none; }
.nav-item.active { background: rgba(var(--accent-rgb),0.1); border-color: rgba(var(--accent-rgb),0.35); color: var(--accent); }
.nav-btn { width: 100%; background: none; cursor: pointer; font-family: inherit; text-align: left; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--coral); color: var(--on-coral); font-size: 11px; font-weight: 700; text-align: center; }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.sidebar-foot form { margin: 0; }
.version { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); padding: 8px 10px 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 16px 28px;
  background: rgba(var(--bg-rgb),0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
/* Garis "fiber" yang berjalan di bawah topbar (ciri khas Allstar) */
.topbar::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 22vw; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: fiber 5s linear infinite;
}
.topbar { overflow: hidden; }
.page-title { font-size: 20px; letter-spacing: -0.03em; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; }
.me-text { text-align: right; line-height: 1.25; }
.me-name { font-weight: 600; font-size: 13.5px; }
.me-role { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--accent-rgb),0.1); border: 1px solid rgba(var(--accent-rgb),0.35);
  color: var(--accent); display: grid; place-items: center; font-weight: 600; font-family: var(--font-mono);
}
.icon-btn { border: 1px solid var(--border-strong); background: transparent; color: var(--text); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1280px; width: 100%; }
.sidebar-backdrop { display: none; }

/* ============================== KOMPONEN ============================== */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 18px; min-width: 0;
}
/* Muncul halus saat halaman dibuka (dimatikan bila pengguna memilih kurangi animasi) */
.content > .card, .content > .grid-2, .content > .grid-3-2, .content > .kpi-grid, .content > .pipeline-strip { animation: masuk .6s var(--ease) both; }
.content > :nth-child(2) { animation-delay: .04s; } .content > :nth-child(3) { animation-delay: .08s; } .content > :nth-child(4) { animation-delay: .12s; }
.card.narrow { max-width: 640px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.section-title { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; margin: 22px 0 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.welcome { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.welcome h2 { margin-bottom: 4px; }
.welcome p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-2 > .card, .grid-2 > div > .card:last-child { margin-bottom: 0; }
.grid-3-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { display: block; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px;
  transition: transform .35s var(--ease), border-color .35s, background .35s; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--accent); transform: translateY(-4px); background: rgba(var(--accent-rgb),0.05); color: inherit; }
.kpi-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }
.kpi-value { font-family: var(--font-ui); font-size: 30px; font-weight: 600; letter-spacing: -0.04em; color: var(--text); line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--text-faint); }

label { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; margin: 14px 0 7px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid rgba(var(--ink-rgb),0.14); border-radius: 14px;
  background: var(--input-bg); color: var(--text); font-family: inherit; font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s;
}
input[type=file] { width: 100%; color: var(--text-dim); font-family: inherit; font-size: 13px; }
input[type=file]::file-selector-button { background: transparent; color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer; font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15); }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
select:disabled, input:disabled { opacity: 0.6; }
form > .btn, form > button, .form-actions { margin-top: 18px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.req { color: var(--coral); }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s, background .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(var(--accent-rgb),0.25); }
.btn:active { transform: scale(0.97); box-shadow: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { color: var(--text); border-color: var(--text); background: transparent; box-shadow: none; }
.btn-success { background: var(--jade); color: var(--on-jade); }
.btn-success:hover { color: var(--on-jade); box-shadow: 0 10px 30px rgba(52,211,153,0.22); }
.btn-danger { background: transparent; color: var(--coral); border-color: rgba(251,113,102,0.45); }
.btn-danger:hover { color: var(--coral); background: rgba(251,113,102,0.12); box-shadow: none; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-sm:hover { transform: none; }
.btn-block { width: 100%; }
.inline-form { display: inline; margin: 0; }

.alert a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.alert a:hover { color: var(--link-hover); }
.alert { padding: 13px 18px; border-radius: 16px; margin-bottom: 18px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.35); color: var(--jade); }
.alert-error { background: rgba(251,113,102,0.12); border-color: rgba(251,113,102,0.35); color: var(--coral); }
.alert-warning { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.35); color: var(--amber); }
.alert-info { background: rgba(108,140,255,0.1); border-color: rgba(108,140,255,0.35); color: var(--slate-blue); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--border); color: var(--text-dim); background: var(--panel-raised); }
.badge-success { color: var(--jade); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.badge-warning { color: var(--amber); border-color: rgba(245,166,35,0.35); background: rgba(245,166,35,0.08); }
.badge-danger { color: var(--coral); border-color: rgba(251,113,102,0.35); background: rgba(251,113,102,0.08); }
.badge-info { color: var(--slate-blue); border-color: rgba(108,140,255,0.35); background: rgba(108,140,255,0.08); }
.badge-muted { color: var(--text-faint); }
.badge-role-super_admin { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.badge-role-direktur { color: var(--accent-2); border-color: rgba(46,224,236,0.35); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(var(--ink-rgb),0.03); }
.row-muted td { color: var(--text-faint); }
td.num, th.num { text-align: right; font-family: var(--font-mono); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters .btn { margin-top: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

dl.info { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0 0 8px; font-size: 13.5px; }
dl.info dt { color: var(--text-faint); }
dl.info dd { margin: 0; color: var(--text); word-break: break-word; }
.checklist { padding-left: 18px; margin: 8px 0 0; color: var(--text-dim); }
.checklist li { margin-bottom: 6px; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: none; }
.dot-online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); margin-right: 8px; }
.empty-state { text-align: center; padding: 40px 20px; }
.note-box { background: rgba(var(--accent-rgb),0.04); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 14px; padding: 12px 16px; font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Pipeline strip (alur status) — elemen khas dari template ---------- */
.pipeline-strip {
  display: flex; align-items: center; background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 24px; margin-bottom: 18px; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.pipeline-strip::-webkit-scrollbar { height: 4px; }
.pipeline-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.pipeline-node-wrap { display: flex; align-items: center; flex: 1; }
.pipeline-node-wrap:last-child { flex: 0 0 auto; }
.pipeline-node { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.pipeline-node__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.pipeline-node--current .pipeline-node__dot { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb),0.6); animation: pulse 1.6s ease-in-out infinite; }
.pipeline-node--current .pipeline-node__label { color: var(--accent); }
.pipeline-node--ok .pipeline-node__dot { background: var(--jade); }
.pipeline-node--ok .pipeline-node__label { color: var(--text); }
.pipeline-node--fail .pipeline-node__dot { background: var(--coral); }
.pipeline-node--fail .pipeline-node__label { color: var(--coral); }
.pipeline-connector { flex: 1; min-width: 24px; height: 1px; background: var(--border); margin: 0 12px; }
.pipeline-connector--ok { background: var(--jade); opacity: 0.4; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Progress ---------- */
.pbar { height: 8px; background: rgba(var(--ink-rgb),0.08); border-radius: 99px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 99px; transition: width 1.2s var(--ease); }
.pbar-big { height: 14px; }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-row .pbar { flex: 1; }
.prog-row .mono { min-width: 46px; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.gallery a { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel-raised); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery video { width: 100%; height: 100%; object-fit: cover; }
video.full { width: 100%; max-height: 360px; border-radius: 8px; background: #000; margin-bottom: 10px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { font-family: var(--font-mono); font-size: 18px; min-width: 60px; text-align: right; color: var(--accent); }

/* ---------- Grafik (Dashboard Direktur) — palet divalidasi (CVD ΔE 26.8, kontras ≥3:1; latar v1.0.3 lebih gelap → kontras makin tinggi) ---------- */
:root { --series-1: #3987e5; --series-2: #d95926; }
.chart-scroll { overflow-x: auto; scrollbar-width: thin; }
.chart-wrap { position: relative; width: 100%; min-width: 560px; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-wrap .grid { stroke: var(--border); stroke-width: 1; }
.chart-wrap .grid.dasar { stroke: var(--text-faint); }
.chart-wrap .sumbu { fill: var(--text-dim); font-family: var(--font-mono); font-size: 12.5px; }
.chart-wrap .hit { fill: transparent; cursor: pointer; }
.chart-wrap .hit.aktif { fill: rgba(var(--ink-rgb),0.05); }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--panel-raised); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; color: var(--text); pointer-events: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.chart-tip i, .chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; }
.rank-nama { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 0 0 90px; height: 6px; background: var(--panel-raised); border-radius: 99px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--series-1); border-radius: 99px; }

/* ---------- Form RAB ---------- */
.rab-edit { min-width: 1180px; }
.rab-edit td { vertical-align: top; padding: 6px 4px; }
.rab-edit input, .rab-edit select { padding: 7px 8px; font-size: 13px; min-width: 0; }
.rab-edit select { width: auto; min-width: 120px; max-width: 170px; }
.rab-edit input[name="item[]"], .rab-edit input[name="deskripsi[]"] { min-width: 220px; }
.rab-edit .small-input { margin-top: 4px; font-size: 12px; }
.rab-edit td.sub, .rab-edit td.tot { padding-top: 13px; }
.rab-edit tfoot td { border-bottom: none; font-family: var(--font-mono); }

/* ---------- Dokumen ---------- */
.doc-list { list-style: none; padding: 0; margin: 0 0 12px; }
.doc-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: none; }
.doc-icon { font-family: var(--font-mono); font-size: 10.5px; padding: 3px 6px; border-radius: 999px; background: rgba(var(--accent-rgb),0.08); border: 1px solid rgba(var(--accent-rgb),0.3); color: var(--accent); text-transform: uppercase; flex: 0 0 auto; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.doc-meta { font-size: 11.5px; color: var(--text-faint); }
.doc-icon-peta { background: rgba(46,224,236,0.08); border-color: rgba(46,224,236,0.35); color: var(--accent-2); }

/* ---------- v1.0.4: logo, tombol tema, tanda tangan ---------- */
[hidden] { display: none !important; } /* atribut hidden selalu menang atas display komponen (mis. tombol Pasang Aplikasi) */
.brand-logo { height: 40px; width: auto; max-width: 72px; flex: 0 0 auto; object-fit: contain; border-radius: 8px; }
.auth-logo { max-width: 120px; max-height: 80px; object-fit: contain; margin: 4px auto 10px; display: block; }
.tema-btn { width: 36px; height: 36px; color: var(--text-dim); }
.tema-btn:hover { color: var(--accent); border-color: var(--accent); }
.tema-btn span { display: grid; place-items: center; }
.tema-btn span[hidden] { display: none; }
a.avatar { text-decoration: none; }
a.avatar:hover { color: var(--accent); border-color: var(--accent); }
.gambar-preview { display: flex; align-items: center; justify-content: center; min-height: 90px; padding: 12px; border: 1px dashed var(--border-strong);
  border-radius: 14px; background: #fff; margin: 6px 0 4px; }
.gambar-preview img { max-height: 110px; max-width: 100%; object-fit: contain; }
.ttd-pad { display: block; width: 100%; height: 170px; background: #fff; border: 1px dashed var(--border-strong); border-radius: 14px; touch-action: none; cursor: crosshair; }
.pilih-tema { display: flex; gap: 8px; flex-wrap: wrap; }
.pilih-tema label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-size: 13.5px; color: var(--text); }
.pilih-tema label:has(input:checked) { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),0.08); }

/* ============================== LOGIN ============================== */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; position: relative; overflow: hidden;
  background-image: radial-gradient(80% 60% at 75% 25%, rgba(var(--accent-rgb),0.10), transparent 70%); }
/* Garis fiber beranimasi di latar halaman login */
.auth-body::before, .auth-body::after {
  content: ""; position: fixed; left: 0; width: 24vw; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: fiber 4.6s linear infinite;
}
.auth-body::before { top: 24%; }
.auth-body::after { top: 72%; width: 18vw; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); animation-duration: 6.2s; animation-delay: 1.4s; }
.auth-wrap { width: 100%; max-width: 420px; position: relative; z-index: 1; animation: masuk .9s var(--ease) both; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 26px; text-align: center; }
.auth-title { font-weight: 700; font-size: 30px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; }
.auth-brand .muted { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.auth-body .card { border-radius: 28px; padding: clamp(24px, 5vw, 36px); }
.auth-body .btn-block { padding: 15px; font-size: 15px; margin-top: 22px; }

/* ============================== CETAK (Print / Simpan PDF dari browser) ============================== */
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-raised: #f4f4f4; --border: #bbb; --border-strong: #999; --text: #111; --text-dim: #333; --text-faint: #666;
          --accent: #3f6212; --accent-rgb: 63,98,18; --accent-2: #0e7490; }
  body { background: #fff; background-image: none; color: #111; font-size: 11px; }
  .card, .kpi, .pipeline-strip { background: #fff !important; animation: none !important; transform: none !important; }
  .topbar::after { display: none; }
  .sidebar, .sidebar-backdrop, .topbar .menu-btn, .me, .filters, .btn, form button, .nav-badge, .chart-tip, details summary { display: none !important; }
  .app-shell { display: block; }
  .topbar { position: static; border: none; padding: 0 0 8px; background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .kpi { break-inside: avoid; border-color: #bbb; box-shadow: none; }
  .grid-2, .grid-3-2 { grid-template-columns: 1fr 1fr; }
  details { display: block; } details > *:not(summary) { display: block; }
  a { color: #111; text-decoration: none; }
  @page { size: A4; margin: 12mm; }
}

/* ============================== HP / TABLET ============================== */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(5,7,12,0.6); z-index: 40; }
  .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 36px; }
  .grid-2, .grid-3-2 { grid-template-columns: minmax(0, 1fr); }
  .me-text { display: none; }
}
@media (max-width: 560px) {
  /* Tombol & menu cukup besar untuk jari (target sentuh ±44px) — audit #20 */
  .btn { min-height: 42px; padding: 10px 16px; }
  .btn-sm { min-height: 38px; padding: 8px 12px; font-size: 13px; }
  .nav-item { padding: 11px 10px; }
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
  input[type=date], input[type=tel], select, textarea { font-size: 16px; padding: 11px 12px; } /* 16px: iPhone tidak auto-zoom */
  /* Tabel menjadi kartu: tiap baris satu kartu, judul kolom tampil di kiri */
  .table-wrap table.stack, .table-wrap table.stack tbody, .table-wrap table.stack tr, .table-wrap table.stack td { display: block; width: 100%; }
  .table-wrap table.stack thead { display: none; }
  .table-wrap table.stack tr { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--panel-raised); }
  .table-wrap table.stack td { border: none; padding: 5px 0; text-align: right; display: flex; justify-content: space-between; gap: 12px; }
  .table-wrap table.stack td[data-label]::before { content: attr(data-label); color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: 0 0 auto; padding-top: 2px; }
  .table-wrap table.stack td > * { text-align: right; }
  .table-wrap table.stack td.num { font-family: var(--font-mono); }
  .table-wrap table.stack td:not([data-label]) { justify-content: flex-end; }
  .table-wrap table.stack td .prog-row { width: 60%; }
  .table-wrap table.stack.rab-edit { min-width: 0; }
  .table-wrap table.stack.rab-edit td { flex-wrap: wrap; }
  .table-wrap table.stack.rab-edit td input, .table-wrap table.stack.rab-edit td select { max-width: 100%; min-width: 0; width: 100% !important; text-align: left; }
  tbody tr:hover td { background: transparent; }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
  dl.info { grid-template-columns: 115px 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-strip { padding: 14px; }
}

/* Hormati pengaturan "kurangi animasi" di HP/komputer */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- v1.0.5: tab Kelola Akun & manajemen peran ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab { padding: 9px 16px; color: var(--text-dim); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.izin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 8px 0 4px; }
.izin { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-size: 13.5px; color: var(--text); }
.izin:hover { background: rgba(var(--ink-rgb),0.04); }
.izin input { flex: 0 0 auto; }
.izin span:first-of-type { flex: 1; }
.izin-beda { border-color: rgba(var(--accent-rgb),0.45); background: rgba(var(--accent-rgb),0.07); }
.izin-kunci { color: var(--text-faint); cursor: not-allowed; }
.tag-bawaan { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 99px; padding: 1px 7px; white-space: nowrap; }
table.matriks { font-size: 12.5px; }
table.matriks th { white-space: normal; min-width: 80px; }
table.matriks th:first-child, table.matriks td:first-child { min-width: 230px; }
table.matriks td { padding: 6px 8px; }
.matriks-grup td { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding-top: 14px; }
.cek { color: var(--jade); font-weight: 700; }
.tag-sensitif { color: var(--amber); border-color: rgba(245,166,35,0.45); }
.grup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; padding: 8px 12px;
  border-radius: 12px; background: rgba(var(--accent-rgb),0.07); border-left: 3px solid var(--accent); font-weight: 600; }
.grup-head:first-of-type { margin-top: 4px; }
.cek-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-size: 13px; color: var(--text-dim); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li:last-child { padding-bottom: 0; }
.timeline .gallery { margin-top: 6px; }
.filters .cek-inline input { min-width: 0; width: auto; flex: 0 0 auto; }

/* ---------- v1.0.8: pendaftaran akun ---------- */
.auth-wrap.auth-wide { max-width: 620px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.grid-2 > dl.info { align-content: start; }
