/* NODO Finanzas. Libro de caja limpio: tarjetas blancas sobre fondo verde grisáceo, un solo verde NODO, cifras grandes y poco texto. */
:root{
  --bg:#F2F5F2; --surface:#FFFFFF; --surface-2:#F5F8F5; --tint:#E4F0E8; --line:#E0E6E1; --line-2:#C8D2CB;
  --ink:#121A15; --ink-2:#38433C; --muted:#5C675F;
  --brand:#00763D; --brand-ink:#005A2E; --btn:#00763D; --on-btn:#FFFFFF;
  --hero:#00763D; --on-hero:#FFFFFF; --on-hero-2:#C8E6D4; --hero-track:rgba(255,255,255,.24);
  --spend:#A2AEA6; --warn:#8F5708; --warn-tint:#FAEFD9; --danger:#AE3428; --danger-tint:#F8E5E2;
  --scrim:rgba(12,22,16,.38);
  --f:"Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root{
  --bg:#0D1310; --surface:#151D18; --surface-2:#19221C; --tint:#15301F; --line:#232E27; --line-2:#35433A;
  --ink:#E5ECE7; --ink-2:#C0CAC3; --muted:#95A29A;
  --brand:#4CC283; --brand-ink:#8ED8AE; --btn:#187A47; --on-btn:#FFFFFF;
  --hero:#0F4F2D; --on-hero:#FFFFFF; --on-hero-2:#AEDBC0; --hero-track:rgba(255,255,255,.18);
  --spend:#56635B; --warn:#E3AA4C; --warn-tint:#2D2412; --danger:#EF8A7C; --danger-tint:#351B19;
  --scrim:rgba(0,0,0,.58); color-scheme:dark;
}}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{height:100%}
body{margin:0; background:var(--bg); color:var(--ink); font-family:var(--f); font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%}
button,input,select{font-family:inherit; font-size:inherit}
h1,h2,h3,p{margin:0}
a{color:var(--brand-ink)}
img{max-width:100%}
.ic{font-family:"Material Symbols Rounded"; font-weight:normal; font-style:normal; font-size:20px; line-height:1; width:1em; height:1em; overflow:hidden; display:inline-block; white-space:nowrap; letter-spacing:normal; text-transform:none; direction:ltr; font-feature-settings:"liga"; -webkit-font-smoothing:antialiased; font-variation-settings:"FILL" 0,"wght" 300,"GRAD" 0,"opsz" 24; flex:none}
.num{font-variant-numeric:tabular-nums}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px}

/* Marco */
.app{position:relative; display:flex; height:100%; height:100dvh; overflow:hidden; background:var(--bg)}
.main{flex:1; min-width:0; display:flex; flex-direction:column}
.scroll{flex:1; overflow-y:auto; padding:4px 16px 28px; -webkit-overflow-scrolling:touch}
.wrap{max-width:1180px; margin:0 auto}
.top{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:calc(14px + env(safe-area-inset-top, 0px)) 16px 10px}
.brand{display:flex; align-items:center; gap:9px; font-weight:700; font-size:15px; letter-spacing:-.01em}
.logo{width:30px; height:30px; border-radius:9px; display:block}
.top-date{display:none; font-size:13px; color:var(--muted)}
.top-r{display:flex; align-items:center; gap:12px}
.sync{display:none; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--brand-ink); background:var(--tint); padding:5px 10px; border-radius:99px}
.sync .ic{font-size:16px}
.avatar{position:relative; width:32px; height:32px; border-radius:50%; background:var(--tint); color:var(--brand-ink); display:grid; place-items:center; font-weight:700; font-size:13px; flex:none; border:0; padding:0}
button.avatar{cursor:pointer}
.avatar.dot::after{content:""; position:absolute; top:-1px; right:-1px; width:10px; height:10px; border-radius:50%; background:var(--warn); border:2px solid var(--surface)}
.mini-av{width:22px; height:22px; border-radius:50%; background:var(--tint); color:var(--brand-ink); display:grid; place-items:center; font-size:11px; font-weight:700; flex:none}

