:root{
  color-scheme:light;
  --bg:#f2f4ef;--surface:#fefdf9;--surface-2:#f4f5f0;--surface-3:#eceee7;
  --ink:#1a1c19;--ink-2:#3f443d;--muted:#6d7369;--line:#e6e8e1;--line-2:#d7dbd2;
  --green:#18a148;--green-ink:#11823a;--mint:#dffce9;--mint-ink:#0f7a35;
  --red:#d83b46;--red-soft:#fde8e9;--amber:#c27c06;--amber-soft:#fdf1da;--blue:#2f6fd6;--blue-soft:#e6eefc;
  --dark-btn:#2b2f2a;
  --shadow:0 1px 2px rgba(26,28,25,.04),0 10px 30px -12px rgba(26,28,25,.16);
  --overlay:rgba(26,28,25,.55);
  --radius:20px;
  font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-size:0.875rem;font-weight:450;color:var(--ink);background:var(--bg);
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0f110f;--surface:#181b18;--surface-2:#1f231f;--surface-3:#2a2e29;
  --ink:#eef0ea;--ink-2:#c9cdc5;--muted:#979d93;--line:#262a25;--line-2:#363b34;
  --green:#2cbf5f;--green-ink:#3fd673;--mint:#163522;--mint-ink:#6ee69a;
  --red:#f0646d;--red-soft:#3a1d20;--amber:#f2b23c;--amber-soft:#3a2d14;--blue:#6aa1ff;--blue-soft:#1a2a45;
  --dark-btn:#eef0ea;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 10px 30px -14px rgba(0,0,0,.7);
  --overlay:rgba(0,0,0,.65);
}
*{box-sizing:border-box}
html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);min-height:100vh;min-height:100dvh}
.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.i.xs{width:14px;height:14px}
button,input,textarea,select{font:inherit;color:inherit;min-width:0}
button{cursor:pointer;touch-action:manipulation}
[hidden]{display:none!important}
h1,h2,h3{margin:0;letter-spacing:-.015em}
h1{font-size:1.25rem;font-weight:650}h2{font-size:1.0625rem;font-weight:650}h3{font-size:0.875rem;font-weight:600}
p{margin:0;line-height:1.55}
a{color:inherit}
kbd{font:600 0.6875rem/1 Inter,system-ui;padding:3px 5px;border-radius:5px;background:var(--surface-3);color:var(--ink-2);border:1px solid var(--line-2)}
.muted{color:var(--muted)}.small{font-size:0.7813rem}
.money{font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.neg{color:var(--red)}.pos{color:var(--green)}.blue{color:var(--blue)}.amber{color:var(--amber)}.neutral{color:var(--ink-2)}
.muted-strong{color:var(--muted)}
.grow{flex:1;min-width:0}.spacer{flex:1}.right{text-align:right}
.between{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
::selection{background:var(--mint);color:var(--ink)}
:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* ---------- layout ---------- */
.app{display:grid;grid-template-columns:252px minmax(0,1fr);gap:14px;padding:12px;min-height:100vh;min-height:100dvh}
.sidebar{position:sticky;top:12px;height:calc(100dvh - 24px);background:var(--surface);border-radius:var(--radius);display:flex;flex-direction:column;padding:0 14px 16px;overflow-y:auto}
.brand-row{display:flex;align-items:center;justify-content:space-between;padding:20px 20px 16px;border-bottom:1px solid var(--line);margin:0 -14px 12px}
.brand{display:flex;align-items:center;gap:10px;font-size:1.1875rem;font-weight:650;letter-spacing:-.03em;color:var(--ink);text-decoration:none}
.logo{width:26px;height:26px;border-radius:50%;background:conic-gradient(from 200deg,var(--green) 0 62%,#8fe3ad 62% 100%);position:relative}
.logo::after{content:"";position:absolute;inset:6px;border-radius:50%;background:var(--surface)}
nav{display:flex;flex-direction:column;gap:2px}
nav a{display:flex;align-items:center;gap:12px;border-radius:14px;padding:9px 12px;font-size:0.9375rem;font-weight:500;color:var(--ink-2);text-decoration:none;transition:background-color .15s}
nav a .i{color:var(--muted)}
nav a:hover{background:var(--surface-2)}
nav a[aria-current]{background:var(--mint);color:var(--ink)}
nav a[aria-current] .i{color:var(--green-ink)}
.nav-gap{height:14px}
.badge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--green);color:#fff;font-size:0.75rem;font-weight:650;display:inline-grid;place-items:center}
.badge:empty{display:none}
.muted-badge{background:var(--surface-3);color:var(--muted);margin-left:8px}
.side-foot{margin-top:auto;padding-top:16px;display:grid;gap:10px}
.local-card{display:flex;gap:10px;align-items:center;background:var(--surface-2);border-radius:16px;padding:12px 14px}
.local-card strong{display:block;font-size:0.8125rem;font-weight:600}
.local-card span:not(.dot){font-size:0.75rem;color:var(--muted)}
.shortcuts{font-size:0.7188rem;color:var(--muted);padding:0 6px;line-height:1.9}
.dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px var(--mint);flex:none}
.main{min-width:0;display:flex;flex-direction:column;gap:14px}
.view{display:flex;flex-direction:column;gap:14px;animation:enter .22s ease-out}
@keyframes enter{from{opacity:0;transform:translateY(4px)}}

/* ---------- topo ---------- */
.topbar{display:flex;align-items:center;gap:16px;background:var(--surface-3);border-radius:var(--radius);padding:10px 14px 10px 28px;min-height:60px}
.greeting{display:flex;align-items:center;gap:12px;color:var(--muted);white-space:nowrap}
.greeting #greeting{color:var(--ink);font-weight:600}
.sep{width:1px;height:18px;background:var(--line-2)}
.period strong{color:var(--ink);font-weight:600}
.top-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:0.8125rem;color:var(--ink-2)}
.switch input{position:absolute;opacity:0;width:1px;height:1px}
.track{width:32px;height:18px;border-radius:9px;background:var(--line-2);position:relative;transition:background-color .2s;flex:none}
.track::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .2s cubic-bezier(.2,.8,.2,1)}
.switch input:checked+.track{background:var(--green)}
.switch input:checked+.track::after{transform:translateX(14px)}
.switch input:focus-visible+.track{outline:2px solid var(--green);outline-offset:2px}

