/* =====================================================================
   DESIGN SYSTEM – YAYASAN HIJRATUL KHAIR (hijratulkhair.ponpes.id)
   ===================================================================== */
:root {
  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F3;
  --text: #13221B;
  --text-muted: #52635B;
  --border: #E2E9E5;

  --primary: #0B4F32;
  --primary-hover: #083B25;
  --primary-soft: #E7F2ED;
  --accent: #C8963E;
  --accent-soft: #FDF6E9;

  --danger: #B91C1C;
  --danger-soft: #FEF2F2;

  --nav-bg: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 6px 18px rgba(11, 79, 50, 0.08), 0 2px 6px rgba(19, 34, 27, 0.05);
  --shadow-md: 0 14px 34px rgba(11, 79, 50, 0.14), 0 4px 12px rgba(19, 34, 27, 0.07);
  --shadow-lg: 0 20px 44px rgba(11, 79, 50, 0.18), 0 6px 16px rgba(19, 34, 27, 0.08);
  --radius: 10px;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-arab: 'Amiri', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* Aturan SVG Garis Bersih (Outline) Tanpa Blok Hitam */
svg, svg path, svg circle, svg rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* =====================================================================
   TOMBOL & INPUT
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  text-decoration: none;
}
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.full { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--surface-alt); }

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
}

.input, .input-sm {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
}
.input:focus, .input-sm:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.input-lg { padding: 13px 14px; font-size: 16px; letter-spacing: 0.15em; text-align: center; font-weight: 700; }
.input-sm { padding: 7px 11px; font-size: 13px; width: auto; }

/* =====================================================================
   1. GERBANG LOGIN EKSKLUSIF
   ===================================================================== */
.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at top, #116642 0%, #072E1D 100%);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  border-top: 4px solid var(--accent);
}
.login-arab {
  font-family: var(--font-arab);
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 10px;
}
.login-badge {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.login-badge svg { width: 28px; height: 28px; }
.login-card h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
}
.login-yayasan {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
  margin-top: 2px;
}
.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0 22px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.login-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.login-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* =====================================================================
   2. APP SHELL & SIDEBAR
   ===================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--primary);
  color: #FFFFFF;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
}
.brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #A3E635;
  color: #0B4F32;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-icon svg {
  width: 21px;
  height: 21px;
  stroke: #0B4F32;
}
.sidebar-brand b {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: 0.15s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: #A3E635;
}

.sidebar-bottom { padding-top: 12px; }
.btn-keluar-sidebar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.btn-keluar-sidebar:hover { background: rgba(255, 255, 255, 0.1); }

