.brand-logo{display:block;width:56px;height:56px;object-fit:contain;flex-shrink:0}
:root{
  color-scheme:light;
  --ink:#10362c;
  --ink-2:#42665b;
  --paper:#f3f8f2;
  --white:#ffffff;
  --line:#d6e6dc;
  --mint:#82e9ae;
  --mint-2:#def8e8;
  --green:#07834d;
  --red:#df514d;
  --red-bg:#ffe5df;
  --gold:#ffc34f;
  --shadow:0 18px 45px rgba(16,54,44,.09);
}
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#082219;
  --ink-2:#a7c7b9;
  --paper:#101a18;
  --white:#1b2c28;
  --line:#344b43;
  --mint:#65e6a3;
  --mint-2:#244738;
  --green:#64e4a2;
  --red:#ff8178;
  --red-bg:#482927;
  --gold:#ffc45d;
  --shadow:0 18px 45px rgba(0,0,0,.22);
  color:#e7f4ed;
}
html[data-theme="dark"] body{background:var(--paper);color:#e7f4ed}
html[data-theme="dark"] .topbar{background:rgba(16,26,24,.92);border-color:var(--line)}
html[data-theme="dark"] .brand small,
html[data-theme="dark"] .chart-key,
html[data-theme="dark"] .movement-info small,
html[data-theme="dark"] .page-head p,
html[data-theme="dark"] .budget-meta,
html[data-theme="dark"] .debt-meta,
html[data-theme="dark"] .empty{color:#a5bcb2}
html[data-theme="dark"] .card,
html[data-theme="dark"] .budget-item,
html[data-theme="dark"] .debt-item,
html[data-theme="dark"] .month-pill,
html[data-theme="dark"] .search,
html[data-theme="dark"] .filter-row select{background:var(--white);border-color:var(--line);color:#e7f4ed}
html[data-theme="dark"] .movement{border-color:#30463f}
html[data-theme="dark"] .movement.gasto .movement-icon{background:#482927}
html[data-theme="dark"] .bottom-nav{background:rgba(27,44,40,.96);border-color:var(--line)}
html[data-theme="dark"] .bottom-nav a{color:#a5bcb2}
html[data-theme="dark"] .bottom-nav a.active{color:#69e5a5}
html[data-theme="dark"] .progress{background:#344b43}
html[data-theme="dark"] dialog{background:#1b2c28;color:#e7f4ed}
html[data-theme="dark"] dialog input,
html[data-theme="dark"] dialog select,
html[data-theme="dark"] .money-field{background:#13231f;border-color:var(--line);color:#e7f4ed}
html[data-theme="dark"] .money-field input{background:transparent}
html[data-theme="dark"] .secondary-btn{background:#344b43;color:#e7f4ed}
html[data-theme="dark"] .type-toggle{background:#13231f}
html[data-theme="dark"] .type-toggle button{color:#a5bcb2}
html[data-theme="dark"] .type-toggle button.active{background:#344b43;color:#fff}
html[data-theme="dark"] .notice{background:#244738}
html[data-theme="dark"] .notice p{color:#c5e3d2}
html[data-theme="dark"] .settings-action{border-color:var(--line);color:#e7f4ed}
html[data-theme="dark"] .settings-action.danger{color:#ff8178}
html[data-theme="dark"] .version{color:#a5bcb2}
.top-actions{display:flex;align-items:center;gap:9px}
.theme-toggle{background:var(--white);color:var(--green);border-color:var(--line)}
.theme-toggle svg{stroke:currentColor}
.balance-card{background:linear-gradient(130deg,#103b2e,#11694b 72%,#13865b)}
.balance-card:after{border-color:rgba(130,233,174,.16)}
.income-btn{background:#a4f1bf}
.expense-btn{background:#ffd8ce}
.primary-btn,.nav-add{background:linear-gradient(135deg,#087b4c,#12a66a);box-shadow:0 6px 16px rgba(8,131,77,.18)}
.budget-overview,.debt-summary{background:linear-gradient(130deg,#103b2e,#11694b)}
.theme-picker{margin:-4px 0 18px}
.theme-label{display:block;font-size:12px;font-weight:800;margin-bottom:9px}
.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.theme-option{display:grid;grid-template-columns:38px 1fr 18px;align-items:center;gap:10px;text-align:left;border:1px solid var(--line);border-radius:15px;padding:10px;background:var(--white);color:inherit;cursor:pointer}
.theme-option.selected{border:2px solid var(--green);padding:9px;box-shadow:0 0 0 3px rgba(8,131,77,.1)}
.theme-preview{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;font-size:20px}
.light-preview{background:#e2f7e9;color:#07834d}
.dark-preview{background:#13231f;color:#65e6a3}
.theme-option b,.theme-option small{display:block}
.theme-option b{font-size:12px}
.theme-option small{font-size:10px;opacity:.68;margin-top:2px}
.theme-option>i{width:15px;height:15px;border-radius:50%;border:1px solid var(--line)}
.theme-option.selected>i{border:5px solid var(--green)}
html[data-theme="dark"] .theme-option{background:#13231f;border-color:var(--line)}
html[data-theme="dark"] .theme-option.selected{border-color:#65e6a3;box-shadow:0 0 0 3px rgba(101,230,163,.12)}
html[data-theme="dark"] .theme-option.selected>i{border-color:#65e6a3}
.payment-debt-summary{display:grid;gap:6px;border-radius:14px;background:var(--mint-2);padding:14px;margin-bottom:17px}
.payment-debt-summary span{font-size:12px;color:var(--ink-2)}
.payment-debt-summary strong{color:var(--green)}
.debt-item .primary-btn:disabled{background:#6d8179;box-shadow:none;cursor:default;opacity:.8}
.quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
.savings-btn{background:#d8f59b}
.investment-btn{background:#c7e8ff}
.allocation-card{margin-top:14px}
.allocation-live{font-size:11px;color:var(--green);white-space:nowrap}
.allocation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 22px;margin-top:18px}
.allocation-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:var(--paper)}
.allocation-row b{font-size:14px;white-space:nowrap}
.allocation-label{display:flex;align-items:center;gap:8px;font-size:12px}
.allocation-label i{width:9px;height:9px;border-radius:50%;background:#39aa73;flex:none}
.allocation-row.variable .allocation-label i{background:#f0a94c}
.allocation-row.debt .allocation-label i{background:#df655f}
.allocation-row.savings .allocation-label i{background:#8fca45}
.allocation-row.investment .allocation-label i{background:#5ba8df}
.allocation-row.available .allocation-label i{background:#334c43}
.expense-kind-row{display:flex;justify-content:space-between;align-items:center;margin:-5px 0 16px;font-size:12px;font-weight:800}
.expense-kind-row[hidden]{display:none}
.expense-kind-row>div{display:flex;gap:5px;padding:3px;background:var(--paper);border-radius:10px}
.expense-kind-row button{border:0;background:transparent;color:var(--ink-2);border-radius:8px;padding:7px 12px;font-weight:800;cursor:pointer}
.expense-kind-row button.active{background:var(--white);color:var(--green);box-shadow:0 1px 5px rgba(0,0,0,.08)}
.type-toggle:has(button:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}
.type-toggle button{padding:9px 5px;font-size:12px}
.movement.deuda .movement-amount{color:#b64a45}
.movement.ahorro .movement-amount{color:#64952d}
.movement.inversion .movement-amount{color:#287cad}
html[data-theme="dark"] .allocation-row{background:#13231f}
html[data-theme="dark"] .allocation-row.available .allocation-label i{background:#a5bcb2}
html[data-theme="dark"] .expense-kind-row>div{background:#13231f}
html[data-theme="dark"] .expense-kind-row button.active{background:#344b43;color:#65e6a3}
html[data-theme="dark"] .movement.deuda .movement-amount{color:#ff8178}
html[data-theme="dark"] .movement.ahorro .movement-amount{color:#aee874}
html[data-theme="dark"] .movement.inversion .movement-amount{color:#79c5f4}
/* Acciones explícitas y fáciles de tocar en pantallas chicas. */
.movement{grid-template-columns:46px minmax(0,1fr) auto auto}
.movement-info{min-width:0}
.row-menu{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--mint-2);color:var(--green);font-size:12px;font-weight:800;padding:0 10px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.row-menu.compact-edit{width:44px;padding:0;border-radius:50%;font-size:20px}
.row-menu:focus-visible,.row-menu:active{outline:3px solid color-mix(in srgb,var(--green) 24%,transparent);outline-offset:2px}
.danger-outline{color:var(--red);border:1px solid color-mix(in srgb,var(--red) 38%,transparent)}
html[data-theme="dark"] .row-menu{background:#244738;color:#65e6a3;border-color:#426357}
@media(max-width:430px){.movement{grid-template-columns:40px minmax(0,1fr) auto 42px;gap:8px;padding:12px 0}.movement-icon{width:40px;height:40px}.movement-info b{max-width:100%;font-size:13px}.movement-info small{font-size:11px}.movement-amount{font-size:12px;white-space:nowrap}.row-menu{min-width:42px;min-height:42px}.row-menu.compact-edit{width:42px}}
.budget-actions{display:flex;align-items:center;gap:8px}
.section-intro{display:flex;justify-content:space-between;align-items:end;margin:24px 0 12px}
.section-intro h2{font-size:18px;margin:0}
.section-intro p{font-size:12px;color:var(--ink-2);margin:5px 0 0}
.allocation-budget-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.allocation-budget-item{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:18px}
.allocation-budget-item .budget-title h3{font-size:14px}
.allocation-budget-item .budget-title button{border:1px solid var(--line);border-radius:9px;padding:6px 9px;font-size:11px;font-weight:800;color:var(--green)}
.allocation-budget-amount{font-size:23px;font-weight:800;letter-spacing:-.5px;margin-top:17px}
.category-intro{margin-top:32px}
.category-budget-overview{background:var(--ink)}
.budget-overview strong.negative{color:#ffb0a6}
html[data-theme="dark"] .allocation-budget-item{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .allocation-budget-item .budget-title button{color:#65e6a3}
@media(max-width:720px){.budget-actions{gap:6px}.budget-actions .primary-btn,.budget-actions .secondary-btn{padding:10px 9px;font-size:11px}.allocation-budget-grid{grid-template-columns:1fr 1fr}.section-intro p{line-height:1.4}.category-budget-overview{margin-bottom:14px}}
@media(max-width:430px){.allocation-budget-grid{grid-template-columns:1fr}.allocation-budget-item{padding:15px}}
@media(max-width:720px){.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.allocation-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.allocation-row{padding:9px 8px}.allocation-label{font-size:11px}.allocation-row b{font-size:12px}.allocation-live{font-size:9px}}
@media(max-width:720px){.top-actions{gap:7px}.top-actions .icon-btn{width:40px;height:40px}}
.bottom-nav{grid-template-columns:repeat(6,82px)}
.report-controls{display:grid;grid-template-columns:auto minmax(180px,1fr) auto minmax(150px,1fr);align-items:center;gap:10px 13px;margin-bottom:14px}
.report-controls>label{font-size:12px;font-weight:800;color:var(--ink-2)}
.report-controls select,.report-controls input{min-width:0;width:100%;border:1px solid var(--line);border-radius:12px;background:var(--white);padding:11px 12px;color:inherit}
.report-controls select{grid-column:2}
.report-controls #reportMonth{grid-column:4}
.report-controls #reportMonthWrap{grid-column:3}
.report-custom-range{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.report-custom-range[hidden]{display:none}
.report-custom-range label{display:grid;gap:6px;font-size:12px;font-weight:800;color:var(--ink-2)}
.report-actions{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:4px}
.report-actions>span{font-size:13px;font-weight:800;text-transform:capitalize;color:var(--ink-2)}
.report-actions>div{display:flex;gap:8px;flex-wrap:wrap}
.report-actions button{min-height:44px}
.report-note{font-size:12px;color:var(--ink-2);margin:0 2px 14px;line-height:1.45}
.report-balance{display:grid;gap:6px;border-radius:22px;padding:22px 24px;color:#fff;background:linear-gradient(130deg,#103b2e,#11694b 72%,#13865b);margin-bottom:14px}
.report-balance span{font-size:13px;color:#d0f0df}
.report-balance strong{font-size:clamp(30px,6vw,42px);letter-spacing:-1.2px}
.report-balance strong.negative{color:#ffaaa0}
.report-balance small{font-size:12px;color:#d0f0df}
.report-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}
.report-kpi{display:grid;gap:8px;padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--white);min-width:0}
.report-kpi span{font-size:11px;color:var(--ink-2)}
.report-kpi strong{font-size:clamp(14px,1.7vw,20px);overflow-wrap:anywhere}
.report-kpi.income strong{color:var(--green)}
.report-kpi.expense strong,.report-kpi.debt strong{color:var(--red)}
.report-kpi.savings strong{color:#64952d}
.report-kpi.investment strong{color:#287cad}
.report-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.report-card{min-width:0}
.report-breakdown{display:grid;gap:0;margin-top:15px}
.report-breakdown>div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.report-breakdown>div:last-child{border-bottom:0}
.report-breakdown span{color:var(--ink-2);font-size:13px}
.report-breakdown b{font-size:13px;text-align:right}
.report-categories{display:grid;gap:13px;margin-top:16px}
.report-category>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:13px}
.report-category>div:first-child span{color:var(--ink-2)}
.report-category>div:first-child b{text-align:right}
.report-category small{display:block;text-align:right;color:var(--ink-2);font-size:10px;margin-top:4px}
.report-bar{height:7px;background:var(--paper);border-radius:99px;overflow:hidden;margin-top:7px}
.report-bar i{display:block;height:100%;border-radius:inherit}
.report-month-card{margin-bottom:10px}
.report-months{display:grid;gap:0;margin-top:8px}
.report-month-row{padding:14px 0;border-bottom:1px solid var(--line)}
.report-month-row:last-child{border-bottom:0}
.report-month-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px}
.report-month-heading strong{text-transform:capitalize}
.report-month-heading span{font-size:12px;font-weight:800;text-align:right}
.report-month-values{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.report-month-values>div{display:grid;gap:4px;min-width:0}
.report-month-values span{font-size:10px;color:var(--ink-2)}
.report-month-values b{font-size:12px;overflow-wrap:anywhere}
html[data-theme="dark"] .report-kpi{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .report-kpi.savings strong{color:#aee874}
html[data-theme="dark"] .report-kpi.investment strong{color:#79c5f4}
html[data-theme="dark"] .report-controls select,html[data-theme="dark"] .report-controls input{background:#13231f;border-color:var(--line);color:#e7f4ed}
@media(max-width:720px){.bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr));width:calc(100% - 12px);padding:6px 4px}.bottom-nav a small{font-size:9px}.report-controls{grid-template-columns:1fr 1fr;gap:8px}.report-controls>label{grid-column:auto!important}.report-controls select{grid-column:1/-1}.report-controls #reportMonth{grid-column:1/-1}.report-custom-range{grid-template-columns:1fr 1fr}.report-actions{align-items:flex-start;flex-direction:column}.report-actions>div{width:100%}.report-actions button{flex:1;padding:10px;font-size:11px}.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.report-kpis .report-kpi:first-child{grid-column:1/-1}.report-two-col{grid-template-columns:1fr}.report-month-values{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:12px}}
@media print{html,body{background:#fff!important;color:#172d25!important}.topbar,.bottom-nav,.report-controls,.report-note,.toast{display:none!important}.app-shell{min-height:0;padding:0}.view,main .view{display:none!important;max-width:none;margin:0;padding:0;animation:none!important}main #informes{display:block!important}.report-page-head{margin:0 0 12px}.report-balance{background:#e6f4eb!important;color:#163d2b!important;box-shadow:none!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.report-balance span,.report-balance small{color:#315a45}.report-kpi,.report-card{box-shadow:none!important;break-inside:avoid}.report-kpi{background:#fff!important}.report-two-col{grid-template-columns:1fr 1fr}.report-month-row{break-inside:avoid}}
