:root {
  --ink: #1e293b;
  --muted: #64748b;
  --line: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.45);
  --glass-strong: rgba(255, 255, 255, 0.65);
  --shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.35);
  --radius: 22px;
  --bon: #f59e0b;
  --bon-bg: rgba(245, 158, 11, 0.16);
  --lunas: #10b981;
  --lunas-bg: rgba(16, 185, 129, 0.16);
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --danger: #ef4444;
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

.panel.editing { border: 2px solid var(--accent) !important; box-shadow: 0 10px 30px -10px rgba(99,102,241,0.4) !important; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(135deg, #e0e7ff 0%, #fbcfe8 40%, #c7d2fe 70%, #a5f3fc 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font-family: inherit; }

/* Blur blobs */
.blobs { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: float 14s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; background: #818cf8; top: -120px; left: -80px; }
.blob.b2 { width: 360px; height: 360px; background: #f472b6; bottom: -100px; right: -60px; animation-delay: -4s; }
.blob.b3 { width: 300px; height: 300px; background: #22d3ee; top: 40%; left: 55%; animation-delay: -8s; opacity: 0.4; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
}

/* ============ Layout ============ */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 50;
  display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--line); box-shadow: 0 0 40px -20px rgba(15,23,42,0.3);
  transition: width .25s ease; overflow: hidden;
}

.sidebar-head { display: flex; align-items: center; gap: 12px; padding: 20px 18px; }
.logo {
  width: 42px; height: 42px; min-width: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.7);
}
.sidebar-head .txt { line-height: 1.1; white-space: nowrap; overflow: hidden; }
.sidebar-head .txt h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; }
.sidebar-head .txt p { color: var(--muted); font-size: 11.5px; font-weight: 500; }

.nav { flex: 1; padding: 8px 12px; overflow-y: auto; overflow-x: hidden; }
.nav-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 14px 12px 6px; white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.nav-item .ico { width: 22px; min-width: 22px; text-align: center; font-size: 17px; }
.nav-item .lbl { overflow: hidden; opacity: 1; transition: opacity .2s; }
.nav-item:hover { background: rgba(255,255,255,0.5); }
.nav-item.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 22px -12px rgba(99,102,241,0.9); }

.sidebar-foot { padding: 14px 12px; border-top: 1px solid var(--line); }
.user-box { display: flex; align-items: center; gap: 10px; padding: 8px; white-space: nowrap; overflow: hidden; }
.avatar { width: 34px; min-width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(99,102,241,0.18); color: var(--accent); font-weight: 800; font-size: 14px; }
.user-box .txt { line-height: 1.1; overflow: hidden; }
.user-box .txt .name { font-weight: 700; font-size: 13px; }
.user-box .txt .role { font-size: 11px; color: var(--muted); }

/* Collapsed state */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar-head { justify-content: center; padding: 20px 0; }
body.sidebar-collapsed .sidebar-head .txt,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-item .lbl,
body.sidebar-collapsed .user-box .txt { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .nav-item .ico { min-width: auto; }
body.sidebar-collapsed .sidebar-foot { display: flex; justify-content: center; }
body.sidebar-collapsed .user-box { padding: 4px; }

.main {
  margin-left: var(--sidebar-w); min-height: 100vh;
  display: flex; flex-direction: column; transition: margin-left .25s ease;
}
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 14px 24px;
  background: rgba(255,255,255,0.35); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.toggle-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); cursor: pointer; display: grid; place-items: center; font-size: 17px; color: var(--ink);
  transition: background .15s, transform .15s;
}
.toggle-btn:hover { background: #fff; transform: translateY(-1px); }
.topbar .title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.topbar .spacer { flex: 1; }
.date-chip {
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
  background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); box-shadow: 0 8px 20px -12px rgba(15,23,42,0.25);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.date-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lunas); }
