/* Finanzas LLF — identidad: arena, blanco, negro, colorado #B12C25; Bebas Neue + Open Sans */
:root{color-scheme:light dark;--bg:light-dark(#EDEAE6,#140c0b);--card:light-dark(#fff,#211614);--ink:light-dark(#070000,#f3eee9);--mute:light-dark(#6b625c,#b3a69e);--line:light-dark(#dcd5ce,#3a2a28);--red:light-dark(#B12C25,#e5594f);--in:light-dark(#2e7d5b,#6fcf9f);--s:light-dark(#9a5b2f,#d99a6c);--f:light-dark(#7d736c,#9e928a);--a:light-dark(#b8820f,#e6b54a);--usd:light-dark(#1f5f8b,#7fb8e0);--warn:light-dark(#b8820f,#e6b54a)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 'Open Sans',system-ui,sans-serif;overflow-x:clip}
.wrap{max-width:1180px;margin:0 auto;padding:max(env(safe-area-inset-top),clamp(14px,3vw,36px)) max(4vw,14px) calc(90px + env(safe-area-inset-bottom))}
.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:44px;width:auto;display:block}
.brand span{font:400 22px/1 'Bebas Neue',sans-serif;padding-left:12px;border-left:2px solid var(--line)}
.tabs{display:flex;gap:4px;background:var(--card);border:1px solid var(--line);padding:4px;border-radius:12px;margin:8px 0 6px;overflow-x:auto;scrollbar-width:none;position:sticky;top:6px;z-index:4;box-shadow:0 4px 18px #0001}
.tabs button{flex:1 0 auto;border:0;background:none;border-radius:9px;min-height:44px;padding:0 14px;font-weight:600;color:var(--mute)}
.tabs button.on{background:var(--red);color:#fff}
.topr{display:flex;align-items:center;gap:8px}
.ic.on{background:var(--ink);color:var(--card);border-color:var(--ink)}
.bar2{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px}
.bar2 .sync{margin-top:0}
.libsw{display:inline-flex;background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:3px}
.libsw button{border:0;background:none;border-radius:999px;min-height:38px;padding:0 16px;font-weight:700;color:var(--mute)}
.libsw button.on{background:var(--ink);color:var(--card)}
.tabs{scroll-snap-type:x proximity}.tabs button{scroll-snap-align:center}
.big.inc{color:var(--in)}
.est{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:15px}
.est b{font-weight:600;white-space:nowrap}.est b small{color:var(--mute);font-weight:400;margin-left:6px}
.est.tot{font-weight:700}.est.tot b{font-weight:700}
.est.res{font:400 26px/1.1 'Bebas Neue',sans-serif;border-bottom:2px solid var(--ink)}.est.res b{font-weight:400}
.est:last-of-type{border-bottom:0}
.fab{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));z-index:8;border:0;border-radius:999px;background:var(--red);color:#fff;font-weight:700;min-height:56px;padding:0 22px 0 18px;box-shadow:0 8px 24px #0004;display:flex;align-items:center;gap:8px;font-size:16px}
.fab span{font-size:26px;line-height:1}
.sheet{width:min(560px,100vw);max-height:92vh;overflow:auto;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
.shd{display:flex;justify-content:space-between;align-items:center}.shd h2{margin:0}
.sheet .note{margin:0 0 10px}
.seg button:not(.on){border-bottom:3px solid transparent}
@media(max-width:600px){.sheet{margin:auto 0 0;border-radius:18px 18px 0 0;max-width:100vw}.save{bottom:calc(84px + env(safe-area-inset-bottom))}}
button{font:inherit;color:inherit;cursor:pointer}
button:disabled{opacity:.55;cursor:progress}
.mes{display:flex;align-items:center;gap:6px}
.mes b{font:400 22px 'Bebas Neue',sans-serif;min-width:8.5em;text-align:center}
.ic{width:44px;height:44px;border-radius:10px;border:1px solid var(--line);background:var(--card);font-size:20px}
:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.sync{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--mute);margin-top:10px;min-height:18px}
.sync i{width:8px;height:8px;border-radius:50%;background:var(--in)}
.sync.pend i,.sync.saving i{background:var(--warn)}.sync.off i{background:var(--red)}
.hero{padding:14px 0 22px;border-bottom:2px solid var(--ink)}
.hrow{display:flex;justify-content:space-between;align-items:center;gap:8px}
.hrow h2{margin:0}
.lbl{color:var(--mute);font-size:14px}
.big{font:400 clamp(60px,13vw,120px)/.95 'Bebas Neue',sans-serif;margin:4px 0 6px;white-space:nowrap}
.big.mid{font-size:clamp(40px,7vw,64px);color:var(--a)}
.big2{font:400 clamp(30px,6vw,48px)/1 'Bebas Neue',sans-serif;color:var(--usd);margin:0 0 6px;white-space:nowrap}
.eq{color:var(--mute);font-size:13px;margin-bottom:8px}
.usdc{color:var(--usd)}
.neg{color:var(--red)!important}
.bar{display:flex;height:14px;border-radius:7px;overflow:hidden;background:var(--line);margin-top:8px}
.bar i{display:block;height:100%}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:14px}
.kpis div{display:flex;flex-direction:column}
.kpis span{font-size:13px;color:var(--mute);display:flex;align-items:center;gap:6px}
.kpis strong{font:400 clamp(24px,3.4vw,32px)/1.1 'Bebas Neue',sans-serif;white-space:nowrap}
.kpis small{display:block;color:var(--usd);font:400 18px/1.1 'Bebas Neue',sans-serif;white-space:nowrap}
.dot{width:10px;height:10px;border-radius:3px;display:inline-block;flex:none}
.grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(18px,4vw,44px);margin-top:22px}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(14px,3vw,36px)}
h2{font:400 26px/1.1 'Bebas Neue',sans-serif;margin:0 0 10px;letter-spacing:.01em}
section{margin-bottom:28px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px}
.card.editing{border-color:var(--red);box-shadow:0 0 0 2px color-mix(in srgb,var(--red) 25%,transparent)}
.seg{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;background:var(--bg);padding:4px;border-radius:12px;margin-bottom:10px}
.seg button{border:0;background:none;border-radius:9px;min-height:44px;font-size:13px;color:var(--mute);font-weight:600}
.seg button.on{background:var(--ink);color:var(--card)}
.row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:8px;align-items:center}
input,select,textarea{width:100%;font:16px 'Open Sans',sans-serif;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:0 12px;min-height:46px}
textarea{padding:10px 12px;margin:8px 0;resize:vertical}
select.auto{width:auto}
.inl{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--mute);white-space:nowrap}
.inl input{width:5em;text-align:center}
.money{display:flex}
.money select{width:auto;flex:none;border-radius:10px 0 0 10px;border-right:0;padding:0 6px 0 10px;font-weight:700;background:var(--card)}
.money input{border-radius:0 10px 10px 0;flex:1}
.mb{margin-bottom:8px}.mt{margin-top:14px}
.btns{display:flex;gap:8px}.btns .go{flex:1}
.go{width:100%;min-height:48px;border:0;border-radius:10px;background:var(--red);color:#fff;font-weight:700}
.ghost{min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--card);padding:0 14px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;text-align:center}
.sm{min-height:36px;padding:0 10px;font-size:13px;flex:none}
.link{border:0;background:none;color:var(--red);font-weight:600;min-height:40px;padding:0;margin-top:6px}
.stack{display:flex;flex-direction:column;gap:8px}
.filebtn{cursor:pointer}
.wa{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:10px;background:#25D366;color:#06301a;font-weight:700;text-decoration:none}
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px dashed var(--line);border-radius:12px;padding:16px;text-align:center;cursor:pointer;margin-bottom:12px;min-height:84px}
.drop:hover,.drop.over{border-color:var(--red)}
.drop b{font-weight:700}.drop small{color:var(--mute);font-size:13px}
.doc{background:var(--bg);border-radius:10px;padding:10px 12px;margin-bottom:10px;display:none}
.doc.show{display:block}
.doc .hd{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.doc .hd span{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.doc .acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.st{font-size:14px;color:var(--mute);margin-top:6px}
.items{max-height:220px;overflow:auto;margin-top:8px;font-size:14px}
.items div{display:flex;justify-content:space-between;gap:10px;padding:4px 0;border-bottom:1px solid var(--line)}
.list{list-style:none;margin:0;padding:0}
.it{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.it .tx{flex:1}
.it .tx b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.it .tx small{color:var(--mute);font-size:13px}
.it a{color:var(--red);font-weight:600}
.it .ed{all:unset;cursor:pointer;flex:1;display:block;min-width:0;border-radius:6px}
.it .ed:hover b{text-decoration:underline}
.it .ed:focus-visible{outline:2px solid var(--red)}
.amt{font:400 22px 'Bebas Neue',sans-serif;white-space:nowrap;text-align:right}
button.amt{border:0;background:none;padding:0 4px;border-radius:6px}
button.amt:hover{background:var(--bg)}
.x{width:36px;height:36px;border:0;background:none;color:var(--mute);border-radius:9px;font-size:20px;flex:none}
.x:hover{background:var(--bg);color:var(--ink)}
.chk{width:26px;height:26px;border-radius:7px;border:2px solid var(--f);background:none;flex:none;display:grid;place-items:center;padding:0;font-weight:700}
.chk.on{background:var(--ink);border-color:var(--ink);color:var(--card)}
.day{display:flex;justify-content:space-between;gap:10px;color:var(--mute);font-size:13px;margin-top:14px;padding-bottom:2px}
.day span:first-child{text-transform:capitalize}
.empty{color:var(--mute);font-size:15px;padding:12px 0}
details summary{cursor:pointer;color:var(--red);min-height:44px;display:flex;align-items:center;font-weight:600}
.note{color:var(--mute);font-size:13px;margin:6px 0 0}
.err{color:var(--red)}
.hbar{display:grid;grid-template-columns:8.5em minmax(0,1fr) auto;gap:10px;align-items:center;padding:6px 0;font-size:14px}
.tr{height:12px;background:var(--line);border-radius:6px;overflow:hidden;display:flex}
.tr i{display:block;height:100%}
.hbar b{font-weight:600;white-space:nowrap;text-align:right}
.hbar span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pres{padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}
.pres .ph{display:flex;justify-content:space-between;gap:8px;align-items:center}
.pres .ph span{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pres .ph b{white-space:nowrap;font-weight:600}
.pres .tr{margin-top:6px}
.pres small{color:var(--mute)}
.mrow{display:grid;grid-template-columns:4.5em minmax(0,1fr) 7.5em;gap:10px;align-items:center;padding:6px 0;font-size:14px;border-bottom:1px solid var(--line)}
.mrow .tr2{display:flex;flex-direction:column;gap:3px}.mrow .tr2 i{display:block;height:8px;border-radius:4px}
.mrow b{text-align:right;white-space:nowrap}
.filt{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.filt select{width:auto}
.ai{white-space:pre-wrap;font-size:15px;line-height:1.6;margin-top:12px}
.ag{display:grid;grid-template-columns:minmax(0,1.5fr) 2.5em repeat(3,minmax(0,1fr));gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;align-items:center}
.ag b{text-align:right;font-weight:600;white-space:nowrap}
.ag b i{display:block;font-style:normal;color:var(--usd)}
.ag span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag.h,.cm.h{color:var(--mute);font-size:12px}
.cm{display:grid;grid-template-columns:minmax(0,1fr) auto 7.5em;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;align-items:center}
.cm b{text-align:right;white-space:nowrap}.cm small{color:var(--mute);margin-right:6px}.cm span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pct{width:5em;min-height:40px;text-align:right}
.auth{max-width:420px;margin:8vh auto;text-align:center}
.auth form{display:flex;flex-direction:column;gap:8px}
.auth .logo{height:56px;width:auto;margin:6px auto 14px;display:block}
.auth input{text-align:center}
.sep{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.qt{display:grid;grid-template-columns:repeat(auto-fit,minmax(9em,1fr));gap:8px;margin-top:10px}
.qt div{background:var(--bg);border-radius:10px;padding:8px 10px;font-size:13px;color:var(--mute);border:2px solid transparent}
.qt div.on{border-color:var(--red)}
.qt b{display:block;font:400 24px/1.1 'Bebas Neue',sans-serif;color:var(--ink)}
.code{font:400 34px/1.1 'Bebas Neue',sans-serif;letter-spacing:.08em;text-align:center;background:var(--bg);border-radius:10px;padding:12px;margin:10px 0;user-select:all}
dialog{border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--ink);max-width:min(440px,92vw);padding:18px}
dialog::backdrop{background:#0008}
dialog .btns{margin-top:14px}
.save{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:var(--card);padding:10px 16px;border-radius:12px;font-size:14px;display:none;gap:12px;align-items:center;box-shadow:0 8px 30px #0006;z-index:9;max-width:92vw}
.save.show{display:flex}.save button{border:0;background:none;color:var(--red);font-weight:700;min-height:32px;filter:brightness(1.4)}
[hidden]{display:none!important}
@media(max-width:820px){.grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.two{grid-template-columns:minmax(0,1fr)}.mes b{min-width:7em}}
@media(max-width:520px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.seg button{font-size:12px}.hbar{grid-template-columns:6.5em minmax(0,1fr) auto}.mrow{grid-template-columns:3.5em minmax(0,1fr) 6.5em}.ag{grid-template-columns:minmax(0,1fr) repeat(3,auto);font-size:13px}.ag>:nth-child(2){display:none}.cm{grid-template-columns:minmax(0,1fr) auto 6.5em;font-size:13px}.brand img{height:36px}.top{justify-content:center}.tabs button{padding:0 12px;font-size:14px}.mes b{min-width:6.5em;font-size:19px}.libsw{flex:1}.libsw button{flex:1}}
@media(prefers-reduced-motion:no-preference){.bar i,.tr i,.tr2 i{transition:width .5s ease}}
@media(max-width:600px){.filt{display:grid;grid-template-columns:1fr 1fr;gap:6px}.filt select{width:100%;min-height:42px;font-size:14px}.filt #rMon{grid-column:1/-1}.filt .ghost,.filt .wa{min-height:40px;font-size:14px;padding:0 8px}.filt .wa{grid-column:1/-1}}
