/* =========================================================================
   LEDGER — Sales & Stock Tracker
   Visual identity: a real bookkeeper's ledger. Warm paper, deep ink-green,
   ruled hairlines, monospace figures for money. Restrained, precise, calm.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============ Tokens ============ */
:root {
  /* Brand — #2F6F5E / #C77B3F are load-bearing: they're hardcoded in the
     canvas chart in app.js, so the palette is built to match them exactly. */
  --teal: #2F6F5E;
  --teal-deep: #1E4B3E;
  --teal-soft: #E3EEE9;
  --teal-line: #BFDBD0;

  --amber: #C77B3F;
  --amber-deep: #9C5E2C;
  --amber-soft: #F6E7D6;

  --brick: #AF4030;
  --brick-deep: #8E3226;
  --brick-soft: #F5E0DC;

  --paper: #FAF6EC;
  --paper-raised: #FFFFFF;
  --paper-sunken: #F2EDE0;

  --ink: #1E241F;
  --ink-soft: #6C7268;
  --ink-faint: #97998D;

  --line: #E4DEC9;
  --line-strong: #D6CEB2;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(30, 36, 31, 0.06), 0 1px 1px rgba(30, 36, 31, 0.04);
  --shadow-md: 0 4px 14px rgba(30, 36, 31, 0.08), 0 1px 3px rgba(30, 36, 31, 0.06);
  --shadow-lg: 0 16px 40px rgba(30, 36, 31, 0.14), 0 4px 12px rgba(30, 36, 31, 0.08);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Reset & base ============ */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; }
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
::selection { background: var(--teal-soft); color: var(--teal-deep); }

/* Focus visibility — accessibility floor */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Faint ruled-ledger texture behind the whole app, echoing paper lines */
#app {
  min-height: 100vh;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 35px,
    rgba(214, 206, 178, 0.35) 36px
  );
  display: none;
}
#app.ready { display: block; }

/* ============ Brand mark ============ */
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-deep) 100%);
  display: inline-block;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  transform: rotate(-8deg);
}
.brand, .login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.login-brand { color: var(--teal-deep); font-size: 19px; margin-bottom: 28px; }

/* ============ Login / setup ============ */
.login-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 550px at 12% -10%, var(--teal-soft) 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 110%, var(--amber-soft) 0%, transparent 50%),
    var(--paper);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 34px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}
.login-card h1 {
  font-size: 23px;
  margin-bottom: 6px;
}
.login-card .sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: 26px;
}
.login-error {
  display: none;
  background: var(--brick-soft);
  color: var(--brick-deep);
  border: 1px solid #E7C3BA;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.login-error.show { display: block; }

/* ============ Fields (shared: login + modals) ============ */
.field label, .field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field input:hover, .field select:hover { border-color: var(--ink-faint); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.field input::placeholder { color: var(--ink-faint); }
.field.full { grid-column: 1 / -1; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  transition: transform 0.1s var(--ease), border-color 0.15s var(--ease),
              background 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-faint); background: var(--paper-sunken); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 1px 2px rgba(30, 75, 62, 0.25);
}
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }

.btn-secondary {
  background: var(--paper-raised);
  border-color: var(--teal);
  color: var(--teal-deep);
}
.btn-secondary:hover { background: var(--teal-soft); }

.btn-danger {
  background: transparent;
  border-color: transparent;
  color: var(--brick-deep);
}
.btn-danger:hover { background: var(--brick-soft); border-color: #E7C3BA; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
}
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 6px; }

