/* =====================================================================
   SMART FINANCE DASHBOARD - style.css
   Desain: minimalis, profesional, ramah pemula.
   Satu elemen paling menonjol: kartu Saldo (biru penuh). Sisanya tenang.
   ===================================================================== */

/* ---------- 1. Token desain ---------- */
:root {
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E5EAF3;
  --line-strong: #D5DCE8;

  --primary: #2563EB;
  --primary-700: #1D4ED8;
  --primary-50: #EFF4FF;
  --success: #16A34A;
  --success-700: #15803D;
  --success-50: #E8F7EE;
  --danger: #DC2626;
  --danger-700: #B91C1C;
  --danger-50: #FDECEC;
  --warning: #F59E0B;
  --warning-700: #B45309;
  --warning-50: #FEF5DC;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 264px;
  --shadow: 0 1px 2px rgba(30, 41, 59, 0.04);
  --shadow-pop: 0 12px 40px rgba(30, 41, 59, 0.18);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- 2. Reset dan dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 3. Kerangka aplikasi ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 20px 14px 14px;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 17px;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; line-height: 1.2; }
.brand-tag { font-size: 12px; color: var(--muted); }

.nav-group { margin-bottom: 14px; }
.nav-title { padding: 0 12px 6px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px;
  transition: background 0.15s, color 0.15s;
}
.nav-link i { width: 18px; text-align: center; font-size: 15px; }
.nav-link:hover { background: #F1F5FB; color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary-50); color: var(--primary); }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: 14px;
}
.user-meta { min-width: 0; }
.user-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.overlay { display: none; }

.main { min-width: 0; padding: 0 32px 56px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0 14px; margin-bottom: 8px;
  background: var(--bg);
}
.btn.menu-btn { display: none; } /* .btn.menu-btn: harus lebih spesifik dari .btn agar tidak tertimpa */
.page-title { flex: 1; min-width: 0; }
.page-date { font-size: 13px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.view-head { margin-bottom: 18px; }
.view-head p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 70ch; }

