/* =====================================================
   Pencatatan Uang — Mobile-first CSS
   Breakpoints: 320 → 375 → 414 → 768 → 1024
   ===================================================== */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --income: #16a34a;
  --expense: #dc2626;
  --bg: #f4f5fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.05);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  font-size: 16px;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overscroll-behavior-y: none;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------------- Layout shell ---------------- */
.app {
  min-height: 100vh;
}
.sidebar {
  display: none;
}
.content {
  padding: 0 12px calc(96px + var(--sab));
  max-width: 720px;
  margin: 0 auto;
}
.page {
  padding-top: 12px;
}

/* Topbar mobile */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + var(--sat)) 14px 10px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow);
}
.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.topbar .icon-btn {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

/* FAB */
.fab {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: calc(76px + var(--sab));
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  font-weight: 300;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.fab:active {
  transform: scale(0.92);
  background: var(--primary-dark);
}

/* Bottom nav */
.bottomnav {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + var(--sab));
}
.bottomnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}
.bottomnav-item .bn-icon {
  font-size: 1.25rem;
}
.bottomnav-item.active {
  color: var(--primary);
  font-weight: 600;
}
.bottomnav-gap {
  pointer-events: none;
}

/* ---------------- Cards & common ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 232, 240, 0.7);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-head h2 {
  font-size: 1rem;
}
.card-title {
  font-size: 1rem;
  margin-bottom: 12px;
}
.section-title {
  font-size: 0.95rem;
  margin: 18px 4px 10px;
  color: var(--muted);
}
.link {
  font-size: 0.82rem;
}
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 6px 0;
}
.empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 18px 6px;
}

/* Balance hero */
.balance-card {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border: none;
  padding: 20px;
}
.balance-card.small {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.balance-card.small .stat-value {
  color: var(--text);
}
.balance-card.small .stat-value.income {
  color: var(--income);
}
.balance-card.small .stat-value.expense {
  color: var(--expense);
}
.balance-label {
  font-size: 0.78rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.balance-amount {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0 14px;
  letter-spacing: 0.3px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 480px) {
  .stat-row.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Kartu ringkasan hari ini */
.today-card {
  margin-top: 14px;
}
.today-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.today-label {
  font-weight: 700;
  font-size: 0.9rem;
}
.today-net {
  font-weight: 800;
  font-size: 0.95rem;
}
.today-net.income {
  color: var(--income);
}
.today-net.expense {
  color: var(--expense);
}
.today-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.today-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.today-item small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.today-item strong {
  font-size: 1.05rem;
}
.today-item strong.income {
  color: var(--income);
}
.today-item strong.expense {
  color: var(--expense);
}
.stat {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px;
}
.balance-card.small .stat {
  background: var(--bg);
}
.stat-label {
  display: block;
  font-size: 0.68rem;
  opacity: 0.8;
  margin-bottom: 2px;
}
.stat-value {
  font-weight: 700;
  font-size: 0.95rem;
}
.stat-value.income {
  color: #a7f3d0;
}
.stat-value.expense {
  color: #fecaca;
}

/* Chips / toolbar */
.toolbar,
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.toolbar::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--text);
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.radio-chip input {
  accent-color: var(--primary);
  margin-right: 6px;
}

/* Forms */
.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 14px;
  font-size: 0.88rem;
}
.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform 0.1s ease,
    opacity 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:active {
  background: var(--primary-dark);
}
.btn-lg {
  padding: 15px 24px;
  font-size: 1rem;
  width: 100%;
}
.btn-block {
  width: 100%;
}
.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #fecaca;
}
.btn.sm {
  padding: 7px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
}
.icon-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: inherit;
  padding: 8px;
  border-radius: 10px;
}
.inline {
  display: inline;
}

/* Alerts */
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
  font-size: 0.88rem;
}
.alert-success {
  background: #dcfce7;
  color: #14532d;
}
.alert-error {
  background: #fee2e2;
  color: #7f1d1d;
}

/* Transaction list */
.tx-list {
  list-style: none;
}
.tx-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 4px 6px;
  border-top: 1px dashed var(--border);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.tx-date-total {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.tx-date-total.income {
  color: var(--income);
}
.tx-date-total.expense {
  color: var(--expense);
}
.tx-list .tx-date:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 2px;
}
.tx-item {
  display: flex;
  align-items: center;
  border-radius: 12px;
}
.tx-item:hover {
  background: #f8fafc;
}
.tx-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
}
.tx-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.tx-info {
  flex: 1;
  min-width: 0;
}
.tx-info strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-info small {
  color: var(--muted);
  font-size: 0.74rem;
}
.tx-amount {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.tx-amount.income {
  color: var(--income);
}
.tx-amount.expense {
  color: var(--expense);
}
.tx-amount.transfer {
  color: #7c3aed;
}
.tx-del {
  color: #cbd5e1;
  padding: 10px 6px;
}
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.day-head h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.day-total {
  font-size: 0.85rem;
  font-weight: 700;
}
.day-total.income {
  color: var(--income);
}
.day-total.expense {
  color: var(--expense);
}
.summary-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
}
.pill {
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.pill.income {
  color: var(--income);
}
.pill.expense {
  color: var(--expense);
}

/* Progress */
.progress {
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress.big {
  height: 12px;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--income);
  transition: width 0.3s;
}
.progress-bar.ok {
  background: var(--income);
}
.progress-bar.caution {
  background: #fbbf24;
}
.progress-bar.warning {
  background: var(--warning);
}
.progress-bar.danger {
  background: var(--danger);
}
.budget-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.budget-nums {
  font-weight: 600;
}
.budget-label {
  color: var(--muted);
}
.budget-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  margin-bottom: 6px;
}
.budget-name {
  display: block;
  font-size: 0.95rem;
}
.budget-head small {
  color: var(--muted);
  font-size: 0.74rem;
}
.budget-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
}
.budget-stats strong {
  color: var(--text);
}
.budget-stats strong.income {
  color: var(--income);
}
.budget-stats strong.expense {
  color: var(--expense);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  vertical-align: middle;
  margin-left: 4px;
}
.badge.gray {
  background: #f1f5f9;
  color: var(--muted);
}
.badge.ok {
  background: #dcfce7;
  color: var(--income);
}
.badge.warning {
  background: #fef3c7;
  color: #b45309;
}
.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