/* ---------- botões ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:12px;padding:0 16px;height:40px;font-weight:600;font-size:0.875rem;background:var(--surface);color:var(--ink);transition:background-color .15s,transform .1s,border-color .15s,filter .15s;white-space:nowrap}
.btn:active{transform:scale(.97)}
.btn .i{width:18px;height:18px}
.btn.primary{background:var(--green);color:#fff}.btn.primary:hover{background:var(--green-ink)}
:root[data-theme="dark"] .btn.primary{color:#06210f}
.btn.dark{background:var(--dark-btn);color:var(--surface)}.btn.dark:hover{filter:brightness(1.15)}
.btn.soft{background:var(--mint);color:var(--mint-ink)}.btn.soft:hover{filter:brightness(.97)}
.btn.ghost{background:transparent;border-color:var(--line-2)}.btn.ghost:hover{background:var(--surface-2)}
.btn.outline{background:transparent;border-color:var(--green);color:var(--green-ink);width:min(360px,100%)}.btn.outline:hover{background:var(--mint)}
.btn.danger{background:var(--red);color:#fff}
.btn.sm{height:32px;padding:0 12px;font-size:0.8125rem;border-radius:10px}
.btn:disabled{opacity:.55;cursor:wait}
.danger-text{color:var(--red)!important}
.icon-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;border:0;background:var(--surface);color:var(--ink-2);transition:background-color .15s;flex:none}
.icon-btn:hover{background:var(--surface-2)}
.icon-btn.ghost{background:transparent;width:34px;height:34px;border-radius:10px}
.icon-btn.ghost:hover{background:var(--surface-2)}
.icon-btn.sm{width:30px;height:30px}.icon-btn.sm .i{width:17px;height:17px}
.icon-btn.round{border-radius:50%;width:48px;height:48px;border:1px solid var(--line)}
.link{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--green-ink);font-weight:600;font-size:0.8125rem;padding:4px 6px;border-radius:8px}
.link .i{width:16px;height:16px}
.link:hover{background:var(--mint)}
.muted-link{color:var(--muted)}
.only-mobile{display:none}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,16px);background:var(--ink);color:var(--surface);padding:11px 18px;border-radius:12px;font-weight:550;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:opacity .2s,transform .25s cubic-bezier(.2,.8,.2,1);z-index:100;max-width:calc(100vw - 32px);margin:0}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.error{background:var(--red);color:#fff}

/* ---------- cards ---------- */
.card{background:var(--surface);border-radius:var(--radius);padding:22px 26px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.card-foot{display:flex;justify-content:flex-end;margin-top:14px}
.page-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:18px}
.page-head>h1{grid-column:1}
.page-head>.btn.dark{grid-column:1;grid-row:1;justify-self:start}
.page-head>.btn.dark+h1{display:none}
.head-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
.month-switch{display:flex;align-items:center;gap:2px;background:var(--surface-2);border-radius:14px;padding:3px;justify-self:center}
.month-label{position:relative;min-width:150px;text-align:center;font-weight:650;font-size:0.9375rem;cursor:pointer;padding:6px 4px;border-radius:10px}
.month-label:hover{background:var(--surface-3)}
.month-label input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.month-label input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.grid-2.top{align-items:start}
.dash-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.crumbs{margin:-4px 0 -6px}