/* Menú lateral (computadora) */
.side{display:none; width:236px; flex:none; flex-direction:column; gap:4px; background:var(--surface); border-right:1px solid var(--line); padding:20px 14px}
.side-brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; padding:0 8px 18px}
.side-brand .logo{width:34px; height:34px}
.nav-i{display:flex; align-items:center; gap:12px; height:42px; padding:0 12px; border:0; border-radius:10px; background:none; color:var(--ink-2); font-size:14px; font-weight:600; text-align:left; cursor:pointer}
.nav-i:hover{background:var(--surface-2)}
.nav-i[aria-current="page"]{background:var(--tint); color:var(--brand-ink)}
.side .btn{margin-top:14px}
.side-foot{margin-top:auto; display:flex; gap:8px; align-items:center; font-size:12px; color:var(--muted); padding:8px}
.side-foot .ic{font-size:16px; color:var(--brand)}

/* Barra inferior (celular) */
.tabs{display:grid; grid-template-columns:repeat(var(--n,5), 1fr); background:var(--surface); border-top:1px solid var(--line); padding:6px 6px calc(10px + env(safe-area-inset-bottom, 0px))}
.tab{display:flex; flex-direction:column; align-items:center; gap:3px; border:0; background:none; color:var(--muted); font-size:11px; font-weight:600; padding:6px 0; cursor:pointer}
.tab .ic{font-size:24px}
.tab[aria-current="page"]{color:var(--brand)}
.tab[aria-current="page"] .ic{font-variation-settings:"FILL" 1,"wght" 400,"GRAD" 0,"opsz" 24}
.tab-add .plus{width:46px; height:46px; border-radius:15px; background:var(--btn); color:var(--on-btn); display:grid; place-items:center; margin-top:-4px}
.tab-add .plus .ic{font-size:28px}
.tab-add{color:var(--ink-2)}

/* Base */
.grid{display:grid; grid-template-columns:minmax(0,1fr); gap:12px}
.card{background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:16px; min-width:0}
button.card{text-align:left; color:inherit; font:inherit; cursor:pointer; width:100%}
button.card:hover{border-color:var(--line-2)}
.card-h{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px}
.card-h h3{font-size:15px; font-weight:700}
.screen-h{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; margin:6px 0 16px}
.h-screen{font-size:24px; font-weight:800; letter-spacing:-.025em; text-wrap:balance}
.back{display:inline-flex; align-items:center; gap:4px; border:0; background:none; color:var(--muted); font-size:13px; font-weight:600; padding:4px 0; cursor:pointer; margin-top:4px}
.muted{color:var(--muted)}
.sm{font-size:12px}
.link{display:inline-grid; place-items:center; width:32px; height:32px; border:0; border-radius:50%; background:var(--surface-2); color:var(--ink-2); cursor:pointer; flex:none}
.ic-box{width:36px; height:36px; border-radius:10px; display:grid; place-items:center; flex:none; background:var(--tint); color:var(--brand-ink)}
.ic-box.n{background:var(--surface-2); color:var(--ink-2)}
.ic-box.warn{background:var(--warn-tint); color:var(--warn)}
.ic-box.sm{width:30px; height:30px; border-radius:9px}
.ic-box.sm .ic{font-size:18px}
.chip{display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; padding:3px 8px; border-radius:99px; background:var(--surface-2); color:var(--ink-2); border:1px solid var(--line); white-space:nowrap}
.chip .ic{font-size:14px}
.chip.ok{background:var(--tint); color:var(--brand-ink); border-color:transparent}
.chip.warn{background:var(--warn-tint); color:var(--warn); border-color:transparent}
.chip.bad{background:var(--danger-tint); color:var(--danger); border-color:transparent}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:0 18px; border-radius:12px; border:1px solid transparent; font-size:14px; font-weight:700; cursor:pointer; text-decoration:none}
.btn.pri{background:var(--btn); color:var(--on-btn)}
.btn.ghost{background:var(--surface); border-color:var(--line-2); color:var(--ink)}
.btn.danger{background:var(--surface); border-color:var(--line-2); color:var(--danger)}
.btn.w{width:100%}
.btn.sm{min-height:36px; padding:0 12px; font-size:13px; border-radius:10px}
.btn.lg{min-height:60px; font-size:16px; border-radius:16px}
.btn.lg .ic{font-size:24px}
.btn[disabled]{opacity:.6; cursor:default}
.row-btns{display:flex; flex-wrap:wrap; gap:8px}
.empty-card{display:grid; justify-items:center; gap:10px; text-align:center; padding:28px 16px}
.empty-card .ic-box{width:52px; height:52px; border-radius:16px}
.empty-card .ic-box .ic{font-size:28px}

