:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#142238;background:#f4f7fb}*{box-sizing:border-box}body{margin:0}.shell{max-width:1250px;margin:auto;padding:20px}header{display:flex;align-items:center;justify-content:space-between;padding:12px 0 22px}.brand{display:flex;align-items:center;gap:12px}.brand strong{display:block;font-size:20px}.brand small{display:block;color:#738198;margin-top:3px}.mark{background:#1e5fca;color:white;font-weight:800;border-radius:14px;width:43px;height:43px;display:grid;place-items:center}nav{display:flex;gap:6px;overflow:auto;border-bottom:1px solid #dce3ee;margin-bottom:28px}nav button{background:none;color:#67778d;border-radius:0;border-bottom:3px solid transparent;white-space:nowrap}nav button.active{color:#1e5fca;border-bottom-color:#1e5fca}button{cursor:pointer;background:#215fc5;color:white;border:0;border-radius:10px;padding:11px 15px;font-weight:650}button:hover{filter:brightness(.95)}.ghost{background:#e9eff8;color:#28507f}.danger{background:#b43e46}.page{display:none}.page.active{display:block}.heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}h1{font-size:29px;margin:0 0 6px}h2{font-size:17px;margin:0 0 20px}p{line-height:1.5;color:#64748b;margin:5px 0 14px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.stats article,.panel,.savingCard{background:white;border:1px solid #e2e8f2;border-radius:16px;padding:21px;box-shadow:0 3px 16px #182b4a07}.stats span{display:block;color:#7c8ca2;font-size:13px}.stats b{display:block;font-size:23px;margin-top:12px}.two{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.panel{margin-bottom:18px}.bars{display:grid;gap:14px}.barlabel{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-bottom:6px}.track{height:9px;background:#eaf0f8;border-radius:99px;overflow:hidden}.fill{height:100%;background:#4b86df;border-radius:99px}.hint{font-size:13px;color:#7b899b}.filters,.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.filters>*{flex:1;min-width:160px}input,select{background:white;border:1px solid #d9e2ee;border-radius:9px;padding:11px;color:#1b2b40;font:inherit;max-width:100%}label{font-size:13px;color:#51617a}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;color:#75839b;font-size:12px;font-weight:600}td,th{border-bottom:1px solid #edf1f6;padding:11px 8px}td select{max-width:160px;font-size:12px;padding:6px}.right{text-align:right}.negative{color:#c44855}.positive{color:#1b9068}.savingsGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.savingCard strong{font-size:23px;display:block;margin:10px 0}.savingCard span{font-size:12px;color:#64748b}.upload{border:2px dashed #b8cbe8;background:#f8fbff;border-radius:15px;padding:40px 15px;display:grid;justify-items:center;gap:8px;text-align:center;cursor:pointer;margin-bottom:16px}.upload input{max-width:280px}.uploadicon{font-size:32px;color:#2d6ccf}.upload strong{font-size:16px;color:#1b2b40}.upload span{color:#64748b}.inline label{display:flex;gap:8px;align-items:center}.tag{display:inline-block;background:#edf2fa;border-radius:7px;padding:5px 7px;font-size:11px}footer{text-align:center;color:#98a4b4;font-size:12px;padding:25px}dialog{border:0;border-radius:18px;box-shadow:0 20px 80px #14223855;max-width:95vw;width:410px}dialog::backdrop{background:#101b2a88}dialog form{display:grid;gap:12px}dialog label{display:grid;gap:5px}dialog input,dialog select{width:100%}.matrix{overflow:auto}.matrix table{min-width:460px}@media(max-width:850px){.stats{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}.savingsGrid{grid-template-columns:repeat(2,1fr)}}@media(max-width:530px){.shell{padding:12px}.stats{gap:9px}.stats article,.panel,.savingCard{padding:14px}.stats b{font-size:17px}.savingsGrid{grid-template-columns:1fr}h1{font-size:23px}.heading{align-items:flex-start}header .ghost{font-size:11px}nav button{padding:12px 9px}}

