/* Catatan Keuangan — stylesheet tanpa build step
 * Gaya: Minimalism & Swiss — bersih, kontras tinggi, banyak ruang.
 * Warna: biru tepercaya + hijau (pemasukan) + merah (pengeluaran). Font: Plus Jakarta Sans (judul) + Inter (isi).
 */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/jakarta-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/jakarta-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/jakarta-800.woff2") format("woff2"); }

:root {
  /* Netral */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f0;
  --border-strong: #d5dbe5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --placeholder: #94a3b8;
  /* Merek */
  --primary: #1d4ed8;
  --primary-600: #1e40af;
  --primary-50: #eef3ff;
  --primary-100: #dbe6fe;
  --ring: rgba(37, 99, 235, .22);
  --navy: #0f1b3d;
  --navy-2: #1e3a8a;
  /* Semantik */
  --in: #047857;
  --in-solid: #059669;
  --in-bg: #ecfdf5;
  --in-border: #a7f3d0;
  --out: #dc2626;
  --out-solid: #dc2626;
  --out-bg: #fef2f2;
  --out-border: #fecaca;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  /* Bentuk */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .03);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);
  --sidebar: 256px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
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);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01";
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-family: var(--font-head); color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-in { color: var(--in); }
.text-out { color: var(--out); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.flex { display: flex; align-items: center; gap: .5rem; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 24px; color: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-label { padding: 14px 12px 6px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 500; margin-bottom: 2px; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a svg.i { color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav a.active svg.i { color: var(--primary); }
.sidebar .user { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.sidebar .user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); flex: none; }
.sidebar .user b { display: block; color: var(--text); font-weight: 600; }
.sidebar .user button { background: none; border: 0; color: var(--muted); padding: 6px; cursor: pointer; font: inherit; border-radius: 8px; display: inline-flex; }
.sidebar .user button:hover { background: var(--out-bg); color: var(--out); }

.main { margin-left: var(--sidebar); padding: 30px 32px 56px; max-width: calc(1200px + var(--sidebar)); }
.topbar { display: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 18px 16px 112px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border); padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  }
  .topbar .brand { padding: 0; font-size: 1rem; }
  .topbar .brand img { width: 30px; height: 30px; }
  .topbar a.icon-link { color: var(--text-2); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; }
  .topbar a.icon-link:hover { background: var(--surface-2); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; font-weight: 500; color: var(--muted); padding: 6px 0; min-height: 48px; }
  .bottom-nav a.active { color: var(--primary); font-weight: 600; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .fab span {
    width: 52px; height: 52px; margin-top: -26px; border-radius: 18px; background: var(--primary); color: #fff;
    display: grid; place-items: center; box-shadow: 0 8px 20px rgba(29, 78, 216, .35);
  }
  h1 { font-size: 1.35rem; }
}

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px 22px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 > .stat.hero { grid-column: 1 / -1; } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.35rem; font-weight: 700; margin-top: 4px; font-family: var(--font-head); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 42px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
  background: var(--primary); color: #fff; box-shadow: var(--shadow-sm);
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--primary-600); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg.i { width: 18px; height: 18px; }
.btn-light { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-light:hover { background: var(--surface-2); border-color: var(--placeholder); }
.btn-in { background: var(--in-solid); } .btn-in:hover { background: var(--in); }
.btn-out { background: var(--out-solid); } .btn-out:hover { background: #b91c1c; }
.btn-danger-ghost { background: var(--surface); color: var(--out); border-color: var(--out-border); box-shadow: none; }
.btn-danger-ghost:hover { background: var(--out-bg); }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: .82rem; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--muted); cursor: pointer; display: inline-flex; transition: background .2s var(--ease), color .2s var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-in { background: var(--in-bg); color: var(--in); border-color: var(--in-border); }
.badge-out { background: var(--out-bg); color: var(--out); border-color: var(--out-border); }
.badge-primary { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.alert-success { background: var(--in-bg); color: #065f46; border-color: var(--in-border); }
.alert-error { background: var(--out-bg); color: #991b1b; border-color: var(--out-border); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label-text { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 14px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; background: var(--surface);
  color: var(--text); transition: border .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--placeholder); }
.input:where(:disabled) { background: var(--surface-2);
}
textarea.input { min-height: 80px; resize: vertical; }
select.input {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
/* Combobox: ketik untuk mencari / menambah */
.combo { position: relative; }
.combo .input { padding-right: 36px; }
.combo-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: .8rem; }
.combo-list {
  position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto;
}
.combo-list li { padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.combo-list li.active, .combo-list li:hover { background: var(--primary-50); }
.combo-list li.new { color: var(--primary); font-weight: 600; }
.combo-list li mark { background: none; color: inherit; font-weight: 700; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.input.is-invalid { border-color: var(--out); }
.error { color: var(--out); font-size: .8rem; margin-top: 4px; }
.hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.input-money { position: relative; }
.input-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.input-money .input { padding-left: 40px; font-weight: 600; font-variant-numeric: tabular-nums; }
.input-money.lg .input { font-size: 1.4rem; padding-top: 12px; padding-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; min-height: 48px; border: 1.5px solid var(--border-strong);
  border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--muted); margin: 0;
}
.segmented input[value=in]:checked + label { border-color: var(--in); background: var(--in-bg); color: var(--in); }
.segmented input[value=out]:checked + label { border-color: var(--out); background: var(--out-bg); color: var(--out); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { margin: 0; min-width: 140px; flex: 1; }
.filters .actions { display: flex; gap: 8px; }
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.tabs label { padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); margin: 0; }
.tabs input { display: none; }
.tabs input:checked + label { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table .icon-btn { padding: 5px; }
.table .icon-btn svg.i { width: 18px; height: 18px; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbff; }
.table .row-total td { background: var(--surface-2); font-weight: 700; }
.table .row-opening td { background: var(--primary-50); font-weight: 600; }

.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 22px; transition: background .2s var(--ease); border-bottom: 1px solid var(--border); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.dot-in { background: var(--in-bg); color: var(--in); }
.dot-out { background: var(--out-bg); color: var(--out); }
.dot-acc { background: var(--primary-50); color: var(--primary); }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .amount { flex: none; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { color: var(--muted); font-size: .8rem; }

/* BKU: tabel pada desktop, kartu pada mobile */
.ledger-table .table td:nth-child(4) { min-width: 150px; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.ledger-cards { display: none; }
@media (max-width: 760px) {
  .ledger-table { display: none; }
  .ledger-cards { display: block; }
}
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg.i { width: 40px; height: 40px; stroke-width: 1.5; margin-bottom: 8px; }

.summary-bar { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.summary-bar > div { padding: 16px 22px; border-right: 1px solid var(--border); }
.summary-bar > div:last-child { border-right: 0; }
.summary-bar .label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.summary-bar .value { font-weight: 700; font-size: 1.1rem; font-family: var(--font-head); margin-top: 2px; }
@media (max-width: 760px) { .summary-bar { grid-template-columns: 1fr 1fr; } .summary-bar > div:nth-child(2) { border-right: 0; } .summary-bar > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }

dl.details { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; }
dl.details dt { color: var(--muted); font-size: .88rem; }
dl.details dd { margin: 0; font-weight: 500; }
@media (max-width: 560px) { dl.details { grid-template-columns: 1fr; gap: 2px; } dl.details dd { margin-bottom: 10px; } }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Signature pad ---------- */
.sig { border: 1.5px dashed var(--border-strong); border-radius: 12px; background: #fff; position: relative; touch-action: none; }
.sig canvas { width: 100%; height: 180px; display: block; border-radius: 10px; cursor: crosshair; }
.sig .sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--placeholder); pointer-events: none; font-size: .9rem; }
.sig.has-ink .sig-hint { display: none; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---------- Kwitansi ---------- */
.receipt {
  background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 28px 32px; position: relative; overflow: hidden;
  max-width: 820px; margin: 0 auto; box-shadow: var(--shadow);
}
.receipt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(180deg, var(--primary), var(--navy-2)); }
.receipt-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 18px; }
.receipt-head .org { font-weight: 700; font-size: 1.05rem; }
.receipt-head .title { font-size: 1.6rem; font-weight: 800; letter-spacing: .2em; color: var(--primary); font-family: var(--font-head); text-align: right; }
.receipt-row { display: grid; grid-template-columns: 170px 12px 1fr; padding: 7px 0; border-bottom: 1px dotted #cbd5e1; }
.receipt-row .v { font-weight: 600; }
.receipt-row .v.words { font-style: italic; background: var(--primary-50); padding: 2px 8px; border-radius: 4px; }
.receipt-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.receipt-amount { font-size: 1.4rem; font-weight: 800; border: 2px solid var(--text); padding: 8px 18px; transform: skew(-8deg); background: var(--surface-2); }
.receipt-amount > span { display: inline-block; transform: skew(8deg); }
.signs { display: flex; gap: 32px; }
.sign { text-align: center; min-width: 170px; }
.sign img { height: 80px; max-width: 200px; object-fit: contain; display: block; margin: 4px auto; }
.sign .name { border-top: 1px solid var(--text); padding-top: 4px; font-weight: 700; }
@media (max-width: 640px) {
  .receipt { padding: 20px 18px 20px 24px; }
  .receipt-row { grid-template-columns: 1fr; }
  .receipt-row .sep { display: none; }
  .receipt-row .k { color: var(--muted); font-size: .8rem; }
  .receipt-head .title { font-size: 1.2rem; }
  .signs { width: 100%; justify-content: space-between; gap: 10px; }
  .sign { min-width: 0; flex: 1; }
}

/* ---------- Beranda ---------- */
.dash-greet { margin-bottom: 16px; }
.dash-greet p { margin: 2px 0 0; color: var(--muted); }
.dash-hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr); gap: 20px; align-items: center;
  background: radial-gradient(120% 140% at 100% 0%, #2f5bdc 0%, transparent 55%), linear-gradient(135deg, var(--navy-2), var(--navy));
  color: #fff; border-radius: 20px; padding: 24px 26px; box-shadow: 0 16px 40px rgba(15, 27, 61, .22);
}
.dash-hero .label { color: #c7d7fe; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.dash-hero-main .value { font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; overflow-wrap: anywhere; white-space: normal; }
.dash-hero-main .sub { color: #c7d7fe; font-size: .85rem; margin-top: 2px; }
.dash-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dash-hero-stats > div { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); border-radius: 14px; padding: 12px; min-width: 0; }
.dash-hero-stats .label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .75rem; color: #c7d7fe; }
.dash-hero-stats .num { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hero-stats .grow { min-width: 0; }
.dash-hero-stats .ico { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; color: #fff; }
.dash-hero-stats .ico svg.i { width: 17px; height: 17px; }
.dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.dash-actions .btn { padding: 12px 14px; font-size: .95rem; }
.dash-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dash-shortcuts a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .8rem; font-weight: 600; text-align: center;
}
.dash-shortcuts a:hover { text-decoration: none; border-color: var(--primary-100); background: var(--primary-50); }
.dash-shortcuts span { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
section.card.dash-col { display: block; }
@media (min-width: 901px) { .dash-actions { grid-template-columns: repeat(2, minmax(0, 220px)); } }
@media (max-width: 1400px) {
  .dash-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dash-greet h1 { font-size: 1.15rem; }
  .dash-hero { padding: 18px; border-radius: 16px; gap: 14px; }
  .dash-hero-main .value { font-size: 1.65rem; }
  .dash-hero-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-hero-stats > div { padding: 10px; gap: 8px; }
  .dash-hero-stats > div:last-child { grid-column: 1 / -1; }
  .dash-hero-stats .ico { display: none; }
  .dash-hero-stats .num { font-size: .95rem; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .dash-shortcuts { gap: 8px; }
  .dash-shortcuts a { padding: 10px 4px; font-size: .72rem; border-radius: 12px; }
  .dash-shortcuts span { width: 36px; height: 36px; }
  .list-item { padding: 12px 14px; gap: 10px; }
  .list-item .dot { width: 34px; height: 34px; border-radius: 10px; }
  .card-head { padding: 12px 14px; }
}

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, var(--primary-100), transparent 70%), var(--bg); }
.auth .card { width: 100%; max-width: 420px; }
.auth .brand-lg { text-align: center; color: var(--text); margin-bottom: 24px; }
.auth .brand-lg img { width: 64px; height: 64px; border-radius: 16px; }
.auth .brand-lg h1 { margin-top: 10px; }
.auth .brand-lg p { color: var(--muted); margin: 4px 0 0; }

/* ---------- PWA install banner ---------- */
.install-banner { position: fixed; left: 16px; right: 16px; bottom: 90px; z-index: 40; max-width: 460px; margin: 0 auto; background: var(--navy); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-lg); }
.install-banner p { margin: 0; font-size: .85rem; color: #c7d7fe; }
@media (min-width: 901px) { .install-banner { bottom: 24px; left: auto; right: 24px; } }

@media print {
  .sidebar, .topbar, .bottom-nav, .no-print, .install-banner, .alert { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
  .card, .receipt { box-shadow: none; }
}
