/* ==========================================================================
   SIAKAD TAHFIDZ — app.css
   Tampilan utama (mobile-first) untuk area wali santri.
   Palet: hijau tua / teal, kartu putih, aksen oranye.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal-950: #062E33;
  --teal-900: #0A3B41;
  --teal-800: #0E4A50;
  --teal-700: #12626A;
  --teal-600: #147A84;
  --teal-500: #19929C;
  --teal-100: #DDF0F1;
  --teal-50: #EDF7F7;

  --ink: #10262A;
  --ink-2: #3C5559;
  --muted: #6E868A;
  --line: #E2EBEB;
  --surface: #FFFFFF;
  --bg: #F2F6F6;

  --orange: #F5821F;
  --orange-soft: #FFF0E1;
  --green: #5DAE2A;
  --green-soft: #EAF7E1;
  --pink: #E8368F;
  --pink-soft: #FDE7F1;
  --gold: #D9A441;
  --red: #D93636;
  --red-soft: #FDEAEA;
  --blue: #2E7BD6;
  --blue-soft: #E7F0FB;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(10, 59, 65, .06);
  --shadow-md: 0 8px 24px rgba(10, 59, 65, .10);
  --shadow-lg: 0 18px 40px rgba(10, 59, 65, .16);
  --shell: 480px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.app-body {
  background:
    radial-gradient(1100px 520px at 50% -10%, #DDE9E9 0%, rgba(221, 233, 233, 0) 60%),
    var(--bg);
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-600); }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

/* ---------------- Shell aplikasi ---------------- */

.app-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: 104px;
  overflow-x: clip;
}

@media (min-width: 560px) {
  .app-shell {
    margin: 24px auto 40px;
    min-height: auto;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(6, 46, 51, .18);
    overflow: hidden;
  }
}

/* ---------------- Hero / header ---------------- */

.hero {
  position: relative;
  padding: 16px 18px 66px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(25, 146, 156, .55) 0%, rgba(25, 146, 156, 0) 55%),
    linear-gradient(165deg, #14666E 0%, #0C4A50 45%, #08343A 100%);
  border-radius: 0 0 26px 26px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .35;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0));
}

.hero > * { position: relative; z-index: 1; }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.brand-text { min-width: 0; }

.brand-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  flex: 0 0 auto;
}

.icon-btn:hover { background: rgba(255, 255, 255, .22); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; }

.hero-greet {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.santri-card {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.santri-ava {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
  background: #0B3C42;
  border: 2px solid rgba(255, 255, 255, .4);
  display: grid;
  place-items: center;
}

.santri-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.santri-ava span { color: #fff; font-weight: 800; font-size: 17px; }

.santri-meta { flex: 1 1 auto; min-width: 0; }

.santri-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.santri-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .04em;
  line-height: 1.4;
}

/* ---------------- Kartu saldo ---------------- */

.saldo-wrap { padding: 0 16px; margin-top: -52px; position: relative; z-index: 2; }

.saldo-card {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 18px 16px;
}

.saldo-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saldo-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  flex: 0 0 auto;
}

.saldo-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
}

.saldo-value .rp {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
}

.saldo-value .amount {
  font-size: clamp(26px, 8.4vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.saldo-value .amount.blurred { filter: blur(7px); user-select: none; }

.eye-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.eye-btn:hover { background: var(--teal-50); color: var(--teal-700); }
.eye-btn svg { width: 20px; height: 20px; }

.saldo-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------------- Tombol ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, #12626A, #0A3B41);
  color: #fff;
  box-shadow: 0 6px 14px rgba(10, 59, 65, .22);
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); }

.btn-outline {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--teal-600); color: var(--teal-700); }

.btn-ghost {
  background: var(--teal-50);
  color: var(--teal-800);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #F7CFCF;
}
.btn-danger:hover { background: #FBDADA; color: var(--red); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 6px 11px; font-size: 12px; border-radius: 999px; }
.btn-block { width: 100%; }

.topup-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.topup-btn .plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 12px rgba(245, 130, 31, .35);
}

.topup-btn .plus svg { width: 19px; height: 19px; }
.topup-btn:hover .plus { filter: brightness(1.06); }

/* ---------------- Seksi & menu ---------------- */

.section { padding: 22px 18px 0; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}

.section-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.section-link svg { width: 15px; height: 15px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 6px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--ink);
  padding: 2px 0;
}

.menu-ico {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 16px rgba(10, 59, 65, .14);
  transition: transform .18s ease;
}

.menu-ico svg { width: 27px; height: 27px; }
.menu-item:hover .menu-ico { transform: translateY(-3px); }

.menu-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ink);
}

.menu-item.menu-more { display: none; }

