/* ==========================================================
   SPP-KU · Sistem Pembayaran Pesantren
   Design system: Modern Islamic — emerald, putih, emas
   ========================================================== */
:root {
  --green-950: #03271C;
  --green-900: #053B2C;
  --green-800: #075E45;
  --green-700: #0B7A57;
  --green-600: #0E8F65;
  --green-500: #12A372;
  --green-100: #E6F5EE;
  --green-50: #F1FAF5;
  --gold: #D8B64A;
  --gold-deep: #B8912A;
  --gold-soft: #FBF4DC;
  --ink: #0C2A22;
  --muted: #61807A;
  --muted-2: #8AA39C;
  --line: #E4EDE9;
  --bg: #F3F7F5;
  --white: #fff;
  --danger: #B42318;
  --danger-soft: #FDECEC;
  --warn: #B54708;
  --warn-soft: #FEF3E2;
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(6, 60, 44, .08);
  --shadow-sm: 0 2px 10px rgba(6, 60, 44, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 12px; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.app { position: relative; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
.main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.content { flex: 1; padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; margin: 0 auto; }
.bare .content { padding: 16px 16px 32px; }
.sidebar { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 22px;
  color: #fff;
  background: linear-gradient(148deg, #03271C 0%, #06553F 42%, #0A7C58 78%, #0E8F65 100%);
  border-radius: 0 0 26px 26px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(360px 200px at 88% -10%, rgba(216, 182, 74, .28), transparent 70%),
    radial-gradient(280px 220px at -10% 110%, rgba(18, 163, 114, .35), transparent 70%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, #fff 1.2px, transparent 0);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.mosque-art { position: absolute; right: -14px; bottom: -6px; width: 168px; color: #EAF7F0; opacity: .16; pointer-events: none; }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-txt strong { display: block; font-size: 18px; letter-spacing: .06em; font-weight: 800; line-height: 1.1; }
.brand-txt small { display: block; font-size: 10.5px; letter-spacing: .02em; color: rgba(255, 255, 255, .72); margin-top: 2px; }
.logo-badge {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(160deg, #0B7A57, #04382A);
  border: 1.4px solid rgba(216, 182, 74, .65);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.logo-svg { width: 30px; height: 30px; }
.logo-sm { width: 22px; height: 22px; }
.hero-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.hero-greet { position: relative; margin-top: 18px; }
.hero-greet h1 { font-size: 21px; line-height: 1.32; font-weight: 700; letter-spacing: -.01em; }
.hero-greet h1 span { display: block; color: #F2D98A; }
.hero-greet p { margin-top: 8px; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .78); max-width: 90%; }

/* ---------- Icons buttons / avatar ---------- */
.icon-btn {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; border: 1px solid rgba(6, 60, 44, .08); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.icon-btn .ic { width: 19px; height: 19px; }
.hero .icon-btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }
.icon-btn .dot {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #E2453B; color: #fff; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; border: 1.6px solid #fff;
}
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #0B7A57, #12A372); color: #fff; font-weight: 700;
  font-size: 12.5px; text-decoration: none; flex: 0 0 auto; letter-spacing: .02em;
}
.avatar-sm { width: 36px; height: 36px; font-size: 12px; }
.avatar-lg { width: 62px; height: 62px; font-size: 20px; }
.avatar-ring { box-shadow: 0 0 0 2px rgba(232, 199, 102, .85); background: linear-gradient(135deg, #0E8F65, #0B7A57); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; max-width: 560px; margin: 0 auto; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-brand { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--green-800); font-weight: 800; font-size: 13px; letter-spacing: .04em; }

/* ---------- Santri switch ---------- */
.santri-switch {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px 14px; color: var(--ink);
  box-shadow: 0 12px 26px rgba(2, 30, 22, .18); text-decoration: none;
  border: 1px solid rgba(6, 60, 44, .05);
}
.hero .santri-switch { margin-top: 18px; }
.santri-switch .avatar { background: linear-gradient(135deg, #0E8F65, #0B7A57); }
.santri-switch-main { flex: 1; min-width: 0; }
.santri-switch-main strong { display: block; font-size: 14.5px; font-weight: 700; }
.santri-switch-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.santri-switch .ic { color: var(--muted-2); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(6, 60, 44, .04);
}
.card + .card { margin-top: 12px; }
.card-gold { border: 1px solid rgba(216, 182, 74, .5); background: linear-gradient(180deg, #FFFDF6, #fff); }
.section { margin-top: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.section-head h2 { font-size: 14.5px; font-weight: 700; }
.section-head .link { font-size: 12px; font-weight: 600; color: var(--green-700); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.section-head .link .ic { width: 14px; height: 14px; }
.section-sub { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 12px; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border-radius: 16px; padding: 14px 6px 12px; text-decoration: none;
  color: var(--ink); font-size: 11.5px; font-weight: 600; line-height: 1.25; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(6, 60, 44, .04);
  transition: transform .16s ease, box-shadow .16s ease;
}
.tile:active { transform: scale(.97); }
.tile span:last-child { min-height: 27px; display: flex; align-items: center; }
.tile-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
}
.tile-icon .ic { width: 22px; height: 22px; }
.t-green { background: #E4F5EC; color: #0B7A57; }
.t-purple { background: #EFEAFF; color: #7C5CFC; }
.t-blue { background: #E6F0FF; color: #2F7DE1; }
.t-orange { background: #FEF3E2; color: #D98216; }
.t-pink { background: #FDE9F2; color: #D6438B; }
.t-teal { background: #E3F6F4; color: #0D9488; }
.t-gold { background: var(--gold-soft); color: var(--gold-deep); }

/* ---------- Child chips ---------- */
.child-chips { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.child-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: #F1F7F4; border: 1px solid #DFEBE5; color: var(--muted);
  font-size: 10px; font-weight: 650; text-decoration: none;
}
.child-chip.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* ---------- Info banner ---------- */
.info-banner {
  display: flex; align-items: center; gap: 12px; background: #EAF7F0;
  border: 1px solid #CFEBDF; border-radius: 16px; padding: 13px 14px; text-decoration: none; color: var(--ink);
}
.info-banner .ib-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #D8F0E2; color: var(--green-700); flex: 0 0 auto; }
.info-banner strong { display: block; font-size: 13px; }
.info-banner p { font-size: 11.5px; color: #3F6B5C; margin-top: 2px; line-height: 1.45; }
.info-banner > .ic { color: var(--muted-2); margin-left: auto; }
.info-banner.gold { background: var(--gold-soft); border-color: #EEDFB0; }
.info-banner.gold .ib-icon { background: #F6E7B9; color: var(--gold-deep); }

/* ---------- Bill card ---------- */
.bill-card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid rgba(6, 60, 44, .05); }
.bill-top { display: flex; align-items: flex-start; gap: 12px; }
.bill-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #E4F5EC; color: var(--green-700); flex: 0 0 auto; }
.bill-info { flex: 1; min-width: 0; }
.bill-info strong { display: block; font-size: 14px; font-weight: 700; }
.bill-info span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.bill-amount { font-size: 17px; font-weight: 800; color: var(--green-700); white-space: nowrap; letter-spacing: -.02em; }
.bill-card .btn { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 12px; font-family: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1.2; text-align: center;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, #0B7A57, #12A372); color: #fff; box-shadow: 0 8px 20px rgba(11, 122, 87, .26); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(11, 122, 87, .32); }
.btn-gold { background: linear-gradient(135deg, #C9A227, #E5C55C); color: #3B2C05; box-shadow: 0 8px 20px rgba(216, 182, 74, .3); }
.btn-outline { background: #fff; border: 1.4px solid var(--green-700); color: var(--green-800); }
.btn-ghost { background: #EDF5F1; color: var(--green-900); }
.btn-soft { background: var(--green-50); color: var(--green-800); border: 1px solid #D9EDE3; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger-solid { background: linear-gradient(135deg, #B42318, #D0493C); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { padding: 14px 20px; font-size: 14.5px; border-radius: 14px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3.5px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.badge .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.badge.ok { background: #E6F6EE; color: #0A7B54; }
.badge.wait { background: var(--warn-soft); color: var(--warn); }
.badge.due { background: #FFF1EE; color: #C0362C; }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: #F0F4F2; color: var(--muted); }
.badge.gold { background: var(--gold-soft); color: var(--gold-deep); }

/* ---------- Lists ---------- */
.list-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid rgba(6, 60, 44, .04); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: #FAFDFB; }
.row-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; background: #E9F6EF; color: var(--green-700); }
.row-ic .ic { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { text-align: right; flex: 0 0 auto; }
.row-amount { font-size: 13px; font-weight: 700; color: var(--green-800); white-space: nowrap; }
.row > .ic { color: var(--muted-2); width: 16px; height: 16px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: #fff; border-radius: 16px; padding: 13px 14px; box-shadow: var(--shadow-sm); border: 1px solid rgba(6, 60, 44, .04); }
.stat-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; margin-bottom: 8px; }
.stat-ic .ic { width: 16px; height: 16px; }
.stat-label { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .01em; text-transform: uppercase; }
.stat-value { font-size: 15.5px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }
.stat-note { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Progress / chart ---------- */
.progress { display: block; height: 8px; border-radius: 999px; background: #EDF3F0; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0B7A57, #12A372); }
.progress.gold > i { background: linear-gradient(90deg, #C9A227, #E5C55C); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 118px; margin-top: 14px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart-bar { width: 100%; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, #12A372, #0B7A57); min-height: 4px; position: relative; }
.chart-bar span { position: absolute; top: -14px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; color: var(--green-800); }
.chart-x { font-size: 9.5px; color: var(--muted); font-weight: 600; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; color: #264A3E; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1.4px solid var(--line); border-radius: 12px;
  background: #fff; font-family: inherit; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3.5px rgba(18, 163, 114, .13); }
select.input { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2361807A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.input { min-height: 84px; resize: vertical; }
.form-grid { display: grid; gap: 0 12px; }
.input-group { position: relative; }
.input-group .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }
.input-group .input { padding-left: 37px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink); }
.check input { margin-top: 2px; accent-color: var(--green-700); width: 16px; height: 16px; }

/* ---------- Steps ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 4px 0 22px; }
.steps::before { content: ""; position: absolute; top: 11px; left: 16.6%; right: 16.6%; height: 2px; background: var(--line); }
.step { position: relative; text-align: center; }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: var(--muted-2); font-size: 10px; font-weight: 700; position: relative; z-index: 1;
}
.step-label { font-size: 10px; font-weight: 650; color: var(--muted); margin-top: 5px; display: block; }
.step.active .step-dot { background: var(--green-700); border-color: var(--green-700); color: #fff; box-shadow: 0 0 0 4px rgba(11, 122, 87, .12); }
.step.active .step-label { color: var(--green-800); }
.step.done .step-dot { background: var(--green-100); border-color: var(--green-600); color: var(--green-700); }
.step.done .step-label { color: var(--green-700); }

/* ---------- Pick / method ---------- */
.pick {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #fff; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, background .15s;
}
.pick input { width: 18px; height: 18px; accent-color: var(--green-700); flex: 0 0 auto; }
.pick-main { flex: 1; min-width: 0; }
.pick-main strong { display: block; font-size: 13px; }
.pick-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pick-amount { font-weight: 700; font-size: 13px; color: var(--green-800); }
.pick.checked { border-color: var(--green-600); background: var(--green-50); box-shadow: 0 0 0 3px rgba(18, 163, 114, .1); }
.method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 10px; cursor: pointer; }
.method input { accent-color: var(--green-700); width: 17px; height: 17px; }
.method.checked { border-color: var(--green-600); background: var(--green-50); }
.method-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #EEF6F1; color: var(--green-700); flex: 0 0 auto; }
.method-main { flex: 1; }
.method-main strong { display: block; font-size: 13px; }
.method-main span { font-size: 11.5px; color: var(--muted); }
.method-va { font-size: 15px; font-weight: 800; letter-spacing: .06em; color: var(--green-800); margin-top: 4px; }

/* ---------- VA box ---------- */
.va-box { background: linear-gradient(145deg, #053B2C, #0A7A57); color: #fff; border-radius: 16px; padding: 16px; position: relative; overflow: hidden; }
.va-box::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(216, 182, 74, .18); }
.va-box small { font-size: 11px; color: rgba(255, 255, 255, .7); letter-spacing: .04em; text-transform: uppercase; }
.va-number { font-size: 20px; font-weight: 800; letter-spacing: .1em; margin-top: 4px; }
.va-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 11.5px; color: rgba(255, 255, 255, .78); }

/* ---------- Tabs & filters ---------- */
.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 13px; border-radius: 999px; background: #fff; border: 1.2px solid var(--line);
  font-size: 12px; font-weight: 650; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.tab.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .field { flex: 1 1 130px; margin-bottom: 0; }
.filter-bar .btn { flex: 0 0 auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid rgba(6, 60, 44, .04); }
table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.table thead th {
  background: #F5FAF8; text-align: left; padding: 10px 12px; font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { padding: 11px 12px; font-weight: 700; background: #F8FCFA; border-top: 1.5px solid var(--line); }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 30px 18px; }
.empty-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: #EDF5F1; color: var(--green-600); margin: 0 auto 12px; }
.empty-ic .ic { width: 24px; height: 24px; }
.empty h3 { font-size: 13.5px; font-weight: 700; }
.empty p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Flash ---------- */
.flash-stack { margin-bottom: 14px; display: grid; gap: 8px; }
.flash { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 13px; font-size: 12.5px; line-height: 1.45; border: 1px solid transparent; }
.flash .ic { width: 17px; height: 17px; margin-top: 1px; }
.flash-success { background: #E9F7EF; color: #08603F; border-color: #CDEBDA; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #F7D3CF; }
.flash-info { background: #EAF2FF; color: #1D4F91; border-color: #D3E3F9; }

/* ---------- Bottom nav & FAB ---------- */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 560px; height: 70px; padding: 0 6px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px) saturate(170%);
  border-radius: 20px 20px 0 0; box-shadow: 0 -8px 26px rgba(6, 60, 44, .1);
  display: flex; align-items: center; justify-content: space-around; z-index: 60;
  border-top: 1px solid rgba(6, 60, 44, .06);
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; height: 100%; color: var(--muted-2); text-decoration: none; }
.nav-ic { display: grid; place-items: center; }
.nav-ic .ic { width: 21px; height: 21px; }
.nav-label { font-size: 10px; font-weight: 650; letter-spacing: .01em; }
.nav-item.active { color: var(--green-700); }
.nav-item.active .nav-ic .ic { stroke-width: 2.1; }
.fab {
  display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; margin: 0 4px;
  border: 0; border-radius: 18px; color: #fff; cursor: pointer; transform: translateY(-14px);
  background: linear-gradient(150deg, #0B7A57, #12A372);
  box-shadow: 0 10px 22px rgba(11, 122, 87, .38), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.fab .ic { width: 23px; height: 23px; }
.fab:active { transform: translateY(-12px) scale(.97); }


/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; display: none; }
.sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(4, 30, 22, .45); backdrop-filter: blur(2px); animation: fade .18s ease; }
.sheet-panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px;
  background: #fff; border-radius: 22px 22px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: slideUp .22s cubic-bezier(.2, .8, .3, 1);
}
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: #DCE7E2; margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 14.5px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sheet-item { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); font-size: 11px; font-weight: 600; text-align: center; }
.sheet-item .tile-icon { width: 48px; height: 48px; }
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Receipt ---------- */
.receipt { position: relative; background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(6, 60, 44, .06); }
.receipt-head { position: relative; background: linear-gradient(140deg, #053B2C, #0B7A57); color: #fff; padding: 18px; text-align: center; overflow: hidden; }
.receipt-brand { display: flex; align-items: center; justify-content: center; gap: 8px; }
.receipt-brand strong { font-size: 16px; letter-spacing: .05em; }
.receipt-head p { font-size: 10.5px; color: rgba(255, 255, 255, .78); margin-top: 2px; }
.receipt-head .receipt-amount { margin-top: 14px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.receipt-head .receipt-status { margin-top: 8px; display: inline-flex; }
.receipt-body { padding: 16px 18px 18px; }
.receipt-dashed { height: 1px; border-top: 1.5px dashed #DCE7E2; margin: 14px 0; position: relative; }
.receipt-dashed::before, .receipt-dashed::after { content: ""; position: absolute; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); }
.receipt-dashed::before { left: -26px; }
.receipt-dashed::after { right: -26px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; font-size: 12.5px; }
.kv dt, .kv .k { color: var(--muted); flex: 0 0 auto; }
.kv dd, .kv .v { margin: 0; font-weight: 650; text-align: right; word-break: break-word; }
.receipt-note { background: #F7FBF9; border: 1px dashed #CFE4D9; border-radius: 12px; padding: 11px 13px; font-size: 11px; color: #4A6E60; margin-top: 14px; }
.watermark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 46px; font-weight: 800; letter-spacing: .12em; color: rgba(11, 122, 87, .06);
  transform: rotate(-22deg); z-index: 2;
}
.watermark.wait { color: rgba(181, 71, 8, .07); }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; background: #F3F7F5; }
.login-shell { width: 100%; max-width: 440px; margin: 0 auto; min-height: 100vh; background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 60px rgba(6, 60, 44, .08); }
.login-hero {
  position: relative; overflow: hidden; padding: 34px 24px 30px; text-align: center; color: #fff;
  background: linear-gradient(150deg, #03271C 0%, #06553F 45%, #0C8A61 100%);
  border-radius: 0 0 30px 30px;
}
.login-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px 180px at 85% 0%, rgba(216, 182, 74, .3), transparent 70%); }
.login-hero .logo-badge { width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 14px; }
.login-hero .logo-svg { width: 44px; height: 44px; }
.login-hero h1 { position: relative; font-size: 26px; letter-spacing: .1em; font-weight: 800; }
.login-hero .gold-line { width: 58px; height: 3px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 8px auto 10px; }
.login-hero p { position: relative; font-size: 12px; color: rgba(255, 255, 255, .8); letter-spacing: .02em; }
.login-body { padding: 22px 22px 34px; flex: 1; }
.login-body h2 { font-size: 17px; font-weight: 700; }
.login-body > p.sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.demo-box { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.demo-box h3 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.demo-list { display: grid; gap: 8px; margin-top: 10px; }
.demo-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #FBFAF6; cursor: pointer; text-align: left; font-family: inherit; width: 100%;
}
.demo-item:hover { border-color: var(--gold); background: #FFFCF2; }
.demo-item .row-ic { width: 32px; height: 32px; border-radius: 9px; }
.demo-item .row-ic .ic { width: 16px; height: 16px; }
.demo-item strong { display: block; font-size: 12.5px; }
.demo-item span { display: block; font-size: 10.5px; color: var(--muted); }

/* ---------- Password toggle & toast ---------- */
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px; color: var(--muted-2); cursor: pointer; display: grid; place-items: center;
}
.pass-toggle .ic { width: 18px; height: 18px; }
.pass-toggle.is-on { color: var(--green-700); }
.input-group:has(.pass-toggle) .input { padding-right: 42px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 14px);
  background: #08382B; color: #fff; font-size: 12.5px; font-weight: 600; padding: 10px 18px;
  border-radius: 999px; box-shadow: 0 10px 24px rgba(0, 0, 0, .24); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.chip-role { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); font-size: 10.5px; font-weight: 700; }
.mini-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.alert-box { display: flex; gap: 10px; padding: 12px 13px; border-radius: 13px; background: var(--gold-soft); border: 1px solid #EEDFB0; font-size: 11.5px; color: #6B5410; line-height: 1.5; }
.alert-box .ic { width: 17px; height: 17px; flex: 0 0 auto; color: var(--gold-deep); }
.tag-number { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hr-list { display: grid; gap: 12px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar-name { display: flex; align-items: center; gap: 10px; }
.avatar-name strong { display: block; font-size: 13.5px; }
.avatar-name span { display: block; font-size: 11.5px; color: var(--muted); }

/* ==========================================================
   Desktop
   ========================================================== */
@media (min-width: 1024px) {
  body { background: #EDF3F0; }
  .app { display: grid; grid-template-columns: 268px minmax(0, 1fr); max-width: none; min-height: 100vh; }
  .sidebar {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh;
    padding: 22px 16px; background: linear-gradient(180deg, #04352A 0%, #064534 60%, #042A21 100%);
    color: #fff; overflow-y: auto;
  }
  .sidebar-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; padding: 0 6px; }
  .sidebar-brand-txt strong { display: block; font-size: 17px; letter-spacing: .07em; font-weight: 800; }
  .sidebar-brand-txt small { display: block; font-size: 9.5px; color: rgba(255, 255, 255, .55); margin-top: 2px; }
  .sidebar-nav { display: grid; gap: 3px; }
  .sidebar-label { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .38); padding: 12px 10px 5px; font-weight: 700; }
  .sidebar-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 13px; font-weight: 550; }
  .sidebar-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .sidebar-link.active { background: linear-gradient(135deg, rgba(18, 163, 114, .9), rgba(11, 122, 87, .9)); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
  .sidebar-link .ic { width: 18px; height: 18px; }
  .sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 10px; }
  .sidebar-user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 6px; border-radius: 10px; }
  .sidebar-user strong { display: block; font-size: 12.5px; }
  .sidebar-user small { display: block; font-size: 10.5px; color: rgba(255, 255, 255, .55); }
  .sidebar-logout { display: flex; align-items: center; gap: 9px; font-size: 12px; color: rgba(255, 255, 255, .68); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
  .sidebar-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

  .content { max-width: 1180px; margin: 0; padding: 24px 32px 56px; }
  .topbar { position: sticky; top: 0; z-index: 30; }
  .topbar-inner { max-width: 1180px; padding: 12px 32px; }
  .topbar-title h1 { font-size: 17px; }
  .bottom-nav, .fab { display: none !important; }
  .hero { border-radius: 24px; margin: 24px 32px 0; padding: 24px 26px 26px; max-width: 1180px; }
  .hero-greet h1 { font-size: 24px; }
  .mosque-art { width: 220px; opacity: .18; }

  .tiles { grid-template-columns: repeat(6, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
  .grid-2 > * { min-width: 0; }
  .grid-2 > .stack, .grid-2 > div > .stack { gap: 16px; }
  .section { margin-top: 24px; }
  .chart { height: 160px; }
  .login-page { display: grid; place-items: center; padding: 32px; background: linear-gradient(135deg, #EAF4EF, #F7F3E4); }
  .login-shell { min-height: auto; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 70px rgba(6, 60, 44, .18); }
  .login-hero { border-radius: 0; }
}

@media (min-width: 1024px) {
  .app > .main { grid-column: 2; }
  .app > .sidebar { grid-column: 1; grid-row: 1; }
  .hero { margin-left: 32px; margin-right: 32px; }
  /* konten halaman dengan hero: judul di hero, konten normal */
}

@media (max-width: 380px) {
  .tiles { gap: 9px; }
  .tile { font-size: 10.5px; }
  .tile-icon { width: 42px; height: 42px; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .bottom-nav, .sheet, .app-foot, .flash-stack, .no-print { display: none !important; }
  .app, .main { display: block !important; }
  .content { padding: 0 !important; max-width: none; }
  .receipt { box-shadow: none; border: 1px solid #ccc; }
  .receipt-head { background: #053B2C !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
