/* PIJAR: tata letak mengikuti dashboard referensi. Semua font berasal dari sistem, jadi tampilan tetap utuh tanpa internet. */
:root {
  --bg: #EFE5D3;            /* turunan Gargoyle Gas #E6D5B7 */
  --surface: #FFFFFF;
  --ink: #1E223D;           /* Space Cadet */
  --muted: #5C6079;
  --line: #E2D8C4;
  --line-2: #C9BBA0;
  --accent: #F54F1B;        /* Orange */
  --accent-ink: #1E223D;    /* teks di atas oranye: Space Cadet, kontras cukup */
  --accent-soft: #FDE3D8;
  --blue: #3B4A8C;
  --blue-soft: #E3E7F4;
  --violet: #5B4FA0;
  --violet-soft: #E9E6F5;
  --amber: #B45309;
  --amber-soft: #FDF0D5;
  --red: #C2362B;
  --red-soft: #FBE4E1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141831; --surface: #1E223D; --ink: #E6D5B7; --muted: #AEA892; --line: #2E3456; --line-2: #434B72;
    --accent: #F54F1B; --accent-ink: #1E223D; --accent-soft: #3A2620;
    --blue: #9AAAE6; --blue-soft: #262D55; --violet: #B9B0F0; --violet-soft: #2C2950;
    --amber: #F5B453; --amber-soft: #3A2C12; --red: #FF8A7F; --red-soft: #3D1B18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141831; --surface: #1E223D; --ink: #E6D5B7; --muted: #AEA892; --line: #2E3456; --line-2: #434B72;
  --accent: #F54F1B; --accent-ink: #1E223D; --accent-soft: #3A2620;
  --blue: #9AAAE6; --blue-soft: #262D55; --violet: #B9B0F0; --violet-soft: #2C2950;
  --amber: #F5B453; --amber-soft: #3A2C12; --red: #FF8A7F; --red-soft: #3D1B18;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layar masuk & pembuatan akun ---------- */
body:has(#auth:not([hidden])) { padding-left: 0; padding-right: 0; }
#auth {
  min-height: 100vh; position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(245, 158, 11, .30), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(34, 197, 94, .28), transparent 60%),
    linear-gradient(155deg, #0B2344 0%, #163763 48%, #1B5A40 100%);
}
#auth::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .8;
}
.auth-screen { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(40px); pointer-events: none; }
.auth-orb.o1 { width: 340px; height: 340px; right: -90px; top: 18%; background: rgba(245, 158, 11, .28); }
.auth-orb.o2 { width: 280px; height: 280px; left: -80px; bottom: 12%; background: rgba(34, 197, 94, .22); }