/* Main Content Area */
.main-area { padding: 28px 32px; }
.page-container { max-width: 1080px; margin: 0 auto; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-kicker {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.header-actions { display: flex; gap: 10px; align-items: center; }

/* =====================================================================
   HALAMAN RINGKASAN (HERO SALDO + GRAFIK 6 BULAN)
   ===================================================================== */
.ringkas-top-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-bottom: 24px;
}

.saldo-hero-card {
  background: linear-gradient(145deg, var(--primary) 0%, #083B25 100%);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.saldo-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.saldo-hero-top span {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.badge-tx {
  background: #A3E635;
  color: #0B4F32;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
}

.saldo-hero-nominal {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.saldo-hero-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sub-pill {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
}
.sub-pill small {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #A3E635;
  margin-bottom: 4px;
}
.sub-pill.keluar small { color: #FDE68A; }
.sub-pill strong { font-size: 16px; font-weight: 700; }

/* Kartu Grafik Arus Kas 6 Bulan */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.chart-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  height: 150px;
  padding-top: 16px;
  border-bottom: 1px solid var(--border);
}
.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 100%;
}
.bar {
  width: 13px;
  border-radius: 5px 5px 0 0;
  min-height: 6px;
  transition: height 0.3s ease;
}
.bar.masuk { background: var(--primary); }
.bar.keluar { background: #A3E635; }
.chart-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.chart-labels span.now { font-weight: 700; color: var(--text); }
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}

.section-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-row-head h3 { font-size: 16px; font-weight: 700; }
.link-aksi {
  background: none; border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.kantong-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kantong-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.kantong-mini small { display: block; font-size: 11.5px; color: var(--text-muted); }
.kantong-mini strong { font-family: var(--font-serif); font-size: 16px; color: var(--primary); }

/* Tabel Transaksi Umum */
.table-wrap { width: 100%; overflow-x: auto; }
.tabel-kas { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabel-kas th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.tabel-kas td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.kanan { text-align: right !important; }
.nom-masuk { color: var(--primary); font-weight: 700; }
.nom-keluar { color: var(--danger); font-weight: 700; }
.nom-mutasi { color: #9A6E21; font-weight: 700; }

/* =====================================================================
   BUKU KAS UMUM (BKU) - STANDAR AKUNTANSI BENDAHARA
   ===================================================================== */
.bku-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.bku-search-box {
  position: relative;
  flex: 1;
}
.bku-search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.bku-search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.bku-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.bku-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tabel-bku {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tabel-bku th {
  padding: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.tabel-bku td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tabel-bku tr:last-child td { border-bottom: none; }
.tabel-bku tr:hover td { background: #FAFDFB; }

.badge-bukti {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.badge-bukti.has-foto {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
}
.bku-saldo-cell {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.btn-hapus-ikon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  opacity: 0.65;
  transition: 0.15s;
}
.btn-hapus-ikon:hover {
  opacity: 1;
  color: var(--danger);
  background: var(--danger-soft);
}

/* =====================================================================
   HALAMAN LAPORAN & PRATINJAU KERTAS LPJ
   ===================================================================== */
.lap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.lap-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.lap-date-group { display: flex; flex-direction: column; gap: 4px; }
.lap-date-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lap-pills {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.lap-pill-btn {
  background: transparent; border: none;
  padding: 7px 12px; border-radius: 7px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
}
.lap-pill-btn.active { background: var(--primary-soft); color: var(--primary); }

.lap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.lap-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.lap-kpi-card small { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.lap-kpi-card strong { font-family: var(--font-serif); font-size: 20px; color: var(--text); }
.lap-kpi-card.masuk strong { color: #0B7A43; }
.lap-kpi-card.keluar strong { color: #C2410C; }
.lap-kpi-card.akhir { background: var(--primary); border-color: var(--primary); }
.lap-kpi-card.akhir small { color: rgba(255, 255, 255, 0.85); }
.lap-kpi-card.akhir strong { color: #FFFFFF; }

.kertas-lpj {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
  max-width: 920px;
  margin: 0 auto;
}
.kertas-kop {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--primary);
}
.kertas-logo {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kertas-logo svg { width: 26px; height: 26px; }
.kertas-kop-teks h3 { font-family: var(--font-serif); font-size: 21px; }
.kertas-kop-teks p { font-size: 13px; color: var(--text-muted); }
.kertas-judul { text-align: center; margin: 24px 0 20px; }
.kertas-judul h4 { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; }
.kertas-judul span { font-size: 13px; color: var(--text-muted); }

.kertas-ikhtisar {
  max-width: 540px;
  margin: 0 auto 28px;
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.kertas-ikhtisar td { padding: 10px 4px; border-bottom: 1px solid var(--border); }
.kertas-ikhtisar tr.total-row td {
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 4px;
}

/* =====================================================================
   HALAMAN REKAP PER POS (PEMASUKAN VS PENGELUARAN + PROGRESS BAR)
   ===================================================================== */
.rekap-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.rekap-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.rekap-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.rekap-box-head h2 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
}
.rekap-total-masuk {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #0B7A43;
}
.rekap-total-keluar {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #C2410C;
}

.pos-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pos-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pos-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pos-icon-box.masuk {
  background: var(--primary-soft);
  color: var(--primary);
}
.pos-icon-box.keluar {
  background: #FFEDD5;
  color: #C2410C;
}
.pos-mid {
  flex: 1;
  min-width: 0;
}
.pos-mid-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.pos-nama {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-nominal {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.pos-track {
  width: 100%;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 99px;
  overflow: hidden;
}
.pos-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}
.pos-fill.masuk { background: #15803D; }
.pos-fill.keluar { background: #C2410C; }

.btn-pos-more {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.btn-pos-more:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.rekap-footnote {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =====================================================================
   MODAL, FORM & TOAST
   ===================================================================== */
dialog.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(490px, calc(100vw - 24px));
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  margin: auto;
}
dialog.modal::backdrop { background: rgba(19, 34, 27, 0.55); backdrop-filter: blur(3px); }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-family: var(--font-serif); font-size: 18px; color: var(--primary); }
.btn-close {
  background: var(--surface-alt); border: none;
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
}
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-body.tengah { align-items: center; text-align: center; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-alt);
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2-asym { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.alert-error { background: var(--danger-soft); color: var(--danger); padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }

.jenis-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jenis-opt {
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px; text-align: center;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.jenis-opt input { display: none; }
.jenis-opt.masuk:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.jenis-opt.keluar:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.bukti-prev img { max-height: 110px; border-radius: 8px; margin-top: 6px; border: 1px solid var(--border); }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--primary); color: #FFF;
  padding: 12px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: 0.2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Mobile Nav */
.mobile-nav { display: none; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; padding-bottom: 72px; }
  .sidebar { display: none; }
  .main-area { padding: 20px 16px; }
  .ringkas-top-grid, .grid-2-asym, .rekap-grid-2 { grid-template-columns: 1fr; }
  .lap-kpi-grid { grid-template-columns: repeat(2, 1fr); }

  .mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
    background: var(--surface); border-top: 1px solid var(--border);
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; z-index: 50;
  }
  .mnav-btn {
    background: none; border: none;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  }
  .mnav-btn.active { color: var(--primary); }
  .mnav-fab {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--primary); color: #FFF; border: none;
    margin: -18px auto 0; display: grid; place-items: center;
    box-shadow: var(--shadow-md); cursor: pointer;
  }
}

/* =====================================================================
   EFEK TRANSISI & MICRO-INTERACTIONS HALUS
   ===================================================================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes growBarUp {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

/* 1. Animasi Masuk Halaman & Kartu Login */
.login-card {
  animation: fadeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-container {
  animation: fadeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 2. Efek Hover Mengambang Halus pada Kartu */
.saldo-hero-card,
.chart-card,
.card,
.kantong-mini,
.lap-kpi-card,
.rekap-box,
.bku-card {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.24s ease;
}

.kantong-mini:hover,
.lap-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(11, 79, 50, 0.25);
}

/* 3. Animasi Batang Grafik 6 Bulan & Progress Bar Rekap Pos */
.bar {
  transform-origin: bottom;
  animation: growBarUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bar.keluar {
  animation-delay: 0.08s;
}

.pos-fill {
  transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 4. Interaksi Tombol & Menu Sidebar */
.btn:active,
.mnav-fab:active {
  transform: scale(0.97);
}

.nav-link {
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.nav-link:hover {
  padding-left: 18px;
}
.nav-link::before {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform: scaleY(0);
  opacity: 0;
}
.nav-link.active::before {
  transform: scaleY(1);
  opacity: 1;
}

/* 5. Animasi Pop-in pada Dialog Modal */
dialog.modal[open] {
  animation: modalPopIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 6. Transisi Lembut pada Baris Tabel */
.tabel-bku tr,
.tabel-kas tr {
  transition: background-color 0.16s ease;
}

/* =====================================================================
   FORMAT CETAK PDF / PRINTER
   ===================================================================== */
.area-cetak { display: none; }
@media print {
  body * { visibility: hidden; }
  .area-cetak, .area-cetak * { visibility: visible; }
  .area-cetak {
    display: block;
    position: absolute; left: 0; top: 0; width: 100%;
    background: #FFF; color: #000; padding: 10mm;
  }
  .tabel-kas th {
    background: #E7F2ED !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}