:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f1f2f6;
  --line: #ebecf1;
  --text: #121217;
  --muted: #8b8c97;
  --muted-2: #b4b5bf;
  --ink: #18181c;
  --primary: #085336;
  --gold: #e7a62b;
  --danger: #ef4444;
  --ok: #16a34a;
  --warn: #f59e0b;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(18, 18, 23, .04), 0 6px 24px rgba(18, 18, 23, .05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; margin: 6px 0 0; font-size: 13px; }

/* ---------- app shell ---------- */
.app { max-width: 1120px; margin: 0 auto; padding: 18px 16px 130px; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.topline .title { display: flex; align-items: center; gap: 14px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 10px; }

.icon-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- big money ---------- */
.big { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big .cur, .money .cur { font-size: .55em; color: var(--muted); font-weight: 600; margin-right: 3px; vertical-align: .32em; letter-spacing: 0; }
.label { color: var(--muted); font-size: 15px; font-weight: 500; }
.delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.delta.up { background: #fdecec; color: #dc2626; }
.delta.down { background: #e8f7ee; color: #15803d; }
body.hide-amounts .amt { filter: blur(9px); user-select: none; }

/* ---------- balance header ---------- */
.balance { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 6px 4px 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 4px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* ---------- action pills ---------- */
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 6px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; padding: 0; }
.action .pill { width: 100%; max-width: 86px; height: 52px; border-radius: 999px; background: #e9eaef; display: grid; place-items: center; transition: background .15s, transform .15s; }
.action:hover .pill { background: #dfe0e7; }
.action:active .pill { transform: scale(.95); }
.action svg { width: 22px; height: 22px; }

/* ---------- sections & cards ---------- */
.panel { background: var(--surface); border-radius: 28px; padding: 20px 18px; box-shadow: var(--shadow); margin-top: 16px; min-width: 0; }
.panel.flat { box-shadow: none; border: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 2px 14px; gap: 10px; }
.section-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.section-head a, .link-btn { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.section-head a:hover, .link-btn:hover { color: var(--text); }
.divider { height: 1px; background: var(--line); margin: 18px -18px; }

/* ---------- folder wallet cards ---------- */
.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.wallet { position: relative; display: block; height: 150px; color: #fff; text-decoration: none; transition: transform .18s; }
.wallet:hover { transform: translateY(-2px); }
.wallet:active { transform: scale(.98); }
.wallet-back { position: absolute; inset: 0 0 18px; border-radius: 22px; background: color-mix(in srgb, var(--c) 78%, #000); }
.wallet-paper { position: absolute; left: 12px; right: 12px; top: 9px; height: 44px; border-radius: 12px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.wallet-front { position: absolute; inset: 26px 0 0; border-radius: 20px; background: var(--c); padding: 13px 14px 12px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 -1px 0 rgba(255,255,255,.25) inset, 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent); overflow: hidden; }
.wallet-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.wallet-icon svg { width: 19px; height: 19px; }
.wallet-name { font-size: 14px; font-weight: 500; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-amt { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wallet-amt .cur { font-size: .62em; opacity: .85; margin-right: 2px; vertical-align: .25em; }
.wallet-bar { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
.wallet-bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.wallet.over .wallet-bar i { background: #fff2b3; }
.wallet.mini { width: 78px; height: 60px; flex: none; }
.wallet.mini .wallet-back { inset: 0 0 6px; border-radius: 12px; }
.wallet.mini .wallet-paper { left: 7px; right: 7px; top: 5px; height: 18px; border-radius: 5px; }
.wallet.mini .wallet-front { inset: 13px 0 0; border-radius: 11px; padding: 7px 9px; }
.wallet.mini .wallet-icon { width: 20px; height: 20px; border-radius: 6px; }
.wallet.mini .wallet-icon svg { width: 12px; height: 12px; }

/* ---------- transactions ---------- */
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 14px; }
.tx:hover { background: var(--surface-2); }
.tx-ic { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.tx-ic svg { width: 20px; height: 20px; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-main b, .tx-right b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main small, .tx-right small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; max-width: 45%; font-variant-numeric: tabular-nums; }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 2px 4px; }
.day-head:first-child { padding-top: 0; }
.empty-note { color: var(--muted); text-align: center; padding: 24px 8px; }

/* ---------- search & chips ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 999px; padding: 0 16px; height: 50px; margin: 6px 0 16px; }
.search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: transparent; font: inherit; outline: none; min-width: 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--text); font-family: inherit; }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
select.chip { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8c97' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input.chip { padding: 7px 12px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* ---------- wallet details ---------- */
.wallet-hero { display: flex; align-items: center; gap: 16px; padding: 8px 4px 18px; }
.wallet-hero .label { font-size: 16px; }
.wallet-hero .big { font-size: 34px; }
.budget-line { margin-top: 2px; }
.bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; }
.month-nav { display: flex; justify-content: space-between; align-items: center; }
.month-nav h4 { margin: 0; font-size: 16px; font-weight: 700; }
.month-nav h4 span { color: var(--muted); font-weight: 500; }
.arrow-btn { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 10px; }
.arrow-btn:hover { background: var(--surface-2); }
.arrow-btn:disabled { opacity: .3; cursor: default; background: none; }
.arrow-btn svg { width: 22px; height: 22px; }
.spent-line { margin: 4px 0 12px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.spent-line small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.spent-line .cur { font-size: .6em; color: var(--muted); vertical-align: .3em; margin-right: 2px; }
.chart-box { position: relative; height: 220px; }
.chart-box.tall { height: 280px; }

/* floating dark pill actions */
.float-actions { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; z-index: 30; }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none; transition: transform .15s, filter .15s; }
.pill-btn svg { width: 19px; height: 19px; }
.pill-btn:active { transform: scale(.97); }
.pill-btn.dark { background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.pill-btn.dark:hover { filter: brightness(1.25); }
.pill-btn.soft { background: var(--surface-2); color: var(--text); }
.pill-btn.soft:hover { background: #e6e7ec; }
.pill-btn.danger { color: var(--danger); }
.pill-btn.grow { flex: 1; }
.pill-btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- analysis ---------- */
.seg-bar { display: flex; gap: 4px; height: 22px; margin: 18px 0 16px; }
.seg-bar i { border-radius: 7px; min-width: 6px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; background: var(--surface); text-decoration: none; display: block; transition: background .15s; min-width: 0; }
.tile:hover { background: var(--surface-2); }
.tile-name { display: flex; align-items: center; gap: 6px; color: var(--c); font-weight: 600; font-size: 13px; }
.tile-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name svg { width: 15px; height: 15px; flex: none; }
.tile-amt { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tile-sub .over { color: var(--danger); font-weight: 600; }
.insight { margin-top: 16px; border-radius: 20px; padding: 16px; background: #fff9e6; border: 1px solid #f8edc7; }
.insight-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.insight-ic { width: 32px; height: 32px; border-radius: 9px; background: #f5c33b; color: #fff; display: grid; place-items: center; }
.insight-ic svg { width: 18px; height: 18px; }
.insight ul { margin: 0; padding-left: 18px; color: #6b6150; font-size: 14px; }
.insight li + li { margin-top: 3px; }
.analysis-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.range-text { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.table th, .table td { padding: 10px 6px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table .num { text-align: right; }
.table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.table .mini-bar { width: 80px; }
.st-ok { color: var(--ok); } .st-warn { color: #d97706; } .st-over { color: var(--danger); font-weight: 600; }

/* ---------- categories / settings ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; font-weight: 600; }
.list-row .grow small { color: var(--muted); font-size: 13px; }
.list-row .bar { margin-top: 6px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.setting-row p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.setting-row b { font-weight: 600; }
.select { appearance: none; border: 1px solid var(--line); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8c97' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border-radius: 12px; padding: 10px 34px 10px 14px; font: inherit; color: var(--text); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

.empty-card { text-align: center; padding: 28px 16px; }
.empty-card h3 { margin: 0 0 6px; font-size: 18px; }
.empty-card p { color: var(--muted); margin: 0 0 16px; }
.empty-card .row { justify-content: center; flex-wrap: wrap; }

/* ---------- dock (bottom nav) ---------- */
.dock { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 4px; padding: 7px; border-radius: 999px; background: var(--ink); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.dock a { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #a1a1aa; transition: background .15s, color .15s; }
.dock a:hover { color: #fff; }
.dock a.active { background: #3a3a40; color: #fff; }
.dock svg { width: 22px; height: 22px; }
.dock-add { width: 76px; height: 50px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; margin: 0 4px; transition: transform .15s; }
.dock-add:active { transform: scale(.95); }
.dock-add svg { width: 24px; height: 24px; }
body.dock-hidden .dock { display: none; }

/* ---------- sheets (dialogs) ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; border-radius: 28px 28px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -10px 40px rgba(0,0,0,.15); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
.sheet::backdrop { background: rgba(18, 18, 23, .4); backdrop-filter: blur(2px); }
.sheet form { padding: 10px 20px 22px; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.sheet-head .icon-btn { width: 38px; height: 38px; }
.sheet-head .icon-btn svg { width: 18px; height: 18px; }
.amount-field { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px 0 18px; }
.amount-field .cur { font-size: 26px; font-weight: 700; color: var(--muted); }
.amount-field input { border: 0; outline: none; font: 800 44px/1 var(--font); letter-spacing: -.03em; width: 6.5ch; text-align: left; background: transparent; color: var(--text); padding: 0; }
.amount-field input::-webkit-outer-spin-button, .amount-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-field input[type=number] { -moz-appearance: textfield; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 2px 8px; }
.cat-picker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.cat-opt { flex: none; display: flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px 6px 6px; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; font-family: inherit; color: var(--text); }
.cat-opt .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, #fff); color: var(--c); }
.cat-opt .ic svg { width: 15px; height: 15px; }
.cat-opt.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 500; padding-left: 2px; }
.field input, .field textarea { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font: inherit; color: var(--text); outline: none; resize: vertical; min-width: 0; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
#payChips { margin: -2px 0 12px; }
#payChips .chip { padding: 6px 12px; font-size: 13px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2.5px var(--text); }

.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -12px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.print-only { display: none; }

/* ---------- income ---------- */
:root { --income: #16a34a; }
.pos { color: var(--income) !important; }
.neg { color: var(--danger) !important; }
.big.neg .cur { color: var(--danger); opacity: .7; }
.big.pos .cur { color: var(--income); opacity: .7; }
a.stat { text-decoration: none; color: inherit; transition: background .15s; }
a.stat:hover { background: var(--surface-2); }
.stat small { display: block; font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action .pill-green { background: #dcf5e4; color: #15803d; }
.action:hover .pill-green { background: #c9efd6; }
button.tile { font: inherit; text-align: left; cursor: pointer; color: inherit; width: 100%; }

/* segmented control (Expense | Income, All | Expenses | Income) */
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; margin: 4px 0 6px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 12px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg.wide { max-width: 420px; margin: 0 0 4px; background: #e6e7ec; }
#expForm[data-type="income"] #typeSeg button.active { color: var(--income); }

/* expense-only / income-only fields in the add sheet */
#expForm[data-type="expense"] .only-income, #expForm[data-type="income"] .only-expense { display: none; }
.amount-field .sign { font-size: 28px; font-weight: 700; color: var(--income); margin-right: -2px; }
#expForm[data-type="expense"] .amount-field .sign { display: none; }
#expForm[data-type="income"] .amount-field input { color: var(--income); }

.tx-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 2px 0 8px; }
.tx-summary div { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; min-width: 0; }
.tx-summary span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.tx-summary b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.day-head .pos { font-weight: 600; }

.money-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.money-flow div { min-width: 0; }
.money-flow span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.money-flow b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.flow-bar { height: 10px; border-radius: 999px; background: #dcf5e4; overflow: hidden; margin-top: 14px; }
.flow-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
@media (max-width: 560px) { .money-flow { grid-template-columns: 1fr 1fr; row-gap: 12px; } }

/* ---------- offline banner ---------- */
.net-banner { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.18); white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
.net-banner .link-btn { color: #f5d58a; font-size: 13px; font-weight: 600; }
body.is-offline .net-banner { background: #92400e; }
body.has-banner .app { padding-top: 58px; }

/* ---------- detected money alerts ---------- */
.alert-prompt { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); z-index: 35; width: min(520px, calc(100vw - 24px)); animation: prompt-up .25s ease-out; }
body.dock-hidden .alert-prompt { bottom: max(16px, env(safe-area-inset-bottom)); }
@keyframes prompt-up { from { transform: translate(-50%, 20px); opacity: 0; } }
.alert-prompt .alert-card { box-shadow: 0 14px 40px rgba(18,18,23,.22); margin: 0; }
.alert-more { display: block; text-align: center; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface); border-radius: 999px; padding: 7px; box-shadow: var(--shadow); }
.alert-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; margin-bottom: 10px; }
.alert-top { display: flex; align-items: flex-start; gap: 12px; }
.alert-top .grow { flex: 1; min-width: 0; }
.alert-top small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-top b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.alert-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #e3efe9; color: var(--primary); }
.alert-ic svg { width: 20px; height: 20px; }
.alert-card.in .alert-ic { background: #dcf5e4; color: #15803d; }
.alert-card.out .alert-ic { background: #fde8e8; color: #dc2626; }
.alert-top .icon-btn.sm { width: 34px; height: 34px; }
.alert-top .icon-btn.sm svg { width: 16px; height: 16px; }
.alert-raw { margin: 10px 0 12px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 8px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-actions .pill-btn { flex: 1 1 auto; }
.pill-btn.dark.green { background: #15803d; }
.alert-banner { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 20px; background: #fff9e6; border: 1px solid #f8edc7; text-decoration: none; color: inherit; }
.alert-banner .alert-ic { background: #f5c33b; color: #fff; }
.alert-banner .grow { flex: 1; min-width: 0; }
.alert-banner b { display: block; font-weight: 700; }
.alert-banner small { display: block; color: #6b6150; font-size: 13px; }

.paste-box { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font: inherit; color: var(--text); resize: vertical; outline: none; }
.paste-box:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.small-note { font-size: 14px; margin: 0 2px 10px; }
.setup-step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-step:first-of-type { border-top: 0; padding-top: 0; }
.setup-step > div { min-width: 0; flex: 1; }
.setup-step p { margin: 3px 0 10px; color: var(--muted); font-size: 14px; }
.step-n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ok-chip { display: inline-block; background: #dcf5e4; color: #15803d; font-weight: 600; font-size: 13px; padding: 5px 11px; border-radius: 999px; }
.danger-text { color: var(--danger) !important; }
.secret { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.secret label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; flex-wrap: wrap; }
.secret code { flex: 1; min-width: 0; word-break: break-all; background: var(--surface); font-size: 12px; padding: 5px 8px; }
.secret .warn { margin: 6px 0 0; font-size: 12.5px; color: #b45309; }
.recipe { margin: 0 0 8px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.recipe li + li { margin-top: 4px; }
.recipe code { word-break: break-all; }

/* ---------- account bits ---------- */
.greet { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.greet small { display: block; color: var(--muted); font-size: 13px; line-height: 1.2; }
.greet b { display: block; font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, #085336, #12805a); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--gold); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-head b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-head small { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; }
.inline-form .field { flex: 1; margin-bottom: 0; }
.inline-form .pill-btn { height: 46px; }
.pw-details { margin-top: 14px; }
.pw-details summary { cursor: pointer; font-weight: 600; padding: 6px 2px; list-style: none; display: flex; justify-content: space-between; }
.pw-details summary::-webkit-details-marker { display: none; }
.pw-details summary::after { content: "›"; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.pw-details[open] summary::after { transform: rotate(-90deg); }
.pw-details form { padding-top: 10px; }
.hint { color: var(--muted); font-size: 13px; margin: -4px 2px 8px; }
.pw-details .hint { margin-top: 10px; }

/* ---------- Akontaa brand ---------- */
.brand-mark { height: 30px; width: auto; display: block; }
.auth-wordmark { height: 42px; width: auto; display: block; margin: 2px 0 20px; }
.auth-submit { background: var(--primary) !important; box-shadow: 0 8px 24px rgba(8, 83, 54, .28) !important; }
.hello { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.pill-btn.dark.green { background: var(--primary); }
a { color: inherit; }
.auth-switch a, .section-head a:hover { color: var(--primary); }

/* ---------- auth screens ---------- */
body.auth-mode .app { padding-bottom: 32px; }
.auth { min-height: calc(100vh - 50px); display: flex; flex-direction: column; justify-content: center; max-width: 440px; margin: 0 auto; }
.auth-art { position: relative; height: 190px; margin: 4px 0 18px; }
.auth-card { position: absolute; width: 58%; height: 140px; pointer-events: none; }
.auth-card:hover { transform: none; }
.auth-card.c0 { left: 0; top: 34px; transform: rotate(-8deg); z-index: 1; }
.auth-card.c1 { left: 21%; top: 6px; transform: rotate(2deg); z-index: 2; }
.auth-card.c2 { right: 0; top: 40px; transform: rotate(9deg); z-index: 1; }
.auth-panel { background: var(--surface); border-radius: 28px; padding: 26px 22px 22px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.auth-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; }
.auth-panel h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.auth-panel > p.muted { margin: 6px 0 20px; font-size: 15px; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-switch { text-align: center; color: var(--muted); margin: 18px 0 0; font-size: 14px; }
.auth-switch a { color: var(--text); font-weight: 600; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; border-radius: 10px; }
.pw-toggle:hover { color: var(--text); background: var(--surface); }
.pw-toggle svg { width: 19px; height: 19px; }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  .app { padding: 28px 28px 130px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .home-grid > .side > .panel:first-child { margin-top: 0; }
  .wallets { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .analysis-grid .span-all { grid-column: 1 / -1; }
  .wallet-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .sheet { margin: auto; border-radius: 28px; }
  .sheet .sheet-grab { display: none; }
  .sheet form { padding-top: 22px; }
  .big { font-size: 46px; }
  .auth { flex-direction: row; align-items: center; max-width: 960px; gap: 48px; }
  .auth-art { flex: 1; height: 300px; margin: 0; }
  .auth-card { height: 170px; }
  .auth-card.c0 { top: 80px; } .auth-card.c1 { top: 20px; } .auth-card.c2 { top: 110px; }
  .auth-panel { width: 420px; flex: none; padding: 32px 28px 26px; }
}
@media (max-width: 380px) {
  .big { font-size: 34px; }
  .tiles .tile-amt { font-size: 17px; }
}

@media print {
  :root { --bg: #fff; --shadow: none; }
  body { background: #fff; font-size: 12px; }
  .no-print, .dock, .float-actions, .toast { display: none !important; }
  .print-only { display: block; }
  .app { padding: 0; max-width: none; }
  .panel { border: 1px solid var(--line); break-inside: avoid; }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .analysis-grid .span-all { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .chart-box, .chart-box.tall { height: 200px; }
  .seg-bar i, .bar > i, .tx-ic, .insight, .insight-ic { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- currency picker (home) ---------- */
.balance-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.cur-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; white-space: nowrap; }
.cur-pick:hover { background: var(--surface-2); }
.cur-pick svg { width: 14px; height: 14px; }
.cur-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cur-pick:focus-within { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 1px; }

/* ---------- profile fields (sign-up & Settings) ---------- */
.select.full { width: 100%; }
.phone-wrap { display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; overflow: hidden; }
.phone-wrap:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.phone-wrap .dial { display: grid; place-items: center; padding: 0 12px; font-weight: 600; color: var(--primary); border-right: 1px solid var(--line); font-size: 15px; white-space: nowrap; }
.field .phone-wrap input { border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text) !important; cursor: pointer; padding-left: 14px !important; }
.choice input:checked + span { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, #fff); color: var(--primary) !important; font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.privacy-note { font-size: 12.5px; color: var(--muted); margin: 0 2px 6px; line-height: 1.45; }
.profile-form { display: block; }
.profile-form .pill-btn { margin-top: 4px; }
.profile-hint { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff9e6; border: 1px solid #f8edc7; font-size: 14px; color: #6b6150; }
.profile-banner .alert-ic { background: var(--primary) !important; }

/* ---------- admin ---------- */
.admin-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.admin-link .grow { flex: 1; min-width: 0; }
.admin-link b { display: block; }
.admin-link small { display: block; color: var(--muted); font-size: 13px; }
.admin-link .alert-ic { background: var(--primary); color: #fff; }
.admin-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.admin-kpis .stat b { font-size: 24px; letter-spacing: -.02em; }
.admin-kpis .stat small { display: block; font-size: 12px; margin-top: 2px; }
@media (min-width: 900px) { .admin-kpis { grid-template-columns: repeat(4, 1fr); } }
.dot-lg { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.user-row { display: flex; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .avatar { width: 42px; height: 42px; font-size: 14px; }
.user-row .grow { flex: 1; min-width: 0; }
.user-row b { display: block; font-weight: 600; }
.user-row small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.user-row small a { color: var(--text); text-decoration: none; }
.user-row small a:hover { color: var(--primary); text-decoration: underline; }
.user-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.user-meta span { background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--gold); padding: 1px 7px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }

/* ---------- Personal / Business ---------- */
/* mode switch at the top (accounts that use both) */
.mode-bar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: center; padding: 10px 16px 6px; background: color-mix(in srgb, var(--bg, #f6f7fb) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mode-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #e6e7ec; width: 100%; max-width: 360px; }
.mode-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; border-radius: 999px; padding: 9px 12px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.mode-seg button svg { width: 17px; height: 17px; }
.mode-seg button.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(8,83,54,.25); }
body.book-business .mode-seg button.active { background: var(--gold); color: #3b2a06; box-shadow: 0 2px 8px rgba(231,166,43,.3); }
body.has-modes .app { padding-top: 8px; }
body.has-modes.has-banner .app { padding-top: 50px; }

/* sign-up + settings: what Akontaa is used for */
.type-cards { display: grid; gap: 8px; }
.type-cards .type-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.type-cards .type-card input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.type-cards .type-card .type-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); padding: 0; }
.type-cards .type-card .type-ic svg { width: 20px; height: 20px; }
.type-cards .type-card .type-txt { display: flex; flex-direction: column; min-width: 0; padding: 0; }
.type-cards .type-card b { font-size: 15px; color: var(--text); }
.type-cards .type-card small { font-size: 13px; color: var(--muted); }
.type-cards .type-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, #fff); }
.type-cards .type-card:has(input:checked) .type-ic { background: var(--primary); color: #fff; }
.type-cards .type-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 720px) { .panel .type-cards { grid-template-columns: repeat(3, 1fr); } }

/* wallets */
.wallet-list .list-row:last-child { border-bottom: 0; }
button.list-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.wallet-row .grow b, .wallet-row .grow small { display: block; }
.wallet-row .grow small { color: var(--muted); font-size: 13px; }
.wallet-row.archived { opacity: .6; }
.wallet-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; font-size: 13px; }
.wallet-chip .wc-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--c); }
.wallet-chip .wc-ic svg { width: 13px; height: 13px; }
.wallet-chip.active .wc-ic { background: rgba(255,255,255,.18); color: #fff; }
#walletChips { margin-bottom: 12px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 4px 2px 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }

/* transfers: neutral, never income or spending */
.tx.transfer .amt { color: var(--muted); }
.moved-note { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border-radius: 18px; background: var(--surface-2); text-decoration: none; color: inherit; font-size: 14px; }
.moved-note small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.money-flow.two { grid-template-columns: 1fr 1fr; }
.transfer-hint { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; line-height: 1.45; }
.transfer-hint:empty { display: none; }
.only-transfer { display: none; }
#expForm[data-type="transfer"] .only-transfer { display: block; }
#expForm[data-type="transfer"] .only-expense, #expForm[data-type="transfer"] .only-income, #expForm[data-type="transfer"] .not-transfer { display: none; }
#expForm[data-type="transfer"] .amount-field .sign { display: none; }
#expForm .field select.select { width: 100%; }

/* phones: two stat boxes side by side and the third underneath, so amounts are never cut off */
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row .stat:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .stat-row .stat:last-child b { margin-top: 0; }
}

/* ---------- Plan ---------- */
.action .pill-gold { background: #fdf1d8; color: #a16207; }
.action:hover .pill-gold { background: #fbe6b8; }
.plan-note { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border-radius: 18px; background: #fff9e6; border: 1px solid #f8edc7; text-decoration: none; color: inherit; font-size: 14px; }
.plan-note small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.plan-hero .big { display: flex; align-items: baseline; gap: 2px; }
.plan-hero .per-day { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.plan-line { display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.plan-line > span:first-child { font-weight: 600; font-size: 15px; min-width: 0; }
.plan-line small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.plan-line b { font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-line .link-btn { justify-self: end; font-size: 13px; }
.plan-line.total { border-bottom: 0; }
.plan-line.total b { font-size: 19px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 2px 4px; }
.inline-form input { flex: 1; min-width: 120px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font: inherit; }
.plan-bar { display: flex; height: 12px; border-radius: 999px; background: #dcf5e4; overflow: hidden; margin-top: 6px; }
.plan-bar i { display: block; height: 100%; }
.plan-bar i.b { background: var(--primary); }
.plan-bar i.g { background: var(--gold); }
.plan-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.plan-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #dcf5e4; margin-right: 5px; vertical-align: 0; }
.plan-legend i.b { background: var(--primary); } .plan-legend i.g { background: var(--gold); }
.goal { padding: 12px 2px 14px; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.goal-top b, .goal-top small { display: block; }
.goal-top small { color: var(--muted); font-size: 13px; }
.goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.goal-foot b { color: var(--text); }
.goal.done .goal-top small { color: var(--income); font-weight: 600; }
.icon-btn.sm { width: 36px; height: 36px; }
.pace-row .grow b, .pace-row .grow small { display: block; }
.pace-row .grow small { color: var(--muted); font-size: 12px; }
.bar.pace { position: relative; overflow: visible; }
.bar.pace em { position: absolute; top: -3px; width: 2px; height: calc(100% + 6px); background: var(--text); opacity: .55; border-radius: 1px; transform: translateX(-1px); }
.pace-row > span:last-child { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* money alerts: which book a payment goes to */
.alert-book { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.alert-book .chip { padding: 5px 12px; font-size: 13px; }