.ticker { position: relative; overflow: hidden; white-space: nowrap; z-index: 1; }
.ticker-atas { background: linear-gradient(90deg, #F59E0B, #FBBF24); color: #1F1400; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ticker-bawah { background: rgba(255, 255, 255, .10); color: #E8F1EC; border-top: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(4px); }
.ticker-track { display: flex; width: max-content; padding: 11px 0; animation: geser 34s linear infinite; }
.ticker-bawah .ticker-track { animation-name: geser-balik; animation-duration: 42s; padding: 10px 0; }
.grup { display: flex; align-items: center; flex: none; }
.grup span { font: 800 12.5px/1 "Inter", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; padding-right: 26px; }
.grup span::after { content: "✦"; margin-left: 26px; opacity: .65; font-size: 11px; }
@keyframes geser { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes geser-balik { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.auth-utama { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 18px; position: relative; z-index: 1; }
.auth-card {
  --surface: #FFFFFF; --line: #E1E7E3; --muted: #5F6B66; --accent: #1E6B3F; --accent-ink: #FFFFFF;
  --accent-soft: #DCF3E4; --red: #B42318; --bg: #F4F6F5;
  width: min(420px, 100%); background: rgba(255, 255, 255, .97); color: #17212B;
  border-radius: 22px; padding: 30px 28px 26px; text-align: left;
  box-shadow: 0 30px 70px rgba(4, 16, 32, .45), 0 0 0 1px rgba(255, 255, 255, .25) inset;
}
.auth-card .brand-besar { margin: 0 auto 12px; }
.auth-card h1 { margin: 6px 0 4px; font-size: 23px; text-align: center; letter-spacing: -.01em; }
.auth-card p { margin: 0 0 18px; color: var(--muted); text-align: center; }
.auth-card form { display: grid; gap: 12px; }
.auth-card input { background: #fff; color: #17212B; border: 1px solid #D5DED9; border-radius: 10px; padding: 11px 12px; }
.auth-card input:focus { border-color: #1E6B3F; box-shadow: 0 0 0 3px rgba(30, 107, 63, .18); outline: none; }
.auth-card .btn.primary { padding: 12px; font-size: 15px; border-radius: 12px; background: linear-gradient(135deg, #1E6B3F, #15803D); }
.auth-card label { color: #33403A; font-weight: 600; font-size: 13px; }
.auth-card .hint { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.chips span { font-size: 12px; color: #E8F1EC; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .18); padding: 6px 11px; border-radius: 999px; }
.auth-kaki { text-align: center; font-size: 12px; color: rgba(232, 241, 236, .7); padding: 0 16px 16px; position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
@media (max-width: 480px) { .auth-card { padding: 24px 20px 20px; } .auth-card h1 { font-size: 20px; } }

/* ---------- kerangka ---------- */
#app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark { width: 56px; height: 56px; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 4px; display: grid; place-items: center; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-besar { width: 92px; height: 92px; border-radius: 20px; padding: 8px; margin: 0 auto 10px; box-shadow: 0 6px 20px rgba(22, 55, 99, .12); }
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.15; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a svg { flex: none; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; flex: none; }
.aksi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.aksi .btn { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; line-height: 1.15; border-radius: 8px; text-align: center; min-width: 0; }
.aksi .btn svg { width: 17px; height: 17px; flex: none; }
.aksi .btn span { white-space: normal; overflow-wrap: anywhere; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { gap: 8px; }
.who .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.who-teks { min-width: 0; display: grid; }
.who-teks strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-teks span { font-size: 11px; color: var(--muted); }
.keluar { color: var(--red); background: var(--surface); }
.keluar:hover { border-color: var(--red); background: var(--red-soft); }
.offline { font-size: 10.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; justify-content: center; }
.offline i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.main { padding: 26px 30px 44px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
#view { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
#isi { display: contents; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; }
.head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.head p { margin: 4px 0 0; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.user strong { display: block; font-size: 13px; }
.user button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0; cursor: pointer; text-decoration: underline; }

/* ---------- komponen umum ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; }
.filter-bar .field { width: 180px; }
.filter-bar .btn { height: 40px; }
.subjudul { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 9px 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label, .field .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="search"], input[type="date"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; min-width: 0; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; width: min(320px, 100%); }
.search input { border: 0; background: transparent; padding: 9px 0; width: 100%; outline: none; }
.search:focus-within { border-color: var(--accent); }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid-form .full { grid-column: 1 / -1; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head a { color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; gap: 14px; align-items: center; min-width: 0; }
.kpi .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi .label { font-size: 12.5px; color: var(--muted); }
.kpi .value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.row-2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row-4 { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); gap: 16px; }
.row-4 > .card[aria-labelledby="h-qa"] { display: flex; flex-direction: column; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
svg text { fill: var(--muted); font-family: var(--font); font-size: 11.5px; }
svg .gridline { stroke: var(--line); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.green { background: var(--accent-soft); color: var(--accent); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.grey { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; background: var(--violet-soft); color: var(--violet); }
.who .av.g { background: var(--blue-soft); color: var(--blue); }
.who .av.t { background: var(--amber-soft); color: var(--amber); }
.empty { padding: 26px 8px; text-align: center; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list li { display: flex; align-items: flex-start; gap: 12px; }
.list li > div { flex: 1; min-width: 0; }
.list .t { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.list .m { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.list time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ic-box { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 60px; gap: 12px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; flex: 1; }
.qa button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 12px; line-height: 1.3; border-radius: 12px; padding: 14px 6px; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; min-width: 0; }
.qa button:hover { border-color: var(--accent); }
.qa .ic-box { width: 40px; height: 40px; }
.note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.note code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--bg); padding: 1px 6px; border-radius: 5px; }

/* kartu anggota & transaksi */
.scan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.scan-input { display: flex; gap: 8px; align-items: stretch; }
.scan-input input { font-size: 16px; padding: 12px 13px; }
.member-card { display: flex; gap: 12px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 12px; }
.member-card .av { width: 44px; height: 44px; font-size: 14px; }
.lines { display: grid; gap: 8px; margin-top: 12px; }
.line { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.line.bad { border-color: var(--red); background: var(--red-soft); }
.line > div { flex: 1; min-width: 0; }
.line .t { font-weight: 600; overflow-wrap: anywhere; }
.line .m { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.line button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }
.dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.chk { width: 16px; height: 16px; accent-color: var(--accent); }

/* diagram */
.donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }
.donut-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; width: 100%; }
.donut-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) 40px 56px; gap: 10px; align-items: center; }
.donut-list span:not(.p) { min-width: 0; line-height: 1.3; }
.donut-list b { text-align: right; }
.donut-wrap > svg { width: 148px; height: 148px; }
.donut-list i { width: 10px; height: 10px; border-radius: 3px; }
.donut-list b { font-variant-numeric: tabular-nums; }
.donut-list span.p { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; white-space: nowrap; }

/* toast & konfirmasi */
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: min(420px, calc(100vw - 36px)); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 500; animation: pop .2s ease-out; }
.toast.bad { background: var(--red); color: #fff; }
.toast.ok { background: var(--accent); color: var(--accent-ink); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.catatan { max-height: 240px; overflow: auto; font-size: 13px; margin: 10px 0 0; padding-left: 18px; }

/* ---------- responsif ---------- */
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .brand-sub { display: none; }
  .nav { flex-direction: row; overflow-x: auto; flex: none; min-height: auto; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .side-foot { padding: 0; border: 0; background: none; display: flex; align-items: center; gap: 8px; }
  .who-teks, .offline { display: none; }
  .aksi { display: flex; gap: 8px; }
  .aksi .btn { flex-direction: row; gap: 6px; padding: 7px 12px; font-size: 13px; }
  .aksi .btn svg { width: 16px; height: 16px; }
  .row-2, .row-4, .scan, .two { grid-template-columns: minmax(0, 1fr); }
  .row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .side { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand foot" "nav nav"; padding: 10px 12px; gap: 8px 10px; }
  .brand { grid-area: brand; }
  .side-foot { grid-area: foot; }
  .nav { grid-area: nav; }
  .nav a { padding: 8px 12px; }
  .aksi .btn { padding: 7px 10px; }
  .main { padding: 18px 16px 32px; }
  .filter-bar .field { width: 100%; }
  .filter-bar .btn { width: 100%; }
  .main > * { margin-inline: 0; }
  .row-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-form { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 50px; }
  .search { width: 100%; }
}
@media print { .side, .toolbar, .tools, .no-print { display: none !important; } #app { display: block; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- layanan mandiri siswa ---------- */
.auth-card.kiosk { max-width: 520px; }
.kiosk-note { text-align: center; color: #33403A; margin: 8px 0; line-height: 1.5; }
.k-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.k-tab { padding: 14px 10px; border-radius: 12px; border: 2px solid #D5DED9; background: #fff; color: #17212B; font-weight: 700; font-size: 16px; cursor: pointer; }
.k-tab.on { background: #1E6B3F; border-color: #1E6B3F; color: #fff; }
.k-langkah { font-size: 14px; color: #33403A; font-weight: 600; margin: 14px 0 8px; text-align: center; }
.k-input { display: flex; gap: 8px; }
.k-input input { flex: 1; min-width: 0; font-size: 18px; padding: 14px 12px; }
.k-input .btn { padding: 0 18px; font-size: 15px; white-space: nowrap; }
.k-pesan { margin-top: 14px; border-radius: 12px; font-weight: 600; text-align: center; font-size: 15px; line-height: 1.45; }
.k-pesan:empty { display: none; }
.k-pesan.ok { background: #DCF3E4; color: #14532D; padding: 12px; }
.k-pesan.warn { background: #FEF3C7; color: #78350F; padding: 12px; }
.k-pesan.bad { background: #FEE2E2; color: #7F1D1D; padding: 12px; }
.k-selesai { width: 100%; margin-top: 12px; }
.chk-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-weight: 600; }
.chk-row input, .radio-grup input { width: 18px; height: 18px; accent-color: var(--accent); }
.radio-grup { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; display: grid; gap: 8px; }
.radio-grup legend { font-weight: 600; padding: 0 6px; }
.radio-grup label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.k-catatan { font-size: 13px; color: #5F6B66; text-align: center; margin: 10px 0 0; }
.jaringan { margin-top: 14px; }
.alamat-box { margin-top: 14px; border: 2px solid var(--accent); border-radius: 12px; padding: 14px 16px; background: var(--accent-soft); }
.alamat-box[hidden] { display: none; }
.alamat-judul { font-weight: 700; margin: 0 0 6px; }
.alamat-isi { margin: 0 0 8px; font-size: 18px; }
.alamat-isi .code { font-size: 18px; word-break: break-all; white-space: normal; }
.alamat-langkah { margin: 8px 0; padding-left: 20px; line-height: 1.6; }
.alamat-box .note { margin: 6px 0 0; }

/* Evaluasi 2: petunjuk per menu, tombol kembali, tabel perolehan, dan ringkasan anggota */
.petunjuk { margin: -6px 0 18px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); font-size: 14px; line-height: 1.5; }
.petunjuk strong { color: var(--accent); }
.head .kembali { margin-bottom: 8px; padding: 6px 10px; font-size: 13px; }
.subjudul { font-size: 14px; margin: 16px 0 6px; }
.daftar-ringkas { margin: 0 0 8px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.perolehan th, .perolehan td { padding: 6px 8px; font-size: 13px; }
.perolehan .total td { border-top: 2px solid var(--line); }
details { margin-top: 10px; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* Cari buku di layar mandiri: status eksemplar dan warna kelas */
#k-cari { flex: 1; min-width: 0; font-size: 18px; padding: 14px 12px; }
.k-buku { display: flex; gap: 12px; padding: 12px; margin-top: 10px; border: 1px solid #D5DED9; border-radius: 12px; background: #fff; text-align: left; }
.k-warna { flex: none; width: 10px; border-radius: 6px; }
.k-buku-isi { min-width: 0; flex: 1; font-size: 15px; }
.k-eks { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; }
.k-eks li { margin: 4px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Dialog cetak label */
.modal-latar { position: fixed; inset: 0; background: rgba(14, 21, 18, .45); display: grid; place-items: center; z-index: 50; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal .field { margin-bottom: 12px; }
.modal .aksi { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

/* Pilihan model label dengan pratinjau */
.pilih-model { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.pilih-model legend { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.kartu-model { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; cursor: pointer; min-width: 0; }
.kartu-model.lebar { grid-column: 1 / -1; }
.kartu-model:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.kartu-model .judul-kartu { font-size: 13px; }
.kartu-model input[type="radio"] { margin: 0 4px 0 0; }
.pratinjau { display: grid; gap: 6px; min-height: 40px; }
.pratinjau svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 480px) { .pilih-model { grid-template-columns: 1fr; } }
.susunan { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.susunan label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.susunan input { width: 72px; }
.hint.galat { color: var(--red); }

/* pilihan cara menerapkan perubahan (dialog nomor inventaris dan nomor panggil) */
.pilih-cara { display: grid; gap: 10px; }
.pilih-cara .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: auto; padding: 12px 14px; text-align: left; white-space: normal; line-height: 1.35; }
.pilih-cara .btn .small { font-weight: 400; opacity: .9; }

/* Revisi 4: kode pemulihan, lupa sandi */
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
.kode-besar { font-family: ui-monospace, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: 2px; text-align: center; border: 2px dashed var(--line, #cbd5e1); border-radius: 12px; padding: 16px 10px; margin: 14px 0; user-select: all; }
@media print {
  body * { visibility: hidden !important; }
  .kode-cetak, .kode-cetak * { visibility: visible !important; }
  .kode-cetak { position: fixed; left: 0; top: 0; width: 100%; padding: 24px; }
}

/* Revisi 4: logo instansi berdampingan dengan logo PIJAR */
.logo-pasangan { display: flex; align-items: center; justify-content: center; gap: 8px; flex: none; }
.brand .logo-pasangan .brand-mark { width: 44px; height: 44px; border-radius: 9px; }
.auth-card .logo-pasangan .brand-besar { margin: 0; }
.brand-instansi img { object-fit: contain; }
.logo-atur { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.logo-atur img { height: 56px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
/* Revisi 4: checklist reset data */
.reset-kartu { border-color: #F5C2C2; }
.reset-pilih { display: grid; gap: 8px; margin-top: 8px; }
.reset-item { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.reset-item input { margin-top: 3px; }

/* Revisi 4: running text di atas tampilan utama */
.runteks { position: sticky; top: 10px; z-index: 20; border: 1px solid #1E223D; background: #1E223D; border-radius: 10px; margin: 0 0 14px; overflow: hidden; box-shadow: 0 8px 18px rgba(30, 34, 61, .22); }
.runteks-kotak { overflow: hidden; white-space: nowrap; padding: 8px 0; font-size: 13px; color: #CFC6B0; }
.runteks-jalur { display: inline-flex; align-items: center; gap: 14px; padding-left: 100%; animation: runteks var(--durasi, 40s) linear infinite; will-change: transform; }
.runteks-jalur span { color: #E6D5B7; }
.runteks-jalur i { color: #F54F1B; font-style: normal; }
.runteks:hover .runteks-jalur { animation-play-state: paused; }
@keyframes runteks { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .runteks-jalur { animation: none; padding-left: 12px; }
  .runteks-jalur > :nth-child(n+1):not(:nth-child(-n+2)) { display: none; }
}

@media (max-width: 720px) {
  .side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "foot" "nav"; }
  .side-foot { width: 100%; }
  .aksi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aksi .btn { flex-direction: column; justify-content: center; gap: 3px; text-align: center; }
  .aksi .btn span { white-space: normal; overflow-wrap: normal; }
  .brand .logo-pasangan { gap: 4px; }
  .brand .logo-pasangan .brand-mark { width: 34px; height: 34px; padding: 2px; border-radius: 7px; }
  .brand { min-width: 0; overflow: hidden; }
}

/* ---------- layar masuk (mengikuti desain referensi: foto kiri, formulir kanan, muat satu layar) ---------- */
#auth:has(.masuk) { background: #E6D5B7; color: #1E223D; height: 100vh; overflow: hidden; position: relative; }
#auth:has(.masuk)::before { content: ""; position: absolute; inset: -12%; pointer-events: none; filter: blur(46px); opacity: .9;
  background:
    radial-gradient(38% 42% at 10% 16%, #F2E6CF 0%, rgba(242, 230, 207, 0) 70%),
    radial-gradient(36% 40% at 92% 10%, #D8C29C 0%, rgba(216, 194, 156, 0) 70%),
    radial-gradient(44% 48% at 82% 94%, #CDB68C 0%, rgba(205, 182, 140, 0) 72%),
    radial-gradient(34% 38% at 6% 92%, #E6D5B7 0%, rgba(230, 213, 183, 0) 70%); }
.masuk { position: relative; z-index: 1; height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; box-sizing: border-box; }
.masuk-kartu { width: min(960px, 100%); height: auto; min-height: min(560px, calc(100vh - 40px)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #FFFFFF; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(30, 34, 61, .14); }
.masuk-kiri { position: relative; min-width: 0; padding: 30px 36px; display: flex; flex-direction: column; color: #1E223D; overflow: hidden;
  background: url("panel-kiri.jpg") 18% center / cover no-repeat; }
.masuk-atas { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.masuk-atas .brand-mark { width: 56px; height: 56px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(30, 34, 61, .12); }
.masuk-merek strong { font-size: 30px; font-weight: 800; letter-spacing: .01em; color: #1E223D; }
.masuk-isi { position: relative; z-index: 1; margin-top: auto; }
.masuk-tagline { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 800; color: #1E223D; text-shadow: 0 0 14px rgba(255, 255, 255, .95), 0 0 4px rgba(255, 255, 255, .8); }
.masuk-tagline em { font-style: normal; color: #F54F1B; }
.masuk-garis { display: block; width: 56px; height: 4px; border-radius: 4px; background: #F54F1B; margin-top: 16px; }
.masuk-ombak { position: absolute; border-radius: 50%; pointer-events: none; }
.masuk-ombak.b1 { width: 230px; height: 150px; left: -80px; bottom: -90px; background: #1E223D; }
.masuk-ombak.b2 { width: 170px; height: 120px; left: 50px; bottom: -95px; background: #F54F1B; }
.masuk-kanan { display: flex; flex-direction: column; justify-content: center; padding: 26px 44px 14px; min-width: 0; }
.masuk-form { width: 100%; max-width: 360px; margin: 0 auto; }
.masuk-logo-tengah { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 14px; }
.masuk-logo-tengah .brand-mark { width: 60px; height: 60px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(30, 34, 61, .12); }
.masuk-logo-tengah strong { font-size: 20px; font-weight: 800; color: #1E223D; }
.masuk-kanan h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: #1E223D; letter-spacing: -.01em; }
.masuk-sub { margin: 0 0 16px; color: #4E6478; font-size: 13px; line-height: 1.45; }
.masuk-form form { display: grid; gap: 12px; }
.masuk-form .field { gap: 5px; }
.masuk-form label { display: flex; align-items: center; gap: 7px; color: #1E223D; font-weight: 600; font-size: 13px; }
.masuk-form label svg { width: 16px; height: 16px; flex: none; }
.masuk-form input { background: #FFFFFF; color: #1E223D; border: 1px solid #CFDAE4; border-radius: 10px; padding: 10px 12px; width: 100%; }
.masuk-form input:focus { border-color: #F54F1B; box-shadow: 0 0 0 3px rgba(245, 79, 27, .16); outline: none; }
.masuk-form .hint { color: #6B7C8C; font-size: 11.5px; }
.ikon-input { position: relative; }
.ikon-input input { padding-right: 42px; }
.ikon-input .mata { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: #6B7C8C; display: grid; place-items: center; }
.ikon-input .mata svg { width: 18px; height: 18px; }
.masuk-form .btn.masuk-tombol { padding: 12px; font-size: 15px; border-radius: 12px; width: 100%; background: #1E223D; border-color: #1E223D; color: #FFFFFF; font-weight: 700; }
.masuk-form .btn.masuk-tombol:hover { background: #2B3056; border-color: #2B3056; }
.masuk-form .btn.masuk-keluar { width: 100%; padding: 9px; font-size: 13.5px; border-radius: 12px; background: #FFFFFF; border: 1px solid #CFDAE4; color: #4E6478; font-weight: 600; }
.masuk-form .btn.masuk-keluar:hover { border-color: #1E223D; color: #1E223D; }
.ferr { color: #B42318; min-height: 16px; font-size: 12.5px; }
.masuk-lupa { justify-self: start; color: #F54F1B; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.masuk-lupa svg { width: 15px; height: 15px; }
.masuk-kanan .masuk-kaki { position: static; color: #6B7C8C; text-align: center; font-size: 12px; padding-top: 10px; margin: 0; }
@media (min-width: 761px) and (max-height: 860px) {
  .masuk { padding: 12px 16px; }
  .masuk-kartu { height: calc(100vh - 24px); }
  .masuk-logo-tengah { display: none; }
  .masuk-kanan { padding: 18px 40px 10px; }
  .masuk-kanan h1 { font-size: 22px; }
  .masuk-sub { margin-bottom: 12px; }
  .masuk-form form { gap: 10px; }
  .masuk-kiri { padding: 24px 32px; }
}
@media (max-width: 760px) {
  #auth:has(.masuk) { height: auto; overflow: visible; }
  .masuk { height: auto; min-height: 100vh; padding: 14px 10px; }
  .masuk-kartu { grid-template-columns: 1fr; height: auto; }
  .masuk-kiri { padding: 22px 22px 120px; min-height: 230px; background: url("panel-kiri.jpg") 18% center / cover no-repeat; }
  .masuk-atas .brand-mark { width: 50px; height: 50px; }
  .masuk-merek strong { font-size: 24px; }
  .masuk-tagline { font-size: 20px; }
  .masuk-kanan { padding: 24px 22px 18px; }
  .masuk-logo-tengah { display: none; }
  .masuk-kanan h1 { font-size: 22px; }
}

/* ---------- pengaturan: ukuran dibuat ringkas ---------- */
.set-kecil { gap: 12px; font-size: 12.5px; }
.set-kecil .head h1 { font-size: 18px; }
.set-kecil .head p { font-size: 12px; }
.set-kecil .card { padding: 12px 14px; }
.set-kecil .card-head { margin-bottom: 8px; }
.set-kecil .card-head h2, .set-kecil h2 { font-size: 13px; }
.set-kecil .field { gap: 3px; }
.set-kecil .field label, .set-kecil .field .lbl { font-size: 11.5px; }
.set-kecil .field .hint, .set-kecil .note, .set-kecil .small { font-size: 11px; }
.set-kecil .note { margin-top: 8px; }
.set-kecil input[type=text], .set-kecil input[type=number], .set-kecil input[type=password], .set-kecil select { padding: 5px 7px; font-size: 12.5px; }
.set-kecil input[type=number] { width: 90px !important; }
.set-kecil .btn { padding: 5px 10px; font-size: 12px; gap: 6px; }
.set-kecil .btn.sm { padding: 3px 8px; font-size: 11.5px; }
.set-kecil .grid-form { gap: 8px 10px; }
.set-kecil table { font-size: 12px; }
.set-kecil th { font-size: 11px; padding: 5px 6px; }
.set-kecil td { padding: 5px 6px; }
.set-kecil .radio-grup { padding: 6px 10px; margin: 8px 0; gap: 4px; font-size: 12px; }
.set-kecil .radio-grup legend { font-size: 12px; }
.set-kecil .chk-row { margin: 4px 0; font-size: 12px; gap: 6px; }
.set-kecil .chk-row input, .set-kecil .radio-grup input { width: 14px; height: 14px; }
.set-kecil .alamat-box { padding: 8px 10px; margin-top: 8px; }
.set-kecil .alamat-isi, .set-kecil .alamat-isi .code { font-size: 14px; }
.set-kecil .alamat-langkah { font-size: 12px; margin: 4px 0; }
.set-kecil .logo-atur img { height: 36px; max-width: 110px; }
.set-kecil .kode-besar { font-size: 17px; padding: 10px; margin: 8px 0; }
.set-kecil .reset-pilih { margin-top: 4px; gap: 4px; }
.set-kecil .reset-item { padding: 5px 8px; }
.set-kecil .rentang-list, .set-kecil #rentang-list { gap: 4px; }
.set-kecil .tools { gap: 6px; }
.set-kecil .brand-besar { width: 60px; height: 60px; }
.simpan-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: 0 -6px 16px rgba(30, 34, 61, .08); }
.simpan-bar[hidden] { display: none; }
.set-kecil .simpan-bar { font-size: 12px; }
.rentang-baris { display: grid; grid-template-columns: 150px 210px minmax(120px, 1fr) 42px 74px; gap: 6px; align-items: end; margin-bottom: 6px; }
.rentang-baris .field { gap: 2px; min-width: 0; }
.rentang-baris input[type=color] { width: 100%; height: 30px; padding: 2px; }
.rentang-baris select, .rentang-baris input[type=text] { width: 100%; }
.rentang-baris input[type=number] { width: 58px; }
@media (max-width: 720px) { .rentang-baris { grid-template-columns: 1fr 1fr; } }
.rentang-isi { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: nowrap; }
.rentang-isi input[type=number] { width: 72px; }
.runteks-daftar { display: grid; gap: 6px; }
.runteks-baris { display: flex; gap: 6px; align-items: center; }
.runteks-baris input { flex: 1; min-width: 0; }

/* ---------- latar aplikasi & layar masuk (paduan warna v4) ---------- */
.masuk-atas { display: block; }
.masuk-logo-lengkap { display: block; width: 210px; max-width: 100%; height: auto; }
.masuk-kiri .masuk-tagline { font-size: 25px; color: #1E223D; text-shadow: 0 0 14px rgba(255, 255, 255, .95), 0 0 4px rgba(255, 255, 255, .8); }
.masuk-kiri .masuk-tagline em { color: #F54F1B; }

/* ---------- tema v10: aksen teal, sidebar & judul navy ---------- */
:root { --accent: #0E8C7B; --accent-ink: #FFFFFF; --accent-soft: #D9F1EC; --navy: #0E3B62; --hijau: #1E6B3F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #14A894; --accent-ink: #FFFFFF; --accent-soft: #16352F; --navy: #8EC3E6; } }
:root[data-theme="dark"] { --accent: #14A894; --accent-ink: #FFFFFF; --accent-soft: #16352F; --navy: #8EC3E6; }
.head h1, .card-head h2, .auth-card h1, .masuk-kanan h1 { color: var(--navy); }
.side { background: var(--navy); border-right: 0; }
.side .brand-name, .side .nav a { color: #E6F0F5; }
.side .brand-sub { color: #A9C4D6; }
.side .nav a:hover { background: rgba(255, 255, 255, .1); }
.side .nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #FFFFFF; box-shadow: inset 3px 0 0 #2FC7B0; }
.side-foot { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.side-foot, .side-foot * { color: #E6F0F5; }
.pill.green { background: #DCF3E4; color: var(--hijau); }
.auth-card .btn.primary { background: var(--accent); }
.masuk-form .btn.masuk-tombol { background: var(--accent); border-color: var(--accent); }
.masuk-form .btn.masuk-tombol:hover { background: #0B7A6B; border-color: #0B7A6B; }
.masuk-garis { background: var(--accent); }
.masuk-ombak.b2 { background: var(--accent); }
.masuk-logo-lengkap { background: #FFFFFF; padding: 8px 12px; border-radius: 14px; box-shadow: 0 4px 14px rgba(11, 16, 38, .18); width: 230px; }
.masuk-tagline em, .masuk-kiri .masuk-tagline em { color: #2FC7B0; }
.side-foot .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #FFFFFF; }
.side-foot .btn:hover { border-color: #2FC7B0; }
.side-foot .btn svg { color: #FFFFFF; }

/* ---------- tema v11: latar terang, foto berwarna, teks jelas ---------- */
:root { --bg: #EEF3F7; }
#auth:has(.masuk) { background: #EAF0F5; }
#auth:has(.masuk)::before { content: none; }
.masuk-logo-lengkap { background: none; padding: 0; border-radius: 0; box-shadow: none; width: 230px; }
.masuk-kiri .masuk-tagline { color: #0E3B62; text-shadow: 0 0 12px #FFFFFF, 0 0 4px #FFFFFF, 0 0 2px #FFFFFF; }
.masuk-kiri .masuk-tagline em, .masuk-tagline em { color: #0B7A6B; }
.masuk-kiri { background: url("panel-kiri.jpg") 18% center / cover no-repeat; }
@media (max-width: 760px) { .masuk-kiri { background: url("panel-kiri.jpg") 18% center / cover no-repeat; } }
.masuk-isi { background: rgba(255, 255, 255, .9); border-radius: 14px; padding: 14px 18px; align-self: flex-start; box-shadow: 0 6px 20px rgba(14, 59, 98, .12); }
.masuk-kiri .masuk-tagline { text-shadow: none; }
.masuk-lupa, .masuk-lupa a, .masuk-form a { color: #0B7A6B; }

/* ---------- tema v13: tagline satu baris, efek lama, gradasi putih kiri ---------- */
.masuk-isi { background: none; border-radius: 0; padding: 0; box-shadow: none; }
.masuk-kiri::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .6) 30%, rgba(255, 255, 255, 0) 62%); }
.masuk-kiri .masuk-tagline { font-size: 21px; white-space: nowrap; color: #0E3B62; text-shadow: 0 0 14px rgba(255, 255, 255, .95), 0 0 4px rgba(255, 255, 255, .8); }
.masuk-kiri .masuk-tagline em, .masuk-tagline em { color: #0B7A6B; font-style: normal; }

/* ---------- tema v14: gambar sedikit ke kanan, logo lebih kecil ---------- */
.masuk-kiri { background-position: 18% center; }
@media (max-width: 760px) { .masuk-kiri { background-position: 18% center; } }
.masuk-logo-lengkap { width: 180px; }

/* ---------- keterbacaan teks (hasil audit kontras) ---------- */
:root { --accent-text: #08685C; }
a, .card-head a, .petunjuk strong, .tabs a[aria-current="page"], .pill.green { color: var(--accent-text); }
.btn.primary, .btn.primary.sm, .auth-card .btn.primary, .masuk-form .btn.masuk-tombol { background: #0B7A6B; border-color: #0B7A6B; color: #FFFFFF; }
.btn.primary:hover, .auth-card .btn.primary:hover, .masuk-form .btn.masuk-tombol:hover { background: #096A5E; border-color: #096A5E; }
.avatar { color: #0E3B62; }
.side-foot span:not(.avatar), .side-foot small { color: #C9DCE8; }
.runteks i, .runteks-jalur i { color: #2FC7B0; }

/* Panel pengguna di kiri: ringkas, tombol ikon saja */
.side-foot { padding: 6px; gap: 6px; }
.side-foot .who { gap: 6px; }
.side-foot .aksi { grid-template-columns: 1fr 1fr; gap: 4px; }
.side-foot .aksi .btn { flex-direction: row; justify-content: center; padding: 6px; font-size: 0; min-width: 0; }
.side-foot .aksi .btn svg { width: 16px; height: 16px; }

/* Logo tanpa kotak latar, bingkai, atau bayangan */
.brand-mark, .masuk-atas .brand-mark, .masuk-logo-tengah .brand-mark { background: transparent; border: 0; box-shadow: none; }

/* ---------- menu sisi ringkas (layar lebar): semua menu tampil tanpa scroll ---------- */
@media (min-width: 1041px) {
  .side { padding: 14px 12px 12px; gap: 10px; }
  .brand { padding: 0 4px; gap: 8px; }
  .brand .brand-mark { width: 44px; height: 44px; padding: 3px; }
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 11px; }
  .nav { gap: 0; overflow: visible; }
  .nav a { padding: 7px 10px; gap: 10px; font-size: 14px; line-height: 1.2; }
  .nav a svg { width: 18px; height: 18px; }
  .side-foot { padding: 6px; gap: 5px; }
  .side-foot .who { gap: 6px; }
}

/* ---- Keuangan: tampilan rapi, angka rata kanan dan sejajar ke bawah ---- */
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.kv { max-width: 520px; }
table.kv th, table.kv td { border-bottom: 1px dashed #d9e2dc; padding: 9px 4px; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
table.kv th { background: none; font-weight: 500; text-align: left; position: static; }

/* ---- Kartu ringkasan (Dashboard dan Pendaftar) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-grid > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat-grid > .stat:last-child:nth-child(odd) { grid-column: auto; }
}
.stat { --grad: linear-gradient(135deg, #1f7a3c, #3fb35e); background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 33, 61, .08); display: flex; flex-direction: column; }
.stat-kepala { display: flex; align-items: center; gap: 8px; padding: 10px 10px 16px; min-height: 52px;
  background: var(--grad); border-radius: 0 0 50% 50% / 0 0 12px 12px; }
.stat-ikon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center; }
.stat-ikon svg { width: 16px; height: 16px; fill: #fff; }
.stat .lbl { font-size: 12px; font-weight: 700; line-height: 1.2; color: #fff; }
.stat-isi { text-align: center; padding: 4px 8px 12px; }
.stat .angka { font-size: 30px; font-weight: 800; line-height: 1.1; color: #14213d; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 11px; color: #6b7490; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.biru { --grad: linear-gradient(135deg, #2f7bf5, #4fa3ff); }
.stat.hijau { --grad: linear-gradient(135deg, #21b35b, #3fd47e); }
.stat.kuning { --grad: linear-gradient(135deg, #f5a524, #ffc93c); }
.stat.ungu { --grad: linear-gradient(135deg, #6f5ee0, #9c86f5); }
.stat.tosca { --grad: linear-gradient(135deg, #18b9b0, #48dcd0); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 4px; }
.chip-l { background: #e0ecff; color: #1d4ed8; }
.chip-p { background: #fde7f3; color: #be185d; }
.chip-n { background: #eef1f0; color: #5b6b7a; }
tr:target { background: #fff7d6; transition: background .3s; }

/* ---- Ringkasan pendaftar satu baris ---- */
.ringkas-pendaftar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #fff; border: 1px solid #e1e8e3;
  border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.ringkas-pendaftar .sep { color: #c5ccd8; }
.angka-kecil { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- tombol edit dan hapus berkas di halaman Scan berkas ---- */
.aksi-berkas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.aksi-berkas details { flex: 1 1 100%; }
.aksi-hapus { margin: 0; }

/* ---- tautan "lihat berkas": sebaris, digaris bawah, berkas dimuat saat diklik ---- */
.lihat-berkas { display: block; }
.lihat-berkas summary { display: inline; cursor: pointer; text-decoration: underline; color: #0f5132; list-style: none; white-space: nowrap; }
.lihat-berkas summary::-webkit-details-marker { display: none; }