/* ---------- visão geral ---------- */
.hero{display:flex;align-items:center;gap:22px;flex-wrap:wrap;padding:20px 24px}
.hero-stat{display:flex;flex-direction:column;gap:4px}
.hero-stat>span{display:flex;align-items:center;gap:6px;color:var(--ink-2);font-weight:550}
.hero-stat strong{font-size:1.5rem;font-weight:650}
.hero-sep{width:1px;align-self:stretch;background:var(--line)}
.dot-ic{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:6px}
.dot-ic .i{width:14px;height:14px;stroke-width:2.2}
.dot-ic.pos{background:var(--mint);color:var(--green-ink)}.dot-ic.neg{background:var(--red-soft);color:var(--red)}
.quick-actions{display:flex;gap:10px;margin-left:auto;align-items:center}
.quick{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);transition:transform .15s,background-color .15s}
.quick:hover{transform:translateY(-2px);background:var(--surface-2)}
.quick.red{color:var(--red)}.quick.green{color:var(--green-ink)}.quick.blue{color:var(--blue)}
.quick.primary{background:var(--green);color:#fff;border-color:var(--green);margin-left:6px}
.banner{display:flex;align-items:center;gap:14px;padding:16px 22px;border:1px solid var(--amber-soft)}
.total-line{display:flex;justify-content:space-between;gap:14px;padding:4px 0 14px 14px;border-left:3px solid var(--green);margin-bottom:6px}
.total-line.wide{border-left:0;padding-left:0;background:var(--surface-2);border-radius:14px;padding:16px 18px;margin-bottom:12px}
.total-line strong{display:block;font-size:1.25rem;font-weight:650}
.total-line strong.big{font-size:1.5rem}
.credit-row{padding:6px 0;border-bottom:1px solid var(--line)}
.credit-row:last-child{border-bottom:0}
.credit-row .row{border:0;padding-bottom:6px}
.credit-box{display:flex;justify-content:space-between;background:var(--surface-2);border-radius:14px;padding:12px 16px;margin-bottom:8px}
.credit-box strong{display:block;font-size:0.9375rem}
.limit-mini{display:flex;align-items:center;gap:12px;padding:8px 0}
.limit-mini .progress{height:6px;margin-top:6px}

/* ---------- linhas ---------- */
.rows{display:flex;flex-direction:column}
.row{display:flex;align-items:center;gap:14px;padding:11px 6px;border-bottom:1px solid var(--line)}
.rows>.row:last-child{border-bottom:0}
.rows.compact .row{padding:8px 4px}
.row-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.row-main h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-sub{font-size:0.7813rem;color:var(--muted);display:flex;gap:6px 10px;flex-wrap:wrap;align-items:center;white-space:nowrap;overflow:hidden}
.row-sub.late{color:var(--red)}
.row-end{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.row-end small{font-size:0.75rem;color:var(--muted)}
.link-row{cursor:pointer;border-radius:12px}
.link-row:hover{background:var(--surface-2)}
.row.archived{opacity:.55}
.row-actions-inline{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.cat{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#fff;flex:none}
.cat .i{width:18px;height:18px;stroke-width:1.9}
.cat.sm{width:28px;height:28px}.cat.sm .i{width:15px;height:15px}
.cat.md{width:34px;height:34px}
.cat.xl{width:64px;height:64px}.cat.xl .i{width:30px;height:30px}
.cat.neutral{background:var(--surface-3);color:var(--ink-2)}
.src{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#fff;font-size:0.7813rem;font-weight:700;letter-spacing:.02em;flex:none}
.src.bank-logo{display:inline-block;background:#fff;overflow:hidden;box-shadow:inset 0 0 0 1px var(--line);position:relative}
.src.bank-logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.src.xs{width:20px;height:20px;font-size:0.5313rem}
.src.lg{width:44px;height:44px;font-size:0.875rem}
.src.card-chip{border-radius:12px}
.pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-size:0.7188rem;font-weight:600;background:var(--surface-3);color:var(--ink-2);white-space:nowrap}
.pill .i{width:12px;height:12px}
.pill.green{background:var(--mint);color:var(--mint-ink)}.pill.amber{background:var(--amber-soft);color:var(--amber)}
.pill.red{background:var(--red-soft);color:var(--red)}.pill.blue{background:var(--blue-soft);color:var(--blue)}
.pill.ghost{background:transparent;border:1px dashed var(--line-2);color:var(--muted)}
.icon-pill{padding:2px 5px}
.tag-chip{color:var(--blue);font-weight:550}

/* ---------- lançamentos ---------- */
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:var(--surface-2);border-radius:16px;padding:8px;margin-bottom:10px}
.filters select{width:auto;max-width:210px;height:38px;padding:0 30px 0 12px;background:var(--surface);border-color:transparent}
.filters .seg{flex:none}
.seg.compact button{flex:none}
select{padding-top:0;padding-bottom:0}
.search{position:relative;flex:1;min-width:180px}
.search .i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);width:18px;height:18px}
.search input{padding-left:38px;height:38px;background:var(--surface);border-color:transparent}
.bulk-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border-radius:14px;background:var(--mint);margin-bottom:8px}
.day-group{margin-top:6px}
.day-head{display:flex;justify-content:space-between;align-items:center;font-size:0.8125rem;font-weight:600;color:var(--ink-2);padding:14px 6px 6px;border-bottom:1px solid var(--line)}
.day-head .muted{font-weight:500;font-size:0.7813rem}
.row.txn{cursor:pointer;border-radius:12px;padding:10px 8px;border-bottom:0}
.row.txn:hover{background:var(--surface-2)}
.row.txn>input[type=checkbox]{width:18px;height:18px;accent-color:var(--green)}
.row.txn.virtual{opacity:.78}
.row-title{display:flex;align-items:center;gap:8px;min-width:0}
.row-title .desc{font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-src{width:200px;flex:none}
.src-label{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:0.8125rem;min-width:0;white-space:nowrap;overflow:hidden}
.src-label span:not(.src){overflow:hidden;text-overflow:ellipsis}
.amount{font-variant-numeric:tabular-nums;font-weight:600;min-width:100px;text-align:right}
.amount.with-fx{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.amount .fx-amount{font-size:.75rem;font-weight:500;color:var(--muted,#6b6f69)}
.wise-rows .row select{width:auto;max-width:200px;flex:0 0 auto;min-width:0}
.wise-rows .row .row-main{flex:1 1 auto;min-width:0}
.wise-rows .row-sub{white-space:normal;overflow:visible;text-overflow:clip}
.wise-rows .row-end{display:flex;flex-direction:column;align-items:flex-end}
@media (max-width:640px){.wise-rows .row{flex-wrap:wrap}.wise-rows .row .row-main{flex-basis:100%}}
.row.linked-account{padding-left:28px}
.row.linked-account{border-left:2px solid var(--line-2);margin-left:22px}
.fx-box{display:grid;gap:4px;margin-top:-4px}
.fx-box[hidden],.fx-box .field[hidden]{display:none}
.paid-btn{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;border:0;background:transparent;color:var(--muted);flex:none}
.paid-btn:hover{background:var(--surface-3)}
.paid-btn.on{color:var(--green)}
.row.pending .paid-btn{color:var(--red)}
.paid-btn .i{width:17px;height:17px}
.paid-slot{width:30px;flex:none}
.list-foot{display:flex;justify-content:flex-end;gap:28px;flex-wrap:wrap;margin-top:14px;padding:14px 18px;background:var(--surface-2);border-radius:14px}
.foot-item{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.foot-item span{font-size:0.7813rem;color:var(--muted)}
.foot-item strong{font-size:1.0625rem}

/* ---------- vazios ---------- */
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:28px 16px}
.ghost-lines{width:min(360px,100%);display:grid;gap:12px;margin-bottom:16px}
.ghost-line{display:grid;grid-template-columns:28px 1fr 48px;gap:10px;align-items:center}
.ghost-line i{display:block;height:10px;border-radius:5px;background:var(--surface-3)}
.ghost-line i:first-child{height:28px;border-radius:8px}
.ghost-line i:nth-child(2){width:60%}
.empty-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--ink);color:var(--surface);margin-bottom:6px;box-shadow:0 0 0 6px var(--surface-2)}
.empty-icon .i{width:18px;height:18px}
.empty h3{font-size:0.9375rem}
.empty p{color:var(--muted);max-width:46ch}
.empty .btn{margin-top:12px}

/* ---------- gráficos ---------- */
.donut-wrap{display:grid;grid-template-columns:auto minmax(0,1fr);gap:24px;align-items:center}
.donut{position:relative;width:170px;height:170px;flex:none}
.donut.lg{width:220px;height:220px}
.donut svg{width:100%;height:100%;transform:rotate(-90deg)}
.donut circle{fill:none;stroke-width:13}
.donut-center{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.donut-center small{color:var(--muted);font-size:0.75rem}
.donut-center strong{font-size:1rem;font-variant-numeric:tabular-nums}
.legend{display:flex;flex-direction:column;gap:9px;min-width:0}
.legend-item{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:0.8438rem}
.legend-item i{width:10px;height:10px;border-radius:50%}
.legend-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.legend-item b{font-weight:600;font-variant-numeric:tabular-nums}
.legend-item em{font-style:normal;color:var(--muted);font-size:0.75rem;margin-left:6px}
.progress{height:8px;border-radius:4px;background:var(--surface-3);overflow:hidden}
.progress span{display:block;height:100%;width:0;border-radius:4px;background:var(--green);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.progress span.warn{background:var(--amber)}.progress span.over{background:var(--red)}.progress span.card-bar{background:var(--blue)}
.chart-wrap{margin:8px 0 18px}
.chart{width:100%;height:auto;display:block}
.chart .bar-in{fill:var(--green)}.chart .bar-out{fill:var(--red)}
.chart .line{fill:none;stroke:var(--blue);stroke-width:2}
.chart .area{fill:var(--blue-soft);opacity:.7}
.chart .baseline{stroke:var(--line-2)}
.chart .axis{fill:var(--muted);font-size:0.6875rem;font-family:inherit}
.chart-legend{display:flex;gap:16px;justify-content:flex-end;font-size:0.7813rem;color:var(--muted)}
.chart-legend span{display:inline-flex;align-items:center;gap:6px}
.chart-legend i{width:10px;height:10px;border-radius:3px}

/* ---------- relatórios ---------- */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:-4px -26px 18px;padding:0 26px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.tabs button{border:0;background:none;padding:10px 12px;font-weight:550;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs button[aria-selected="true"]{color:var(--green-ink);border-color:var(--green)}
.report-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.report-tools select{width:auto;height:auto;min-height:36px;padding-top:6px;padding-bottom:6px;line-height:1.35}
.report-tools .field{min-width:220px}
.report-block{margin-bottom:28px}
.block-title{font-size:0.9375rem;margin-bottom:10px}
.report{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:40px;align-items:start}
.report-table{display:flex;flex-direction:column}
.bar-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:14px;align-items:center;padding:11px 4px;border-bottom:1px solid var(--line)}
.bar-row.clickable{cursor:pointer;border-radius:10px}
.bar-row.clickable:hover{background:var(--surface-2)}
.bar-row.total{border-bottom:0;font-size:0.9375rem}
.bar-row .top{display:flex;justify-content:space-between;gap:10px;margin-bottom:7px}
.bar-row .top span{font-weight:550}
.bar-row .top small{color:var(--muted)}
.bar{height:6px;border-radius:3px;background:var(--surface-3);overflow:hidden}
.bar span{display:block;height:100%;border-radius:3px}
.bar-row strong{font-variant-numeric:tabular-nums;font-weight:600;min-width:96px;text-align:right}
.report-detail{padding:4px 0 12px 50px;border-bottom:1px solid var(--line)}
.sub-list{display:grid;gap:4px;padding:8px 12px;background:var(--surface-2);border-radius:10px;margin-bottom:6px}
.table{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.tr{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr 1fr;gap:12px;padding:9px 14px;border-bottom:1px solid var(--line);align-items:center;font-variant-numeric:tabular-nums}
.tr:last-child{border-bottom:0}
.tr.th{background:var(--surface-2);font-size:0.7813rem;color:var(--muted);font-weight:600}
.tr.dim{color:var(--muted)}
.tr.dim .pos,.tr.dim .neg{color:var(--muted)}
.tr.total{background:var(--surface-2);font-weight:650}
.table.flow .tr>span:not(:first-child),.table.flow .tr>strong{text-align:right}
.sub-card .tr{grid-template-columns:1fr 1fr 1.4fr auto}
.table.import .tr{grid-template-columns:80px minmax(140px,2fr) 100px 110px minmax(150px,1.4fr) minmax(140px,1.2fr)}
.table.import select{height:34px;font-size:0.8125rem;padding:4px 8px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:6px 0 16px}
.kpis>div{background:var(--surface-2);border-radius:14px;padding:12px 16px}
.kpis strong{display:block;font-size:1.125rem;margin-top:2px}

/* ---------- limites ---------- */
.budget-hero{display:flex;flex-direction:column;gap:10px;padding:18px;border-radius:16px;background:var(--surface-2);margin-bottom:12px}
.budget-hero .nums{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.budget-hero .nums strong{display:block;font-size:1.375rem;font-weight:650}
.budget-hero .meta{display:flex;justify-content:space-between;font-size:0.8125rem;color:var(--muted);gap:12px}
.budget-total{display:grid;gap:10px;padding:18px 20px;border-radius:16px;background:var(--surface-2);margin-bottom:10px}
.budget-total strong{font-size:1.125rem}
.legend-inline{display:flex;gap:16px;flex-wrap:wrap;margin:4px 0 12px}
.legend-inline span{display:inline-flex;align-items:center;gap:6px}
.sw{display:inline-block;width:12px;height:12px;border-radius:3px}
.sw.realized{background:var(--green)}.sw.committed{background:var(--green);opacity:.35}.sw.pace{width:2px;height:14px;background:var(--ink-2);border-radius:0}
.limit-list{display:flex;flex-direction:column}
.limit-row{display:flex;align-items:center;gap:14px;padding:12px 4px;border-bottom:1px solid var(--line)}
.limit-row.unset .limit-name{color:var(--muted)}
.limit-name{font-weight:550}
.limit-bar{position:relative;height:12px;border-radius:6px;background:var(--surface-3);margin-top:8px;display:flex;overflow:visible}
.limit-bar span{display:block;height:100%}
.limit-bar span:first-child{border-radius:6px 0 0 6px}
.limit-bar .realized{background:var(--green)}
.limit-bar .committed{background:var(--green);opacity:.35}
.limit-bar.warn .realized,.limit-bar.warn .committed{background:var(--amber)}
.limit-bar.over .realized,.limit-bar.over .committed{background:var(--red)}
.limit-bar .pace{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--ink-2);border-radius:1px}
.limit-bar .limit-mark{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--red)}

/* ---------- cartões e fatura ---------- */
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.credit{border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:14px;background:var(--surface);cursor:pointer;transition:transform .15s,box-shadow .15s}
.credit:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.credit.archived{opacity:.6}
.credit-top{display:flex;align-items:center;gap:12px}
.credit h3{font-size:0.9375rem}
.credit dl{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0}
.credit dt{font-size:0.75rem;color:var(--muted)}
.credit dd{margin:2px 0 0;font-weight:600;font-variant-numeric:tabular-nums}
.credit .progress{margin-top:6px;height:6px}
.invoice-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:16px}
.invoice-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.invoice-nav .icon-btn{border:1px solid var(--line-2)}
.invoice-nav h1{font-weight:500;font-size:1.375rem}
.invoice-total{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.invoice-total strong{font-size:1.125rem}
.mini-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:18px}
.mini-stat{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:16px;padding:14px}
.mini-stat strong{display:block;font-size:0.9375rem;font-variant-numeric:tabular-nums}
.mini-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--surface-2);color:var(--ink-2)}
.sub-card{border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:18px;display:grid;gap:10px}
.invoice-body{display:flex;gap:28px;align-items:flex-start}
.invoice-cats{width:260px;display:grid;gap:14px;justify-items:center;padding:16px;border-radius:16px;background:var(--surface-2)}
.invoice-cats .legend{width:100%}

/* ---------- caixa de entrada ---------- */
.captures{display:grid;gap:12px;margin-top:12px}
.capture{border:1px solid var(--line);border-radius:16px;padding:16px 18px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:start}
.capture .row-sub{white-space:normal}
.capture details{grid-column:2/-1;font-size:0.8125rem}
.capture details summary{cursor:pointer;color:var(--green-ink);font-weight:600;font-size:0.7813rem}
.capture details p{margin-top:8px;padding:12px;border-radius:10px;background:var(--surface-2);white-space:pre-wrap;color:var(--ink-2)}
.capture .actions{grid-column:2/-1;display:flex;gap:8px;flex-wrap:wrap}
.warn{color:var(--amber);font-size:0.7813rem;font-weight:550}
.stat-icon{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;flex:none}
.stat-icon .i{width:18px;height:18px}
.stat-icon.green{background:var(--mint);color:var(--green-ink)}
.stat-icon.amber{background:var(--amber-soft);color:var(--amber)}
.disclosure summary{display:flex;align-items:center;cursor:pointer;list-style:none}
.disclosure summary::-webkit-details-marker{display:none}
.disclosure summary::after{content:"";width:8px;height:8px;border-right:1.7px solid var(--muted);border-bottom:1.7px solid var(--muted);transform:rotate(45deg);margin-left:auto;transition:transform .2s}
.disclosure[open] summary::after{transform:rotate(-135deg)}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:0.75rem;margin:18px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
.dropzone{position:relative;display:flex;align-items:center;gap:14px;border:1.5px dashed var(--line-2);border-radius:14px;padding:16px 18px;cursor:pointer;transition:border-color .15s,background-color .15s}
.dropzone.big{padding:36px 24px;justify-content:center;margin:12px 0}
.dropzone:hover{border-color:var(--green);background:var(--mint)}
.dropzone .i{color:var(--green-ink)}
.dropzone span{display:flex;flex-direction:column}
.dropzone small{color:var(--muted);font-weight:450}
.dropzone input{position:absolute;opacity:0;width:1px;height:1px}
.import-target{display:flex;align-items:center;gap:10px;margin:12px 0;padding:12px 14px;border-radius:14px;background:var(--surface-2)}
.step{margin:18px 0 8px;font-size:0.9375rem}

/* ---------- categorias e tags ---------- */
.cat-list .row.sub{padding-left:28px}
.sub-arrow{color:var(--muted)}
.inline-form{display:flex;gap:10px;margin-bottom:12px}
.inline-form input{max-width:360px}

/* ---------- configurações ---------- */
.pref-row{display:flex;justify-content:space-between;gap:24px;padding:18px 0;border-bottom:1px solid var(--line);align-items:center}
.pref-row>div:first-child{max-width:60ch}
.radio-col{display:grid;gap:8px;min-width:200px}
.radio-row{display:flex;gap:18px;flex-wrap:wrap}
.radio{display:inline-flex;gap:8px;align-items:center;cursor:pointer;font-weight:500;color:var(--ink)}
.radio input{width:18px;height:18px;accent-color:var(--green)}
.activity{display:flex;align-items:center;gap:12px;padding:10px 6px;border-bottom:1px solid var(--line)}
.act-ic{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--surface-2);color:var(--muted)}
.act-ic .i{width:15px;height:15px}
.feature{display:flex;gap:14px;align-items:flex-start;margin:6px 0 16px}
.settings-body .form{margin-top:14px}

/* ---------- formulários ---------- */
.form{display:grid;gap:14px}
.form .btn{justify-self:start}
.field{display:grid;gap:6px;min-width:0}
.field-label{font-size:0.8125rem;font-weight:550;color:var(--ink-2);display:flex;align-items:center;gap:8px}
input,select,textarea{width:100%;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);padding:9px 12px;font-size:0.9375rem;color:var(--ink);transition:border-color .15s,box-shadow .15s}
input,select{height:42px}
input[type=checkbox],input[type=radio]{width:auto;height:auto}
textarea{resize:vertical;line-height:1.5}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px var(--mint)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}
input[readonly]{background:var(--surface-2)}
.money-input{display:flex;align-items:center;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);transition:border-color .15s,box-shadow .15s}
.money-input:focus-within{border-color:var(--green);box-shadow:0 0 0 3px var(--mint)}
.money-input>span{padding-left:12px;color:var(--muted);font-weight:600}
.money-input input{border:0;box-shadow:none!important;background:transparent;font-variant-numeric:tabular-nums}
.sign-btn{width:30px;height:30px;margin-right:6px;border:0;border-radius:8px;background:var(--surface-2)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.span-2{grid-column:span 2}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:450;font-size:0.8125rem}
.check input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--green)}
.error{color:var(--red);font-size:0.8125rem;font-weight:550}
.error:empty{display:none}
.note{display:flex;gap:10px;align-items:flex-start;background:var(--surface-2);border-radius:12px;padding:12px 14px;font-size:0.8125rem;color:var(--ink-2);line-height:1.5}
.note:empty{display:none}
.note .i{width:18px;height:18px;color:var(--muted);margin-top:1px}
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:3px;gap:2px}
.seg button{flex:1;border:0;background:transparent;border-radius:10px;padding:8px 12px;font-weight:600;color:var(--muted);white-space:nowrap}
.seg button[aria-selected="true"],.seg button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.seg button:disabled{opacity:.5;cursor:not-allowed}
.seg.compact button{padding:6px 10px;font-size:0.8125rem}
.seg.small{margin-top:4px}
.swatches{display:flex;flex-wrap:wrap;gap:8px}
.swatch{width:26px;height:26px;border-radius:50%;border:2px solid transparent;box-shadow:inset 0 0 0 2px var(--surface)}
.swatch.on{border-color:var(--ink)}
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:6px;max-height:150px;overflow:auto;padding:2px}
.icon-pick{display:grid;place-items:center;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink-2)}
.icon-pick.on{background:var(--ink);color:var(--surface);border-color:var(--ink)}
.avatar-row{display:flex;gap:16px;align-items:flex-end}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.chip-check{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:6px 12px;cursor:pointer;font-size:0.8125rem}
.chip-check input{margin:0}
.chip-check .i{width:16px;height:16px;color:var(--muted)}
.chip-check:has(input:checked){border-color:var(--green);background:var(--mint);color:var(--mint-ink)}
.warn-note p{margin:2px 0 0}
.chip{display:inline-flex;align-items:center;gap:4px;padding:3px 4px 3px 10px;border-radius:999px;background:var(--blue-soft);color:var(--blue);font-weight:550;font-size:0.8125rem}
.chip-x{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;border:0;background:transparent;color:inherit}
.chip-x .i{width:12px;height:12px}

