/* Slip Gaji Terpusat — YASMA PB. Soedirman · v2.0 (GitHub Pages) */
/* ============================================================
   SLIP GAJI TERPUSAT — Stylesheet
   Tema: Zamrud tua + emas lembut (modern Islami), mengikuti referensi UI
   Tipografi: Inter (UI) · Source Serif 4 (angka KPI & label) · JetBrains Mono (kode/NRP)
   ============================================================ */
:root, [data-theme="light"] {
  --emerald-950: #0F2A1D; --emerald-900: #163A29; --emerald-800: #1E4D36; --emerald-700: #2B6247; --emerald-600: #3A7A5A; --emerald-100: #E3F1E9;
  --gold: #F2C14E; --gold-600: #D9A520; --gold-soft: #FBF0D0; --gold-ink: #6B4E05;
  --bg: #F3F5FA; --surface: #FFFFFF; --surface-2: #EEF1FA; --surface-3: #F7F8FC;
  --text: #17211C; --text-2: #4E5A55; --text-3: #7A8580; --border: #E2E6EF; --border-2: #D4DAE6;
  --danger: #B42318; --danger-soft: #FDECEA; --warn: #8A5A00; --warn-soft: #FFF3D6; --success: #18794E; --success-soft: #DFF3E8; --info-soft: #E7EEFC;
  --sidebar: #1E4D36; --sidebar-2: #163A29; --sidebar-text: #CFE3D8; --sidebar-muted: #8FB3A1;
  --shadow-sm: 0 1px 2px rgba(16, 40, 28, .06); --shadow: 0 4px 18px rgba(16, 40, 28, .07); --shadow-lg: 0 18px 50px rgba(16, 40, 28, .18);
  --chart-main: #1E4D36;
  --radius: 14px; --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #0D1612; --surface: #141F1A; --surface-2: #1B2822; --surface-3: #18241F;
  --text: #E6EEEA; --text-2: #A9BAB2; --text-3: #7D8F87; --border: #24342C; --border-2: #2F4339;
  --danger: #F97066; --danger-soft: #3A1714; --warn: #F5C46B; --warn-soft: #33270C; --success: #4ADE9B; --success-soft: #11301F; --info-soft: #172235;
  --gold-soft: #33290F; --gold-ink: #F2C14E; --emerald-100: #173325;
  --sidebar: #0F2219; --sidebar-2: #0B1A13; --chart-main: #3FA374;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 4px 18px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
}

