/* Dark, compact, thin-bordered layout modeled on the reference screenshots. */
:root {
  --bg: #000;
  --panel: #0b0b0b;
  --panel-2: #111;
  --raised: #161616;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --text: #f2f1ee;
  --text-2: #b9b8b2;
  --text-3: #85847e;
  --text-4: #5c5b57;
  --green: #4ccf7a;
  --red: #f07070;
  --blue: #4b8de8;
  --hover: #0f0f0f;
  --sel: #151515;
  --chip: #232323;
  --w: 1100px;
  --font: "Inter", -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text); font: 13px/1.45 var(--font); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--text-3); }
.dim { color: var(--text-4); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); }
.top-1 { height: 46px; border-bottom: 1px solid var(--line); }
.top-1 .in, .tabs .in { max-width: var(--w); margin: 0 auto; padding: 0 16px; height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.slash { color: var(--text-4); font-size: 18px; font-weight: 300; margin: 0 2px; }
.crumb { font-weight: 600; font-size: 12.5px; }
.find { margin-left: auto; position: relative; }
.find input { width: 190px; height: 28px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); padding: 0 34px 0 28px; outline: none; font-size: 12.5px; }
.find input:focus { border-color: #3a3a3a; width: 260px; }
.find .ic { position: absolute; left: 10px; top: 7px; width: 14px; height: 14px; color: var(--text-3); }
.find kbd { position: absolute; right: 7px; top: 6px; }
kbd { display: inline-block; min-width: 16px; padding: 0 4px; height: 16px; line-height: 16px; border-radius: 4px; background: var(--chip); color: var(--text-3); font: 600 10px/16px var(--font); text-align: center; }
.find-pop { position: absolute; right: 0; top: 34px; width: 340px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.find-pop a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; }
.find-pop a:hover, .find-pop a.on { background: var(--raised); }
.find-pop .t { font-size: 10.5px; color: var(--text-4); text-transform: uppercase; letter-spacing: .05em; width: 64px; }
.icon-btn { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); position: relative; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: #3a3a3a; }
.icon-btn .dot { position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #1d7ed6; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; cursor: pointer; border: 0; }
.menu { position: absolute; right: 0; top: 34px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; min-width: 190px; z-index: 40; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--raised); }
.tabs { height: 36px; border-bottom: 1px solid var(--line); }
.tabs .in { gap: 18px; }
.tabs a { height: 100%; display: inline-flex; align-items: center; color: var(--text-2); font-size: 12.5px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); }
.role-chip { margin-left: auto; font-size: 11px; color: var(--text-3); }