/* ---------- modal de lançamento ---------- */
.txn-form{display:grid;gap:14px}
.type-row .seg button[aria-selected="true"][data-kind="expense"]{color:var(--red)}
.type-row .seg button[aria-selected="true"][data-kind="income"]{color:var(--green-ink)}
.type-row .seg button[aria-selected="true"][data-kind="transfer"]{color:var(--blue)}
.amount-field{display:grid;gap:4px}
.amount-field .money-input{border:0;border-bottom:2px solid var(--line-2);border-radius:0;box-shadow:none!important;background:transparent}
.amount-field .money-input>span{padding-left:0;font-size:1.25rem}
.amount-field .money-input input{font-size:2rem;font-weight:650;height:56px;padding-left:8px}
.amount-field.expense .money-input input{color:var(--red)}.amount-field.expense .money-input:focus-within{border-color:var(--red)}
.amount-field.income .money-input input{color:var(--green-ink)}.amount-field.income .money-input:focus-within{border-color:var(--green)}
.amount-field.transfer .money-input input{color:var(--blue)}.amount-field.transfer .money-input:focus-within{border-color:var(--blue)}
.paid-row{display:flex}
.ai-badge{display:inline-flex;align-items:center;gap:3px;font-size:0.6875rem;font-weight:600;color:var(--blue);background:var(--blue-soft);padding:1px 7px;border-radius:999px}
.ai-badge .i{width:12px;height:12px}
.extras{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:12px}
.extra{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line-2);background:var(--surface);border-radius:999px;padding:6px 14px 6px 10px;font-weight:550;color:var(--ink-2)}
.extra .i{width:17px;height:17px}
.extra[aria-pressed="true"]{background:var(--mint);border-color:transparent;color:var(--mint-ink)}
.panel-sub{display:grid;gap:12px;padding:14px;border-radius:14px;background:var(--surface-2)}
.panel-title{font-size:0.875rem}
.panel-sub input,.panel-sub select,.panel-sub textarea{background:var(--surface)}