/* ── Dasar ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; margin: 0; -webkit-font-smoothing: antialiased; transition: background-color .25s var(--ease), color .25s var(--ease); }
h1, h2, h3, h4 { color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 800; margin: .15rem 0 .35rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
a { color: var(--emerald-700); }
[data-theme="dark"] a:not([class]) { color: #7FD1A7; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.tiny { font-size: .75rem; }
.text-muted-2 { color: var(--text-2) !important; }
.text-muted-3 { color: var(--text-3) !important; }
.min-w-0 { min-width: 0; }
.req { color: var(--danger); }
.eyebrow { font-family: var(--serif); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 0 0 .25rem; font-weight: 600; }
.eyebrow.gold { color: var(--gold); font-family: var(--font); font-weight: 700; }
.tag { display: inline-block; background: var(--info-soft); color: var(--emerald-800); padding: .15rem .5rem; border-radius: 4px; margin-right: .4rem; font-weight: 700; }
[data-theme="dark"] .tag { color: #9ED9BA; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 9999; background: var(--gold); color: #000; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── Tombol ── */
.btn { border-radius: 10px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: transform .12s var(--ease), background-color .2s, box-shadow .2s, color .2s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-sm { min-height: 36px; font-size: .85rem; }
.btn-primary-app { background: var(--emerald-800); color: #fff; border: 1px solid var(--emerald-800); padding: .55rem 1.1rem; }
.btn-primary-app:hover { background: var(--emerald-700); color: #fff; }
.btn-primary-app:disabled { background: var(--border-2); border-color: var(--border-2); color: var(--text-3); }
[data-theme="dark"] .btn-primary-app { background: #2F7A55; border-color: #2F7A55; }
.btn-gold { background: var(--gold); color: #3a2a00; border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-600); color: #241a00; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid transparent; padding: .5rem 1rem; }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border: 1px solid transparent; }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }
.btn-xs { min-height: 32px; padding: .25rem .65rem; font-size: .8rem; border-radius: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; font-size: 1.15rem; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--surface-2); }

/* ── Form ── */
.form-label { font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: .35rem; }
.form-control, .form-select { background-color: var(--surface-2); color: var(--text); border: 1px solid transparent; border-radius: 10px; min-height: 44px; font-size: .95rem; }
.form-control::placeholder { color: var(--text-3); }
.form-control:focus, .form-select:focus { background-color: var(--surface); color: var(--text); border-color: var(--emerald-600); box-shadow: 0 0 0 .2rem rgba(58, 122, 90, .18); }
.form-control.is-invalid { border-color: var(--danger); }
.form-select-sm, .form-control-sm { min-height: 36px; font-size: .85rem; }
[data-theme="dark"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a9bab2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .form-control { padding-left: 2.4rem; padding-right: 2.8rem; }
.btn-eye { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 40px; height: 40px; color: var(--text-2); border-radius: 8px; }
.field-error { color: var(--danger); font-size: .85rem; min-height: 1.2em; }
.check-pill { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface-2); padding: 0 .9rem; border-radius: 10px; min-height: 44px; font-size: .88rem; white-space: nowrap; cursor: pointer; }
.check-row { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check-row input, .check-pill input { width: 18px; height: 18px; accent-color: var(--emerald-700); flex-shrink: 0; margin-top: .15rem; }
.search-box { position: relative; min-width: 200px; }
.search-box i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box .form-control { padding-left: 2.25rem; }
.search-box.grow { flex: 1 1 240px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar .form-select { width: auto; min-width: 150px; flex: 0 1 auto; }

/* ── Chip & Badge ── */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; font-family: var(--serif); text-transform: uppercase; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-outline { border: 1px solid var(--border-2); color: var(--text); background: var(--surface); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-gold { background: var(--gold-soft); color: var(--gold-ink); border: 1px solid rgba(242, 193, 78, .5); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-dark { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.chip-info { background: var(--info-soft); color: var(--text); }
.badge-gold { background: var(--gold); color: #3a2a00; border-radius: 4px; padding: .05rem .4rem; font-size: .7rem; font-weight: 800; }
.status { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; padding: .3rem .55rem; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; font-family: var(--serif); line-height: 1.15; }
.status.ok { background: var(--success-soft); color: var(--success); }
.status.bad { background: var(--danger-soft); color: var(--danger); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.wait { background: var(--info-soft); color: var(--text-2); }
.status.gold { background: var(--gold-soft); color: var(--gold-ink); }
.status.skip { background: var(--surface-2); color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.ch-badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; }

/* ── Pratinjau isi pesan (surel & WhatsApp) ── */
.msg-head { display: grid; gap: .35rem; font-size: .85rem; margin-bottom: .75rem; }
.msg-head > div { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.msg-head span:first-child { color: var(--text-2); min-width: 64px; }
.att-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .65rem; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); font-size: .8rem; font-weight: 600; }
.att-chip .bi { color: #C2410C; font-size: 1rem; }
.msg-frame { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 12px; background: #F3F5F4; display: block; }
.wa-chat { background: #EFE7DE; border-radius: 12px; padding: 1rem; display: grid; gap: .5rem; justify-items: end; }
.wa-bubble { max-width: min(440px, 100%); background: #D9FDD3; color: #111B21; border-radius: 10px 0 10px 10px; padding: .5rem .65rem .35rem; font-size: .86rem; line-height: 1.45; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); word-wrap: break-word; }
.wa-bubble a { color: #027EB5; word-break: break-all; }
.wa-bubble .wa-time { display: block; text-align: right; font-size: .66rem; color: #667781; margin-top: .15rem; }
.wa-doc { display: flex; align-items: center; gap: .6rem; background: rgba(0, 0, 0, .05); border-radius: 8px; padding: .55rem .6rem; margin-bottom: .35rem; }
.wa-doc .bi { font-size: 1.6rem; color: #C2410C; }
.wa-doc small { display: block; color: #667781; font-size: .7rem; }
[data-theme="dark"] .wa-chat { background: #0B141A; }
[data-theme="dark"] .wa-bubble { background: #005C4B; color: #E9EDEF; }
[data-theme="dark"] .wa-bubble .wa-time, [data-theme="dark"] .wa-doc small { color: #A6B5BD; }
[data-theme="dark"] .wa-bubble a { color: #53BDEB; }

/* ── Tautan pribadi WhatsApp (login & portal pegawai) ── */
.link-note { display: flex; gap: .75rem; align-items: flex-start; border-radius: 12px; padding: .8rem .95rem; font-size: .88rem; line-height: 1.45; margin-bottom: 1rem; background: var(--info-soft); color: var(--text); border-left: 4px solid #25D366; }
.link-note > i { font-size: 1.3rem; color: #128C4A; flex-shrink: 0; margin-top: .05rem; }
.link-note > .btn { align-self: center; }
.link-note.warn { background: var(--warn-soft); border-left-color: var(--gold-600); }
.link-note.warn > i { color: var(--warn); }
.link-note.bad { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }
.link-note.bad > i { color: var(--danger); }
[data-theme="dark"] .link-note > i { color: #5BE38F; }
[data-theme="dark"] .link-note.warn > i { color: var(--warn); }

/* ── Metode pengiriman (W-05) ── */
.metode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.metode-opt { display: flex; align-items: center; gap: .75rem; text-align: left; padding: .8rem .9rem; min-height: 64px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease); }
.metode-opt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--emerald-600) 55%, var(--border)); }
.metode-opt:focus-visible { outline: 3px solid color-mix(in srgb, var(--emerald-600) 45%, transparent); outline-offset: 2px; }
.metode-opt.active { border-color: var(--emerald-700); background: color-mix(in srgb, var(--emerald-600) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald-600) 14%, transparent); }
.metode-opt:disabled { opacity: .6; cursor: not-allowed; }
.metode-opt .m-ic { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.15rem; background: var(--surface-2); color: var(--emerald-700); }
.metode-opt .m-ic.wa { background: color-mix(in srgb, #25D366 16%, var(--surface)); color: #128C4A; }
.metode-opt .m-ic.both { background: var(--gold-soft); color: var(--gold-ink); }
.metode-opt .m-txt { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.metode-opt .m-txt b { font-size: .95rem; }
.metode-opt .m-txt small { color: var(--text-2); font-size: .74rem; line-height: 1.3; }
.metode-opt .m-check { font-size: 1.1rem; color: var(--border); flex-shrink: 0; }
.metode-opt.active .m-check { color: var(--emerald-700); }
.metode-info { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .78rem; color: var(--text-2); }
.metode-info i { color: var(--emerald-700); }
.kontak { display: grid; gap: .15rem; }
.kontak span { white-space: nowrap; }
.ch-row { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem 0; border-top: 1px dashed var(--border); }
.ch-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--emerald-700); }
.ch-ic.wa { background: color-mix(in srgb, #25D366 16%, var(--surface)); color: #128C4A; }
.wa-token { border: 1px dashed var(--border-2); border-radius: 12px; padding: .9rem; background: var(--surface); }
@media (max-width: 991.98px) { .metode-grid { grid-template-columns: 1fr; } .metode-opt { min-height: 56px; } }
[data-theme="dark"] .metode-opt .m-ic.wa, [data-theme="dark"] .ch-ic.wa { color: #5BE38F; }
.unit-pill { display: inline-block; background: var(--info-soft); color: var(--text); border-radius: 5px; padding: .15rem .45rem; font-size: .72rem; font-weight: 700; font-family: var(--serif); }
.nrp { font-family: var(--mono); font-size: .82rem; background: var(--surface-2); padding: .1rem .4rem; border-radius: 4px; }
.alert-soft { border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; }
.alert-soft.danger { background: var(--danger-soft); color: var(--danger); }
.alert-soft.warn { background: var(--warn-soft); color: var(--warn); }
.alert-soft.ok { background: var(--success-soft); color: var(--success); }
.alert-soft.info { background: var(--info-soft); color: var(--text); }

/* ── Boot loader ── */
.boot-loader { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; z-index: 3000; color: var(--text-2); transition: opacity .3s; }
.boot-loader.hide { opacity: 0; pointer-events: none; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .75; } }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(145deg, var(--emerald-700), var(--emerald-900)); color: var(--gold); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; border: 1px solid rgba(242, 193, 78, .35); }
.brand-mark.lg { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 16px; }
.brand-mark.has-logo { background: #fff; padding: 3px; }
.brand-mark img, .logo-prev img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 7px; }
.logo-card { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem; border: 1px dashed var(--border-2); border-radius: 12px; }
.logo-prev { width: 84px; height: 84px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 2.2rem; color: var(--gold); background: linear-gradient(145deg, var(--emerald-700), var(--emerald-900)); border: 1px solid rgba(242, 193, 78, .35); }
.logo-prev.has-logo { background: #fff; border-color: var(--border-2); padding: 6px; }
.logo-card label.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--emerald-600) 45%, transparent); outline-offset: 2px; }
@media (max-width: 575.98px) { .logo-card { flex-direction: column; } }

/* ── Login ── */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.login-art { display: none; position: relative; background: var(--emerald-800); color: #fff; overflow: hidden; }
.pattern { position: absolute; inset: 0; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23F2C14E' stroke-width='1'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3Ccircle cx='40' cy='40' r='12'/%3E%3C/g%3E%3C/svg%3E"); }
.login-art-inner { position: relative; padding: 4rem; max-width: 560px; margin: auto; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.login-art h1 { color: #fff; font-size: 2.6rem; margin-top: .5rem; }
.lead-soft { color: #CFE3D8; font-size: 1.05rem; }
.feature-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.feature-list li { display: flex; gap: .7rem; align-items: center; color: #E7F2EC; }
.feature-list i { color: var(--gold); font-size: 1.2rem; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 2rem 1.1rem; }
.login-card { background: var(--surface); border-radius: 18px; padding: 2rem 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); width: 100%; max-width: 440px; margin: 0 auto; }
.divider-text { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--text-3); font-size: .8rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }
@media (min-width: 992px) { .login-wrap { grid-template-columns: 1.1fr 1fr; } .login-art { display: block; } }

/* ── Layout aplikasi ── */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; z-index: 1040; transform: translateX(-100%); transition: transform .28s var(--ease); }
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1030; }
.sidebar-brand { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand-title { font-weight: 800; color: #fff; font-size: .92rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .78rem; color: var(--sidebar-muted); }
.portal-tag { margin: .8rem 1rem 0; background: rgba(0, 0, 0, .18); padding: .45rem .7rem; border-radius: 8px; font-size: .7rem; letter-spacing: .1em; display: flex; justify-content: space-between; font-family: var(--mono); }
.portal-tag b { background: var(--gold); color: #3a2a00; padding: 0 .35rem; border-radius: 3px; }
.nav-list { list-style: none; margin: 0; padding: .6rem .6rem; }
.sidebar nav { flex: 1; overflow-y: auto; }
.nav-link-app { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: 10px; color: var(--sidebar-text); text-decoration: none; font-size: .92rem; font-weight: 500; min-height: 44px; transition: background .15s, color .15s; cursor: pointer; }
.nav-link-app i { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-link-app > span:not(.code):not(.nav-badge) { flex: 1; min-width: 0; line-height: 1.25; }
.nav-link-app .code { margin-left: auto; font-family: var(--serif); font-size: .68rem; color: var(--sidebar-muted); white-space: nowrap; flex-shrink: 0; }
.nav-link-app .nav-badge { white-space: nowrap; flex-shrink: 0; background: var(--gold); color: #3a2a00; font-size: .65rem; font-weight: 800; padding: .05rem .4rem; border-radius: 4px; font-family: var(--serif); }
.nav-link-app:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link-app.active { background: var(--sidebar-2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-meta { display: flex; justify-content: space-between; padding: .6rem 1rem .9rem; font-family: var(--serif); font-size: .64rem; letter-spacing: .12em; color: var(--sidebar-muted); }
.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); min-height: 64px; }
.topbar-chips { display: flex; gap: .5rem; align-items: center; min-width: 0; overflow: hidden; }
.topbar-right { margin-left: auto; display: flex; gap: .45rem; align-items: center; }
.user-btn { display: flex; align-items: center; gap: .6rem; background: transparent; border: 0; color: var(--text); padding: .25rem; border-radius: 12px; min-height: 44px; }
.user-btn strong { font-size: .85rem; }
.user-btn small { font-size: .72rem; color: var(--text-2); }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--emerald-800); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.dropdown-menu { background: var(--surface); border-color: var(--border); }
.dropdown-item { color: var(--text); min-height: 40px; display: flex; gap: .5rem; align-items: center; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item small { font-size: .74rem; white-space: normal; }
.dropdown-item > i { align-self: flex-start; margin-top: .15rem; }
.net-bar { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--emerald-900); color: #fff; padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; z-index: 1090; display: flex; gap: .5rem; align-items: center; box-shadow: var(--shadow); }
.content { padding: 1.1rem 1rem 6rem; max-width: 1440px; margin: 0 auto; outline: none; }
@media (min-width: 992px) {
  .sidebar { transform: none; }
  .app-main { margin-left: 268px; }
  .content { padding: 1.5rem 1.75rem 6rem; }
  .sidebar-backdrop { display: none !important; }
}

/* SPA section */
.content-section { display: none; }
.content-section.active { display: block; animation: secIn .22s var(--ease); }
@keyframes secIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.1rem; }
.narrow { max-width: 620px; margin: 0 auto; }

/* ── Kartu ── */
.card-app { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow-sm); }
.card-app.soft { background: var(--surface-3); }
.card-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; margin-bottom: .9rem; flex-wrap: wrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 992px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; position: relative; box-shadow: var(--shadow-sm); min-width: 0; display: flex; flex-direction: column; }
.kpi.alert { border-top: 3px solid var(--danger); }
.kpi.gold { border-top: 3px solid var(--gold); }
.kpi .k-label { font-family: var(--serif); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); font-weight: 600; padding-right: 2.2rem; }
.kpi .k-icon { position: absolute; right: .9rem; top: .9rem; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--emerald-700); }
.kpi.alert .k-icon { background: var(--danger-soft); color: var(--danger); }
.kpi .k-value { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; line-height: 1.1; margin: .55rem 0 .3rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-value small { font-size: .9rem; font-family: var(--font); font-weight: 500; color: var(--text-2); }
.kpi.alert .k-value { color: var(--danger); }
.kpi .k-foot { font-size: .78rem; color: var(--text-2); margin-top: auto; display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.kpi .k-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: .4rem 0; }
.kpi .k-bar span { display: block; height: 100%; background: var(--emerald-800); border-radius: 99px; transition: width .5s var(--ease); }
.small-kpi .kpi .k-value { font-size: 1.6rem; }
.insight-card { background: linear-gradient(160deg, var(--emerald-800), var(--emerald-950)); color: #E9F3EE; border-radius: var(--radius); padding: 1.25rem 1.3rem; position: relative; overflow: hidden; }
.insight-card h3 { color: #fff; margin-bottom: .8rem; }
.insight-card ul { padding-left: 1.1rem; margin: 0; display: grid; gap: .6rem; font-size: .9rem; }
.insight-card li::marker { color: var(--gold); }
.policy-card { display: flex; gap: 1rem; background: linear-gradient(160deg, var(--emerald-800), var(--emerald-950)); color: #DCEBE3; border-radius: var(--radius); padding: 1.1rem 1.25rem; font-size: .88rem; }
.policy-card > i { font-size: 1.8rem; color: var(--gold); }
.policy-card strong { color: #fff; letter-spacing: .03em; }
.chart-box { position: relative; height: 270px; }
.chart-box.donut { height: 230px; }
.chart-box.donut.sm { height: 200px; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; font-family: var(--serif); }
.donut-center b { display: block; font-size: 1.35rem; color: var(--text); }
.donut-center span { font-size: .66rem; letter-spacing: .12em; color: var(--text-2); }
.legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .8rem; }
.legend-item { display: flex; align-items: center; gap: .5rem; background: var(--surface-3); border: 1px solid var(--border); border-radius: 6px; padding: .35rem .55rem; font-size: .78rem; font-family: var(--serif); }
.legend-item .sw { width: 11px; height: 11px; border-radius: 2px; flex-shrink: 0; }
.legend-item b { margin-left: auto; }

/* ── Tabel ── */
.table-app { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.table-app thead th { background: var(--surface-3); color: var(--text-2); font-family: var(--serif); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: .8rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table-app thead th[data-sort] { cursor: pointer; user-select: none; }
.table-app thead th[data-sort]:hover { color: var(--text); }
.table-app tbody td { padding: .8rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table-app tbody tr { transition: background .12s; }
.table-app tbody tr:hover { background: var(--surface-3); }
.table-app tbody tr.row-bad { background: color-mix(in srgb, var(--danger-soft) 70%, transparent); }
.table-app tbody tr.row-warn { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.table-app.compact td, .table-app.compact th { padding: .5rem .7rem; }
.table-app .t-name { font-weight: 600; }
.table-app .t-sub { font-size: .78rem; color: var(--text-2); }
.table-app .num { text-align: right; font-family: var(--serif); font-weight: 600; white-space: nowrap; }
.table-app .actions { white-space: nowrap; text-align: right; }
.table-app .empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-2); }
.table-app input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--emerald-700); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; font-size: .82rem; color: var(--text-2); gap: .5rem; flex-wrap: wrap; }
.pager .pg { display: flex; gap: .3rem; }
.pager button { min-width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; }
.pager button.on { background: var(--emerald-800); color: #fff; border-color: var(--emerald-800); }
.pager button:disabled { opacity: .45; }
/* Tabel → kartu di ponsel */
@media (max-width: 767.98px) {
  .table-app.stack thead { display: none; }
  .table-app.stack, .table-app.stack tbody, .table-app.stack tr, .table-app.stack td { display: block; width: 100%; }
  .table-app.stack tr { border-bottom: 8px solid var(--bg); padding: .5rem 0; }
  .table-app.stack td { border: 0; padding: .3rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-app.stack td::before { content: attr(data-l); font-family: var(--serif); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); text-align: left; flex-shrink: 0; }
  .table-app.stack td.t-main { display: block; text-align: left; }
  .table-app.stack td.t-main::before { display: none; }
  .table-app.stack td.actions { justify-content: flex-end; }
  .table-app.stack td.actions::before { display: none; }
}

/* ── Stepper ── */
.stepper { display: flex; gap: .5rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1.1rem; overflow-x: auto; }
.step { display: flex; align-items: center; gap: .6rem; white-space: nowrap; padding: .3rem .5rem; border-radius: 10px; cursor: pointer; }
.step .n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--surface-2); color: var(--text-2); flex-shrink: 0; }
.step.done .n { background: var(--emerald-800); color: #fff; }
.step.cur { background: var(--emerald-100); }
.step.cur .n { background: var(--gold); color: #3a2a00; }
.step b { font-size: .86rem; display: block; }
.step small { font-size: .72rem; color: var(--text-2); font-family: var(--serif); }
.step-line { flex: 1; min-width: 24px; height: 2px; background: var(--border); }
.step-line.done { background: var(--emerald-800); }

/* ── Upload ── */
.tpl-banner { display: flex; gap: 1rem; align-items: center; background: var(--emerald-100); border: 1px solid color-mix(in srgb, var(--emerald-600) 25%, transparent); border-radius: var(--radius); padding: .9rem 1.1rem; flex-wrap: wrap; }
.tpl-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-size: 1.3rem; color: var(--emerald-800); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; background: var(--surface-3); border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 2rem 1rem; cursor: pointer; position: relative; transition: border-color .2s, background .2s; width: 100%; }
.dropzone:hover, .dropzone.drag { border-color: var(--emerald-600); background: var(--emerald-100); }
.dz-meta { position: absolute; top: .7rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; font-family: var(--serif); font-size: .68rem; letter-spacing: .1em; color: var(--text-3); }
.dz-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--emerald-100); color: var(--emerald-800); display: grid; place-items: center; font-size: 1.8rem; margin: 1rem 0 .4rem; }
.file-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.file-icon { width: 52px; height: 52px; border-radius: 10px; background: var(--emerald-800); color: #fff; display: grid; place-items: center; font-size: 1.5rem; }
.progress-thin { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-thin span { display: block; height: 100%; background: var(--emerald-800); border-radius: 99px; transition: width .4s var(--ease); }
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.flow { background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; padding: .85rem; font-size: .85rem; }
.flow.on { background: var(--emerald-100); border-color: color-mix(in srgb, var(--emerald-600) 30%, transparent); }
.flow .f-step { font-family: var(--serif); font-size: .66rem; letter-spacing: .1em; color: var(--text-2); display: flex; justify-content: space-between; }
.flow b { display: block; margin: .3rem 0; }
.flow .f-state { font-family: var(--serif); font-size: .66rem; letter-spacing: .1em; color: var(--text-2); margin-top: .5rem; text-transform: uppercase; }
.audit-row { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 10px; margin-top: .5rem; flex-wrap: wrap; }
.audit-row.bad { background: var(--danger-soft); }
.audit-row.warn { background: var(--warn-soft); }
.audit-row .lvl { font-family: var(--serif); font-weight: 800; font-size: .66rem; letter-spacing: .1em; padding: .25rem .5rem; border-radius: 4px; color: #fff; white-space: nowrap; }
.audit-row.bad .lvl { background: var(--danger); }
.audit-row.warn .lvl { background: #8A5A00; }
.sticky-actions { position: sticky; bottom: 0; margin: 1.25rem -1rem -6rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; z-index: 5; }
@media (min-width: 992px) { .sticky-actions { margin: 1.5rem -1.75rem -6rem; padding: .85rem 1.75rem; } }

/* ── Progress / console ── */
.runtime-box { display: flex; gap: .7rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .9rem; font-family: var(--serif); font-size: .8rem; }
.runtime-box i { font-size: 1.4rem; color: var(--emerald-700); }
.big-pct { font-family: var(--font); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; color: var(--emerald-800); }
[data-theme="dark"] .big-pct { color: #6FD3A0; }
.seg-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--surface-2); font-family: var(--serif); font-size: .68rem; font-weight: 700; color: #fff; }
.seg-bar span { display: grid; place-items: center; transition: width .5s var(--ease); white-space: nowrap; overflow: hidden; }
.seg-bar .s-ok { background: var(--emerald-800); }
.seg-bar .s-bad { background: var(--danger); }
.seg-bar .s-wait { background: transparent; color: var(--text-2); }
.stat-tile { border-radius: 12px; padding: 1rem; background: var(--surface-3); border: 1px solid var(--border); height: 100%; }
.stat-tile.ok { background: var(--info-soft); }
.stat-tile.bad { background: var(--danger-soft); color: var(--danger); }
.stat-tile b { font-family: var(--serif); font-size: 1.7rem; display: block; margin: .3rem 0; }
.console { background: #0E1F17; border-radius: var(--radius); color: #CFE3D8; font-family: var(--mono); font-size: .8rem; box-shadow: var(--shadow); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.console-head { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #7FA593; font-size: .75rem; }
.console-head .dots { display: flex; gap: .3rem; }
.console-head .dots i { width: 10px; height: 10px; border-radius: 50%; background: #E5484D; }
.console-head .dots i:nth-child(2) { background: #F2C14E; }
.console-head .dots i:nth-child(3) { background: #8FB3A1; }
.console-copy { margin-left: auto; background: transparent; border: 0; color: #9FC2B1; font-size: .75rem; }
.console-body { padding: .8rem .9rem; max-height: 330px; min-height: 220px; overflow-y: auto; display: grid; gap: .45rem; align-content: start; }
.console-body .ln { display: grid; grid-template-columns: auto auto 1fr; gap: .6rem; }
.console-body .t { color: #5F8574; }
.console-body .k { font-weight: 700; }
.k-WA { color: #5BE38F; } .k-WA_ERR { color: #F97066; }
.k-INIT, .k-RESUME { color: #CFE3D8; } .k-SENT { color: #F2C14E; } .k-ERROR { color: #F97066; } .k-BATCH, .k-DONE { color: #6FD3A0; } .k-QUOTA, .k-PAUSE { color: #F5C46B; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.unit-card { border: 1px solid var(--border); border-radius: 10px; padding: .75rem; background: var(--surface); }
.unit-card.proc { border-top: 3px solid var(--gold); }
.unit-card .u-top { display: flex; justify-content: space-between; font-family: var(--serif); font-size: .64rem; letter-spacing: .08em; color: var(--text-2); }
.unit-card b { display: block; font-size: 1rem; margin: .3rem 0; }
.unit-card .u-num { display: flex; justify-content: space-between; font-family: var(--serif); font-size: .8rem; font-weight: 700; }

/* ── Hbar (tren unit) ── */
.hbar-list { display: grid; gap: .55rem; }
.hbar { display: grid; grid-template-columns: 74px 1fr 52px; gap: .7rem; align-items: center; font-size: .8rem; font-family: var(--serif); }
.hbar .bar { height: 22px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; }
.hbar .bar .ok { background: var(--emerald-800); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: .5rem; font-size: .68rem; white-space: nowrap; }
.hbar .bar .bad { background: var(--danger); }

/* ── Tabs ── */
.tabs-app { display: flex; gap: .4rem; overflow-x: auto; background: var(--surface); padding: .35rem; border-radius: 12px; border: 1px solid var(--border); }
.tab { border: 0; background: transparent; color: var(--text-2); padding: .6rem 1rem; border-radius: 9px; font-weight: 600; font-size: .88rem; white-space: nowrap; display: flex; gap: .45rem; align-items: center; min-height: 44px; }
.tab.active { background: var(--emerald-800); color: #fff; }
.tab-pane-app { display: none; }
.tab-pane-app.active { display: block; }
.incident { display: flex; gap: 1rem; align-items: flex-start; background: var(--danger-soft); border-radius: var(--radius); padding: 1rem 1.1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.incident.ok { background: var(--success-soft); }
.incident .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--danger); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.incident.ok .ic { background: var(--emerald-800); }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin-top: .7rem; font-family: var(--mono); font-size: .72rem; width: 100%; }
.timeline div { background: var(--surface); border-radius: 8px; padding: .5rem .6rem; }
.timeline .bad { color: var(--danger); font-weight: 700; }
.kendala { border-radius: var(--radius); padding: 1rem 1.1rem; border: 1px solid var(--border); background: var(--surface); height: 100%; }
.kendala.bad { background: var(--danger-soft); border-color: transparent; }
.kendala.warn { background: var(--warn-soft); border-color: transparent; }
.kendala .kh { display: flex; justify-content: space-between; gap: .5rem; font-family: var(--serif); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.kendala .kh .lbl { background: var(--danger); color: #fff; padding: .15rem .45rem; border-radius: 3px; font-weight: 700; }
.kendala.warn .kh .lbl { background: #8A5A00; }

/* ── Portal pegawai ── */
.hero-slip { background: linear-gradient(150deg, var(--emerald-800), var(--emerald-950)); color: #fff; border-radius: 18px; padding: 1.3rem 1.3rem 1.2rem; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-slip .pattern { opacity: .08; }
.hero-slip > * { position: relative; }
.hero-slip .lbl { font-family: var(--serif); font-size: .68rem; letter-spacing: .12em; color: #A9CDB9; text-transform: uppercase; }
.hero-slip .amt { font-family: var(--font); font-weight: 800; font-size: clamp(1.9rem, 6vw, 2.9rem); line-height: 1.1; margin: .2rem 0; letter-spacing: -.02em; }
.hero-slip .terb { font-style: italic; color: #CFE3D8; font-size: .85rem; }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; background: rgba(0, 0, 0, .18); border-radius: 12px; padding: .7rem; margin: 1rem 0; font-size: .78rem; }
.hero-meta span { display: block; font-family: var(--serif); font-size: .62rem; letter-spacing: .1em; color: #A9CDB9; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.hero-actions .btn-w { background: #fff; color: var(--emerald-900); border: 0; }
.blurred { filter: blur(9px); user-select: none; }
.slip-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .8rem; box-shadow: var(--shadow-sm); }
@media (min-width: 992px) { .slip-item { grid-template-columns: auto 1.4fr 2fr auto; align-items: center; } }
.slip-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--emerald-100); color: var(--emerald-800); display: grid; place-items: center; font-size: 1.3rem; }
.slip-ic.thr { background: var(--gold-soft); color: var(--gold-ink); }
.slip-ic.rev { background: var(--info-soft); color: var(--text); }
.slip-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; background: var(--surface-3); border-radius: 10px; padding: .6rem .8rem; }
.slip-nums span { display: block; font-family: var(--serif); font-size: .62rem; letter-spacing: .1em; color: var(--text-2); text-transform: uppercase; }
.slip-nums b { font-family: var(--mono); font-size: .88rem; }
.slip-nums .neg { color: var(--danger); }
.slip-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.profile-card { display: flex; gap: 1rem; align-items: flex-start; }
.profile-av { width: 58px; height: 58px; border-radius: 14px; background: var(--emerald-800); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; background: var(--surface-3); border-radius: 10px; padding: .8rem; margin-top: .8rem; }
.kv span { display: block; font-family: var(--serif); font-size: .62rem; letter-spacing: .1em; color: var(--text-2); text-transform: uppercase; }
.kv b { font-family: var(--mono); font-size: .85rem; word-break: break-all; }
.seg { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.seg button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .45rem .95rem; font-weight: 600; font-size: .85rem; white-space: nowrap; min-height: 40px; }
.seg button.on { background: var(--emerald-800); color: #fff; border-color: var(--emerald-800); }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: var(--surface); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem 0 .5rem; color: var(--text-2); text-decoration: none; font-size: .7rem; font-weight: 600; min-height: 56px; }
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active { color: var(--emerald-800); }
[data-theme="dark"] .bottom-nav a.active { color: #6FD3A0; }
@media (min-width: 992px) { .bottom-nav { display: none !important; } }

/* ── Keamanan / PIN ── */
.strength { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .7rem; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }
.pw-rules { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem; background: var(--surface-3); border-radius: 10px; padding: .7rem .8rem; margin-top: .7rem; font-size: .8rem; color: var(--text-2); }
.pw-rules span.ok { color: var(--success); }
.pin-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; max-width: 380px; }
.pin-boxes input { text-align: center; font-size: 1.35rem; font-weight: 700; font-family: var(--mono); padding: 0; min-height: 54px; min-width: 0; caret-color: transparent; border: 2px solid transparent; transition: border-color .15s, background-color .15s; }
.pin-boxes input::selection { background: transparent; color: inherit; }
.pin-boxes input.masked { -webkit-text-security: disc; }
.pin-boxes input:focus { border-color: var(--emerald-600); background: var(--surface); box-shadow: 0 0 0 .2rem rgba(58, 122, 90, .18); }
.pin-boxes input.filled { border-color: color-mix(in srgb, var(--emerald-600) 45%, transparent); }
.pin-boxes.ok input { border-color: var(--success); }
.pin-boxes.bad input { border-color: var(--danger); }
.pin-label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; margin-bottom: .4rem; max-width: 380px; }
.pin-sheet { border-radius: 20px; }
.pin-shield { width: 60px; height: 60px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; margin: .5rem auto 0; font-size: 1.6rem; color: var(--emerald-800); }
.pin-dots { display: flex; justify-content: center; gap: .7rem; margin: 1rem 0 .2rem; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-2); transition: background .12s, border-color .12s; }
.pin-dots i.on { background: var(--emerald-800); border-color: var(--emerald-800); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.keypad button { min-height: 54px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.25rem; font-weight: 600; font-family: var(--mono); transition: background .1s; }
.keypad button:active { background: var(--border-2); }
.success-hero { text-align: center; }
.success-hero .ic { width: 82px; height: 82px; border-radius: 20px; background: var(--emerald-800); color: var(--gold); display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 1rem; box-shadow: var(--shadow); }
.kv-list { display: grid; }
.kv-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.kv-list div span:first-child { color: var(--text-2); }

/* ── Modal / Toast ── */
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; }
.modal-header, .modal-footer { border-color: var(--border); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.slip-stage { background: #E9ECF2; position: relative; min-height: 70vh; }
[data-theme="dark"] .slip-stage { background: #0B1310; }
.slip-stage iframe { width: 100%; height: 72vh; border: 0; display: block; background: #fff; max-width: 860px; margin: 1rem auto; box-shadow: var(--shadow-lg); }
@media (max-width: 767.98px) { .slip-stage iframe { margin: 0; height: calc(100vh - 140px); } }
.center-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--text-2); background: inherit; z-index: 2; }
.confirm-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.confirm-icon.ok { background: var(--success-soft); color: var(--success); }
.toast-stack { position: fixed; top: 1rem; right: 1rem; left: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; pointer-events: none; }
.toast-app { pointer-events: auto; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--emerald-800); border-radius: 12px; padding: .8rem 1rem; box-shadow: var(--shadow-lg); max-width: 420px; width: 100%; display: flex; gap: .7rem; animation: toastIn .25s var(--ease); font-size: .9rem; }
.toast-app.danger { border-left-color: var(--danger); }
.toast-app.warning { border-left-color: var(--gold); }
.toast-app i.ti { font-size: 1.2rem; color: var(--emerald-700); }
.toast-app.danger i.ti { color: var(--danger); }
.toast-app.warning i.ti { color: var(--gold-600); }
.toast-app.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.spinner-inline { display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(255, 255, 255, .35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; border-radius: 8px; min-height: 1rem; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-2); }
.empty-state i { font-size: 2.4rem; color: var(--text-3); display: block; margin-bottom: .5rem; }
.temp-pass { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .1em; background: var(--gold-soft); color: var(--gold-ink); border-radius: 10px; padding: .7rem 1rem; text-align: center; user-select: all; }

@media print {
  .sidebar, .topbar, .sticky-actions, .bottom-nav { display: none !important; }
  .app-main { margin: 0 !important; }
}

.spin { animation: spin .8s linear infinite; display: inline-block; }
/* Tombol resmi "Sign in with Google" (Google Identity Services) */
.gsi-btn { display: flex; justify-content: center; min-height: 44px; }
.gsi-btn > div { width: 100%; display: flex; justify-content: center; }
.api-warn code { word-break: break-all; }

/* ── Unduh Data Pegawai: pilihan format ── */
.ex-fmt { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ex-fmt .check-row { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .8rem; margin: 0; background: var(--surface); transition: border-color .15s var(--ease), background .15s var(--ease); }
.ex-fmt .check-row:hover { border-color: var(--border-2); }
.ex-fmt .check-row:has(input:checked) { border-color: var(--emerald-700); background: var(--info-soft); }
.ex-fmt .check-row .bi { font-size: 1.35rem; line-height: 1; color: var(--emerald-700); }
.ex-fmt .check-row small { display: block; color: var(--text-2); font-size: .76rem; }
@media (max-width: 480px) { .ex-fmt { grid-template-columns: 1fr; } }