/* Inicio */
.hello{margin:6px 0 16px}
.hello .h-screen{margin-top:2px}
.hero{background:var(--hero); color:var(--on-hero); border-color:transparent}
.hero-l{font-size:13px; font-weight:600; color:var(--on-hero-2)}
.big{font-size:40px; font-weight:800; letter-spacing:-.035em; line-height:1.05; margin:6px 0 18px; font-variant-numeric:tabular-nums}
.big .cents{font-size:.5em; font-weight:700; opacity:.78; letter-spacing:-.01em}
.hero-bar{display:flex; gap:3px; height:8px; margin-bottom:12px}
.hero-bar i{display:block; height:100%; border-radius:4px}
.hero-bar .lk{background:var(--hero-track)}
.hero-bar .fr{background:var(--on-hero)}
.hero-split{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.hero-split .hl{display:flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:var(--on-hero-2)}
.hero-split .hl .ic{font-size:15px}
.hero-split b{display:block; font-size:17px; font-weight:800; letter-spacing:-.01em; font-variant-numeric:tabular-nums; margin-top:2px}
.hero-split > div:last-child{text-align:right}
.hero-split > div:last-child .hl{justify-content:flex-end}
.hero-foot{display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:12px; font-size:12px; color:var(--on-hero-2)}
.hero-btn{border:0; background:var(--hero-track); color:var(--on-hero); border-radius:99px; padding:5px 10px; font-size:12px; font-weight:700; cursor:pointer}
.pair{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.tile{display:flex; flex-direction:column; align-items:flex-start; gap:2px}
.tile .ic-box{margin-bottom:14px}
.tile-l{font-size:13px; font-weight:600; color:var(--muted)}
.tile-n{font-size:20px; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.tile-s{font-size:12px; color:var(--muted)}
.flow{display:grid; gap:12px}
.flow-r{display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:10px}
.flow-r b{font-size:14px; font-weight:700; font-variant-numeric:tabular-nums}
.b{display:block; height:12px; border-radius:6px; min-width:4px}
.b.in{background:var(--brand)}
.b.out{background:var(--spend)}
.quedo{display:flex; align-items:baseline; justify-content:space-between; margin-top:16px; padding-top:12px; border-top:1px solid var(--line)}
.quedo span{font-size:13px; font-weight:600; color:var(--muted)}
.quedo b{font-size:22px; font-weight:800; letter-spacing:-.02em; color:var(--brand); font-variant-numeric:tabular-nums}
.quedo b.neg{color:var(--danger)}
.prow{display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:12px; align-items:center; width:100%; padding:9px 0; border:0; background:none; color:inherit; text-align:left; cursor:pointer}
.prow-n{font-size:14px; font-weight:600}
.track{height:8px; border-radius:4px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; margin-top:6px}
.track i{display:block; height:100%; background:var(--brand); border-radius:4px}
.track.warn i{background:var(--warn)}
.track.bad i{background:var(--danger)}
.prow-a{font-weight:700; font-variant-numeric:tabular-nums}
.todo{display:grid; grid-template-columns:36px minmax(0,1fr) 20px; gap:12px; align-items:center; width:100%; padding:10px 0; border:0; border-top:1px solid var(--line); background:none; color:inherit; text-align:left; cursor:pointer}
.todo:first-of-type{border-top:0; padding-top:0}
.todo b{display:block; font-size:14px; font-weight:600}
.todo small{display:block; font-size:12px; color:var(--muted)}
.todo > .ic{color:var(--muted)}

/* Proyectos */
.pr-row{display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:12px; align-items:center; width:100%; padding:10px 0; border:0; border-top:1px solid var(--line); background:none; color:inherit; text-align:left; cursor:pointer}
.pr-row:first-of-type{border-top:0; padding-top:0}
.pr-row b{display:block; font-size:14px; font-weight:600}
.pr-row small{display:block; font-size:12px; color:var(--muted)}
.pr-row .r{font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap}
.r.pos{color:var(--brand)}
.r.neg{color:var(--danger)}
.duo{display:flex; gap:3px; height:8px; margin-top:6px}
.duo i{display:block; height:100%; border-radius:4px; min-width:3px}
.duo .in{background:var(--brand)}
.duo .out{background:var(--spend)}
.proy{display:flex; flex-direction:column; gap:2px}
.proy-h{display:flex; align-items:center; gap:12px}
.proy-h .t{min-width:0; flex:1}
.proy-h b{display:block; font-size:16px; font-weight:700; letter-spacing:-.01em}
.proy-h small{display:block; font-size:12px; color:var(--muted)}
.k3{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin-top:14px}
.k3 .l{display:block; font-size:11px; font-weight:600; color:var(--muted)}
.k3 .n{display:block; font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap}
.k3 .n.pos{color:var(--brand)}
.k3 .n.neg{color:var(--danger)}
.seg-tabs{display:inline-flex; background:var(--surface); border:1px solid var(--line); border-radius:99px; padding:3px}
.seg-tabs button{border:0; background:none; font-size:13px; font-weight:600; color:var(--muted); padding:7px 14px; border-radius:99px; cursor:pointer}
.seg-tabs button[aria-pressed="true"]{background:var(--ink); color:var(--bg)}
.sum3{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin-bottom:12px}
.sum3 .card{padding:12px 14px}
.sum3 .l{font-size:12px; font-weight:600; color:var(--muted)}
.sum3 .n{font-size:15px; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums; white-space:nowrap}
.sum3 .n.pos{color:var(--brand)}
.sum3 .n.neg{color:var(--danger)}
.cot-h{display:flex; justify-content:space-between; align-items:center; gap:8px}
.cot-n{font-size:13px; font-weight:800; color:var(--muted); font-variant-numeric:tabular-nums}
.cot-p{font-size:17px; font-weight:700; margin-top:6px; letter-spacing:-.01em}
.prog{height:10px; border-radius:5px; background:var(--surface-2); border:1px solid var(--line-2); overflow:hidden; margin:14px 0 4px}
.prog i{display:block; height:100%; background:var(--brand)}
.note{display:inline-flex; align-self:flex-start; align-items:center; gap:6px; margin-top:12px; padding:6px 10px; border-radius:99px; font-size:12px; font-weight:700; background:var(--warn-tint); color:var(--warn)}
.note.ok{background:var(--tint); color:var(--brand-ink)}
.note .ic{font-size:16px}

/* Movimientos */
.search{display:flex; align-items:center; gap:8px; height:44px; padding:0 12px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface); margin-bottom:10px}
.search input{flex:1; min-width:0; height:100%; border:0; outline:0; background:transparent; color:var(--ink); font-size:16px}
.search .ic{color:var(--muted)}
.filters{display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px}
.filters::-webkit-scrollbar{display:none}
.chip-b{display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 13px; border-radius:99px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink-2); font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; flex:none}
.chip-b[aria-pressed="true"]{background:var(--tint); border-color:var(--brand); color:var(--brand-ink)}
.chip-b .ic{font-size:17px}
.chip-b .mini-av{margin-left:-6px}
.day{font-size:12px; font-weight:700; color:var(--muted); margin:18px 0 8px}
.list{background:var(--surface); border:1px solid var(--line); border-radius:16px; overflow:hidden}
.mov{display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:12px; align-items:center; width:100%; padding:12px 14px; border:0; border-top:1px solid var(--line); background:none; color:inherit; text-align:left; cursor:pointer}
.mov:first-child{border-top:0}
.mov:hover{background:var(--surface-2)}
.mov .ic-box{width:40px; height:40px; border-radius:12px; background:var(--surface-2); color:var(--ink-2)}
.mov.ingreso .ic-box{background:var(--tint); color:var(--brand-ink)}
.mov-b{display:flex; flex-direction:column; gap:2px; min-width:0}
.mov-t{font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.mov-m{font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.mov-tags{display:flex; flex-wrap:wrap; gap:4px; margin-top:4px}
.mov-a{font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; align-self:start; padding-top:2px}
.mov.ingreso .mov-a{color:var(--brand)}
.mov.flash{animation:flash 2.6s ease-out}
@keyframes flash{from{background:var(--tint)} to{background:transparent}}
.empty{padding:28px 16px; text-align:center; color:var(--muted)}
.narrow{max-width:880px; margin:0 auto}

/* Reportes */
.months{display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin-bottom:12px}
.months::-webkit-scrollbar{display:none}
.legend{display:flex; gap:14px; font-size:12px; color:var(--muted)}
.legend span{display:inline-flex; align-items:center; gap:6px}
.legend i{width:10px; height:10px; border-radius:3px; display:inline-block}
.chart-w{overflow-x:auto}
.chart{display:block; width:100%; min-width:300px; height:auto}
.chart .gl{stroke:var(--line); stroke-width:1}
.chart .ax{fill:var(--muted); font-size:11px; font-family:var(--f)}
.chart .ax.cur{fill:var(--ink); font-weight:700}
.chart .b-in{fill:var(--brand)}
.chart .b-out{fill:var(--spend)}
.chart .dim{opacity:.5}
.hb{display:grid; gap:14px}
.cat-r{display:grid; grid-template-columns:30px minmax(0,1fr); gap:10px; align-items:center}
.hb-t{display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13px}
.hb-t > span:first-child{font-weight:600; display:inline-flex; align-items:center; gap:6px; min-width:0}
.hb-t > span:last-child{font-variant-numeric:tabular-nums; color:var(--ink-2); white-space:nowrap}
.stack{display:flex; gap:3px; height:34px; margin-bottom:6px}
.stack i{display:block; height:100%; border-radius:8px; background:var(--brand)}
.split{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; margin-top:14px}
.split div{display:grid; grid-template-columns:12px minmax(0,1fr); gap:2px 8px; align-items:center; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:10px 12px}
.split .sw{width:12px; height:12px; border-radius:3px; background:var(--brand)}
.split b{font-size:16px; font-variant-numeric:tabular-nums}
.split small{grid-column:2; font-size:12px; color:var(--muted)}
.dl{display:grid; gap:10px}
.dl-i{display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px; border:1px solid var(--line-2); border-radius:14px; background:var(--surface); color:inherit; text-align:left; cursor:pointer; width:100%; text-decoration:none}
.dl-i b{display:block; font-size:14px}
.dl-i small{display:block; font-size:12px; color:var(--muted)}
.dl-i .ic-box{width:44px; height:44px}

/* Hoja (registro y detalles) */
.scrim{position:fixed; inset:0; background:var(--scrim); z-index:20}
.sheet{position:fixed; z-index:30; display:flex; flex-direction:column; background:var(--surface); outline:0; left:0; right:0; bottom:0; max-height:93%; border-radius:24px 24px 0 0}
.sheet::before{content:""; display:block; width:38px; height:4px; border-radius:2px; background:var(--line-2); margin:8px auto 0; flex:none}
.sheet.in{animation:up .26s cubic-bezier(.2,.8,.2,1)}
@keyframes up{from{transform:translateY(24px); opacity:0}}
.sheet-h{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 20px 8px; flex:none}
.sheet-h h3{font-size:19px; font-weight:800; letter-spacing:-.02em; text-wrap:balance}
.kicker{font-size:12px; font-weight:700; color:var(--brand-ink); margin-bottom:2px}
.x{width:36px; height:36px; border-radius:50%; border:0; background:var(--surface-2); color:var(--ink-2); display:grid; place-items:center; cursor:pointer; flex:none}
.sheet-b{flex:1; overflow-y:auto; padding:8px 20px 20px; display:grid; gap:16px; align-content:start}
.sheet-f{display:flex; gap:10px; padding:12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--line); flex:none}
.sheet-f .btn{flex:1}
.tipos{display:grid; grid-template-columns:repeat(var(--n,3), minmax(0,1fr)); gap:10px}
.tipo{display:grid; justify-items:center; gap:10px; padding:20px 8px 16px; border:1px solid var(--line-2); border-radius:16px; background:var(--surface); color:var(--ink); font-size:13px; font-weight:700; text-align:center; cursor:pointer}
.tipo .ic-box{width:52px; height:52px; border-radius:16px}
.tipo .ic-box .ic{font-size:28px}
.tipo:hover{border-color:var(--brand)}
.modes{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px}
.mode{display:grid; justify-items:center; gap:6px; padding:12px 6px; border:1px solid var(--line-2); border-radius:14px; background:var(--surface); color:var(--ink-2); font-size:12px; font-weight:700; text-align:center; cursor:pointer}
.mode[aria-pressed="true"]{border-color:var(--brand); background:var(--tint); color:var(--brand-ink)}
.drop{position:relative; display:grid; justify-items:center; gap:6px; padding:30px 16px; border:1.5px dashed var(--line-2); border-radius:18px; background:var(--surface-2); text-align:center; cursor:pointer}
.drop input,.file-btn input{position:absolute; width:1px; height:1px; opacity:0; overflow:hidden}
.drop .ic-box{width:64px; height:64px; border-radius:20px; margin-bottom:6px}
.drop .ic-box .ic{font-size:32px}
.drop b{font-size:16px}
.drop small{font-size:12px; color:var(--muted)}
.drop:focus-within,.file-btn:focus-within{outline:2px solid var(--brand); outline-offset:2px}
.file-btn{position:relative}
.scanbox{position:relative; padding:18px; border-radius:16px; background:var(--surface-2); overflow:hidden; display:grid; place-items:center; min-height:120px}
.beam{position:absolute; left:6%; right:6%; height:3px; border-radius:2px; background:var(--brand); box-shadow:0 0 14px var(--brand); animation:scan 1.3s ease-in-out infinite alternate}
@keyframes scan{from{top:8%} to{top:90%}}
.reading{display:flex; align-items:center; justify-content:center; gap:10px; font-weight:600; color:var(--brand-ink)}
.spin{width:18px; height:18px; border-radius:50%; border:2px solid var(--line-2); border-top-color:var(--brand); animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.shot{display:block; max-width:100%; max-height:300px; margin:0 auto; border-radius:10px}
.pdf{display:grid; justify-items:center; gap:6px; color:var(--ink-2); font-weight:700}
.pdf .ic{font-size:40px; color:var(--danger)}
.ia{display:grid; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2)}
.ia-h{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; font-weight:700}
.row2{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px}
.fld{display:grid; gap:6px; min-width:0}
.fld > span:first-child{font-size:13px; font-weight:700; color:var(--ink-2)}
.fld input,.fld select,.inp{width:100%; height:46px; padding:0 12px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface); color:var(--ink); font-size:16px; font-weight:500}
.fld input:focus,.fld select:focus,.inp:focus{outline:2px solid var(--brand); outline-offset:0; border-color:transparent}
.fld input[disabled],.fld select[disabled]{opacity:.65}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.switch{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid var(--line-2); border-radius:12px; cursor:pointer; background:var(--surface)}
.switch > span{display:flex; align-items:center; gap:10px}
.switch b{display:block; font-size:14px}
.switch small{display:block; font-size:12px; color:var(--muted)}
.switch input{width:22px; height:22px; accent-color:var(--brand); flex:none}
.err{font-size:12px; font-weight:700; color:var(--danger)}
.info{display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; background:var(--tint); color:var(--brand-ink); font-size:13px; font-weight:700}
.info.warn{background:var(--warn-tint); color:var(--warn)}
.info .ic{font-size:18px}
.hint{font-size:12px; color:var(--muted)}
.dt{display:grid; border:1px solid var(--line); border-radius:14px; overflow:hidden}
.dt div{display:grid; grid-template-columns:24px minmax(0,1fr); gap:10px; align-items:center; padding:10px 14px; border-top:1px solid var(--line); font-size:14px}
.dt div:first-child{border-top:0}
.dt .ic{color:var(--muted)}
.amt-big{font-size:34px; font-weight:800; letter-spacing:-.03em; font-variant-numeric:tabular-nums}
.amt-big.in{color:var(--brand)}
.amt-big.neg{color:var(--danger)}
.tl-i{display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--line)}
.tl-i:first-child{border-top:0}
.tl-i b{display:block; font-size:14px}
.tl-i small{display:block; font-size:12px; color:var(--muted)}
.tl-a{font-weight:700; font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap}
.vs{width:100%; border-collapse:collapse; font-size:13px}
.vs th{font-size:11px; font-weight:700; color:var(--muted); text-align:right; padding:0 0 8px}
.vs th:first-child{text-align:left}
.vs td{padding:9px 0; border-top:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap}
.vs td:first-child{text-align:left; white-space:normal; padding-right:8px}
.vs tfoot td{font-weight:800; border-top:1px solid var(--line-2)}
.sec-t{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; font-weight:700; color:var(--ink-2); margin-bottom:-6px}
.toast{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(96px + env(safe-area-inset-bottom, 0px)); z-index:40; display:flex; align-items:center; gap:8px; max-width:90%; padding:11px 14px; border-radius:12px; background:var(--ink); color:var(--bg); font-size:13px; font-weight:600}
.toast .ic{color:var(--brand)}
.toast.bad .ic{color:var(--danger)}
.toast.in{animation:tin .22s ease-out}
@keyframes tin{from{opacity:0; transform:translate(-50%, 12px)}}
.team-cta{display:grid; gap:8px; align-content:center}