.logout-btn {
  padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink);
  text-decoration: none; display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.logout-btn:hover { background: #fee2e2; border-color: var(--danger); color: var(--danger); }

.content { padding: 24px; flex: 1; }

/* ============ Glass card ============ */
.glass {
  background: var(--glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel { padding: 24px; }
.panel h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel .sub { color: var(--muted); font-size: 13px; margin: 4px 0 18px; }

/* ============ Summary ============ */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.card { padding: 20px; position: relative; overflow: hidden; }
.card .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; margin-bottom: 12px; }
.card .label { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }
.card .value { font-size: 21px; font-weight: 800; margin-top: 4px; letter-spacing: -0.5px; }
.card.total .icon { background: rgba(99,102,241,0.16); color: var(--accent); }
.card.bon .icon { background: var(--bon-bg); color: var(--bon); }
.card.lunas .icon { background: var(--lunas-bg); color: var(--lunas); }
.card.count .icon { background: rgba(14,165,233,0.16); color: #0ea5e9; }

/* ============ Form ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.6); font: inherit; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(99,102,241,0.15); background: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .opt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 13px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); font-weight: 700; font-size: 14px; color: var(--muted); transition: all .18s;
}
.seg input:checked + .opt.bon { background: var(--bon-bg); border-color: var(--bon); color: #b45309; }
.seg input:checked + .opt.lunas { background: var(--lunas-bg); border-color: var(--lunas); color: #047857; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border: none; border-radius: 14px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 28px -12px rgba(99,102,241,0.8);
  transition: transform .12s, box-shadow .18s, filter .18s; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.btn-ghost:hover { background: #fff; }

/* ============ Toolbar / filter ============ */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.toolbar input, .toolbar select {
  padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.6); font: inherit; font-size: 13.5px; color: var(--ink); outline: none;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--accent); }
.toolbar .search { flex: 1; min-width: 160px; }

/* ============ Table ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
thead th {
  text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid rgba(148,163,184,0.3);
}
tbody td { padding: 14px; border-bottom: 1px solid rgba(148,163,184,0.18); font-size: 14px; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,0.35); }
tbody tr:last-child td { border-bottom: none; }
.plat { font-weight: 800; letter-spacing: 0.3px; white-space: nowrap; }
.desc { color: var(--ink); font-weight: 600; max-width: 260px; }
.date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.nominal { font-weight: 800; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge.bon { background: var(--bon-bg); color: #b45309; }
.badge.bon::before { background: var(--bon); }
.badge.lunas { background: var(--lunas-bg); color: #047857; }
.badge.lunas::before { background: var(--lunas); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); cursor: pointer; display: grid; place-items: center;
  font-size: 15px; color: var(--ink); transition: all .15s; text-decoration: none;
}
.icon-btn:hover { background: #fff; transform: translateY(-1px); }
.icon-btn.danger:hover { background: #fee2e2; border-color: var(--danger); color: var(--danger); }
.icon-btn.toggle:hover { background: var(--lunas-bg); border-color: var(--lunas); color: #047857; }
.icon-btn.edit:hover { background: rgba(99,102,241,0.14); border-color: var(--accent); color: var(--accent); }
.icon-btn.check:hover { background: var(--lunas-bg); border-color: var(--lunas); color: #047857; }
.icon-btn.check.paid { background: var(--lunas-bg); border-color: var(--lunas); color: #047857; opacity: 0.85; cursor: default; }

/* ============ Clustered list (transaksi) ============ */
.cluster { display: flex; flex-direction: column; gap: 18px; }
.car-group { overflow: hidden; }
.car-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; user-select: none;
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(139,92,246,0.14));
  border-bottom: 1px solid var(--line);
}
.car-head .plate-badge {
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; letter-spacing: 0.5px;
}
.car-head .car-info { flex: 1; line-height: 1.25; }
.car-head .car-info .plat { font-size: 15px; }
.car-head .car-info .meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.car-head .car-total { text-align: right; line-height: 1.2; }
.car-head .car-total .val { font-weight: 800; font-size: 15px; }
.car-head .car-total .val.bon-val { color: #b45309; }
.car-head .car-total .sub { font-size: 11px; color: var(--muted); font-weight: 600; }
.car-head .chev { transition: transform .25s; font-size: 14px; color: var(--muted); }
.car-totals { display: flex; align-items: center; gap: 20px; }
.car-actions { display: flex; align-items: center; gap: 4px; }
.car-group.open .car-head .chev { transform: rotate(180deg); }
.car-body { display: none; }
.car-group.open .car-body { display: block; }

/* Scroll internal per cluster jika data banyak */
.car-body { max-height: 420px; overflow-y: auto; }
.car-body::-webkit-scrollbar { width: 6px; }
.car-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.2); border-radius: 999px; }
.car-body::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.35); border-radius: 999px; }
.car-body::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.55); }
.icon-btn.print:hover { background: rgba(14,165,233,0.14); border-color: #0ea5e9; color: #0284c7; }

.day-block { padding: 14px 20px; border-top: 1px solid rgba(148,163,184,0.15); }
.day-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 13px; font-weight: 800; color: var(--ink);
}
.day-head .cal { font-size: 15px; }
.day-head .day-total { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.tx { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.55); border: 1px solid var(--line); box-shadow: 0 6px 18px -14px rgba(15,23,42,0.3); margin-bottom: 10px; transition: background .15s, transform .12s, box-shadow .15s; }
.tx:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(15,23,42,0.4); }
.tx .keterangan { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; }
.tx-badges { display: flex; align-items: center; gap: 8px; }
.tx .nominal { font-weight: 800; font-size: 14px; }