/* ---------- modal genérico ---------- */
.modal{border:0;padding:0;border-radius:22px;background:var(--surface);color:var(--ink);width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);box-shadow:0 30px 80px -20px rgba(0,0,0,.45);display:flex;flex-direction:column}
.modal:not([open]){display:none}
.modal.small{width:min(430px,calc(100vw - 24px))}
.modal.txn{width:min(600px,calc(100vw - 24px))}
.modal::backdrop{background:var(--overlay)}
.modal[open]{animation:pop .22s cubic-bezier(.2,.8,.2,1)}
.modal[open]::backdrop{animation:fade .2s ease-out}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}}
@keyframes fade{from{opacity:0}}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 24px 10px}
.modal-head h2{font-size:1.1875rem}
.modal-head p{margin-top:4px}
.modal-body{padding:6px 24px 8px;overflow-y:auto;display:grid;gap:14px}
.modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:14px 24px 20px;flex-wrap:wrap}
.card .modal-actions{padding:18px 0 0}
.choices{display:grid;gap:8px}
.choice{display:grid;gap:2px;text-align:left;padding:14px 16px;border-radius:14px;border:1px solid var(--line-2);background:var(--surface)}
.choice:hover{border-color:var(--green);background:var(--mint)}

/* ---------- popovers ---------- */
.popover{position:absolute;z-index:60;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px;min-width:200px;animation:pop .16s ease-out}
.menu{display:grid}
.menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}
.menu-item{display:flex;align-items:center;gap:10px;border:0;background:transparent;text-align:left;padding:9px 12px;border-radius:10px;font-weight:500;color:var(--ink)}
.menu-item:hover{background:var(--surface-2)}
.menu-item .i{width:17px;height:17px;color:var(--muted)}
.menu-item kbd{margin-left:auto}
.menu-item.danger{color:var(--red)}.menu-item.danger .i{color:var(--red)}
.pop-form{display:grid;gap:10px;padding:10px;min-width:240px}