/* Configuración */
.cfg{display:grid; gap:12px}
.user-r{display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--line)}
.user-r:first-of-type{border-top:0}
.user-r b{display:block; font-size:14px}
.user-r small{display:block; font-size:12px; color:var(--muted)}
.inline{display:flex; gap:8px; align-items:center}
.inline .inp{flex:1; min-width:0}
.topes{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px}

/* Entrar */
.login{min-height:100%; min-height:100dvh; display:grid; place-items:center; padding:24px 16px calc(24px + env(safe-area-inset-bottom, 0px))}
.login-card{width:100%; max-width:380px; display:grid; gap:18px}
.login-brand{display:grid; justify-items:center; gap:10px; text-align:center}
.login-brand .logo{width:64px; height:64px; border-radius:18px}
.login-brand h1{font-size:24px; font-weight:800; letter-spacing:-.02em}
.who{display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:10px}
.who button{display:grid; justify-items:center; gap:8px; padding:16px 8px; border:1px solid var(--line-2); border-radius:16px; background:var(--surface); color:var(--ink); font-size:14px; font-weight:700; cursor:pointer}
.who button[aria-pressed="true"]{border-color:var(--brand); background:var(--tint); color:var(--brand-ink)}
.who .avatar{width:44px; height:44px; font-size:17px}
.loading{min-height:100dvh; display:grid; place-items:center}

