/* Sales Commission & Settlement Manager — sistem desain (mobile-first) */

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

:root {
  --u-950: #1E0B45;
  --u-900: #2A1260;
  --u-800: #3B1C78;
  --u-700: #5B21B6;
  --u-600: #6D28D9;
  --u-500: #7C3AED;
  --u-300: #C4B5FD;
  --u-200: #DDD6FE;
  --u-100: #EDE9FE;
  --u-50: #F5F3FF;

  --bg: #F5F4F9;
  --surface: #FFFFFF;
  --surface-2: #FAF9FD;
  --line: #E9E6F0;
  --line-strong: #D9D4E5;
  --text: #17131F;
  --text-2: #3D3850;
  --muted: #6E6882;
  --faint: #9C97AD;

  --hijau: #047857;  --hijau-bg: #ECFDF5;  --hijau-line: #A7F3D0;
  --kuning: #B45309; --kuning-bg: #FFFBEB; --kuning-line: #FDE68A;
  --merah: #BE123C;  --merah-bg: #FFF1F2;  --merah-line: #FECDD3;
  --biru: #4338CA;   --biru-bg: #EEF2FF;   --biru-line: #C7D2FE;

  --r-xl: 20px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(23, 19, 31, .04), 0 2px 8px rgba(23, 19, 31, .04);
  --shadow-2: 0 2px 6px rgba(23, 19, 31, .06), 0 12px 32px rgba(23, 19, 31, .10);
  --font: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[x-cloak] { display: none !important; }
a { color: var(--u-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
p { margin: 0; }
button { font: inherit; }
svg { flex: none; }
.num, .money, td.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 800; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kerangka ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidenav { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  min-height: 56px;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(245, 244, 249, .88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .t-title { flex: 1; min-width: 0; font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--u-900), var(--u-500));
  box-shadow: 0 4px 12px rgba(91, 33, 182, .28);
}
.brand-mark svg { width: 18px; height: 18px; }
.env-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #92400E; background: #FEF3C7; border: 1px solid #FDE68A;
  padding: 2px 8px; border-radius: 999px;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  display: grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--u-50); }
.icon-btn svg { width: 20px; height: 20px; }

.content {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--nav-h);
  font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.aktif { color: var(--u-700); }
.bottomnav a.aktif .nav-ico { background: var(--u-100); }
.nav-ico { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; }

@media (min-width: 1024px) {
  .sidenav {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100vh; width: 256px; flex: none;
    padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .sidenav .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
  .sidenav .brand b { display: block; font-size: 14px; line-height: 1.2; }
  .sidenav .brand span { font-size: 11.5px; color: var(--muted); }
  .sidenav a.nav {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    color: var(--text-2); font-weight: 700; font-size: 14px; text-decoration: none;
  }
  .sidenav a.nav svg { width: 20px; height: 20px; color: var(--muted); }
  .sidenav a.nav:hover { background: var(--surface-2); }
  .sidenav a.nav.aktif { background: var(--u-50); color: var(--u-700); }
  .sidenav a.nav.aktif svg { color: var(--u-700); }
  .sidenav .spacer { flex: 1; }
  .sidenav .user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
  .bottomnav { display: none; }
  .topbar .brand-mark { display: none; }
  .content { padding: 28px 32px 56px; }
}

/* ---------- Judul halaman ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 0 16px; }
.page-head h1 { font-size: 22px; line-height: 1.25; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
@media (min-width: 1024px) { .page-head h1 { font-size: 26px; } }

/* ---------- Kartu ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.card + .card, .stack > * + * { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 16px; line-height: 1.3; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .g3-md { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4-md { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Statistik ---------- */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px; min-width: 0; box-shadow: var(--shadow-1);
}
.stat .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat .value { font-size: 19px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.hero {
  border: 0; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(167, 139, 250, .35) 0, rgba(167, 139, 250, 0) 55%), linear-gradient(140deg, var(--u-900), var(--u-600));
  box-shadow: 0 10px 28px rgba(59, 28, 120, .28);
}
.stat.hero .label, .stat.hero .sub { color: var(--u-200); }
.stat.hero .value { font-size: 26px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 800; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
.err-text { font-size: 12px; color: var(--merah); font-weight: 700; }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 44px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 0 12px; background: #fff; color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.select {
  -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236E6882' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--u-500); box-shadow: 0 0 0 3px rgba(124, 58, 237, .16); }
.input:disabled, .select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input.err, .select.err { border-color: var(--merah); box-shadow: 0 0 0 3px rgba(190, 18, 60, .10); }
.money { text-align: right; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; user-select: none; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--u-600); margin: 0; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (min-width: 720px) { .form-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-weight: 800; font-size: 14px; text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--u-700); color: #fff; box-shadow: 0 6px 16px rgba(91, 33, 182, .24); }
.btn-primary:hover { background: var(--u-800); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--u-50); color: var(--u-700); }
.btn-soft:hover { background: var(--u-100); }
.btn-danger { background: #fff; border-color: var(--merah-line); color: var(--merah); }
.btn-danger:hover { background: var(--merah-bg); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-i { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); }
.btn-i svg { width: 18px; height: 18px; }

/* ---------- Lencana status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; border: 1px solid transparent;
  font-size: 11.5px; font-weight: 800; white-space: nowrap; line-height: 1.3;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-lunas { background: var(--hijau-bg); color: var(--hijau); border-color: var(--hijau-line); }
.b-sebagian { background: var(--kuning-bg); color: var(--kuning); border-color: var(--kuning-line); }
.b-belum { background: var(--merah-bg); color: var(--merah); border-color: var(--merah-line); }
.b-tertahan { background: var(--biru-bg); color: var(--biru); border-color: var(--biru-line); }
.b-selesai { background: #F3F2F7; color: var(--muted); border-color: var(--line); }
.b-final { background: var(--u-50); color: var(--u-700); border-color: var(--u-200); }

/* ---------- Pemilih periode / toolbar ---------- */
.toolbar { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toolbar .full { grid-column: 1 / -1; }
@media (min-width: 720px) { .toolbar.t4 { grid-template-columns: 1.2fr 1fr 1.6fr 1.6fr; } .toolbar.t5 { grid-template-columns: 1fr 0.8fr 1.4fr 1.4fr 1.4fr; } .toolbar .full { grid-column: auto; } }

/* ---------- Tabel ---------- */
.tbl-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th {
  background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { background: var(--surface-2); font-weight: 800; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .num, .tbl th.num { text-align: right; }
.tbl .c { text-align: center; }
.tbl .sticky { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line), 6px 0 10px -8px rgba(23, 19, 31, .18); }
.tbl th.sticky { z-index: 3; background: var(--surface-2); }
.tbl tfoot td.sticky { background: var(--surface-2); }
.tbl tr.row-err td { background: #FFF8F9; }
.tbl tr.row-err td.sticky { background: #FFF8F9; }
.tbl tr.row-lock td { background: #FBFAFE; }
.tbl tr.row-lock td.sticky { background: #FBFAFE; }
.tbl .input, .tbl .select { height: 40px; font-size: 14px; border-radius: 10px; }
.tbl .w-ae { min-width: 172px; }
.tbl .w-pkg { min-width: 132px; }
.tbl .w-money { width: 128px; min-width: 112px; }
.tbl .w-bagi { min-width: 128px; }
.tbl .w-day { min-width: 84px; }
.tbl .w-id { min-width: 170px; }
.tbl .w-sus { min-width: 96px; }
.cell-id { display: flex; align-items: center; gap: 8px; max-width: 128px; }
.cell-id .idtext { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-id .no { font-size: 11px; color: var(--faint); font-weight: 800; min-width: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.saved { background: #34D399; }
.dot.dirty, .dot.saving { background: #FBBF24; }
.dot.error, .dot.conflict { background: #F43F5E; }
.dot.new { background: var(--u-300); }
.combo { margin-top: 4px; }
.cell-err { white-space: normal; max-width: 240px; margin-top: 4px; }

/* ---------- Daftar kunci-nilai ---------- */
.kv { display: grid; gap: 0; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { color: var(--text-2); font-size: 14px; }
.kv dd, .kv .v { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.kv .total { border-top: 1px solid var(--line-strong); border-bottom: 0; margin-top: 4px; padding-top: 11px; }
.kv .total .k { font-weight: 800; color: var(--text); }
.kv .total .v { font-size: 17px; color: var(--u-700); }
.kv .sub .k { padding-left: 14px; color: var(--muted); font-size: 13px; }
.kv .sub .v { font-weight: 700; color: var(--text-2); font-size: 13.5px; }

/* ---------- Daftar item (kewajiban, AE, dll.) ---------- */
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .main-t { font-weight: 800; font-size: 14px; }
.item .sub-t { font-size: 12.5px; color: var(--muted); }
.item .amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- Pemberitahuan ---------- */
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.45;
  background: var(--biru-bg); color: #312E81; border: 1px solid var(--biru-line);
}
.note svg { width: 18px; height: 18px; margin-top: 1px; }
.note.warn { background: var(--kuning-bg); color: #78350F; border-color: var(--kuning-line); }
.note.err { background: var(--merah-bg); color: #881337; border-color: var(--merah-line); }
.note.ok { background: var(--hijau-bg); color: #064E3B; border-color: var(--hijau-line); }
.note + .note { margin-top: 8px; }

/* ---------- Status simpan ---------- */
.save-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.save-pill .dot { width: 7px; height: 7px; }
.save-pill.saving { color: var(--kuning); border-color: var(--kuning-line); background: var(--kuning-bg); }
.save-pill.saved { color: var(--hijau); border-color: var(--hijau-line); background: var(--hijau-bg); }
.save-pill.offline, .save-pill.error { color: var(--merah); border-color: var(--merah-line); background: var(--merah-bg); }
.offline-bar {
  position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 25;
  margin: 0; padding: 8px 16px; font-size: 13px; font-weight: 700; text-align: center;
  background: #881337; color: #fff;
}

/* ---------- Kosong & memuat ---------- */
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .ico { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--u-50); color: var(--u-600); }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.skeleton { border-radius: var(--r-md); background: linear-gradient(90deg, #EFEDF5 25%, #F7F6FA 50%, #EFEDF5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chip / segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.chip b { color: var(--u-700); }
.seg { display: inline-flex; padding: 3px; background: #EFEDF5; border-radius: 12px; gap: 3px; }
.seg button { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--u-700); box-shadow: var(--shadow-1); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: none; border: 0; background: transparent; padding: 10px 12px; font-weight: 800; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs button.on { color: var(--u-700); border-bottom-color: var(--u-600); }

/* ---------- Lapisan (dialog, sheet, toast) ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(23, 15, 43, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-2);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.sheet.wide { max-width: 860px; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: -6px auto 12px; }
.sheet h3 { font-size: 18px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet .actions .btn { flex: 1; }
@media (min-width: 720px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; padding: 22px; }
  .sheet-grip { display: none; }
}
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  max-width: 520px; width: max-content; min-width: 0;
  background: #1C1530; color: #fff; border-radius: 14px; padding: 11px 14px;
  font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow-2);
}
.toast.error { background: #881337; }
.toast.success { background: #065F46; }
.toast button { background: transparent; border: 0; color: var(--u-200); font-weight: 800; cursor: pointer; padding: 4px 6px; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, #E9E2FF 0, var(--bg) 70%); }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.auth-brand .brand-mark svg { width: 24px; height: 24px; }

/* ---------- Konten panduan ---------- */
.prose { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 8px; }
.prose ul { margin: 6px 0 0; padding-left: 20px; }
.prose li { margin: 3px 0; }
.prose b, .prose strong { color: var(--text); }
.accordion details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.accordion details + details { margin-top: 10px; }
.accordion summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 15px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--u-50); color: var(--u-700); font-size: 12.5px; flex: none; }
.accordion summary .chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
.accordion details[open] summary .chev { transform: rotate(180deg); }
.accordion .body { padding: 0 16px 16px; }
.example { margin-top: 12px; border: 1px solid var(--u-200); background: var(--u-50); border-radius: var(--r-md); padding: 12px 14px; }
.example .t { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--u-700); margin-bottom: 6px; }

/* ---------- Laporan (dirender untuk screenshot) ---------- */
.rpt-stage { position: fixed; left: -10000px; top: 0; z-index: -1; }
.rpt {
  width: 720px; background: #fff; color: #17131F; font-family: var(--font);
  font-size: 15px; line-height: 1.45; padding: 0 0 22px; border-radius: 0;
}
.rpt-head { padding: 26px 30px 22px; color: #fff; background: linear-gradient(135deg, #2A1260, #6D28D9); }
.rpt-head .app { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #DDD6FE; }
.rpt-head .kind { font-size: 24px; font-weight: 800; margin-top: 4px; color: #fff; }
.rpt-head .meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: 14px; color: #EDE9FE; }
.rpt-head .meta b { color: #fff; font-size: 16px; display: block; }
.rpt-body { padding: 20px 30px 0; }
.rpt-hero { border-radius: 16px; padding: 18px 20px; background: #F5F3FF; border: 1px solid #DDD6FE; }
.rpt-hero .l { font-size: 13px; font-weight: 800; color: #5B21B6; text-transform: uppercase; letter-spacing: .05em; }
.rpt-hero .v { font-size: 32px; font-weight: 800; color: #2A1260; margin-top: 2px; }
.rpt-hero .s { font-size: 13px; color: #5B5470; margin-top: 2px; }
.rpt h4 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6E6882; margin: 20px 0 8px; }
.rpt table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rpt th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #6E6882; padding: 7px 8px; border-bottom: 1.5px solid #E9E6F0; background: #FAF9FD; }
.rpt td { padding: 7px 8px; border-bottom: 1px solid #EFEDF5; vertical-align: top; }
.rpt td.n, .rpt th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt tr.tot td { font-weight: 800; border-top: 1.5px solid #D9D4E5; border-bottom: 0; background: #FAF9FD; }
.rpt .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rpt .box { border: 1px solid #E9E6F0; border-radius: 14px; padding: 12px 14px; }
.rpt .box .l { font-size: 12px; font-weight: 800; color: #6E6882; }
.rpt .box .v { font-size: 20px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rpt .box.asm .v { color: #5B21B6; }
.rpt .box.ae .v { color: #047857; }
.rpt .st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.rpt .st.LUNAS { background: #ECFDF5; color: #047857; }
.rpt .st.SEBAGIAN { background: #FFFBEB; color: #B45309; }
.rpt .st.BELUM_LUNAS { background: #FFF1F2; color: #BE123C; }
.rpt .st.SELESAI { background: #F3F2F7; color: #6E6882; }
.rpt-foot { margin: 22px 30px 0; padding-top: 12px; border-top: 1px solid #E9E6F0; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #6E6882; }
.rpt .page-no { font-weight: 800; }
.rpt-preview { display: grid; gap: 12px; }
.rpt-preview img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-1); }

/* ---------- Lain-lain ---------- */
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.lock-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--u-50); border: 1px solid var(--u-200); color: var(--u-800); font-size: 13.5px; font-weight: 700; }
.lock-banner svg { width: 18px; height: 18px; }
.amount-big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--u-100); color: var(--u-700); font-size: 12px; font-weight: 800; }
.hr-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.hr-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* =====================================================================
   REVISI 01 — tampilan HP ringkas & tabel spreadsheet (ala Google Sheets)
   ===================================================================== */
.show-sm { display: none; }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .show-sm { display: inline; }
  .content { padding: 12px 12px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
  .page-head { margin: 0 0 10px; }
  .page-head h1 { font-size: 19px; }
}
.select.sm, .input.sm { height: 38px; font-size: 14px; border-radius: 10px; padding: 0 10px; }
.select.sm { padding-right: 28px; background-position: right 8px center; }

/* Filter & ringkasan Dashboard */
.dash-filter { display: grid; gap: 6px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
@media (min-width: 720px) { .dash-filter { grid-template-columns: 170px 110px minmax(0, 1fr) 240px; gap: 10px; } }
.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
@media (min-width: 560px) { .dash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; } }
.ds {
  display: flex; flex-direction: column; min-width: 0; gap: 1px;
  padding: 7px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
.ds:hover { text-decoration: none; }
.ds .l, .ds .s { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds .l { font-weight: 800; color: var(--muted); }
.ds .s { color: var(--faint); }
.ds b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds.hero { background: linear-gradient(140deg, var(--u-900), var(--u-600)); border-color: transparent; color: #fff; }
.ds.hero .l, .ds.hero .s { color: var(--u-200); }
@media (min-width: 720px) { .ds { padding: 12px 14px; border-radius: 14px; } .ds b { font-size: 19px; } .ds .l, .ds .s { font-size: 12px; } }
.dash-chips { margin-top: 8px; }
.dash-chips .chip { height: 28px; font-size: 12px; }

/* Kartu tabel spreadsheet */
.gs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); }
.gs-bar { display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.gs-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.gs-btn svg { width: 15px; height: 15px; }
.gs-btn.primary { background: var(--u-700); border-color: var(--u-700); color: #fff; }
.gs-btn:disabled { opacity: .5; }
.gs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.gsheet { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11.5px; color: var(--text); }
.gsheet col.c-no { width: 6%; }
.gsheet col.c-ae { width: 23%; }
.gsheet col.c-pkg { width: 19%; }
.gsheet col.c-biaya { width: 16%; }
.gsheet col.c-bagi { width: 7%; }
.gsheet col.c-tgl { width: 8%; }
.gsheet col.c-id { width: 21%; }
.gsheet th {
  background: var(--u-50); color: var(--u-800); border: 1px solid var(--line);
  font-size: 9.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; text-align: left;
  padding: 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsheet th.r { text-align: right; }
.gsheet th.c { text-align: center; }
.gsheet th.no { text-align: center; color: var(--faint); }
.gsheet td { border: 1px solid var(--line); padding: 0; height: 33px; background: #fff; }
.gsheet td.no { background: var(--surface-2); }
.gsheet .cell {
  display: block; width: 100%; min-width: 0; height: 32px; margin: 0;
  border: 0; border-radius: 0; background: transparent; padding: 0 4px;
  font: inherit; font-size: 11.5px; color: var(--text);
  -webkit-appearance: none; appearance: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsheet select.cell { cursor: pointer; }
.gsheet .cell.r { text-align: right; font-variant-numeric: tabular-nums; }
.gsheet .cell.c { text-align: center; text-align-last: center; }
.gsheet .cell::placeholder { color: var(--faint); }
.gsheet .cell:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--u-500); }
.gsheet .cell.err { background: #FFF5F7; box-shadow: inset 0 0 0 2px var(--merah); }
.gsheet .cell:disabled { color: var(--muted); cursor: not-allowed; opacity: 1; }
.gsheet .pkg { display: flex; align-items: center; min-width: 0; }
.gsheet .pkg .cell { flex: 1; }
.gsheet .tv {
  flex: none; width: 20px; height: 18px; margin-right: 3px; padding: 0;
  border-radius: 5px; border: 1px solid var(--line-strong); background: #fff; color: var(--faint);
  font: inherit; font-size: 8.5px; font-weight: 800; cursor: pointer;
}
.gsheet .tv.on { background: var(--u-600); border-color: var(--u-600); color: #fff; }
.gsheet .tv:disabled { cursor: not-allowed; }
.gsheet .no-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; height: 32px; padding: 0; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 10px; font-weight: 800; color: var(--muted);
}
.st { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.st.saved { background: #10B981; }
.st.incomplete { background: #fff; box-shadow: inset 0 0 0 1.5px #94A3B8; }
.st.dirty, .st.saving, .st.new { background: #F59E0B; }
.st.error, .st.conflict { background: #F43F5E; }
.st.lock { background: var(--u-500); }
.gsheet tbody.is-err td { background: #FFF8F9; }
.gsheet tbody.is-lock td { background: #FBFAFE; }
.gsheet tr.msg td { height: auto; padding: 4px 6px; background: #FFF8F9; color: var(--merah); font-size: 11.5px; font-weight: 700; white-space: normal; }
.link-btn { border: 0; background: none; padding: 0; color: var(--u-700); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.gs-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 7px 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.gs-legend span { display: inline-flex; align-items: center; gap: 4px; }
.act-list { display: grid; gap: 8px; }
@media (min-width: 720px) {
  .gsheet { font-size: 13.5px; }
  .gsheet th { font-size: 11px; padding: 8px; }
  .gsheet td { height: 39px; }
  .gsheet .cell { height: 38px; padding: 0 8px; font-size: 13.5px; }
  .gsheet select.cell:not(.c) {
    padding-right: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239C97AD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center;
  }
  .gsheet .no-btn { height: 38px; font-size: 11px; }
  .gsheet .tv { width: 26px; height: 22px; font-size: 10px; margin-right: 6px; }
}

/* Penyesuaian lebar kolom setelah uji di 375 px */
.gsheet col.c-no { width: 5%; }
.gsheet col.c-ae { width: 21%; }
.gsheet col.c-pkg { width: 19%; }
.gsheet col.c-biaya { width: 15%; }
.gsheet col.c-bagi { width: 7.5%; }
.gsheet col.c-tgl { width: 8%; }
.gsheet col.c-id { width: 24.5%; }
.gsheet .cell { padding: 0 3px; }
.gsheet th { padding: 6px 3px; }
.gsheet th.c, .gsheet th.no { letter-spacing: 0; }
.gsheet .tv { width: 17px; height: 16px; font-size: 7.5px; margin-right: 2px; border-radius: 4px; }
@media (max-width: 640px) {
  .topbar .t-title { visibility: hidden; }
  .dash-stats .ds { padding: 6px 9px; }
  .dash-stats .ds .s { display: none; }
  .dash-stats .ds b { font-size: 14px; }
}
@media (min-width: 720px) {
  .gsheet .cell { padding: 0 8px; }
  .gsheet th { padding: 8px; }
  .gsheet .tv { width: 26px; height: 22px; font-size: 10px; margin-right: 6px; border-radius: 5px; }
}
@media (max-width: 640px) {
  .gsheet col.c-no { width: 5%; }
  .gsheet col.c-ae { width: 20.5%; }
  .gsheet col.c-pkg { width: 20%; }
  .gsheet col.c-biaya { width: 14%; }
  .gsheet col.c-bagi { width: 8.5%; }
  .gsheet col.c-tgl { width: 7.5%; }
  .gsheet col.c-id { width: 24.5%; }
  .gsheet th { font-size: 9px; letter-spacing: 0; }
}

/* Sel AE di HP: tampil nama singkat; ketuk membuka daftar lengkap (select transparan di atasnya) */
.gsheet td.ov { position: relative; }
.gsheet .cell-label { display: none; }
@media (max-width: 719px) {
  .gsheet .cell, .gsheet .cell-label { font-size: 11px; }
  .gsheet .cell-label { display: block; padding: 0 3px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); pointer-events: none; }
  .gsheet .cell-label.ph { color: var(--faint); }
  .gsheet .ov-select { position: absolute; inset: 0; height: 100%; opacity: 0; }
  .gsheet td.ov:focus-within { box-shadow: inset 0 0 0 2px var(--u-500); }
  .gsheet td.ov-err { box-shadow: inset 0 0 0 2px var(--merah); background: #FFF5F7; }
}
@media (max-width: 640px) {
  .gsheet col.c-ae { width: 19%; }
  .gsheet col.c-biaya { width: 15.5%; }
}
.gsheet th.wrap { white-space: normal; line-height: 1.15; }
@media (max-width: 640px) {
  .gsheet col.c-no { width: 4.5%; }
  .gsheet col.c-pkg { width: 20.5%; }
  .gsheet th.c { padding-left: 1px; padding-right: 1px; }
  .gsheet .tv { width: 15px; margin-right: 2px; }
  .gsheet .pkg .cell { padding-right: 2px; }
}
/* Judul kolom pendek sampai layar cukup lebar untuk "Pembagian"/"Tanggal" */
@media (max-width: 1099px) { .gsheet .hide-sm { display: none !important; } .gsheet .show-sm { display: inline; } }
@media (min-width: 720px) {
  .gsheet col.c-no { width: 4%; }
  .gsheet col.c-ae { width: 24%; }
  .gsheet col.c-pkg { width: 19%; }
  .gsheet col.c-biaya { width: 13%; }
  .gsheet col.c-bagi { width: 10%; }
  .gsheet col.c-tgl { width: 9%; }
  .gsheet col.c-id { width: 21%; }
}

/* Kolom Hapus (Revisi 05) — HP portrait tetap tanpa geser horizontal */
.gsheet col.c-no { width: 4%; }
.gsheet col.c-ae { width: 19%; }
.gsheet col.c-pkg { width: 20%; }
.gsheet col.c-biaya { width: 15%; }
.gsheet col.c-bagi { width: 8%; }
.gsheet col.c-tgl { width: 7%; }
.gsheet col.c-id { width: 22%; }
.gsheet col.c-del { width: 5%; }
.gsheet th.del { text-align: center; padding-left: 1px; padding-right: 1px; }
.gsheet th.del svg { width: 12px; height: 12px; vertical-align: -2px; }
.gsheet td.del { text-align: center; }
.gs-legend .gs-hint { display: block; flex-basis: 100%; }
.gsheet .del-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 32px;
  padding: 0; border: 0; background: transparent; color: var(--merah); cursor: pointer;
}
.gsheet .del-btn svg { width: 14px; height: 14px; }
.gsheet .del-btn:hover, .gsheet .del-btn:focus-visible { background: var(--merah-bg); outline: none; }
.gsheet .del-btn:disabled { color: var(--line-strong); background: transparent; cursor: not-allowed; }
@media (min-width: 720px) {
  .gsheet col.c-no { width: 4%; }
  .gsheet col.c-ae { width: 25%; }
  .gsheet col.c-pkg { width: 18%; }
  .gsheet col.c-biaya { width: 13%; }
  .gsheet col.c-bagi { width: 8%; }
  .gsheet col.c-tgl { width: 8%; }
  .gsheet col.c-id { width: 18%; }
  .gsheet col.c-del { width: 6%; }
  .gsheet .del-btn { height: 38px; }
  .gsheet .del-btn svg { width: 16px; height: 16px; }
  .gsheet th.del svg { width: 14px; height: 14px; }
}

/* =====================================================================
   REVISI 02 — tabel Perhitungan & Settlement (header bertingkat)
   ===================================================================== */
.hscroll { overscroll-behavior-x: contain; }
.zoom { display: inline-flex; gap: 4px; }
.calc { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 11.5px; color: var(--text); }
.calc th, .calc td {
  padding: 5px 6px; white-space: nowrap; background: #fff;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.calc thead th { background: var(--u-50); color: var(--u-800); font-size: 9.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; text-align: left; }
.calc .r { text-align: right; font-variant-numeric: tabular-nums; }
.calc .c { text-align: center; }
.calc td.strong { font-weight: 800; }
.calc tr.t1 th { background: var(--u-800); color: #fff; font-size: 12px; text-transform: none; letter-spacing: 0; border-color: var(--u-800); }
.calc tr.t2 th { background: var(--u-100); color: var(--u-800); font-size: 11px; text-transform: none; letter-spacing: 0; }
.calc tr.t1 th, .calc tr.t2 th { position: sticky; left: 0; }
/* kolom identitas tetap terlihat saat tabel digeser */
.calc .sk { position: sticky; z-index: 2; }
.calc .sk1 { left: 0; width: 30px; min-width: 30px; max-width: 30px; }
.calc .sk2 { left: 30px; min-width: 86px; max-width: 120px; box-shadow: 4px 0 6px -4px rgba(23, 19, 31, .18); }
.calc thead .sk { z-index: 3; }
.calc td.idc { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.calc td.idc small { display: block; font-weight: 600; font-size: 9.5px; color: var(--faint); }
.calc .tvb { margin-left: 4px; padding: 0 4px; border-radius: 4px; background: var(--u-600); color: #fff; font-size: 8.5px; }
/* warna halus per kelompok */
.calc th.g-asm { background: #EDE7FF; color: var(--u-800); }
.calc td.g-asm { background: #F8F6FF; }
.calc th.g-ae { background: #D9F4E8; color: #065F46; }
.calc td.g-ae { background: #F3FCF8; }
.calc th.g-tam { background: #FCEFC7; color: #92400E; }
.calc td.g-tam { background: #FFFAEE; }
.calc td.tap { cursor: pointer; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
.calc tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1.5px solid var(--line-strong); }
.calc tfoot td.g-asm { background: #F1EDFF; } .calc tfoot td.g-ae { background: #E9F8F1; } .calc tfoot td.g-tam { background: #FFF4D9; }
.calc tr.row-err td { background: #FFF8F9; }
@media (min-width: 720px) {
  .calc { font-size: 13px; }
  .calc th, .calc td { padding: 7px 9px; }
  .calc thead th { font-size: 10.5px; }
  .calc .sk1 { width: 40px; min-width: 40px; max-width: 40px; }
  .calc .sk2 { left: 40px; min-width: 110px; }
}
/* Rincian New SA ringkas */
.blk { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.blk-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--u-700); }
.blk-h b { font-size: 15px; letter-spacing: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.blk .kv { margin-top: 2px; }
.hak { display: grid; gap: 8px; margin-top: 14px; }
.hak-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; }
.hak-row.ae { background: #ECFDF5; border: 1px solid #A7F3D0; }
.hak-row.asm { background: var(--u-50); border: 1px solid var(--u-200); }
.hak-row b { display: block; font-size: 13px; }
.hak-row small { display: block; font-size: 11px; color: var(--muted); }
.hak-row > span { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hak-row.ae > span { color: var(--hijau); }
.hak-row.asm > span { color: var(--u-700); }
.calc tr.t1 th, .calc tr.t2 th { position: static; }
.calc .stick { position: sticky; left: 8px; display: inline-block; }
.calc th.wrap2 { white-space: normal; line-height: 1.15; min-width: 52px; }
/* Halaman Hitung lebih ringkas di HP */
@media (max-width: 640px) {
  .hitung .page-head .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .hitung .toolbar { gap: 8px; }
  .hitung .toolbar .field > label { font-size: 11px; }
  .hitung .toolbar .select { height: 38px; font-size: 14px; }
  .hitung > .card, .hitung .card { padding: 12px; }
  .hitung .stat { padding: 8px 10px; }
  .hitung .stat .value { font-size: 16px; }
  .hitung .stat.hero .value { font-size: 20px; }
  .hitung .stat .sub { display: none; }
  .hitung .grid { gap: 8px; }
}
.rpt table.rc th, .rpt table.rc td { padding: 5px 4px; }

/* =====================================================================
   REVISI 06 — menu Pembayaran (status BELUM/LUNAS)
   ===================================================================== */
.bottomnav { grid-template-columns: repeat(6, 1fr); }
.bottomnav a { font-size: 10.5px; letter-spacing: -.01em; white-space: nowrap; }
.bottomnav .nav-ico { width: 40px; }
@media (max-width: 400px) { .bottomnav a { font-size: 10px; letter-spacing: -.02em; } .bottomnav .nav-ico { width: 36px; } }

.pay-cards { display: grid; gap: 8px; }
.pay-card {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 12px 34px 12px 14px; text-align: left; cursor: pointer; font: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
  box-shadow: 0 1px 2px rgba(23, 19, 31, .04);
}
.pay-card:hover { border-color: var(--u-300); }
.pay-card .l { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.pay-card b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-card .chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 22px; line-height: 1; color: var(--faint); }
.pay-card.hero { background: linear-gradient(140deg, var(--u-800), var(--u-600)); border-color: transparent; color: #fff; }
.pay-card.hero .l, .pay-card.hero .chev { color: var(--u-200); }
.pay-card.ok b { color: var(--hijau); }
@media (min-width: 720px) {
  .pay-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .pay-card { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; padding: 16px 34px 16px 16px; min-height: 96px; }
  .pay-card b { font-size: 22px; }
}

.pay-list .card-head { align-items: center; }
.pay-sum { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.pay-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.pay-ae { border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px 6px; }
.pay-ae + .pay-ae { margin-top: 8px; }
.pay-ae.is-zero { opacity: .72; }
.pay-ae-h { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0 4px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.pay-ae-h span { font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; align-items: center; gap: 8px; padding: 7px 0; }
.pay-k { min-width: 0; }
.pay-k span { display: block; font-size: 13.5px; font-weight: 800; }
.pay-k small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-v { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.st-btn {
  height: 30px; padding: 0 6px; border-radius: 999px; border: 1.5px solid; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .03em; transition: background .12s, color .12s;
}
.st-btn.belum { background: var(--merah-bg); color: var(--merah); border-color: var(--merah-line); }
.st-btn.lunas { background: var(--hijau); color: #fff; border-color: var(--hijau); }
.st-btn.none { background: var(--surface-2); color: var(--faint); border-color: var(--line); }
.st-btn.wait { opacity: .55; }
.st-btn:disabled { cursor: not-allowed; }
.st-btn:not(:disabled):active { transform: scale(.97); }
.pay-warn { margin: -2px 0 6px; padding: 6px 8px; border-radius: 8px; background: var(--kuning-bg); border: 1px solid var(--kuning-line); color: #78350F; font-size: 11.5px; font-weight: 700; }
.pay-pend { margin: -2px 0 6px; font-size: 11.5px; color: var(--muted); }
.pay-total { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.pay-total b { font-variant-numeric: tabular-nums; }
.pay-tbl td small.st-mini { display: block; font-size: 10px; font-weight: 800; }
.pay-tbl td small.st-mini.ok { color: var(--hijau); }
.pay-tbl td small.st-mini.no { color: var(--merah); }
@media (max-width: 480px) { .pay-tbl { font-size: 12.5px; } .pay-tbl th, .pay-tbl td { padding: 7px 6px; } }
@media (max-width: 640px) {
  .pay-list .card-head { flex-wrap: wrap; }
  .pay-list .card-head > div { flex: 1 1 100%; }
  .pay-list .card-head .select { width: 100%; }
}

/* =====================================================================
   REVISI 07 — Ringkasan UPRES (desain = Insentif New SA) & Settlement uang ASM
   ===================================================================== */
.up-calc { margin-top: 3px; font-size: 12px; color: var(--muted); }
.blk-held .blk-h { color: var(--kuning); }
.hak-row.held { background: var(--kuning-bg); border: 1px dashed var(--kuning-line); }
.hak-row.held > span { color: var(--kuning); }
.set-tbl tr.grp td { background: var(--u-50); color: var(--u-800); font-size: 12.5px; padding-top: 7px; padding-bottom: 7px; white-space: normal; }
.set-tbl tr.grp td .muted { font-weight: 600; }
.set-tbl tr.sub td { background: var(--surface-2); font-weight: 800; font-size: 12.5px; }
.set-tbl td.strong { font-weight: 800; color: var(--u-700); }
.set-tbl tfoot td { color: var(--u-800); }
@media (max-width: 640px) { .set-tbl { font-size: 12.5px; } .set-tbl th, .set-tbl td { padding: 7px 6px; } .set-tbl th { white-space: normal; } }