.scrim{position:fixed;inset:0;background:var(--overlay);z-index:30}

/* ---------- entrada ---------- */
.auth-root{display:none}
body.auth-mode .auth-root{display:block}
body.auth-mode .app{display:none}
.auth-page{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:24px 16px}
.brand.big{font-size:1.625rem}.brand.big .logo{width:34px;height:34px}.brand.big .logo::after{inset:8px}
.auth-card{width:min(440px,100%);display:grid;gap:14px;padding:30px 32px;box-shadow:var(--shadow)}
.auth-card h1{font-size:1.375rem;text-align:center}
.auth-card>p.muted{text-align:center}
.auth-form{margin-top:4px}
.btn.block{width:100%;height:46px;justify-self:stretch!important}
.pass-wrap{position:relative;display:block}
.pass-wrap .icon-btn{position:absolute;right:4px;top:4px}
.auth-swap{text-align:center;font-size:0.8438rem;color:var(--muted)}
.auth-swap a{color:var(--green-ink);font-weight:600}
.center{text-align:center}

/* ---------- espaços ---------- */
.space-slot{margin:0 0 10px}
.space-switch{display:flex;align-items:center;gap:10px;width:100%;border:1px solid var(--line);background:var(--surface-2);border-radius:14px;padding:8px 10px;text-align:left}
.space-switch:hover{border-color:var(--line-2)}
.space-name{flex:1;min-width:0;display:flex;flex-direction:column}
.space-name strong{font-size:0.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.space-name small{font-size:0.7188rem;color:var(--muted)}
.space-ic{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--mint);color:var(--green-ink);flex:none}
.space-ic.shared{background:var(--blue-soft);color:var(--blue)}
.space-ic .i{width:17px;height:17px}
.space-menu{min-width:270px}
.space-menu .menu-item span{display:flex;flex-direction:column;flex:1}
.space-menu .menu-item.on{background:var(--surface-2)}
body.shared-space .topbar{background:var(--blue-soft)}
.user-chip{display:flex;align-items:center;gap:10px;width:100%;border:0;background:var(--surface-2);border-radius:16px;padding:10px 12px;text-align:left;min-width:0}
.user-chip span.grow{display:flex;flex-direction:column;min-width:0}
.user-chip strong{font-size:0.8125rem}.user-chip small{font-size:0.7188rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.src.person{background:var(--ink-2);color:var(--surface)}
.space-box{border:1px solid var(--line);border-radius:18px;padding:16px 18px;margin-bottom:14px;display:grid;gap:12px}
.space-head{display:flex;align-items:center;gap:12px}
.invite-row{display:flex;gap:8px;flex-wrap:wrap}
.invite-row input{flex:1;min-width:200px}.invite-row select{width:auto}
.sm-select{width:auto;height:34px;font-size:0.8125rem}
.split-list{display:grid;gap:8px}
.split-row{display:flex;align-items:center;gap:10px}
.split-row .money-input,.split-row input[type=number]{width:150px;flex:none}
.share-body{display:grid;gap:14px}
.shared-hero{display:flex;gap:16px;align-items:center}
.shared-hero .big{font-size:1.375rem;display:block;margin-top:4px}
.obligation,.debt,.resp{display:flex;align-items:center;gap:10px;padding:10px 4px;border-bottom:1px solid var(--line)}
.resp-list{display:grid}
.warn-note{background:var(--amber-soft);color:var(--amber)}
.pill.purple{background:var(--blue-soft);color:var(--blue)}
.shared-row .cat{box-shadow:0 0 0 3px var(--blue-soft)}

/* ---------- alertas ---------- */
.bell-btn{position:relative;text-decoration:none}
.bell-count{position:absolute;top:4px;right:3px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--muted);color:#fff;font-size:0.6563rem;font-weight:700;display:grid;place-items:center}
.bell-count.hot{background:var(--red)}
.alert-row{border-bottom:1px solid var(--line)}
.alert-dot{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--surface-2);color:var(--ink-2);flex:none}
.alert-row.high .alert-dot{background:var(--red-soft);color:var(--red)}
.alert-row.medium .alert-dot{background:var(--amber-soft);color:var(--amber)}
.check-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.inline-pair{display:flex;align-items:center;gap:8px}
.prefs-card{margin-top:18px}