.reportFilters{margin-top:8px}.reportFilters label,.filters label{display:grid;gap:5px;font-size:12px}.reportFilters label>*{width:100%}.sumGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px;margin:12px 0}.sumGrid>div{border-radius:10px;background:#f4f7fb;padding:13px}.sumGrid small{display:block;color:#667991;margin-bottom:8px}.sumGrid strong{font-size:16px}.aliasRow{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr);gap:16px;align-items:center;margin:10px 0}.aliasRow span{word-break:break-word}.muted{display:block;color:#9ca9b9;font-size:10px;margin-top:3px}.tablewrap{overflow-x:auto}h3{font-size:14px;margin:16px 0 10px}@media(max-width:530px){.aliasRow{grid-template-columns:1fr;gap:5px}.filters>*{min-width:130px}.sumGrid{grid-template-columns:repeat(2,1fr)}}

.reportDisclosure{margin-top:12px}.reportDisclosure>summary{cursor:pointer;font-weight:700;font-size:1.02rem;padding:.4rem 0;list-style-position:inside}.reportDisclosure[open]>summary{margin-bottom:16px}.sourceVisibility{display:flex;align-items:center;gap:8px;margin:-4px 0 12px 0;color:#52647a;font-size:.87rem}.sourceVisibility input{width:auto;flex:none}

.source-chip{display:inline-flex;align-items:center;gap:7px;white-space:normal}.source-dot{display:inline-block;width:11px;height:11px;background:var(--source-color,#64748b);border-radius:4px;flex:none}.colorLabel{display:flex;align-items:center;gap:9px;color:#52647a}.colorLabel input[type=color]{padding:2px;width:47px;height:36px;cursor:pointer}.tablewrap tbody tr[style*="--source-color"] td:first-child{box-shadow:inset 4px 0 var(--source-color)}

.cashPanel{margin-bottom:24px}.cashPanel h2{margin-bottom:4px}.cashHistory{margin-top:18px}.cashHistory summary{cursor:pointer;font-weight:650;color:#28507f;padding:8px 0}.cashWalletCard .inline{margin-top:13px}.cashWalletCard button{font-size:12px;padding:9px 11px}.cashWalletCard h2{margin-top:9px}.cashPanel .heading{flex-wrap:wrap}

.currencyTotals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-bottom:10px}.currencyTotalCard{background:white;border:1px solid #d9e5f4;border-radius:16px;padding:22px;box-shadow:0 3px 16px #182b4a07}.currencyTotalCard>span{display:block;font-size:13px;color:#60748e;font-weight:650}.currencyTotalCard>strong{display:block;margin:12px 0 16px;font-size:clamp(21px,3vw,30px);word-break:break-word}.totalParts{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;border-top:1px solid #edf1f6;padding-top:13px;font-size:13px;color:#60748e}.totalsNote{margin-bottom:22px}@media(max-width:640px){.currencyTotals{grid-template-columns:1fr}.currencyTotalCard{padding:17px}}

.trendPanel{margin:20px 0}.trendPanel h2{margin:0 0 6px}.trendHeader{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}.trendHeader label{display:grid;gap:5px}.trendChart svg{width:100%;height:auto;display:block}.trendChart{min-height:80px}.trendChart>.hint{margin:26px 0}.trendLegend{display:flex;justify-content:center;gap:22px;color:#64748b;font-size:13px}.legendDot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}.trendCurrencyGrid{display:grid;grid-template-columns:1fr;gap:12px}.trendCurrencyGrid>div{padding:9px;border:1px solid #edf1f6;border-radius:12px;min-width:0}.trendCurrencyGrid h3{padding-left:12px}.trendCurrencyGrid .trendChart svg{max-height:260px}

/* v21: compact chart layout, retain accessible SVG tooltips and full data */
#dashboard .two{gap:12px;margin-bottom:12px}
#dashboard .two .panel{padding:15px;margin-bottom:8px}
#dashboard .two .panel h2{margin-bottom:12px}
#dashboard .bars{gap:8px;max-height:230px;overflow-y:auto;overscroll-behavior:contain}
#dashboard .trendPanel{padding:16px;max-width:900px;margin:12px auto}
#dashboard #flowTrendChart{max-width:760px;margin:0 auto}
#dashboard .trendLegend{margin-top:4px}
#savings .trendPanel{padding:16px}
#savings .trendCurrencyGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#savings .trendCurrencyGrid>div{padding:7px}
#savings .trendCurrencyGrid h3{margin:6px 0 8px;padding-left:6px}
#savings .trendCurrencyGrid .trendChart{min-height:70px}
#savings .trendCurrencyGrid .trendChart svg{max-height:175px}
#savings .trendPanel .hint{margin-top:10px}
.cashPanel{padding:14px 20px}
.cashPanel .cashHistory summary{cursor:pointer}
@media(max-width:830px){#savings .trendCurrencyGrid{grid-template-columns:1fr}#savings .trendCurrencyGrid .trendChart svg{max-height:200px;max-width:720px;margin:auto}}


/* v25: multiple selections for sources, categories and transaction types */
.multiFilter{position:relative;min-width:150px;flex:1;border:1px solid #d9e2ee;border-radius:9px;background:white;color:#1b2b40;align-self:stretch}
.multiFilter>summary{display:block;cursor:pointer;min-height:43px;line-height:21px;padding:10px 33px 10px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;position:relative;list-style:none}
.multiFilter>summary::-webkit-details-marker{display:none}
.multiFilter>summary:after{content:'⌄';position:absolute;right:12px;top:9px;color:#64748b;font-size:18px}
.multiFilter[open]{z-index:60;border-color:#6995dc}
.multiFilter>summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.multiOptions{position:absolute;top:calc(100% + 4px);left:0;min-width:max(100%,230px);max-width:min(360px,90vw);max-height:290px;overflow-y:auto;overscroll-behavior:contain;padding:9px;background:#fff;border:1px solid #cbd7e8;border-radius:11px;box-shadow:0 10px 30px #14223825;z-index:70}
.multiHelp{font-size:12px;color:#67788e;padding:5px 7px 9px}
.multiChoice{display:flex;align-items:center;gap:9px;padding:8px;border-radius:7px;font-size:13px;color:#1b2b40;cursor:pointer;white-space:normal}
.multiChoice:hover{background:#f2f6fc}
.multiChoice input{flex:none;width:16px;height:16px;margin:0;padding:0;accent-color:#215fc5}
.multiChoice span{overflow-wrap:anywhere}
.multiClear{background:#ecf2fa;color:#28507f;width:100%;margin-top:7px;text-align:center;font-size:12px;padding:9px}
.multiField{display:grid;gap:5px;flex:1;min-width:160px}
.multiField .filterCaption{font-size:12px;color:#51617a}
.reportFilters .multiField .multiFilter{width:100%}
@media(max-width:530px){.multiOptions{min-width:220px;max-width:min(310px,88vw)}}

/* v26: consistent currency colors across balances and monthly savings charts.
   Colors are used as an aid, not the only way to identify a currency. */
#savings [data-currency="ARS"]{--currency-accent:#b42335;--currency-surface:#fff0f2;--currency-border:#edb8c0;--currency-ink:#861b2a}
#savings [data-currency="USD"]{--currency-accent:#18794e;--currency-surface:#edfaf2;--currency-border:#abdbc3;--currency-ink:#155c3d}
#savings [data-currency="EUR"]{--currency-accent:#1d5db8;--currency-surface:#eef5ff;--currency-border:#afcaed;--currency-ink:#194c91}
#savings .currencyTotals{grid-template-columns:repeat(3,minmax(0,1fr))}
#savings .currencyTotalCard,
#savings .savingCard[data-currency],
#savings .currencyTrendCard{
  background:var(--currency-surface,#fff);
  border:1px solid var(--currency-border,#e2e8f2);
  border-top:4px solid var(--currency-accent,#215fc5);
  color:var(--currency-ink,#142238);
}
#savings .currencyTotalCard>span,
#savings .savingCard[data-currency]>span{color:var(--currency-ink,#64748b)}
#savings .currencyTotalCard>strong,
#savings .savingCard[data-currency]>strong,
#savings .currencyTrendCard h3{color:var(--currency-ink,#142238)}
#savings .currencyTotalCard .totalParts{border-top-color:var(--currency-border,#edf1f6);color:var(--currency-ink,#60748e)}
#savings .currencyTrendCard{border-radius:12px}
@media(max-width:800px){#savings .currencyTotals{grid-template-columns:1fr}}

/* v27: non-destructive statement reconciliation */
.importReport{border:1px solid #dce5f2;border-radius:12px;padding:14px;margin:13px 0;background:#f8fbff}
.importReport h3{margin:0 0 6px;font-size:16px}
.statementReview{margin-top:12px;background:white;border:1px solid #e2e8f2;border-radius:10px;padding:12px}
.statementReview summary{font-weight:650;cursor:pointer;color:#1d4b85}
.importReviewTable{max-height:320px;overflow:auto;margin-top:12px}
.importReviewTable th{position:sticky;top:0;background:white}
.balanceImport{font-size:13px;margin:4px 0}
.warning{color:#985b00}

/* v28: equal-height filters, a single row on desktop, predictable line breaks. */
#transactions>.filters{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;align-items:end}
#transactions>.filters>#search{grid-column:1/-1;width:100%;height:45px}
#transactions>.filters>select,
#transactions>.filters>details{height:46px;min-width:0;align-self:end}
#transactions>.filters>label{display:grid;grid-template-rows:15px 46px;gap:4px;min-width:0;height:65px;align-items:end}
#transactions>.filters>label input{width:100%;height:46px;min-width:0}
#transactions>.filters .multiFilter>summary{height:46px;display:flex;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#transactions>.filters>select{width:100%;height:46px}
.reportFilters{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;align-items:end}
.reportFilters>.multiField{min-width:0;grid-template-rows:15px 46px;gap:4px;min-height:65px}
.reportFilters>label{min-width:0;display:grid;grid-template-rows:15px 46px;gap:4px;height:65px}
.reportFilters>label :is(select,input){min-width:0;width:100%;height:46px}
.reportFilters .multiFilter>summary{height:46px;display:flex;align-items:center;white-space:nowrap;overflow:hidden}
@media(max-width:1000px){#transactions>.filters,.reportFilters{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){#transactions>.filters,.reportFilters{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v31: income breakdowns match the expense charts and stay compact. */
#dashboard .incomeBars .fill{background:#208b79}
#dashboard .dashboardBreakdowns .panel{min-width:0}
#dashboard .dashboardBreakdowns .barlabel span{overflow-wrap:anywhere}

/* Edición Argentina: cotizaciones transparentes y equivalencias */
.fxEquivalent{display:block;font-size:12px;line-height:1.45;font-weight:500;color:#586f88;margin-top:5px}
.stats article .fxEquivalent{color:#587e9b}
.barlabel .fxEquivalent{display:inline;font-size:11px;margin-left:5px;white-space:nowrap}
.fxStrip{display:flex;gap:15px;justify-content:space-between;align-items:center;border:1px solid #b9d5f4;background:#f2f8ff;padding:13px 16px;border-radius:12px;margin-bottom:16px}
.fxStrip small{display:block;color:#55708f;margin-top:4px}
.fxStatus{border:1px solid #cbdceb;background:#f2f7fc;color:#24466a;padding:12px;border-radius:9px;margin:10px 0}
.fxSettingsGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.fxSettingsGrid label{display:grid;gap:7px}
.fxSettingsGrid input,.fxSettingsGrid select{width:100%}
.fxSettings .inline{margin-top:10px}
.globalEquivalent>strong{font-size:clamp(21px,3vw,30px);color:#174c83}
@media(max-width:600px){.fxSettingsGrid{grid-template-columns:1fr}.fxStrip{flex-direction:column;align-items:flex-start}.fxStrip button{width:100%}}