.ico-tahsin { background: linear-gradient(140deg, #79C43C, #4E9A18); }
.ico-tahfidz { background: linear-gradient(140deg, #FFA53B, #EF7A0B); }
.ico-keuangan { background: linear-gradient(140deg, #1C95A1, #0B6D77); }
.ico-kesehatan { background: linear-gradient(140deg, #F2559C, #D92674); }
.ico-akademik { background: linear-gradient(140deg, #2FC0A0, #109E86); }
.ico-portofolio { background: linear-gradient(140deg, #7B8CF0, #4C5FD7); }

/* ---------------- Kartu tagihan aktif ---------------- */

.tagihan-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(25, 146, 156, .55) 0%, rgba(25, 146, 156, 0) 60%),
    linear-gradient(150deg, #14666E 0%, #0B4147 60%, #08343A 100%);
  box-shadow: 0 14px 28px rgba(10, 59, 65, .22);
  overflow: hidden;
}

.tagihan-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}

.tagihan-inner {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, .05);
}

.tagihan-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, .95);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tagihan-amount {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tagihan-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.due {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 255, 255, .82);
}

.due svg { width: 18px; height: 18px; opacity: .9; flex: 0 0 auto; }
.due strong { display: block; color: #fff; font-size: 13px; font-weight: 700; }

.btn-white {
  background: #fff;
  color: var(--teal-900);
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
}
.btn-white:hover { color: var(--teal-900); filter: brightness(.97); }

.empty-mini {
  border: 1px dashed #CFE0E0;
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: #fff;
}

.empty-mini strong { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 3px; }

/* ---------------- Kartu putih umum ---------------- */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 235, 235, .9);
}

.card + .card { margin-top: 14px; }

.badge-teal { background: var(--teal-50); color: var(--teal-800); }

.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 18px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title { font-size: 14.5px; font-weight: 700; }
.card-sub { font-size: 12.5px; color: var(--muted); }

/* ---------------- Progres hafalan ---------------- */

.progress-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

.donut { flex: 0 0 auto; position: relative; width: 96px; height: 96px; }

.donut-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.1;
}

.donut-label b { font-size: 20px; font-weight: 800; color: var(--ink); }
.donut-label small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.progress-meta { flex: 1 1 auto; min-width: 0; display: grid; gap: 9px; }

.bar-row { display: grid; gap: 5px; }

.bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
}

.bar-top b { font-size: 12px; color: var(--ink); }

.bar {
  height: 8px;
  border-radius: 999px;
  background: #E9F1F1;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1C95A1, #12626A);
}

.bar.bar-orange > span { background: linear-gradient(90deg, #FFA53B, #EF7A0B); }
.bar.bar-green > span { background: linear-gradient(90deg, #79C43C, #4E9A18); }

/* ---------------- Daftar ---------------- */

.list { display: grid; gap: 12px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
}

.list-item:hover { border-color: #BFD9DA; color: var(--ink); }

.li-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--teal-50);
  color: var(--teal-700);
}

.li-ico svg { width: 20px; height: 20px; }
.li-ico.green { background: var(--green-soft); color: #4E9A18; }
.li-ico.orange { background: var(--orange-soft); color: #DE700B; }
.li-ico.pink { background: var(--pink-soft); color: #D92674; }
.li-ico.red { background: var(--red-soft); color: var(--red); }
.li-ico.blue { background: var(--blue-soft); color: var(--blue); }

.li-body { flex: 1 1 auto; min-width: 0; }
.li-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.li-sub { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.li-end { flex: 0 0 auto; text-align: right; display: grid; gap: 3px; justify-items: end; }
.li-amount { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.li-amount.plus { color: #3D8C16; }
.li-amount.minus { color: var(--red); }
.li-chev { color: #A9BEBE; display: grid; place-items: center; }
.li-chev svg { width: 18px; height: 18px; }

/* ---------------- Badge / chip ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--teal-50);
  color: var(--teal-800);
}

.badge-green { background: var(--green-soft); color: #417F14; }
.badge-orange { background: var(--orange-soft); color: #C06400; }
.badge-red { background: var(--red-soft); color: #B62B2B; }
.badge-pink { background: var(--pink-soft); color: #BE1F70; }
.badge-blue { background: var(--blue-soft); color: #1F5FA8; }
.badge-grey { background: #F0F3F3; color: var(--muted); }
.badge-gold { background: #FBF1D9; color: #98700F; }

/* ---------------- Statistik ringkas ---------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 13px;
  display: grid;
  gap: 2px;
}

.stat b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ---------------- Navigasi bawah ---------------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell);
  z-index: 40;
  padding: 0 10px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(226, 240, 240, .98) 55%, rgba(226, 240, 240, .82));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 22px 22px 0 0;
}

@media (min-width: 560px) {
  .bottom-nav { border-radius: 0 0 30px 30px; }
}

.nav-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 0;
  padding-top: 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0 3px;
  color: #51706F;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.nav-item .nav-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 3px 8px rgba(10, 59, 65, .10);
  transition: background .18s ease, color .18s ease;
}

.nav-item .nav-ico svg { width: 19px; height: 19px; }

.nav-item.active { color: var(--teal-800); }
.nav-item.active .nav-ico { background: var(--teal-800); color: #fff; }

.nav-center {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 2px;
}

.nav-center button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 5px solid #E2F0F0;
  background: linear-gradient(150deg, #16707A, #0A3B41);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(10, 59, 65, .28);
  margin-bottom: 14px;
  transition: transform .18s ease;
}

.nav-center button:active { transform: scale(.94); }
.nav-center button svg { width: 22px; height: 22px; }

/* ---------------- Sheet (semua menu) ---------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.sheet.open { display: block; }

.sheet-bg {
  position: absolute;
  inset: 0;
  background: rgba(6, 46, 51, .45);
  backdrop-filter: blur(2px);
  animation: fade-in .2s ease;
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell);
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  animation: slide-up .26s cubic-bezier(.2, .8, .2, 1);
}

.sheet-grip {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #D7E3E3;
  margin: 4px auto 14px;
}

.sheet-title { font-size: 16px; font-weight: 800; margin-bottom: 14px; }

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
}

@keyframes slide-up { from { transform: translate(-50%, 24px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Halaman dalam (sub page) ---------------- */

.page-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, #14666E, #0A3B41);
  box-shadow: 0 4px 14px rgba(10, 59, 65, .16);
}

.page-bar h1 { font-size: 16px; font-weight: 700; letter-spacing: 0; }
.page-bar .icon-btn { width: 35px; height: 35px; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); }

.page-body { padding: 16px 16px 8px; }
.page-body > .stack + .stack { margin-top: 16px; }

.page-intro {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ---------------- Formulir ---------------- */

.field { display: grid; gap: 6px; }

.label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #D7E3E3;
  border-radius: 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(20, 122, 132, .14);
}

.input::placeholder, .textarea::placeholder { color: #9BB0B0; }
.textarea { min-height: 84px; resize: vertical; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E868A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 34px;
}

.input-group { display: flex; align-items: stretch; gap: 8px; }
.input-group .input { flex: 1 1 auto; }

.form-grid { display: grid; gap: 12px; }

@media (min-width: 480px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.error-text { font-size: 12px; color: var(--red); font-weight: 600; }

/* Pilihan nominal cepat */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #D7E3E3;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover { border-color: var(--teal-600); color: var(--teal-700); }
.chip.active { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }

/* Metode bayar */
.radio-cards { display: grid; gap: 10px; }

.radio-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1.5px solid #D7E3E3;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.radio-card input { accent-color: var(--teal-700); width: 17px; height: 17px; flex: 0 0 auto; }
.radio-card:has(input:checked) { border-color: var(--teal-600); background: var(--teal-50); }
.radio-card b { display: block; font-size: 13.5px; font-weight: 700; }
.radio-card small { color: var(--muted); font-size: 11.5px; }

/* Unggah berkas */
.file-drop {
  border: 1.5px dashed #C6D9D9;
  border-radius: 14px;
  padding: 14px;
  background: #FAFDFD;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.file-drop input { margin-top: 8px; font-size: 12px; width: 100%; }

/* ---------------- Flash message ---------------- */

.flash-wrap { padding: 12px 16px 0; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.flash + .flash { margin-top: 8px; }
.flash svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.flash-success { background: var(--green-soft); border-color: #CFE9BB; color: #356C10; }
.flash-error { background: var(--red-soft); border-color: #F5C9C9; color: #A52626; }
.flash-warning { background: var(--orange-soft); border-color: #FBD9B7; color: #99570A; }
.flash-info { background: var(--teal-50); border-color: #CBE6E8; color: var(--teal-800); }

/* ---------------- Halaman masuk ---------------- */

.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(25, 146, 156, .45), rgba(25, 146, 156, 0) 60%),
    linear-gradient(160deg, #0E4A50 0%, #08333A 60%, #062528 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
}

.auth-head { text-align: center; display: grid; gap: 10px; justify-items: center; margin-bottom: 18px; }
.auth-head img { width: 60px; height: 60px; border-radius: 16px; }
.auth-head h1 { font-size: 19px; letter-spacing: -.01em; }
.auth-head p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.auth-note {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--teal-50);
  border: 1px solid #CFE8EA;
  font-size: 11.5px;
  color: var(--teal-800);
  line-height: 1.6;
}

.auth-note b { display: block; margin-bottom: 3px; }

/* ---------------- Utilities ---------------- */

.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.kv { display: grid; gap: 9px; }

.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

.kv-row .k { color: var(--muted); flex: 0 0 auto; }
.kv-row .v { font-weight: 600; text-align: right; word-break: break-word; }

.avatar-initial {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 800;
  font-size: 17px;
  flex: 0 0 auto;
}

.note {
  font-size: 12px;
  color: var(--ink-2);
  background: #F7FAFA;
  border-left: 3px solid var(--teal-500);
  padding: 9px 12px;
  border-radius: 0 10px 10px 0;
  line-height: 1.55;
}

/* Tabel sederhana (dipakai juga di mobile untuk rincian) */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.mini-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.mini-table td.num, .mini-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table tr:last-child td { border-bottom: 0; }

/* Grafik batang SVG */
.chart-wrap { width: 100%; overflow: hidden; }
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* Halaman galat sederhana */
.fatal-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #F2F6F6; }
.fatal-card { background: #fff; border-radius: 18px; padding: 26px; max-width: 620px; box-shadow: var(--shadow-md); }
.fatal-card h1 { font-size: 20px; color: var(--teal-900); margin-bottom: 10px; }
.fatal-card p { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-bottom: 10px; }