/* ---------- page ---------- */
.wrap { max-width: var(--w); margin: 0 auto; padding: 18px 16px 70px; }
.wrap.wide { max-width: none; padding-left: 20px; padding-right: 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12.5px; margin-bottom: 10px; }
.back:hover { color: var(--text); }
h1 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 .sub { font-size: 13px; font-weight: 400; color: var(--text-3); }
h2 { font-size: 12.5px; font-weight: 600; margin: 0 0 8px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.big { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.big .cents { font-size: .6em; color: var(--text-2); font-weight: 600; }
.lede { font-size: 13.5px; font-weight: 500; margin: 6px 0 14px; }
.lede a { color: var(--text-3); border-bottom: 1px dotted var(--text-4); font-weight: 400; }
.flash { padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid #1f3a28; background: #0b1810; font-size: 12.5px; }
.flash.error { border-color: #4a1f1f; background: #1a0b0b; }

/* ---------- controls ---------- */
.pill, .btn { height: 32px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; cursor: pointer; white-space: nowrap; color: var(--text); font-size: 12.5px; }
.pill:hover, .btn:hover { border-color: #3a3a3a; }
.btn.primary { background: var(--text); color: #000; border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--red); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn[disabled], .pill[disabled] { opacity: .35; pointer-events: none; }
select.pill { appearance: none; -webkit-appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 13px) 14px, calc(100% - 9px) 14px; background-size: 4px 4px; background-repeat: no-repeat; max-width: 240px; }
.search { flex: 1; position: relative; min-width: 200px; }
.search input { width: 100%; height: 32px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); padding: 0 36px 0 32px; outline: none; }
.search input:focus { border-color: #3a3a3a; }
.search .ic { position: absolute; left: 11px; top: 9px; width: 14px; height: 14px; color: var(--text-3); }
.search kbd { position: absolute; right: 9px; top: 8px; }
.seg { display: inline-flex; height: 32px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; background: var(--panel); }
.seg a, .seg button { display: inline-flex; align-items: center; padding: 0 11px; border-radius: 999px; color: var(--text-2); background: none; border: 0; cursor: pointer; font-size: 12.5px; }
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.on, .seg button.on { background: var(--chip); color: var(--text); font-weight: 500; }
.stepper { display: inline-flex; height: 32px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--panel); }
.stepper a, .stepper span { width: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--text-2); font-size: 15px; }
.stepper a:hover { background: var(--chip); color: var(--text); }
.stepper span { color: var(--text-4); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
input.field, select.field, textarea.field { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; outline: none; width: 100%; }
input.field:focus, textarea.field:focus, select.field:focus { border-color: #444; }
label.lbl { display: block; font-size: 11.5px; color: var(--text-3); margin: 0 0 4px; }

/* ---------- category icon ---------- */
.ci { --c: #777; width: 18px; height: 18px; border-radius: 50%; background: var(--c); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ci svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ci.sq { width: 28px; height: 28px; border-radius: 7px; }
.ci.sq svg { width: 15px; height: 15px; stroke-width: 2; }
.ci.lg { width: 34px; height: 34px; border-radius: 8px; }
.ci.lg svg { width: 19px; height: 19px; }
.ini { width: 26px; height: 26px; border-radius: 50%; background: #1b1b1b; border: 1px solid var(--line-2); color: var(--text-2); font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ini.xs { width: 16px; height: 16px; font-size: 7px; }
.ini.lg { width: 30px; height: 30px; font-size: 10px; }

/* ---------- tables ---------- */
.tbl { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0 12px; height: 38px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
table.tx tbody tr { cursor: pointer; }
table.tx tbody tr:hover td { background: var(--hover); }
table.tx tbody tr.sel td { background: var(--sel); }
table.tx tbody tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--text); }
td.date { color: var(--text); width: 96px; }
.desc { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mlink { background: none; border: 0; padding: 2px 4px; margin: 0 -4px; border-radius: 5px; cursor: pointer; color: var(--text); font-weight: 500; }
.mlink:hover { background: var(--chip); }
.clink { background: none; border: 0; padding: 2px 4px; margin: 0 -2px; border-radius: 5px; cursor: pointer; color: var(--text-3); font-size: 12px; }
.clink:hover { background: var(--chip); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; background: var(--chip); color: var(--text); font-size: 10.5px; font-weight: 600; }
.chip.warn { background: #3a2a0c; color: #f3c46a; }
.chip.ok { background: #0f2a18; color: var(--green); }
.chip.blue { background: #0f2238; color: #8ab9f5; }
.mark { width: 13px; height: 13px; color: var(--text-3); flex: none; }
td.acct { color: var(--text); }
td.acct .row { gap: 8px; }
tr.nonspend td.amt { color: var(--text-2); }
.foot { color: var(--text-3); font-size: 12px; margin-top: 12px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

/* ---------- split + drawer ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.split.open { grid-template-columns: minmax(0, 1fr) 342px; }
.drawer { position: sticky; top: 98px; max-height: calc(100vh - 110px); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px; }
.drawer::-webkit-scrollbar { width: 6px; } .drawer::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
.dh { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dh b { font-weight: 600; }
.dh .icons { margin-left: auto; display: flex; gap: 2px; }
.dh .icons button, .dh .icons a { background: none; border: 0; color: var(--text-3); width: 24px; height: 24px; border-radius: 5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dh .icons button:hover, .dh .icons a:hover { background: var(--chip); color: var(--text); }
.dh .sep { width: 1px; background: var(--line-2); margin: 4px 4px; }
.damt { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.dsub { color: var(--text-3); font-size: 11.5px; margin: 2px 0 12px; }
.tl { position: relative; padding-left: 14px; }
.tl::before { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl-step { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; margin: 8px 0; }
.tl-step::before { content: ""; position: absolute; left: -14px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.tl-step.green::before { background: var(--green); }
.tl-step.hollow::before { background: var(--bg); border: 1.5px solid var(--text-3); }
.tl-step .when { margin-left: auto; color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin: 6px 0 10px; background: var(--panel); }
.box-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; margin-bottom: 6px; }
.box-title .r { margin-left: auto; font-weight: 500; }
.kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 12px; padding: 4px 0; align-items: center; }
.kv > span:first-child { color: var(--text-3); }
.kv > span:last-child { overflow-wrap: anywhere; }
.statement { font-size: 11.5px; letter-spacing: .01em; }
.note-meta { font-size: 11px; color: var(--text-4); margin-top: 4px; }
.explain { font-size: 12.5px; line-height: 1.5; }
.draft { border: 1px dashed #4a3d14; background: #120f05; border-radius: 6px; padding: 8px; margin-top: 6px; }
.actions { margin-top: 6px; }
.actions h3 { font-size: 12px; margin: 10px 0 2px; }
.act { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; color: var(--text); }
.act svg { width: 14px; height: 14px; color: var(--text-3); margin-top: 2px; flex: none; }
.act small { display: block; color: var(--text-3); font-size: 11px; }
.act:hover span { text-decoration: underline; text-underline-offset: 2px; }
.ref { font-size: 11px; color: var(--text-3); display: grid; grid-template-columns: 92px 1fr; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.ref code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-edit textarea { min-height: 70px; resize: vertical; }
.inline-edit .row { justify-content: flex-end; margin-top: 6px; }

/* mini bars */
.mini { display: flex; gap: 4px; align-items: flex-end; height: 50px; margin: 8px 0 4px; }
.mb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.mb i { display: block; background: #262626; border-radius: 3px; min-height: 3px; }
.mb.sel i { background: var(--text); }
.mb span { font-size: 10px; text-align: center; color: var(--text-3); margin-top: 4px; }
.mb.sel span { color: var(--text); font-weight: 600; }
.lines { width: 100%; }
.lines td { height: 26px; padding: 0; border: 0; font-size: 12px; }
.lines td.num { font-weight: 600; }

/* popover */
.pop { position: absolute; z-index: 50; width: 296px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.7); }
.pop-h { display: flex; gap: 9px; align-items: flex-start; }
.pop-h .ci { margin-top: 1px; }
.pop-text { font-size: 12px; color: var(--text-2); margin: 8px 0 6px; }
.pop-text b { color: var(--text); }
.pop-acts { border-top: 1px solid var(--line-2); margin: 8px -12px -6px; padding: 4px 12px 0; }
.pop-acts .act { padding: 6px 0; }

/* ---------- lists (spending, recurring) ---------- */
.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 11px; padding: 0 12px; height: 52px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--hover); }
.li b { display: block; font-weight: 600; font-size: 12.5px; }
.li small { display: block; color: var(--text-3); font-size: 11.5px; }
.li .num b { font-weight: 600; }
.delta { font-size: 11px; color: var(--text-3); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* stacked chart */
.chart { border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 10px; margin-bottom: 22px; }
.plot { position: relative; height: 196px; margin-right: 46px; }
.grid-line { position: absolute; left: 0; right: -46px; border-top: 1px solid var(--line); }
.grid-line span { position: absolute; right: 0; top: -8px; font-size: 10.5px; color: var(--text-3); background: var(--bg); padding-left: 6px; }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; align-items: center; cursor: pointer; }
.bar .bstack { width: 34%; max-width: 58px; min-width: 14px; height: 100%; display: flex; flex-direction: column-reverse; }
.bar .bstack i { display: block; width: 100%; flex: none; box-shadow: inset 0 2px 0 var(--bg); }
.bar .bstack i:first-child { box-shadow: none; }
.bar .bstack i:last-child { border-radius: 4px 4px 0 0; }
.bar:hover .bstack { filter: brightness(1.15); }
.xlabels { display: flex; margin-right: 46px; margin-top: 8px; }
.xlabels span { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.badge-arrow { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--chip); align-items: center; justify-content: center; vertical-align: middle; margin-left: 8px; }
.badge-arrow svg { width: 11px; height: 11px; stroke: var(--text); fill: none; stroke-width: 2.4; }

/* accounts */
.nw { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 14px; margin-bottom: 18px; }
.nw-top { display: flex; gap: 20px; align-items: flex-start; }
.nw-top .right { margin-left: auto; text-align: right; }
.nw-split { display: flex; gap: 0; margin-top: 10px; }
.nw-split > div { padding: 0 14px; border-left: 1px solid var(--line-2); text-align: right; }
.nw-split > div:first-child { border: 0; }
.nw-split small { display: block; color: var(--text-3); font-size: 11px; }
.nw-split b { font-size: 14px; }
.nw-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; margin: 16px 0 6px; background: #1b1b1b; }
.nw-bar i { display: block; height: 100%; }
.nw-legend { display: flex; gap: 14px; font-size: 11px; color: var(--text-3); }
.nw-legend b { color: var(--text); font-weight: 600; margin: 0 3px; }
.nw-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 1px; margin-right: 5px; }
.line-chart { position: relative; height: 170px; margin-top: 14px; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; }
.grp-h { display: flex; justify-content: space-between; font-weight: 600; font-size: 12.5px; margin: 18px 0 8px; }
.acct-li { height: 57px; }
.spark { width: 96px; height: 24px; }
.spark polyline { fill: none; stroke: #bdbcb6; stroke-width: 1.2; }

/* automations */
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; max-width: 450px; }
.stat3 > div { padding: 12px 14px; border-left: 1px solid var(--line); }
.stat3 > div:first-child { border: 0; }
.stat3 small { color: var(--text-3); font-size: 11px; display: block; }
.stat3 b { font-size: 16px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--green); }
.sdot.notified { background: var(--blue); } .sdot.skipped { background: var(--text-4); } .sdot.failed { background: var(--red); } .sdot.off { background: var(--text-4); }
.run-li { height: 46px; cursor: pointer; }
.run-li.on { background: var(--sel); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg); }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.settings-nav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-size: 11.5px; display: none; min-width: 150px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; }
.tip .tr i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; }
.chat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.msg { max-width: 82%; padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--raised); }
.msg.ai { align-self: flex-start; border: 1px solid var(--line); }
.msg .q { margin-top: 6px; font-size: 11px; color: var(--text-4); }
.login { max-width: 340px; margin: 12vh auto 0; }
@media (max-width: 980px) {
  .split.open { grid-template-columns: 1fr; }
  .drawer { position: fixed; inset: auto 0 0 0; top: 30vh; max-height: none; border-radius: 14px 14px 0 0; z-index: 45; }
  .cols2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .find input { width: 120px; }
}

/* ---------- dashboards ---------- */
.wrap.dash-wrap { max-width: 1280px; }
.dash-split.editing { grid-template-columns: minmax(0, 1fr) 340px; }
.dash-split.editing.open { grid-template-columns: minmax(0, 1fr) 340px 342px; }
.dash-split.open:not(.editing) { grid-template-columns: minmax(0, 1fr) 342px; }
.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.wcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); min-width: 0; transition: box-shadow .4s; }
.wcard.s-small { grid-column: span 4; } .wcard.s-medium { grid-column: span 6; } .wcard.s-large { grid-column: span 8; } .wcard.s-full { grid-column: span 12; }
.wcard.touched { box-shadow: 0 0 0 1px #6b5a1d, 0 0 0 4px rgba(232,179,58,.12); }
.whead { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.wtitle { font-weight: 600; font-size: 13px; }
.wsub { margin-top: 1px; }
.wperiod { background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; font-size: 11.5px; padding: 3px 8px; color: var(--text-2); }
.wtools { display: flex; gap: 3px; }
.wtools button, .wtools select { background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; color: var(--text-2); font-size: 11.5px; height: 24px; min-width: 24px; cursor: pointer; }
.wtools button:hover { color: var(--text); border-color: #444; }
.wtools button[disabled] { opacity: .3; pointer-events: none; }
.wbody { min-width: 0; }
.wbody { overflow: hidden; }
.wplot { position: relative; height: 200px; margin: 14px 46px 0 0; }
.h-short .wplot { height: 120px; } .h-tall .wplot { height: 340px; }
.wplot .bar .bstack a { display: block; width: 100%; flex: none; box-shadow: inset 0 2px 0 var(--bg); }
.wplot .bar .bstack a:first-child { box-shadow: none; } .wplot .bar .bstack a:last-child { border-radius: 4px 4px 0 0; }
.wplot .bar .bstack a:hover { filter: brightness(1.2); }
.pairbar { flex-direction: row !important; align-items: flex-end !important; justify-content: center; gap: 3px; }
.pseg { width: 22%; max-width: 26px; border-radius: 4px 4px 0 0; display: block; }
.pseg:hover { filter: brightness(1.2); }
.wavg { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--text-4); pointer-events: none; }
.wavg span { position: absolute; right: 4px; top: -15px; font-size: 10px; color: var(--text-3); }
.wline { width: 100%; height: 190px; display: block; }
.h-short .wline { height: 110px; } .h-tall .wline { height: 330px; }
.wlinewrap { display: block; }
.kpi { display: block; padding: 4px 0; }
.kpi-v { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.kpi:hover .kpi-v { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.wlist { margin: 0 -14px -14px; border-top: 1px solid var(--line); }
.wli { height: auto; min-height: 48px; padding: 8px 14px; }
.wli .wnote { color: var(--text-2); margin-top: 2px; white-space: normal; }
.wtrack { display: block; height: 4px; background: #1b1b1b; border-radius: 2px; margin-top: 5px; overflow: hidden; }
.wtrack i { display: block; height: 100%; border-radius: 2px; }
.wfoot { color: var(--text-2); font-size: 12px; min-height: 38px; }
.wgh { display: flex; justify-content: space-between; padding: 8px 14px 4px; font-size: 11.5px; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--line); }
.wmore { display: block; text-align: right; font-size: 12px; color: var(--text-2); padding: 8px 14px; }
.wmore:hover { color: var(--text); }
.wempty { color: var(--text-3); font-size: 12.5px; padding: 16px 0; text-align: center; }
.wcard .tbl { border-radius: 8px; }
.edit-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; border: 1px dashed #4a3d14; border-radius: 10px; background: #0d0b04; }
.ai-panel { position: sticky; top: 98px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; background: var(--panel); max-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.ai-log { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; margin-bottom: 10px; }
.ai-panel > :not(.ai-log) { flex: none; }
.ai-log .msg { max-width: 92%; font-size: 12.5px; padding: 8px 10px; }
@media (max-width: 980px) {
  .wcard.s-small, .wcard.s-medium, .wcard.s-large { grid-column: span 12; }
  .dash-split.editing, .dash-split.editing.open { grid-template-columns: 1fr; }
  .ai-panel { position: static; max-height: none; }
}

/* ---------- readability (v2.1) ---------- */
.wrap.tx-wrap { max-width: 1240px; }
table.tx { table-layout: fixed; }
table.tx col.c-date { width: 92px; }
table.tx col.c-acct { width: 30%; }
table.tx col.c-amt { width: 128px; }
table.tx td { height: 46px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
table.tx th { padding: 11px 14px; }
table.tx td { padding: 0 14px; }
table.tx tbody tr:nth-child(odd) td { background: #000; }
table.tx tbody tr:nth-child(even) td { background: #111113; }
table.tx tbody tr:hover td { background: #1b1b1e; }
table.tx tbody tr.sel td { background: #24242a; }
table.tx tbody td { border-bottom-color: #18181a; }
.desc { gap: 10px; overflow: hidden; }
.desc .mlink { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; font-size: 13.5px; }
.desc .clink { flex: 0 0 auto; }
.acct-in { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-in .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--text-2); }
td.amt { font-weight: 600; font-size: 14px; }
@media (max-width: 980px) { table.tx col.c-acct { width: 0; } }

/* merchant icon: company logo on a white tile, or the category icon */
.mi { --c: #777; width: 26px; height: 26px; border-radius: 7px; background: var(--c); display: inline-flex; align-items: center;
      justify-content: center; flex: none; position: relative; overflow: hidden; }
.mi svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mi.has-logo { background: #fff; }
.mi.has-logo svg { display: none; }
.mi img { width: 100%; height: 100%; object-fit: contain; padding: 3px; display: block; }
.mi.sq { width: 32px; height: 32px; border-radius: 8px; }
.mi.sq svg { width: 17px; height: 17px; }
.mi.lg { width: 44px; height: 44px; border-radius: 10px; }
.mi.lg svg { width: 22px; height: 22px; }
.mi.lg img { padding: 5px; }

/* calmer, wider detail panel */
.split.open { grid-template-columns: minmax(0, 1fr) 440px; }
.dash-split.open:not(.editing) { grid-template-columns: minmax(0, 1fr) 440px; }
.dash-split.editing.open { grid-template-columns: minmax(0, 1fr) 340px 440px; }
.drawer { padding: 18px 20px; background: #0a0a0b; border-color: #232326; }
.dh { gap: 12px; margin-bottom: 12px; }
.dname { font-size: 16px; font-weight: 600; line-height: 1.25; }
.damt { font-size: 30px; }
.dsub { font-size: 12.5px; margin-bottom: 6px; }
.drawer .box, .dsec { border: 0; border-top: 1px solid #1f1f22; border-radius: 0; background: none; padding: 14px 0 6px; margin: 10px 0 0; }
.drawer .box-title, .dsec-t { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 8px; }
.drawer .box-title svg { display: none; }
.drawer .kv { grid-template-columns: 112px minmax(0, 1fr); font-size: 13px; padding: 5px 0; }
.drawer .explain { font-size: 13.5px; line-height: 1.55; }
.dsel { padding: 5px 8px !important; font-size: 13px; max-width: 240px; }
.dmore { border-top: 1px solid #1f1f22; margin-top: 12px; padding-top: 10px; }
.dmore summary { cursor: pointer; color: var(--text-2); font-size: 12.5px; list-style: none; }
.dmore summary::before { content: "▸ "; } .dmore[open] summary::before { content: "▾ "; }
.dtech { margin-top: 8px; border-top: 1px dashed #1f1f22; padding-top: 6px; }
.dtech .kv { font-size: 11.5px; color: var(--text-3); }
.dtech code { font-size: 11px; }

.card-tag { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px;
            background: #1d2a44; color: #9cc0ff; border: 1px solid #2c4170; }

/* no inner scroll areas on dashboards; thin dark scrollbars elsewhere (Windows shows thick light ones by default) */
.wlist { margin: 0 -14px -14px; }
.wshowmore { display: block; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12px; padding: 9px 14px; cursor: pointer; text-align: left; }
.wshowmore:hover { color: var(--text); background: var(--hover); }
html { scrollbar-color: #2e2e32 #000; }
* { scrollbar-width: thin; scrollbar-color: #2e2e32 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2e; border-radius: 6px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #3a3a40; }
::-webkit-scrollbar-corner { background: transparent; }

.run-item { color: var(--text); border-bottom: 1px solid #3a3a40; }
.run-item:hover { color: #9cc0ff; border-bottom-color: #9cc0ff; }

/* v2.3: card payments, credit card months, statement import */
.pay-chip { flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: #0f2a18; color: var(--green); border: 1px solid #1d4a2b; }
.pay-note { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
a.pill { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
a.pill.on-pill { background: #0f2a18; color: var(--green); border-color: #1d4a2b; }
.cc { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); margin-bottom: 16px; }
.cc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-head h2 { margin: 0; font-size: 17px; }
.cc-head .right { margin-left: auto; text-align: right; }
.cc-big { font-size: 22px; font-weight: 700; }
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.cc-stat { background: #0c0c0e; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.cc-stat .k { font-size: 11.5px; color: var(--muted); }
.cc-stat .v { font-size: 18px; font-weight: 700; margin-top: 2px; }
.cc-stat .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 18px 2px 0; border-bottom: 1px solid var(--line); }
.mbar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: var(--text); }
.mbar .col { width: 70%; max-width: 46px; background: #6f8ff0; border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.mbar.open .col { background: repeating-linear-gradient(45deg, #6f8ff0 0 6px, #4f6bc4 6px 12px); }
.mbar .val { font-size: 10.5px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.mbar:hover .col { filter: brightness(1.25); } .mbar:hover .val { color: var(--text); }
.mbar.on .col { background: #e8b33a; }
.mlabels { display: flex; gap: 6px; padding: 6px 2px 0; } .mlabels span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); min-width: 0; }
table.months { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
table.months th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.months td { padding: 9px 8px; border-bottom: 1px solid #18181b; }
table.months tr:nth-child(even) td { background: #0e0e10; }
table.months tr.go { cursor: pointer; } table.months tr.go:hover td { background: #17171b; }
table.months .num, table.months th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.catrow { display: grid; grid-template-columns: 26px minmax(0,1fr) 110px 90px; gap: 10px; align-items: center; padding: 7px 4px; text-decoration: none; color: var(--text); border-radius: 6px; }
.catrow:hover { background: #141417; }
.catrow .meter { height: 6px; background: #1b1b1f; border-radius: 3px; overflow: hidden; } .catrow .meter i { display: block; height: 100%; background: var(--c, #6f8ff0); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.cov { width: 100%; border-collapse: collapse; font-size: 12px; } .cov td, .cov th { padding: 4px 3px; text-align: center; }
.cov th { color: var(--muted); font-weight: 600; } .cov td.n { text-align: left; white-space: nowrap; padding-right: 10px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cov i { display: block; height: 18px; border-radius: 4px; background: #1b1b1f; }
.cov i.feed { background: #2f6fd6; } .cov i.stmt { background: #8a6dd8; } .cov i.both { background: linear-gradient(90deg, #8a6dd8 50%, #2f6fd6 50%); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 10px; }
table.rv { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
table.rv th { text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
table.rv td { padding: 7px 6px; border-bottom: 1px solid #18181b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.rv tr:nth-child(even) td { background: #0e0e10; } table.rv tr.dup td { color: var(--muted); }
table.rv .num { text-align: right; font-variant-numeric: tabular-nums; }
.dropzone { border: 1px dashed #3a3a40; border-radius: 12px; padding: 22px; text-align: center; background: #0c0c0e; }
.dropzone.over { border-color: #6f8ff0; background: #10141f; }
.desc .pay-note { flex: 0 4 auto; } .desc .mlink { flex-shrink: 1; min-width: 60px; }

/* v2.4: side menu */
:root { --side: 224px; }
.side-toggle { display: none; }
body.has-side .top-1 .in { max-width: none; padding-left: 18px; }
.side { position: fixed; top: 46px; left: 0; bottom: 0; width: var(--side); border-right: 1px solid var(--line); background: #070708;
  padding: 10px 10px 76px; overflow-y: auto; z-index: 25; scrollbar-width: thin; }
.side-sec { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; white-space: nowrap; }
.sl { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; overflow: hidden; }
.sl svg { flex: none; }
.sl:hover { background: #141417; color: var(--text); }
.sl.on { background: #13241a; color: #9be6b1; box-shadow: inset 2px 0 0 var(--green); }
.sl-t { overflow: hidden; text-overflow: ellipsis; }
.sl-dot { flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--c); display: grid; place-items: center; }
.sl-dot svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { position: fixed; left: 0; bottom: 0; width: var(--side); display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-top: 1px solid var(--line); background: #070708; font-size: 12.5px; line-height: 1.3; }
.side-foot .side-collapse { margin-left: auto; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; flex: none; display: grid; place-items: center; }
body.has-side main.wrap { margin-left: calc(var(--side) + max(0px, (100vw - var(--side) - var(--w)) / 2)); margin-right: auto; }
body.has-side main.wrap.tx-wrap { margin-left: calc(var(--side) + max(0px, (100vw - var(--side) - 1240px) / 2)); }
body.has-side main.wrap.dash-wrap { margin-left: calc(var(--side) + max(0px, (100vw - var(--side) - 1280px) / 2)); }
body.has-side main.wrap.wide { margin-left: var(--side); }
body.side-mini { --side: 62px; }
body.side-mini .sl-t, body.side-mini .side-sec { display: none; }
body.side-mini .sl { justify-content: center; padding: 0; }
body.side-mini .side-foot { flex-direction: column; padding: 8px 0; }
body.side-mini .side-foot .side-collapse { margin: 0; transform: rotate(180deg); }
body.side-mini .side-sec + .sl, body.side-mini .side-sec { margin-top: 0; }
.drawer, .ai-panel { top: 62px; } .drawer { max-height: calc(100vh - 76px); }
.side-scrim { display: none; }
@media (max-width: 900px) {
  .side-toggle { display: inline-grid; }
  .side { transform: translateX(-100%); transition: transform .2s; width: 240px; }
  .side-foot { width: 240px; transform: translateX(-100%); transition: transform .2s; }
  body.side-open .side, body.side-open .side-foot { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 46px 0 0 0; background: rgba(0,0,0,.5); z-index: 24; }
  body.has-side main.wrap, body.has-side main.wrap.tx-wrap, body.has-side main.wrap.dash-wrap, body.has-side main.wrap.wide { margin-left: auto; margin-right: auto; }
  body.side-mini { --side: 224px; } body.side-mini .sl-t, body.side-mini .side-sec { display: revert; }
}
/* tracked category pages, checks, analytics */
.tk-head { display: flex; align-items: center; gap: 12px; }
.tk-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--c); display: grid; place-items: center; flex: none; }
.tk-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mnote { background: #0c0c0e; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.mnote textarea { width: 100%; min-height: 64px; background: #111113; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; resize: vertical; }
.chk-note { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.bill { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); min-width: 0; }
.bill-h { display: flex; align-items: center; gap: 10px; }
.bill-h h3 { margin: 0; font-size: 15px; } .bill-h .right { margin-left: auto; text-align: right; }
.bill .mbars { height: 120px; padding-top: 16px; gap: 4px; } .bill .mbar .val { font-size: 9.5px; }
.bill .mlabels { gap: 4px; } .bill .mlabels span { font-size: 10px; }
.delta { font-size: 12px; font-weight: 600; } .delta.up { color: #f08a7a; } .delta.down { color: var(--green); }
.bill-tools { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
table.heat { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.heat th { color: var(--muted); font-weight: 600; font-size: 11px; padding: 6px 4px; text-align: right; }
table.heat th:first-child, table.heat td:first-child { text-align: left; }
table.heat td { padding: 7px 4px; text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid #17171a; white-space: nowrap; }
.bill .mbar .val { visibility: hidden; } .bill .mbar:hover .val, .bill .mbar:nth-last-child(-n+2) .val { visibility: visible; }
@media (max-width: 600px) { .top-1 .slash, .top-1 .crumb { display: none; } .top-1 .brand { white-space: nowrap; } }

/* v2.5: details slide open below the clicked row */
tr.xrow > td { padding: 0 !important; background: #0a0a0c !important; border-bottom: 1px solid var(--line); white-space: normal; height: auto; }
.xs { height: 0; overflow: hidden; transition: height .28s ease; }
.xs-in { padding: 0; }
tr.xrow .drawer { position: static; max-height: none; overflow: visible; border: 0; border-radius: 0; background: transparent; padding: 16px 20px 18px;
  inset: auto; z-index: auto; columns: 2 360px; column-gap: 36px; border-left: 3px solid var(--green); }
tr.xrow .drawer > .dh, tr.xrow .drawer > .damt, tr.xrow .drawer > .dsub { column-span: all; }
tr.xrow .drawer > .dsec, tr.xrow .drawer > details { break-inside: avoid; }
table.tx tbody tr.sel > td { background: #13241a !important; }
.xpanel { overflow: hidden; height: 0; transition: height .28s ease; }
.xpanel-in { padding: 10px 0 14px 12px; border-left: 3px solid var(--green); margin: 2px 0 6px 6px; }
.li.xopen { background: #13241a; }
[data-expand] { cursor: pointer; }
.li .caret { margin-left: 6px; color: var(--muted); transition: transform .2s; flex: none; }
.li.xopen .caret { transform: rotate(180deg); }

tr.xprow > td { padding: 0 12px !important; background: #0a0a0c !important; white-space: normal; height: auto; }
tr.xprow .xpanel-in { margin: 8px 0 12px; }
.xpwrap .xpanel-in .tbl, tr.xprow .xpanel-in .tbl { border-radius: 8px; }
tr[data-expand].xopen > td { background: #13241a !important; }
table.tx tbody tr, [data-expand] { scroll-margin-top: 64px; }