/* Category list (dashboard/report) */
.cat-list {
  list-style: none;
}
.cat-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.cat-list li:last-child {
  border-bottom: none;
}
.cat-name {
  font-size: 0.88rem;
}
.cat-bar {
  grid-column: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.cat-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.cat-bar.income span {
  background: var(--income);
}
.cat-amount {
  grid-row: span 2;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: right;
}
.cat-amount small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

/* Wallets */
.wallet-list {
  list-style: none;
}
.wallet-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.wallet-list strong.wallet-bal {
  margin-left: auto;
}
.wallet-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex: 0 0 40px;
}
.wallet-icon.lg {
  width: 50px;
  height: 50px;
  font-size: 1.4rem;
  flex-basis: 50px;
}
.wallet-cards {
  list-style: none;
}
.wallet-card.muted {
  opacity: 0.55;
}
.wallet-open {
  display: flex;
  gap: 12px;
  align-items: center;
}
.wallet-meta {
  flex: 1;
  min-width: 0;
}
.wallet-meta small {
  color: var(--muted);
}
.wallet-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* Lists */
.simple-list {
  list-style: none;
}
.simple-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.simple-list li:last-child {
  border: none;
}
.simple-list small {
  color: var(--muted);
  font-size: 0.72rem;
  display: block;
}
.cat-manage {
  list-style: none;
}
.cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.cat-children {
  list-style: none;
  margin-left: 18px;
  border-left: 2px solid var(--border);
  padding-left: 12px;
}
.cat-children li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.row-actions.wrap {
  flex-wrap: wrap;
}
.bill-item {
  flex-wrap: wrap;
}

/* Quick amount */
.amount-field .amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px 14px;
}
.amount-field input {
  border: none !important;
  box-shadow: none !important;
  font-size: 1.7rem;
  font-weight: 700;
  padding: 8px 0;
}
.amount-sym {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Category picker chips */
.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.cat-chip {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
}
.cat-chip.sub {
  font-size: 0.78rem;
  padding: 6px 12px;
  color: var(--muted);
}
.cat-chip[data-selected] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Filter card */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 12px;
}
.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px 0 16px;
}

/* Charts */
.chart-wrap {
  position: relative;
  height: 240px;
}
.chart-wrap.donut {
  height: 220px;
  margin-bottom: 10px;
}

/* ---------------- Modal (bottom sheet) ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.modal[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.modal-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + var(--sab));
  max-height: 88vh;
  overflow-y: auto;
  animation: sheet-up 0.22s ease;
}
@keyframes sheet-up {
  from {
    transform: translateY(30%);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 4px auto 10px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.modal-head h3 {
  font-size: 1.05rem;
}

/* Quick-add type tabs */
.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.type-tabs .tab {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 6px;
  font-size: 0.84rem;
  font-weight: 600;
}
.type-tabs .tab.active[data-type="expense"] {
  background: #fee2e2;
  border-color: var(--expense);
  color: var(--expense);
}
.type-tabs .tab.active[data-type="income"] {
  background: #dcfce7;
  border-color: var(--income);
  color: var(--income);
}
.type-tabs .tab.active[data-type="transfer"] {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #7c3aed;
}

/* Grid helpers */
@media (min-width: 600px) {
  .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }
  .col {
    display: grid;
    gap: 0;
  }
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 768px) {
  .filter-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .content {
    max-width: 960px;
  }
}

/* ---------------- Desktop ≥1024: sidebar layout ---------------- */
@media (min-width: 1024px) {
  .app {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 16px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
  }
  .brand-name {
    font-weight: 800;
    font-size: 1.02rem;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
  }
  .nav-item:hover {
    background: var(--bg);
  }
  .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
  }
  .sidebar-foot {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
  .user-chip {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
  }
  .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
  }
  .user-meta {
    line-height: 1.2;
  }
  .user-meta small {
    color: var(--muted);
  }
  .topbar {
    background: #fff;
    color: var(--text);
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    padding: 14px 22px;
  }
  .topbar .icon-btn {
    color: var(--primary);
  }
  .content {
    padding: 0 22px 40px;
  }
  .fab {
    display: none;
  }
  .bottomnav {
    display: none;
  }
}

/* Small screens 320px */
@media (max-width: 359px) {
  .balance-amount {
    font-size: 1.6rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stat-value {
    font-size: 0.82rem;
  }
}

/* =====================================================
   Halaman Auth (Login / Register)
   ===================================================== */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef2ff 0%, #f4f5fb 45%, #ede9fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + var(--sab));
}
.auth-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.auth-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow:
    0 12px 40px rgba(79, 70, 229, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 30px 24px 26px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 22px;
}
.auth-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}
.auth-logo h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.auth-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}
.auth-form .field {
  margin-bottom: 14px;
}
.auth-form .btn {
  margin-top: 6px;
}
.auth-alt {
  text-align: center;
  font-size: 0.87rem;
  margin-top: 16px;
  color: var(--muted);
}
.auth-alt a {
  font-weight: 700;
}
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 16px;
}

@media (max-width: 359px) {
  .auth-card {
    padding: 24px 16px 20px;
  }
}