/* ============ Mobil cards ============ */
.mobil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mobil-card { padding: 20px; }
.mobil-card .plate { font-size: 17px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 4px; }
.mobil-card .ket { color: var(--muted); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.mobil-card .stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.mobil-card .stats b { color: var(--ink); }
.mobil-card .card-actions { display: flex; gap: 8px; }

/* ============ Flash ============ */
.flash {
  padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 10px; animation: slideDown .3s ease;
}
.flash.success { background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.5); color: #047857; }
.flash.error { background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.5); color: #b91c1c; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.empty p { font-size: 14px; }

/* ============ Modal confirm ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn .15s ease;
}
.modal {
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 22px;
  padding: 28px 24px; width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.5);
  animation: pop .18s ease;
}
.modal-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(245, 158, 11, 0.18); color: var(--bon); font-size: 24px;
}
.modal-msg { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 22px; line-height: 1.5; word-wrap: break-word; }
.modal-input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85); font: inherit; font-size: 13.5px; color: var(--ink);
  outline: none; margin-bottom: 18px; transition: border-color .15s, background .15s;
}
.modal-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.badge.note-badge { background: rgba(99, 102, 241, 0.12); color: var(--accent); font-weight: 600; font-size: 11.5px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions .btn, .modal-actions .btn-ghost { padding: 11px 20px; }
.danger-btn {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 24px -12px rgba(239, 68, 68, 0.8);
}
.danger-btn:hover { filter: brightness(1.05); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* ============ Login ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; padding: 36px 32px; }
.login-card .logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.login-card .logo-row h1 { font-size: 22px; font-weight: 800; }
.login-card .tag { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.login-card .err { padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.5); color: #b91c1c; }
.login-card .hint { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 20px; }
.login-card .hint b { color: var(--ink); }

/* ============ Dashboard misc ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-row .b-label { width: 110px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bar-row .b-track { flex: 1; height: 14px; border-radius: 999px; background: rgba(255,255,255,0.5); overflow: hidden; }
.bar-row .b-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s ease; }
.bar-row .b-val { width: 120px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.recent { list-style: none; }
.recent li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(148,163,184,0.18); }
.recent li:last-child { border-bottom: none; }
.recent .r-main { flex: 1; }
.recent .r-main .t { font-weight: 700; font-size: 13.5px; }
.recent .r-main .s { font-size: 12px; color: var(--muted); }

/* ============ Form grid (form di atas, multi kolom) ============ */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.form-grid .field { margin-bottom: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .submit { grid-column: 1 / -1; display: flex; gap: 10px; }
@media (max-width: 860px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ============ Pagination ============ */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.pagination .page {
  min-width: 36px; height: 36px; padding: 0 6px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: rgba(255,255,255,0.5); font-weight: 700; font-size: 13.5px; color: var(--ink);
  text-decoration: none; cursor: pointer; transition: all .15s;
}
.pagination .page:hover { background: #fff; transform: translateY(-1px); }
.pagination .page.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(99,102,241,0.9); }
.pagination .page.disabled { opacity: 0.4; pointer-events: none; }

/* ============ Scrollable list ============ */
.scroll-list { max-height: 60vh; overflow-y: auto; padding-right: 6px; }
.scroll-list::-webkit-scrollbar { width: 8px; }
.scroll-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.25); border-radius: 999px; }
.scroll-list::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 999px; }
.scroll-list::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.6); }

.dash-scroll { max-height: 260px; overflow-y: auto; padding-right: 6px; }
.dash-scroll::-webkit-scrollbar { width: 6px; }
.dash-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.2); border-radius: 999px; }
.dash-scroll::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.35); border-radius: 999px; }
.dash-scroll::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.55); }