/* Reporte imprimible */
.rep{background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:24px}
.rep h1{font-size:22px; font-weight:800}
.rep table{width:100%; border-collapse:collapse; font-size:12px; margin-top:8px}
.rep th{text-align:left; font-size:11px; color:var(--muted); padding:6px 4px; border-bottom:1px solid var(--line-2)}
.rep td{padding:6px 4px; border-bottom:1px solid var(--line); vertical-align:top}
.rep td.n,.rep th.n{text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap}
.rep h2{font-size:15px; font-weight:800; margin-top:22px}

/* Computadora */
@media (min-width: 900px){
  .side{display:flex}
  .tabs{display:none}
  .top{padding:18px 32px 10px}
  .top .brand{display:none}
  .top-date,.sync{display:flex}
  .scroll{padding:8px 32px 40px}
  .card{padding:20px}
  .h-screen{font-size:28px}
  .grid{grid-template-columns:repeat(12, minmax(0,1fr)); gap:16px}
  .c-4{grid-column:span 4}
  .c-5{grid-column:span 5}
  .c-6{grid-column:span 6}
  .c-7{grid-column:span 7}
  .c-8{grid-column:span 8}
  .c-12{grid-column:1 / -1}
  .sheet{left:50%; top:50%; bottom:auto; right:auto; width:min(580px, 92vw); max-height:88vh; border-radius:20px; transform:translate(-50%,-50%); border:1px solid var(--line)}
  .sheet::before{display:none}
  .sheet.in{animation:pop .2s ease-out}
  .toast{bottom:28px}
  .dl{grid-template-columns:1fr 1fr}
}
@keyframes pop{from{opacity:0; transform:translate(-50%,-47%)}}

@media print{
  body{background:#fff; color:#000}
  .side,.tabs,.top,.no-print,.toast,.sheet,.scrim{display:none !important}
  .app{display:block; height:auto; overflow:visible}
  .scroll{overflow:visible; padding:0}
  .rep{border:0; padding:0}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none !important; transition:none !important; scroll-behavior:auto !important}
}