/* ============ Mobile topbar ============ */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-md);
}
.mobile-topbar .brand { color: #fff; }
.mobile-topbar .brand-mark {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.mobile-topbar .brand-mark::after { border-color: #fff; }

/* ============ Shell / Sidebar ============ */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, var(--teal-deep) 0%, #17362C 100%);
  color: #EDF3EF;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  color: #fff;
  padding: 4px 10px 26px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 3px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(237, 243, 239, 0.72);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item .ic {
  font-size: 13px;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}
/* Signature: ledger-tab notch on the active section, like a book divider */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--amber);
  border-radius: 0 3px 3px 0;
}
.sidebar-foot {
  margin-top: auto;
  padding: 16px 14px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: rgba(237, 243, 239, 0.55);
  line-height: 1.6;
}
.sidebar-foot .who {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  margin: 3px 0 10px;
}
.sidebar-foot button {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(237, 243, 239, 0.85);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s var(--ease);
}
.sidebar-foot button:hover { background: rgba(255, 255, 255, 0.08); }

/* ============ Main / views ============ */
.main {
  padding: 30px 36px 60px;
  max-width: 1180px;
}
.view { display: none; }
.view.active { display: block; animation: rise 0.25s var(--ease); }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 26px;
  margin-bottom: 4px;
}
.page-head p {
  color: var(--ink-soft);
  font-size: 13.5px;
}
.page-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============ Dashboard: stat grid ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.stat-card .value {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-card .value.teal { color: var(--teal); }
.stat-card .value.amber { color: var(--amber-deep); }
.stat-card .value.brick { color: var(--brick); }
.stat-card .hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* ============ Dashboard: chart + collected cards ============ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h3 {
  font-size: 15.5px;
}

.segmented {
  display: inline-flex;
  background: var(--paper-sunken);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.segmented button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.segmented button.active {
  background: var(--paper-raised);
  color: var(--teal-deep);
  box-shadow: var(--shadow-sm);
}

.chart-wrap { width: 100%; }
.chart-wrap canvas { display: block; width: 100%; }
.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--ink-soft);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.collected-card { display: flex; flex-direction: column; }
.collect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}
.collect-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
}
.collect-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.collect-bar {
  height: 7px;
  background: var(--paper-sunken);
  border-radius: 4px;
  overflow: hidden;
}
.collect-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber));
  border-radius: 4px;
}
.collect-amount {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.collect-method {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-left: 4px;
}
.collect-sale-info { color: var(--ink-soft); }

/* ============ Empty state ============ */
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
  background: var(--paper-raised);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}
.empty .ic {
  font-size: 22px;
  color: var(--teal);
  margin-bottom: 8px;
}

/* ============ Slips (products / sales / collected / defects / staff) ============ */
.slip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 15px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
  flex-wrap: wrap;
}
.slip:hover { box-shadow: var(--shadow-md); }

.slip.status-paid    { border-left-color: var(--teal); }
.slip.status-partial { border-left-color: var(--amber); }
.slip.status-unpaid   { border-left-color: var(--brick); }

.slip-main { flex: 1; min-width: 240px; }
.slip-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.slip-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.slip-sub span { white-space: nowrap; }
.slip-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.slip-amounts {
  text-align: right;
  min-width: 130px;
}
.slip-amounts .total {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.slip-amounts .remaining {
  font-size: 12px;
  font-weight: 600;
  color: var(--brick);
  margin-top: 2px;
}
.slip-amounts .remaining.zero { color: var(--teal); }

/* ============ Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 9px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  background: var(--paper-sunken);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
.badge.pickup, .badge.paid, .badge.resolved, .badge.cash {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: var(--teal-line);
}
.badge.unpaid, .badge.open {
  background: var(--brick-soft);
  color: var(--brick-deep);
  border-color: #E7C3BA;
}
.badge.parcel, .badge.partial, .badge.online {
  background: var(--amber-soft);
  color: var(--amber-deep);
  border-color: #E9C9A0;
}

/* ============ Overlay / Modal ============ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 21, 0.5);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 0.15s var(--ease);
}
.overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s var(--ease);
}
.modal.wide { max-width: 640px; }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper-raised);
  z-index: 2;
}
.modal-head h3 {
  font-size: 17px;
}
.modal-close {
  border: none;
  background: var(--paper-sunken);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.modal-close:hover { background: var(--brick-soft); color: var(--brick-deep); }

.modal form { padding: 20px 22px 22px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ============ Toggle rows (segmented choice inputs) ============ */
.toggle-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.toggle-row button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s var(--ease);
}
.toggle-row button:hover { border-color: var(--ink-faint); }
.toggle-row button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 1px 2px rgba(30, 75, 62, 0.25);
}
.toggle-row button.amber-active.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
  box-shadow: 0 1px 2px rgba(156, 94, 44, 0.25);
}

/* ============ Calc box (sale total / remaining preview) ============ */
.calc-box {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--paper-sunken);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.calc-box .final {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-left: 4px;
}

/* ============ Tables (balance / spreadsheet) ============ */
.balance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--paper-raised);
}
.balance-table th, .balance-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.balance-table th {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--paper-sunken);
  position: sticky;
  top: 0;
}
.balance-table tbody tr:hover { background: var(--teal-soft); }
.balance-table td.mono { color: var(--ink); font-weight: 600; }

#spreadsheetView h3 { color: var(--teal-deep); }

/* ============ Toast ============ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #F4F1E6;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  z-index: 200;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--brick-deep); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-topbar { display: flex; }
  .main { padding: 22px 18px 48px; }
  .page-head { align-items: flex-start; }
  .slip { padding: 14px 16px; }
  .slip-amounts { text-align: left; min-width: 0; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 22px; }
}