/* ---------- 4. Kartu ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.cards-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.charts-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.charts-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-col { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }

.stat-card .card-head { margin-bottom: 14px; align-items: center; justify-content: flex-start; gap: 12px; }
.stat-card h3 { font-size: 15px; }
.icon-badge {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 15px;
}
.tone-success { background: var(--success-50); color: var(--success-700); }
.tone-primary { background: var(--primary-50); color: var(--primary); }
.tone-danger { background: var(--danger-50); color: var(--danger-700); }
.tone-warning { background: var(--warning-50); color: var(--warning-700); }

.stat-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.stat-list li:first-child { border-top: 0; padding-top: 0; }
.stat-list li span { color: var(--muted); }
.stat-list li strong { font-weight: 700; text-align: right; }

/* Kartu saldo: satu-satunya elemen berwarna penuh */
.balance-card { background: var(--primary); border-color: var(--primary); color: #fff; }
.balance-card h3 { color: #fff; }
.balance-card .icon-badge { background: rgba(255, 255, 255, 0.18); color: #fff; }
.balance-total { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 4px; word-break: break-word; }
.balance-total.negative { color: #FECACA; }
.balance-caption { font-size: 13px; color: rgba(255, 255, 255, 0.78); margin-bottom: 14px; }
.balance-card .stat-list li { border-top-color: rgba(255, 255, 255, 0.2); }
.balance-card .stat-list li span { color: rgba(255, 255, 255, 0.78); }
.balance-card .stat-list li strong { color: #fff; }
.balance-card .link-btn { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.status-row { padding: 10px 0; border-top: 1px solid var(--line); }
.status-row:first-child { border-top: 0; padding-top: 0; }
.status-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.status-row-top > span:first-child { color: var(--muted); }
.status-row-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* ---------- 5. Badge status, progress, chip ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.lg { font-size: 14px; padding: 5px 14px; }
.s-sangat-irit { background: #DCFCE7; color: #166534; }
.s-irit { background: #E8F7EE; color: #15803D; }
.s-cukup-hemat { background: #DBEAFE; color: #1D4ED8; }
.s-hampir-boros { background: var(--warning-50); color: var(--warning-700); }
.s-tidak-irit { background: var(--danger-50); color: var(--danger-700); }
.s-none { background: #EEF2F8; color: #475569; }

.progress { height: 8px; background: #EEF2F8; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; min-width: 0; transition: width 0.4s ease; }
.bar-sangat-irit { background: #15803D; }
.bar-irit { background: #16A34A; }
.bar-cukup-hemat { background: #2563EB; }
.bar-hampir-boros { background: #F59E0B; }
.bar-tidak-irit { background: #DC2626; }
.bar-none { background: #CBD5E1; }

.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #EEF2F8; color: #475569; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

/* ---------- 6. Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 700; font-size: 14.5px; line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-700); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: #F8FAFD; border-color: #C3CCDB; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-700); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn-ghost.loading::after { border-color: rgba(30, 41, 59, 0.2); border-top-color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 7. Formulir ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 13.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 12.5px; color: var(--danger-700); min-height: 0; }
.field-error:empty { display: none; }

input[type='text'], input[type='email'], input[type='password'], input[type='date'],
input[type='number'], input[type='search'], select, textarea {
  width: 100%; height: 44px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
input[readonly] { background: #F8FAFD; color: var(--muted); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error select:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.input-prefix { position: relative; }
.input-prefix > span {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-weight: 600; pointer-events: none;
}
.input-prefix input { padding-left: 40px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
details.advanced { margin-top: 10px; }
details.advanced summary { cursor: pointer; font-size: 13.5px; color: var(--primary); font-weight: 600; }
details.advanced .form-grid { margin-top: 12px; }

/* ---------- 8. Tabel ---------- */
/* position: relative menahan teks .sr-only (posisi absolut) di dalam pembungkus,
   sehingga tidak melebarkan halaman di layar sempit. */
.table-wrap { position: relative; overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 14px; }
table.data th {
  text-align: left; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover td { background: #F8FAFD; }
table.data tfoot td { font-weight: 700; border-bottom: 0; background: #F8FAFD; }
table.data .num-col { text-align: right; white-space: nowrap; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions .btn + .btn { margin-left: 4px; }
.tx-name { font-weight: 600; }
.tx-note { font-size: 12.5px; color: var(--muted); max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt-in { color: var(--success-700); font-weight: 700; }
.amt-out { color: var(--text); font-weight: 700; }
.amt-neg { color: var(--danger-700); font-weight: 700; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pager .pager-btns { display: flex; gap: 6px; }

/* ---------- 9. Filter, toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.toolbar .field { min-width: 150px; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.date-nav { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }

/* ---------- 10. Metrik laporan ---------- */
.metric-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.metric-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-top: 4px; word-break: break-word; }
.metric-value.sm { font-size: 16px; }
.metric-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.metric.accent { background: var(--primary-50); border-color: #D6E3FF; }

.status-panel { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.status-panel .status-main { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 170px; }
.status-pct { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.status-text { flex: 1 1 300px; min-width: 0; }
.status-text dt { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.status-text dt:first-child { margin-top: 0; }
.status-text dd { margin: 2px 0 0; }
.status-panel .progress { width: 100%; }

.compare-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trend { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.trend.up { color: var(--danger-700); }
.trend.down { color: var(--success-700); }
.trend.flat { color: var(--muted); }

/* ---------- 11. Grafik ---------- */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 240px; }
.chart-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; color: var(--muted); font-size: 14px; padding: 16px;
}
.chart-empty i { font-size: 22px; color: var(--faint); }

/* ---------- 12. Notifikasi, alert, modal ---------- */
#alert-area { display: grid; gap: 10px; margin-bottom: 16px; }
#alert-area:empty { display: none; }
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius); border: 1px solid; font-size: 14px;
}
.alert i { margin-top: 3px; }
.alert-info { background: var(--primary-50); border-color: #CFE0FF; color: #1E3A8A; }
.alert-success { background: var(--success-50); border-color: #BFE8CE; color: #14532D; }
.alert-warning { background: var(--warning-50); border-color: #F8DE9B; color: #78350F; }
.alert-danger { background: var(--danger-50); border-color: #F8C4C4; color: #7F1D1D; }

#toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px;
  padding: 12px 14px; box-shadow: var(--shadow-pop); font-size: 14px;
  animation: toast-in 0.22s ease-out;
}
.toast i { margin-top: 3px; }
.toast-success { border-left-color: var(--success); } .toast-success i { color: var(--success); }
.toast-error { border-left-color: var(--danger); } .toast-error i { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); } .toast-warning i { color: var(--warning-700); }
.toast-info { border-left-color: var(--primary); } .toast-info i { color: var(--primary); }
.toast.leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 150; background: rgba(15, 23, 42, 0.45);
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
}
.modal {
  width: min(100%, 560px); max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-pop);
}
.modal.small { width: min(100%, 420px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal p { color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty i { font-size: 26px; color: var(--faint); margin-bottom: 10px; display: block; }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

.recent-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.recent-list li:first-child { border-top: 0; padding-top: 0; }
.recent-list .recent-main { flex: 1; min-width: 0; }
.recent-list .recent-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-list .recent-meta { font-size: 12.5px; color: var(--muted); }

.insight-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.insight-list li:first-child { border-top: 0; padding-top: 0; }
.insight-list i { margin-top: 4px; width: 18px; text-align: center; color: var(--primary); }

.range-table td:first-child { font-weight: 600; white-space: nowrap; }
.range-table td:nth-child(2) { white-space: nowrap; }

/* ---------- 13. Layar muat dan banner konfigurasi ---------- */
#loading-screen {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--muted);
}
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #DCE4F2; border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
.config-banner {
  position: relative; z-index: 250; padding: 14px 20px; background: var(--warning-50); color: #78350F;
  border-bottom: 1px solid #F8DE9B; font-size: 14px;
}
.config-banner code { background: rgba(0, 0, 0, 0.06); padding: 1px 6px; border-radius: 4px; }

/* ---------- 14. Halaman login dan registrasi ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-aside {
  background: var(--primary); color: #fff; padding: 56px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-aside .brand-mark { background: rgba(255, 255, 255, 0.18); }
.auth-aside h2 { font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; max-width: 14ch; }
.auth-points { display: grid; gap: 16px; margin-top: 28px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; color: rgba(255, 255, 255, 0.9); }
.auth-points i { margin-top: 4px; width: 18px; text-align: center; }
.auth-main { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(100%, 420px); }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .auth-switch { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.form-message { padding: 10px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.form-message.error { background: var(--danger-50); border-color: #F8C4C4; color: #7F1D1D; }
.form-message.success { background: var(--success-50); border-color: #BFE8CE; color: #14532D; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-wrap .toggle-pw {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 8px;
}
.password-wrap .toggle-pw:hover { background: #F1F5FB; }

/* ---------- 15. Responsif ---------- */
@media (max-width: 1280px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 120;
    transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: none; }
  .overlay.show { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(15, 23, 42, 0.4); }
  .btn.menu-btn { display: inline-flex; }
  .main { padding: 0 20px 48px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .charts-grid, .charts-grid.three { grid-template-columns: minmax(0, 1fr); }
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { padding: 28px 24px; gap: 20px; }
  .auth-aside h2 { font-size: 24px; max-width: none; }
  .auth-points { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .main { padding: 0 14px 40px; }
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar .field { min-width: 0; flex: 1 1 140px; }
  .toolbar .toolbar-actions { margin-left: 0; width: 100%; }
  .toolbar .toolbar-actions .btn { flex: 1; }
  .balance-total { font-size: 26px; }
  #toast-container { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
  .modal { padding: 18px; }
  .status-pct { font-size: 28px; }
}