/* ---------- entrada inteligente ---------- */
.quick-entry{display:grid;gap:8px;padding:10px;border-radius:16px;background:var(--surface-2);border:1px dashed var(--line-2)}
.quick-row{display:flex;align-items:center;gap:6px}
.quick-row input{flex:1;height:40px;background:var(--surface)}
.quick-ic{color:var(--blue)}
.quick-msg{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;font-size:0.8125rem;color:var(--ink-2)}
.quick-msg:empty{display:none}
.quick-msg .i{width:16px;height:16px;flex:none;margin-top:2px}
.quick-msg.ok{color:var(--green-ink)}.quick-msg.warn{color:var(--amber)}
.quick-msg a{color:inherit;font-weight:600}
.chip.pick{border:0;padding:4px 12px;cursor:pointer}
.icon-btn.listening{background:var(--red-soft);color:var(--red);animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{box-shadow:0 0 0 6px var(--red-soft)}}
.icon-btn.dim{opacity:.55}
.plan-card{display:grid;gap:12px;padding:20px;border-radius:18px;border:1px solid var(--line)}
.plan-card.premium{border-color:var(--amber);background:linear-gradient(135deg,var(--amber-soft),transparent 60%)}
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.steps{margin:0;padding-left:20px;display:grid;gap:8px;color:var(--ink-2)}
.steps a,.note a{color:var(--green-ink);font-weight:600}
.bank-account{display:grid;gap:8px;padding:12px 0;border-top:1px solid var(--line)}
.bank-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.bank-controls select{width:auto;min-width:220px}
.plan-card ul{margin:0;padding-left:18px;display:grid;gap:6px;color:var(--ink-2)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media print{.sidebar,.topbar,.filters,.head-actions,.paid-btn,.toolbar,.bulk-bar{display:none!important}.app{display:block}.card{padding:0}}

@media (max-width:1180px){
  .row-src{width:150px}
  .topbar .switch-label{display:none}
  .report{grid-template-columns:1fr}
  .report .donut{justify-self:center}
  .invoice-body{flex-direction:column}
  .invoice-cats{width:100%}
}
@media (max-width:980px){
  .app{grid-template-columns:1fr;padding:10px}
  .sidebar{position:fixed;inset:0 auto 0 0;top:0;height:100%;width:280px;border-radius:0 var(--radius) var(--radius) 0;z-index:40;transform:translateX(-102%);transition:transform .28s cubic-bezier(.2,.8,.2,1);padding-top:env(safe-area-inset-top)}
  .sidebar.open{transform:none}
  .only-mobile{display:inline-grid}
  .topbar{padding:10px 12px}
  .greeting{display:none}
  .dash-grid,.grid-2{grid-template-columns:1fr}
  .card{padding:18px 16px}
  .tabs{margin-inline:-16px;padding-inline:16px}
  .page-head{grid-template-columns:1fr auto;grid-template-areas:"title actions" "nav nav"}
  .page-head>h1,.page-head>.btn.dark{grid-area:title}
  .page-head>.month-switch{grid-area:nav;justify-self:stretch;justify-content:space-between}
  .page-head>.head-actions{grid-area:actions}
  .row-src{display:none}
  .hero{gap:14px}
  .hero-sep{display:none}
  .quick-actions{margin-left:0;width:100%}
}
@media (max-width:600px){
  .top-actions .btn.primary span{display:none}
  .top-actions .btn.primary{width:40px;padding:0}
  .form-grid{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .donut-wrap{grid-template-columns:1fr;justify-items:center}
  .legend{width:100%}
  .filters select{flex:1;max-width:none}
  .capture{grid-template-columns:auto minmax(0,1fr)}
  .capture>.row-end{grid-column:2;align-items:flex-start}
  .hero-stat strong{font-size:1.25rem}
  .amount{min-width:0}
  .tr{grid-template-columns:repeat(3,1fr)}
  .table.flow .tr>:nth-child(4){display:none}.table.flow .tr>:nth-child(2){display:none}
  .table.import{overflow-x:auto}.table.import .tr{min-width:760px}
  .pref-row{flex-direction:column;align-items:flex-start}
  .credit dl{grid-template-columns:1fr 1fr}
  .list-foot{gap:16px;justify-content:space-between}
}
.row.dim{opacity:.6}
.privacy-block h3.sub{margin-top:16px;font-size:0.875rem}
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:8px}
.module{border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.module p{margin:6px 0 0}
.nw-head{display:grid;grid-template-columns:minmax(200px,1fr) 2fr;gap:20px;align-items:start}
.nw-head>div:first-child{display:grid;gap:4px}
.nw-split{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.nw-split h3{margin:0 0 6px;font-size:0.875rem}
.nw-split .between{padding:3px 0}
@media (max-width:720px){.nw-head,.nw-split{grid-template-columns:1fr}}
.nw-bars{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;align-items:end;height:120px;margin:18px 0 6px}
.nw-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:4px}
.nw-col small{color:var(--muted);font-size:0.6875rem}
.nw-bar{width:100%;max-width:28px;border-radius:6px 6px 2px 2px;background:var(--green)}
.nw-bar.neg{background:var(--red)}
.row.goal .progress{margin-top:6px}
.valuations{display:grid;gap:4px;border-top:1px solid var(--line);padding-top:8px}
.holders{display:grid;gap:6px;border-top:1px solid var(--line);padding-top:10px;margin-top:4px}
.holder{display:flex;gap:10px;align-items:center}
.holder.archived{opacity:.55}
.holder .grow{display:grid}
.holder-ic{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);flex:none}
.holder-ic .i{width:15px;height:15px}
.credit-foot{display:flex;justify-content:flex-end}
.onboarding .progress{margin:4px 0 8px}
.steps-list .row.done h3{color:var(--muted);text-decoration:line-through}
.step-ic{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);flex:none}
.step-ic.ok{background:var(--mint);color:var(--mint-ink)}
.step-ic .i{width:16px;height:16px}
.doc-body{background:var(--bg);color:var(--ink)}
.doc{max-width:760px;margin:0 auto;padding:32px 16px 64px;line-height:1.6}
.doc h1{margin:24px 0 4px}
.doc h2{font-size:1.125rem;margin:28px 0 8px}
.doc ul{padding-left:20px}
.doc a{color:var(--green-ink);font-weight:600}
.consent-row{display:grid;gap:2px;margin-bottom:10px}
.consent-row p{margin:0}
.privacy-block{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}
.privacy-block h3{margin:0 0 4px}
.danger-zone h3{color:var(--red)}
.rule-offer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rule-offer[hidden]{display:none}
.rule-offer .inline-input{width:auto;min-width:140px;flex:1;padding:6px 10px}
.rule-probe{margin-top:12px}
.rule-probe input{flex:1}
.confidence{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.suggestion{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:6px 0 0}
.suggestion svg{flex:none;color:var(--muted)}
.candidates{display:grid;gap:6px;margin-top:8px}
.candidate{display:flex;gap:8px;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:10px;padding:6px 10px}
.balance-box{border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;gap:10px;margin:12px 0}
.balance-box h3{margin:0}
.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:720px){.form-grid.three{grid-template-columns:1fr}}
.balance-check{display:grid;gap:6px}
.check-line{display:flex;gap:8px;align-items:flex-start;margin:0;color:var(--ink-2)}
.check-line svg{flex:none;margin-top:2px}
.check-line.ok svg{color:var(--green-ink)}
.check-line.bad{color:var(--red)}
.check-line.warn{flex-wrap:wrap;align-items:center}
.forgot-link{margin:-4px 0 0;text-align:right;font-size:0.8125rem}
.forgot-link a{color:var(--green-ink);font-weight:600}
.verify-bar{display:flex;align-items:center;gap:10px;margin:12px 24px 0;padding:10px 14px;border-radius:12px;background:var(--mint);color:var(--mint-ink);font-size:0.8438rem;line-height:1.45}
.verify-bar .i{flex:none}
@media (max-width:720px){.verify-bar{margin:10px 16px 0;flex-wrap:wrap}}
.invite-title{font-size:0.875rem;margin:14px 0 6px}

