:root,[data-theme=light]{--bg: #f5f7fb;--ink: #0f172a;--muted: #64748b;--line: #e2e8f0;--card: #ffffff;--input: #ffffff;--sidebar: #0f172a;--sidebar-text: #e2e8f0;--sidebar-muted: #94a3b8;--sidebar-active: #1e293b;--accent: #2563eb;--accent-soft: #e8f0fe;--good: #059669;--good-soft: #ecfdf5;--bad: #e11d48;--bad-soft: #fff1f2;--warn: #b45309;--warn-soft: #fffbeb;--track: #eef2f7;--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .06);--radius: 16px;color-scheme:light}[data-theme=dark]{--bg: #0b1120;--ink: #e8eef9;--muted: #94a3b8;--line: #1e293b;--card: #131c31;--input: #0f172a;--sidebar: #070c16;--sidebar-text: #e2e8f0;--sidebar-muted: #64748b;--sidebar-active: #1e293b;--accent: #60a5fa;--accent-soft: #172554;--good: #34d399;--good-soft: #052e24;--bad: #fb7185;--bad-soft: #3f121c;--warn: #fbbf24;--warn-soft: #3a2a08;--track: #1e293b;--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 28px rgba(0, 0, 0, .25);color-scheme:dark}:root{font-family:Outfit,Avenir Next,Segoe UI,sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}html,body{margin:0;max-width:100%;overflow-x:clip;background:var(--bg);color:var(--ink)}button,input,select{font:inherit;color:inherit}a{color:inherit;text-decoration:none}.shell{display:grid;grid-template-columns:216px minmax(0,1fr);min-height:100vh}.shell.slim{grid-template-columns:76px minmax(0,1fr)}.sidebar{background:var(--sidebar);color:var(--sidebar-text);align-self:stretch;min-height:100vh}.sidebar-sticky{position:sticky;top:0;height:100vh;max-height:100vh;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:16px 12px}.sidebar.slim .sidebar-sticky{padding:16px 10px;align-items:center}.sidebar.slim .hide-slim{display:none}.sidebar.slim .brand{justify-content:center;padding:0}.sidebar.slim nav a,.sidebar.slim .theme-btn,.sidebar.slim .collapse-btn{justify-content:center;padding:10px;width:44px}.brand{display:flex;gap:12px;align-items:center;padding:0 8px}.mark{width:36px;height:36px;border-radius:10px;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:650}.brand strong{display:block;font-size:16px;letter-spacing:-.02em}.brand span{color:var(--sidebar-muted);font-size:12px}nav{display:flex;flex-direction:column;gap:4px;width:100%}nav a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:var(--sidebar-muted);font-weight:500}nav a.active,nav a:hover{background:var(--sidebar-active);color:#fff}.nav-icon,.sec-icon{width:20px;height:20px;flex:none}.collapse-btn,.theme-btn{display:flex;align-items:center;gap:10px;border:1px solid #334155;background:transparent;color:var(--sidebar-text);border-radius:10px;padding:10px 12px;cursor:pointer;text-align:left;width:100%}.sidebar-tools{margin-top:auto;display:flex;flex-direction:column;gap:8px;width:100%}.sidebar.slim .sidebar-tools{align-items:center}.pago{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}.collapse-btn:hover,.theme-btn:hover{background:var(--sidebar-active)}.main{padding:28px 32px 64px;min-width:0}.page{width:min(1120px,100%);margin:0 auto}.page-full{width:100%;max-width:none;margin:0;min-width:0}.page-full .kpis{grid-template-columns:repeat(3,minmax(160px,220px))}.topbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;margin-bottom:18px}.eyebrow{margin:0 0 4px;color:var(--muted);font-size:12px;letter-spacing:.08em;text-transform:uppercase}h1{margin:0;font-weight:620;font-size:32px;letter-spacing:-.03em}h2{margin:0 0 14px;font-size:16px;font-weight:600}.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.filters button,.ghost{border:1px solid var(--line);background:var(--card);border-radius:999px;padding:7px 12px;cursor:pointer}.filters button.on,.filters button:hover{background:var(--accent);color:#fff;border-color:var(--accent)}.filters select{border:1px solid var(--line);background:var(--card);border-radius:999px;padding:7px 12px}.hero{display:flex;flex-direction:column;gap:14px;align-items:flex-start;background:var(--card);border:1px solid var(--line);border-radius:20px;padding:22px 24px;box-shadow:var(--shadow);margin:18px 0 14px}.hero.bad{background:var(--bad-soft);border-color:transparent}.hero.ok{background:var(--good-soft);border-color:transparent}.balance{display:block;margin:4px 0 2px;font-weight:650;font-size:56px;line-height:1.05;letter-spacing:-.035em;font-variant-numeric:lining-nums tabular-nums}.label{color:var(--muted);font-size:13px}.sub{display:block;color:var(--muted);font-size:14px}.status{margin:0;font-size:16px;line-height:1.4;max-width:62ch}.hero.bad .status{color:var(--bad)}.hero.ok .status{color:var(--good)}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:12px}.kpi,.card{overflow:hidden;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}.kpi span,.muted{color:var(--muted);font-size:13px}.kpi strong{display:block;margin-top:6px;font-size:22px;letter-spacing:-.03em;line-height:1.15;font-variant-numeric:lining-nums tabular-nums}.kpi em{font-style:normal;color:var(--muted);font-size:13px}.neg{color:var(--bad)}.pos{color:var(--good)}.split{display:grid;grid-template-columns:1.35fr .85fr;gap:12px;align-items:start}.charts{display:grid;grid-template-columns:1.15fr .85fr;gap:12px;margin-bottom:12px}.stack{display:flex;flex-direction:column;gap:12px}.card+.card{margin-top:12px}.split>.card+.card,.stack>.card+.card,.charts>.card{margin-top:0}table{width:100%;border-collapse:collapse;font-size:14px}th{text-align:left;color:var(--muted);font-weight:500;font-size:12px;letter-spacing:.04em;text-transform:uppercase}th,td{padding:9px 8px;border-bottom:1px solid var(--line);white-space:nowrap}td.wrap,th.wrap{white-space:normal}.num{text-align:right;font-variant-numeric:lining-nums tabular-nums}.scroll{overflow:auto;max-height:calc(100vh - 220px);max-width:100%}.plan-scroll table{width:max-content;min-width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.col-concepto{width:268px}.col-mes{width:136px}.plan-scroll th.num,.plan-scroll td.num{width:136px;overflow:hidden}.plan-scroll th.num{white-space:normal;line-height:1.2;vertical-align:bottom}.plan-scroll .sticky{width:268px;max-width:268px;white-space:normal;overflow:hidden;vertical-align:middle}.scroll thead th{position:sticky;top:0;background:var(--card);z-index:3}.sticky{position:sticky;left:0;background:var(--card);z-index:2;min-width:240px}.sticky-end{background:var(--card)}.section-row{cursor:pointer}.section-row td{background:var(--track);font-weight:600}.section-row:hover td{filter:brightness(.97)}.chevron{width:16px;height:16px;flex:none;transition:transform .15s ease}.chevron.open{transform:rotate(90deg)}.section-row .sticky,.section-row .sticky-end{background:var(--track);z-index:3}.sec-name{display:flex;align-items:flex-start;gap:8px}.sec-label{min-width:0;line-height:1.25}.subtotal td{font-weight:650;background:var(--track)}.subtotal .sticky,.subtotal .sticky-end{background:var(--track)}.ingreso-total td,.ingreso-total .sticky,.ingreso-total .sticky-end{background:var(--good-soft)}.gasto-total td,.gasto-total .sticky,.gasto-total .sticky-end{background:var(--bad-soft)}.result td,.result .sticky,.result .sticky-end{background:var(--accent-soft);font-weight:700}.cierre td,.cierre .sticky,.cierre .sticky-end{background:var(--card);font-weight:650}.lowest td,.lowest .sticky,.lowest .sticky-end{background:var(--accent-soft);font-weight:650}.total-row td{font-weight:650}.income td{background:var(--accent-soft)}.past{color:var(--muted)}.tag{display:inline-block;border-radius:999px;padding:2px 8px;background:var(--track);font-size:12px}.form{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}.field input{border:1px solid var(--line);background:var(--input);color:var(--ink);border-radius:10px;padding:10px 12px;min-width:160px}.primary{background:var(--accent);color:#fff;border:0;border-radius:10px;padding:11px 16px;cursor:pointer}.drop{display:grid;place-items:center;min-height:132px;border:1.5px dashed var(--line);background:var(--card);color:var(--ink);text-align:center;padding:24px;border-radius:16px;cursor:pointer;margin-top:16px}.drop strong{font-size:16px}.drop.over{background:var(--accent-soft);border-color:var(--accent)}.note{color:var(--muted);font-size:14px;line-height:1.45}.callout{border-radius:14px;padding:14px 16px;background:var(--warn-soft);color:var(--warn);margin:14px 0}.callout.bad{background:var(--bad-soft);color:var(--bad)}.rules{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rules li{margin:8px 0}.chart{width:100%;height:240px;display:block}.legend{display:flex;gap:16px;color:var(--muted);font-size:13px;margin-bottom:8px}.swatch{display:inline-block;width:10px;height:10px;border-radius:99px;margin-right:6px}.donut-row{display:grid;grid-template-columns:180px 1fr;gap:18px;align-items:center}.donut{width:180px;height:180px}.error{background:var(--bad-soft);color:var(--bad);padding:12px 14px;border-radius:12px}.bar-row{display:grid;grid-template-columns:168px 1fr 108px;gap:10px;align-items:center;margin:7px 0}.bar-track{height:8px;border-radius:99px;background:var(--track)}.bar-fill{display:block;height:8px;border-radius:99px;background:var(--accent)}.gate{min-height:100vh;display:grid;place-items:center;padding:24px}.gate form{width:min(400px,100%);display:grid;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px}.gate h1{margin:0}.gate .field input{width:100%;min-width:0}.gate-wait{padding:32px;color:var(--muted)}.hoy-top{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,320px);gap:12px;align-items:stretch;margin:0 0 14px;width:100%;max-width:100%}.hoy-top>*{min-width:0;max-width:100%}.hoy-balance{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:22px 24px;box-shadow:var(--shadow);display:flex;flex-direction:column;justify-content:center;min-width:0;overflow:hidden}.hoy-balance.bad{background:var(--bad-soft);border-color:transparent}.hoy-balance.ok{background:var(--good-soft);border-color:transparent}.hoy-balance.bad .status{color:var(--bad)}.hoy-balance.ok .status{color:var(--good)}.hoy-kicker{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 12px}.hoy-kicker .eyebrow{margin:0}.hoy-balance .balance{font-size:clamp(42px,6vw,64px)}.hoy-balance .status,.hoy-anotar .note,.kpi span,.kpi em{min-width:0;max-width:100%;overflow-wrap:break-word}.hoy-balance .status,.hoy-anotar .note{align-self:stretch;width:auto;max-width:100%;min-width:0;white-space:normal}.kpi span,.kpi em{display:block}.hoy-anotar{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:16px 16px 14px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px;min-width:0;overflow:hidden}.hoy-anotar h2{margin:0}.hoy-anotar .note{margin:4px 0 0}.hoy-anotar .field{width:100%;min-width:0;max-width:100%;overflow:hidden}.hoy-anotar .field input{display:block;width:100%;min-width:0;max-width:100%}.hoy-anotar .primary{width:100%}.hoy-aviso{color:var(--good)}.hoy-cols{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.8fr);gap:12px;align-items:start}.mov-list{max-height:460px;overflow:auto}.mov{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.mov .concepto{display:block;font-weight:600;white-space:normal}.mov-nums{text-align:right}.mov-nums strong{font-variant-numeric:lining-nums tabular-nums}.chat-fab{position:fixed;right:20px;bottom:20px;z-index:40;width:56px;height:56px;padding:0;border:0;border-radius:50%;cursor:pointer;display:grid;place-items:center;background:var(--accent);color:#fff;box-shadow:var(--shadow)}.chat-fab svg{width:28px;height:28px}.chat-panel{position:fixed;right:20px;bottom:20px;z-index:40;width:min(380px,calc(100vw - 32px));height:min(640px,calc(100vh - 40px));display:flex;flex-direction:column;gap:10px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:14px}.chat-panel header{display:flex;justify-content:space-between;align-items:center;gap:8px}.chat-panel header button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:4px 6px}.chat-log{flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px}.bubble{margin:0;max-width:92%;padding:10px 12px;border-radius:14px;background:var(--track);white-space:pre-wrap;line-height:1.45}.bubble.mia{align-self:flex-end;background:var(--accent-soft)}.bubble.asesor{align-self:stretch;max-width:100%;white-space:normal}.bubble.asesor p{margin:0 0 8px}.bubble.asesor p:last-child,.bubble.asesor ul:last-child{margin-bottom:0}.bubble.asesor ul{margin:0 0 8px;padding-left:1.15rem}.bubble.asesor li{margin:3px 0}.bubble.asesor li p{margin:0}.bubble.asesor strong{font-weight:650}.chat-panel form{display:flex;gap:8px}.chat-panel input{flex:1;min-width:0;border:1px solid var(--line);background:var(--input);color:var(--ink);border-radius:10px;padding:10px 12px}@media(max-width:760px){.shell,.shell.slim{display:block}.sidebar-sticky{display:contents;position:static;height:auto;max-height:none;overflow:visible;padding:0}.sidebar,.sidebar.slim{position:fixed;inset:auto 0 0;min-height:0;height:auto;z-index:30;flex-direction:row;align-items:center;gap:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));border-top:1px solid #1e293b}.collapse-btn,.brand{display:none}.sidebar.slim nav a,.sidebar.slim .theme-btn,.sidebar.slim .collapse-btn{width:auto;padding:6px 2px}nav{flex-direction:row;align-items:stretch;justify-content:space-between;gap:0;overflow-x:auto}nav a{flex:1 1 0;flex-direction:column;justify-content:center;gap:3px;min-width:0;padding:6px 2px;font-size:10px}nav a .hide-slim,.sidebar.slim nav a .hide-slim{display:block;font-size:10px;line-height:1.1;text-align:center;white-space:normal}.sidebar-tools{position:fixed;top:0;left:0;right:0;z-index:30;margin:0;width:auto;flex-direction:row;justify-content:flex-end;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;background:var(--bg);border-bottom:1px solid var(--line)}.sidebar-tools .hide-slim{display:none}.sidebar-tools .theme-btn{width:40px;height:40px;margin:0;padding:0;justify-content:center;color:var(--ink);border-color:var(--line);background:var(--card)}.main{padding:calc(64px + env(safe-area-inset-top)) 14px calc(86px + env(safe-area-inset-bottom));width:auto;max-width:100%}.page,.hoy-top,.kpis,.hoy-cols{max-width:100%}.hoy-balance,.hoy-anotar{width:100%}.hoy-balance .status,.hoy-anotar .note,.kpi span,.kpi em{display:block;max-width:100%;padding-right:12px;overflow-wrap:anywhere}.kpi span,.kpi em{max-width:calc(50vw - 36px)}h1{font-size:26px}.balance{font-size:40px}.hero{padding:16px;margin-top:14px}.kpi{padding:12px}.kpi strong{font-size:18px}.split,.charts,.rules,.donut-row{grid-template-columns:1fr}.hoy-top,.hoy-cols{grid-template-columns:minmax(0,1fr)}.kpis,.page-full .kpis{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.hoy-balance,.hoy-anotar,.kpi{min-width:0}.hoy-balance{padding:18px 16px}.hoy-balance .status{max-width:100%}.hoy-anotar{padding:16px}.mov-list{max-height:360px}.donut{margin:0 auto}.topbar{display:block}.filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px}.filters button,.filters select{flex:none}.form{display:grid}.field input{width:100%;min-width:0}.pago{align-items:flex-start}.pago strong{min-width:0}.col-concepto{width:156px}.col-mes{width:104px}.sticky,.plan-scroll .sticky{min-width:0;width:156px;max-width:156px}.plan-scroll th.num,.plan-scroll td.num{width:104px;min-width:104px;max-width:104px}.scroll thead th.sticky-end,.sticky-end{position:static;right:auto;box-shadow:none}.bar-row{grid-template-columns:minmax(0,1fr) auto}.scroll{max-height:none}table{font-size:13px}th,td{padding:8px 6px}.chart{height:200px}.chat-fab{position:fixed;top:calc(8px + env(safe-area-inset-top));bottom:auto;left:12px;right:auto;width:40px;height:40px;z-index:60}.chat-fab svg{width:22px;height:22px}.kpi{overflow:visible}.chat-panel{right:12px;bottom:calc(78px + env(safe-area-inset-bottom));z-index:60}.chat-panel{height:auto;top:calc(60px + env(safe-area-inset-top))}.hoy-balance .status,.hoy-anotar .note{max-width:260px}.kpi span,.kpi em{max-width:none;white-space:normal}}