/* ============ Badge lokasi ============ */
.badge.padang { background: rgba(99,102,241,0.16); color: #4338ca; }
.badge.padang::before { background: #6366f1; }
.badge.pekanbaru { background: rgba(20,184,166,0.16); color: #0f766e; }
.badge.pekanbaru::before { background: #14b8a6; }

/* ============ RESPONSIVE (mobile) ============ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 45;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}

@media (max-width: 900px) {
  .sidebar {
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: 0 0 60px -20px rgba(15, 23, 42, 0.5);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }

  /* Drawer selalu full-width di mobile (override collapse) */
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  body.sidebar-collapsed .sidebar-head { justify-content: flex-start; padding: 20px 18px; }
  body.sidebar-collapsed .sidebar-head .txt,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-item .lbl,
  body.sidebar-collapsed .user-box .txt { display: block; }
  body.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 11px 12px; }
  body.sidebar-collapsed .nav-item .ico { min-width: 22px; }
  body.sidebar-collapsed .sidebar-foot { display: block; }
  body.sidebar-collapsed .user-box { padding: 8px; }

  .main, body.sidebar-collapsed .main { margin-left: 0; }

  .sidebar-overlay { display: block; }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }

  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar .title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .date-chip { display: none; }
  .logout-btn span { display: none; }
  .logout-btn { padding: 9px 12px; }

  .content { padding: 16px; }
}

@media (max-width: 720px) {
  .summary { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { padding: 16px; }
  .card .value { font-size: 16px; word-break: break-word; }

  .panel { padding: 18px; }
  .panel .sub { margin-bottom: 14px; }

  .toolbar form { flex-direction: column; }
  .toolbar .search, .toolbar form input, .toolbar form select { width: 100%; flex: none; }
  .toolbar .btn-ghost { width: 100%; justify-content: center; }

  .mobil-grid { grid-template-columns: 1fr; }

  .car-head { flex-wrap: wrap; row-gap: 10px; padding: 14px 16px; }
  .car-head .plate-badge { min-width: 40px; height: 40px; padding: 0 8px; font-size: 13px; }
  .car-head .car-info { flex: 1; }
  .car-head .car-info .plat { display: none; }
  .car-head .chev { order: 2; }
  .car-totals { width: 100%; order: 3; justify-content: space-between; gap: 12px; }
  .car-totals .car-total { text-align: left; }
  .car-totals .car-total:last-child { text-align: right; }
  .car-actions { order: 4; width: 100%; justify-content: flex-end; }

  .day-block { padding: 12px 14px; }
  .day-head { flex-wrap: wrap; row-gap: 4px; }
  .day-head .day-total { width: 100%; margin-left: 0; }

  .tx { flex-wrap: wrap; row-gap: 8px; padding: 12px 14px; }
  .tx .keterangan { flex: 1 1 100%; }
  .tx-badges { flex-wrap: wrap; }
  .tx .nominal { margin-left: auto; }
  .tx .actions { width: 100%; justify-content: flex-end; }

  .scroll-list { max-height: none; overflow: visible; }
  .car-body { max-height: none; }
  .icon-btn { width: 40px; height: 40px; font-size: 16px; }
  .form-grid .submit { flex-direction: column; }
  .form-grid .submit .btn, .form-grid .submit .btn-ghost { width: 100%; justify-content: center; }

  .bar-row { flex-wrap: wrap; row-gap: 6px; }
  .bar-row .b-label { width: 100%; }
  .bar-row .b-val { width: auto; margin-left: auto; }

  .recent li { flex-wrap: wrap; row-gap: 6px; }
  .recent .r-main { flex: 1 1 100%; }
  .recent .nominal { margin-left: auto; }

  .modal-actions { flex-direction: column; }
  .modal-actions .btn, .modal-actions .btn-ghost { width: 100%; }
}

@media (max-width: 420px) {
  .summary { grid-template-columns: 1fr; }
}

/* ============ Setoran (tagihan) ============ */
.card.belum .icon { background: var(--bon-bg); color: var(--bon); }
.card.dibayar .icon { background: var(--lunas-bg); color: var(--lunas); }
.badge.belum_bayar { background: var(--bon-bg); color: #b45309; }
.badge.belum_bayar::before { background: var(--bon); }
.badge.dibayar { background: var(--lunas-bg); color: #047857; }
.badge.dibayar::before { background: var(--lunas); }
.tx-list { padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.tx.paid { background: rgba(16, 185, 129, 0.09); border-color: rgba(16, 185, 129, 0.35); }
.tx.paid .keterangan { color: #047857; }
.icon-btn.check { border-radius: 50%; }
.icon-btn.check:hover { background: var(--lunas-bg); border-color: var(--lunas); color: #047857; }
.icon-btn.check:disabled { cursor: default; }
.icon-btn.check.paid { background: var(--lunas); border-color: var(--lunas); color: #fff; }
.icon-btn.check.paid:hover { background: #059669; border-color: #059669; color: #fff; }
@media (max-width: 720px) {
  .tx-list { padding: 12px 14px; }
}