.checks .card-head h2{display:flex;align-items:center;gap:6px}
.check-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.check-item{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.check-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.check-txns{margin:0;padding-left:18px;font-size:0.8125rem;display:flex;flex-direction:column;gap:2px}
.check-item .actions{display:flex;gap:8px;flex-wrap:wrap}
.check-item a.btn{text-decoration:none}

.attention-box,.import-error{margin:12px 0}
.import-error{background:var(--red-soft);color:var(--ink)}
.attention-box{background:var(--amber-soft);color:var(--ink)}
.attention-list{margin:6px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:3px}
.attention-list a{font-weight:600}
.table.import .tr.attention{box-shadow:inset 3px 0 0 var(--amber)}
.table.import .tr.failed{box-shadow:inset 3px 0 0 var(--red);background:var(--red-soft)}
.table.import .tr.flash{animation:rowflash 1.6s ease-out}
@keyframes rowflash{0%{background:var(--amber-soft)}100%{background:transparent}}
@media (prefers-reduced-motion:reduce){.table.import .tr.flash{animation:none;outline:2px solid var(--amber)}}
.check-choice{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.check-ok{background:var(--mint);color:var(--ink);margin:12px 0}
.pdf-password{margin:12px 0}
.pdf-password .inline-form{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.pdf-password input{min-height:40px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit}
.invest-line{margin:-6px 4px 12px;display:flex;align-items:center;gap:4px}
.bulk-fixes{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.insight-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-top:10px}
.insight{border:1px solid var(--line);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.insight.alert{border-left:3px solid var(--amber)}.insight.good{border-left:3px solid var(--green)}.insight.tip{border-left:3px solid var(--blue)}
.insight-head{display:flex;gap:10px;align-items:flex-start}.insight-head h3{margin:4px 0 0;font-size:0.9375rem;line-height:1.3}
.insight-items{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;font-size:0.8125rem}
.insight-items li{display:flex;gap:10px;align-items:baseline;border-top:1px solid var(--line);padding-top:4px}
.insight-group{font-size:0.9375rem;margin:18px 0 0}
.insights-home .card-head h2{display:flex;align-items:center;gap:6px}
.stat-icon.blue{background:var(--blue-soft);color:var(--blue)}
.advisor{margin-bottom:16px}.advisor .card-head h2{display:flex;align-items:center;gap:6px}
.advisor-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0}
.advisor-controls input{flex:1 1 280px;min-height:40px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit}
.advisor-turn{border-top:1px solid var(--line);padding-top:12px;margin-top:12px;display:flex;flex-direction:column;gap:10px}
.advisor-q{margin:0;font-weight:600;display:flex;align-items:center;gap:4px}.advisor-answer{margin:0;line-height:1.55;white-space:pre-line}
.advisor-actions{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}
.advisor-action p{margin:4px 0}.advisor-action-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.advisor-impact{margin-left:auto;font-weight:600;color:var(--green-ink)}
.advisor-list ul{margin:4px 0 0;padding-left:18px}.advisor-chips{display:flex;gap:6px;flex-wrap:wrap}
.hero-note{grid-column:1/-1;margin:4px 0 0}
