:root{--green:#0c8065;--ink:#142539;--muted:#657487;--line:#e6ecf0;--pale:#f6f8fa;--orange:#d65d3d;--lightgreen:#eaf7f1}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font:16px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:8px;color:var(--ink);font-size:.875rem;font-weight:600;transition:.15s}button:hover{background:var(--pale);border-color:#bac9d3}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--green);color:#fff;border-color:var(--green)}button.primary:hover{background:#086750}button.soft{color:var(--green);background:var(--lightgreen);border-color:transparent}button.danger{color:#b74735}button:focus-visible,a:focus-visible{outline:3px solid #8ccbbb;outline-offset:3px}a{color:var(--green)}aside{width:234px;position:fixed;inset:0 auto 0 0;border-right:1px solid var(--line);padding:26px 16px;background:#fff;display:flex;flex-direction:column}.brand{font-size:1.6rem;font-weight:750;letter-spacing:-.7px;display:flex;align-items:center;gap:10px;padding:0 6px}.brandmark{color:var(--green);font-size:2rem}.brandcaption{font-size:.8rem;color:var(--muted);margin:0 0 33px 47px}nav{display:grid;gap:8px}nav button{text-align:left;border:0;background:transparent;font-weight:500;padding:13px 15px;display:flex;gap:14px;align-items:center;font-size:.95rem}nav button.active{background:var(--lightgreen);color:var(--green);font-weight:650}nav svg{width:21px;height:21px;flex-shrink:0}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding-top:20px;display:flex;align-items:center;gap:9px;font-size:.75rem}.avatar{background:var(--lightgreen);color:var(--green);font-weight:700;border-radius:50%;padding:12px}.sidebar-bottom small{display:block;color:var(--muted);font-size:.75rem}main{margin-left:234px;padding:30px 32px;max-width:1900px}header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}h1{font-size:2rem;letter-spacing:-1px;margin:0;font-weight:720}header p{color:var(--muted);margin:3px 0 0;font-size:.95rem}.actions{display:flex;gap:12px;align-items:center}.month-label{display:flex;gap:8px;align-items:center;font-size:.8rem;color:var(--muted)}input,select,textarea{border:1px solid #dbe3e9;border-radius:7px;padding:9px 10px;background:#fff;color:var(--ink);max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #89cbbb;outline-offset:1px}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.card{border:1px solid var(--line);border-radius:12px;padding:21px;background:white;min-width:0}.kpi-label{font-size:.875rem;color:var(--muted)}.kpi-value{font-size:1.8rem;letter-spacing:-.8px;font-weight:750;margin:10px 0 8px;font-variant-numeric:tabular-nums}.kpi-note{font-size:.8rem;color:var(--muted)}.kpi-icon{float:right;padding:8px 10px;background:var(--lightgreen);color:var(--green);border-radius:50%;font-weight:600}.kpi-accent{background:#f6fcf9;border-color:#d4eade}.banks{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.bank{display:flex;gap:15px;align-items:center;padding:16px 21px}.bank-logo{font-size:1.1rem;font-weight:800;color:var(--green)}.bank-logo.inter{color:#ea7125}.bank small{display:block;color:var(--muted);font-size:.8rem}.bank .bank-value{margin-left:auto;text-align:right;font-weight:650}.grid-two{display:grid;grid-template-columns:1.35fr 1fr;gap:20px;margin:20px 0}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}h2{font-size:1.1rem;margin:0;font-weight:700;letter-spacing:-.25px}h3{font-size:1rem;margin:12px 0}.muted{color:var(--muted)}.small{font-size:.8rem}.badge{display:inline-block;border-radius:20px;padding:4px 9px;font-size:.75rem;font-weight:600;white-space:nowrap;background:var(--pale);color:var(--muted)}.badge.green{background:var(--lightgreen);color:var(--green)}.badge.amber{background:#fff4dc;color:#926009}.badge.red{background:#fff0eb;color:#b55032}.notice{background:#f3f8fb;border:1px solid #deebf3;border-radius:9px;padding:13px 16px;font-size:.875rem;color:#446078;margin:18px 0}.notice.amber{background:#fffbf0;border-color:#f0e3bd;color:#7b642b}.empty{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:220px;text-align:center;padding:24px;color:var(--muted)}.empty h2{color:var(--ink);margin:10px 0 2px}.empty p{max-width:460px;font-size:.9rem;margin:8px 0 18px}.empty-icon{font-size:1.8rem;color:#a6b7bf;background:var(--pale);width:54px;height:54px;display:grid;place-items:center;border-radius:15px}.bars{display:grid;gap:20px;padding-top:8px}.bar-row{display:grid;grid-template-columns:120px 1fr 110px;align-items:center;gap:12px;font-size:.875rem}.track{height:13px;background:#eff3f6;border-radius:4px;overflow:hidden}.fill{height:100%;background:var(--green);border-radius:4px}.bar-amount{text-align:right;font-variant-numeric:tabular-nums}.chart{width:100%;height:240px}.chart text{font:12px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;fill:var(--muted)}.legend{display:flex;justify-content:center;gap:18px;font-size:.8rem;color:var(--muted)}.dot{width:9px;height:9px;border-radius:50%;background:var(--green);display:inline-block;margin-right:5px}.dot.personal{background:#8a9bb5}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.875rem}th{text-align:left;background:var(--pale);font-size:.8rem;font-weight:600;color:var(--muted);padding:12px 10px;white-space:nowrap}td{padding:14px 10px;border-bottom:1px solid var(--line);vertical-align:middle}tr:last-child td{border-bottom:0}td.amount,th.amount{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.row-actions{display:flex;gap:6px;white-space:nowrap}.row-actions button{font-size:.8rem;padding:7px 9px}.desc{min-width:180px;max-width:300px;overflow-wrap:anywhere}.desc small{display:block;color:var(--muted);font-size:.75rem;margin-top:3px}.summary-line{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid var(--line);font-size:.9rem}.summary-line strong{white-space:nowrap}.summary-line.result{background:var(--lightgreen);border-radius:8px;border:0;padding:13px;margin-top:10px}.summary-line:last-child{border-bottom:0}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:20px;flex-wrap:wrap}.toolbar input[type=search]{flex:1;min-width:160px}.toolbar select{font-size:.875rem;max-width:200px}.spacer{flex:1}.count{font-size:.85rem;color:var(--muted)}.file-card{display:flex;align-items:center;gap:18px;margin:12px 0}.file-icon{background:var(--pale);padding:15px;font-size:1.2rem;border-radius:8px}.file-info{flex:1;min-width:0}.file-info strong{overflow-wrap:anywhere;font-size:.95rem}.file-meta{font-size:.8rem;color:var(--muted);margin:4px 0}.dropzone{border:1.5px dashed #a6c9bd;border-radius:12px;background:#f8fcfa;padding:35px;text-align:center;cursor:pointer}.dropzone:hover,.dropzone.drag{background:var(--lightgreen)}.dropzone h2{margin:10px 0}.dropzone p{color:var(--muted);font-size:.875rem}.period-status{display:flex;align-items:center;gap:12px;margin:16px 0}.two-inputs{display:grid;grid-template-columns:1fr 1fr;gap:14px}dialog{border:0;border-radius:16px;padding:24px;max-width:600px;width:calc(100% - 30px);box-shadow:0 25px 90px #14253930;color:var(--ink)}dialog::backdrop{background:#132a3e60;backdrop-filter:blur(3px)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.icon-button{border:0;padding:0 8px;font-size:1.8rem;background:transparent}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:15px;font-size:.875rem;font-weight:600}.field small{font-weight:400;color:var(--muted);font-size:.8rem}.field textarea{min-height:85px}.error{color:#b74735;font-size:.9rem;margin:12px 0}.checkline{display:flex;align-items:flex-start;gap:9px;margin:12px 0;font-size:.9rem}.file-input{width:100%;padding:16px;background:var(--pale)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;max-width:90%;padding:13px 22px;border-radius:9px;opacity:0;pointer-events:none;z-index:10;transition:.2s;font-size:.9rem}#toast.visible{opacity:1}footer{font-size:.8rem;color:var(--muted);padding:25px 0 10px}.rule-line{padding:12px 0}.loading{opacity:.6}.snapshot-note{padding:10px 0;font-size:.85rem;color:var(--muted)}@media(min-width:1500px){main{padding:36px 45px}.kpi-value{font-size:2rem}}@media(max-width:1150px){aside{width:205px;padding:25px 10px}main{margin-left:205px;padding:25px 20px}.kpis{grid-template-columns:repeat(2,1fr)}.grid-two{grid-template-columns:1fr}.actions{flex-wrap:wrap;justify-content:flex-end}.kpi-value{font-size:1.7rem}.sidebar-bottom{font-size:.7rem}}@media(max-width:750px){aside{position:static;width:auto;border:0;border-bottom:1px solid var(--line);padding:12px 16px}.brand{font-size:1.3rem}.brandcaption,.sidebar-bottom{display:none}nav{display:flex;overflow:auto;margin-top:10px;gap:2px}nav button{padding:10px;white-space:nowrap;font-size:.85rem}nav svg{display:none}main{margin:0;padding:20px 15px}header{align-items:flex-start;flex-direction:column;gap:14px}h1{font-size:1.8rem}.actions{width:100%;justify-content:space-between}.month-label{font-size:.75rem}.actions button{font-size:.8rem;padding:10px}.kpis{gap:10px}.card{padding:16px}.kpi-value{font-size:1.4rem}.kpi-icon{display:none}.kpi-label{font-size:.8rem}.banks{grid-template-columns:1fr;gap:10px}.bar-row{grid-template-columns:95px 1fr 95px;font-size:.8rem}.two-inputs{grid-template-columns:1fr}.file-card{flex-wrap:wrap}.card-head{flex-wrap:wrap}.row-actions{flex-wrap:wrap}.toolbar select{max-width:none;flex:1}.toolbar input[type=search]{width:100%;flex-basis:100%}}@media print{aside,header .actions,button,footer,.toolbar,#toast{display:none!important}main{margin:0;padding:0}.card{break-inside:avoid}.grid-two{display:block}.card{margin-bottom:15px}body{font-size:12px}.kpis{grid-template-columns:repeat(4,1fr)}.kpi-value{font-size:18px}}
.print-period{display:none}@page{size:A4;margin:14mm}@media print{.print-period{display:block;font-size:12px;color:#536578;margin-top:8px}header{margin-bottom:16px}h1{font-size:24px}.card{padding:12px;margin-bottom:10px}.empty{min-height:60px;padding:8px}.empty-icon{display:none}.empty p{margin:4px 0;font-size:11px}.grid-two{margin:12px 0}.summary-line{padding:7px 0;font-size:12px}.kpi-label,.kpi-note{font-size:11px}.kpi-icon{display:none}.kpi-value{font-size:18px;margin:6px 0}.small,.notice{font-size:11px}table{font-size:11px}th{font-size:10px}td,th{padding:8px}.card-head{margin-bottom:8px}.notice{margin:10px 0;padding:9px}.period-status{margin:8px 0}a[href='/api/backup']{display:none}}
@media screen{aside{width:14.625rem}main{margin-left:14.625rem;container-type:inline-size}header{flex-wrap:wrap}.kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr))}.actions{max-width:100%}.card-head{flex-wrap:wrap}.bank{flex-wrap:wrap}.summary-line{flex-wrap:wrap}@container(max-width:50rem){.grid-two{grid-template-columns:1fr}.banks{grid-template-columns:1fr}}}@media screen and (max-width:1150px){aside{width:12.8125rem}main{margin-left:12.8125rem}}@media screen and (max-width:750px){aside{width:auto}main{margin-left:0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi-value{overflow-wrap:anywhere}.summary-line strong{white-space:normal}}
/* Mobile app: bottom navigation and fast daily entry */
.mobile-nav{display:none}.entry-modes{display:flex;gap:6px;border-radius:12px;background:var(--pale);padding:5px;margin-bottom:22px}.entry-modes button{flex:1;border:0;background:transparent;font-size:1rem;min-height:44px}.entry-modes button.active{background:#fff;color:var(--green);box-shadow:0 2px 7px #1425390c}.money-input{font-size:2.4rem;font-weight:700;letter-spacing:-1px;border:0;border-bottom:2px solid #d9e9e2;border-radius:0;padding:8px 0 15px;width:100%;color:var(--green)}.category-shortcuts{display:flex;gap:7px;overflow:auto;margin:-2px 0 16px;padding:3px 0}.category-shortcuts button{white-space:nowrap;min-height:40px;border-radius:25px;font-size:.85rem}.category-shortcuts button.active{color:var(--green);border-color:var(--green);background:var(--lightgreen)}.entry-details{margin:4px 0 16px}.entry-details summary{cursor:pointer;color:var(--muted);padding:9px 0;font-size:.9rem}.quick-options{display:grid;gap:14px}.quick-options button{display:grid;text-align:left;grid-template-columns:46px 1fr;gap:6px 12px;padding:20px}.quick-options strong{font-size:1.1rem}.quick-options small{grid-column:2;color:var(--muted);font-weight:400;font-size:.9rem}.quick-symbol{grid-row:span 2;width:44px;height:44px;border-radius:12px;background:var(--lightgreen);display:grid;place-items:center;color:var(--green);font-size:1.1rem}.choice-dialog .modal-actions{display:none}.more-menu{display:grid;gap:8px}.more-menu button{display:flex;gap:14px;text-align:left;align-items:center;min-height:50px}.more-menu svg{width:23px;height:23px}.more-menu a{padding:15px;font-size:.95rem}.notes-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px}.note-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:1rem;line-height:1.6}.note-input{min-height:220px!important;font-size:1rem;line-height:1.6}.note-card .row-actions{flex-wrap:wrap}.notes-toolbar{gap:14px}#connection-status{position:fixed;top:0;left:0;right:0;z-index:50;background:#fff0d9;color:#74491a;text-align:center;font-size:.875rem;padding:10px}.checkline input{width:20px;height:20px;flex-shrink:0}.modal-actions button{min-height:46px}body:has(dialog[open]){overflow:hidden}
@media screen and (max-width:750px){
 body{background:#f7faf9}aside{display:none}main{padding:22px 16px calc(108px + env(safe-area-inset-bottom));margin:0;container-type:normal}header{gap:14px;margin-bottom:20px}header h1{font-size:1.65rem}header p{font-size:.875rem;max-width:32ch}.actions{gap:10px}.actions input{font-size:16px;min-height:44px}.actions button{min-height:44px}.month-label{font-size:.875rem}button,input,select,textarea{font-size:16px;min-height:44px}button{padding:10px 13px}.icon-button{min-width:44px}.card{border-color:#e3ebe7;border-radius:15px;box-shadow:0 2px 5px #12372b02}.kpis{gap:10px}.kpi-label{font-size:.875rem}.kpi-value{font-size:clamp(1.35rem,5.6vw,1.65rem);letter-spacing:-.7px}.kpi-note{font-size:.8rem}.kpi-accent{background:#e9f6ef}.banks{margin:14px 0}.bank{padding:13px 15px}.bank small{font-size:.8rem}.bank-logo{font-size:1rem}.grid-two{gap:14px;margin:14px 0}.empty{min-height:150px;padding:16px 8px}.empty p{font-size:.9rem}.chart{height:200px}.notice{font-size:.875rem}.notice button{display:block;margin-top:9px}.bar-row{grid-template-columns:minmax(75px,1fr) minmax(45px,1fr) auto;gap:8px;font-size:.875rem}.card-head h2{font-size:1rem}.card-head{gap:10px}.card-head button{font-size:.875rem}.small{font-size:.8rem}.summary-line{font-size:.95rem}.mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;position:fixed;bottom:0;left:0;right:0;z-index:20;background:#fffffff5;backdrop-filter:blur(18px);border-top:1px solid #e0e8e3;padding:5px 7px calc(7px + env(safe-area-inset-bottom));margin:0;gap:0;box-shadow:0 -6px 24px #17392a06}.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;background:transparent;border:0;color:#667b73;font-size:.75rem;font-weight:550;min-height:58px;padding:4px 0;white-space:nowrap}.mobile-nav button.active{color:var(--green);background:transparent}.mobile-nav svg{display:block;width:23px;height:23px}.mobile-nav .nav-add{color:var(--green);font-weight:700}.add-circle{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:var(--green);color:#fff;font-size:1.8rem;line-height:1;margin-top:-15px;box-shadow:0 4px 12px #0c806526}#toast{bottom:calc(90px + env(safe-area-inset-bottom));width:calc(100% - 32px);max-width:450px;text-align:center;font-size:.9rem}footer{padding-top:10px}.toolbar{gap:8px}.toolbar input[type=search]{min-height:46px}.toolbar select{font-size:16px}.toolbar .primary{width:100%}.row-actions button{font-size:.875rem;min-height:44px}.period-status{flex-wrap:wrap}.period-status button{flex:1;font-size:.875rem}.file-card{gap:12px}.file-card a{display:block;padding:10px 0}.file-info{flex-basis:65%}.file-info strong{font-size:.95rem}.file-meta{font-size:.85rem}.dropzone{padding:24px 15px}.dropzone .badge{white-space:normal}.notes-toolbar>div{flex:1 0 100%}.notes-toolbar>button{flex:1;width:auto!important}.notes-grid{grid-template-columns:1fr}.note-card{padding:18px}.note-body{font-size:1rem}.note-card .row-actions button{flex:1}.note-card{break-inside:avoid}
 dialog{width:100%;max-width:100%;max-height:94dvh;margin:auto 0 0;border-radius:22px 22px 0 0;padding:0;overflow:auto;overscroll-behavior:contain}dialog form{padding:0 20px calc(14px + env(safe-area-inset-bottom))}.modal-head{position:sticky;top:0;background:#fff;z-index:2;margin:0 -20px 18px;padding:18px 18px 12px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:1.15rem}.modal-actions{position:sticky;bottom:calc(-14px - env(safe-area-inset-bottom));background:#fff;z-index:2;margin:20px -20px calc(-14px - env(safe-area-inset-bottom));padding:12px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);gap:10px}.modal-actions .primary{flex:1}.field{font-size:.95rem}.two-inputs{grid-template-columns:1fr 1fr;gap:12px}.field input,.field select{width:100%;min-width:0}.field input[type=date]{appearance:none;min-height:46px}.money-input{font-size:2.6rem;min-height:70px!important}.entry-modes button{min-height:44px}.note-input{min-height:260px!important}.choice-dialog{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.choice-dialog .quick-options{padding-bottom:8px}
 body[data-route=transactions] .table-wrap,body[data-route=fixed] .table-wrap{overflow:visible}body[data-route=transactions] table,body[data-route=transactions] tbody,body[data-route=fixed] table,body[data-route=fixed] tbody{display:block}body[data-route=transactions] thead,body[data-route=fixed] thead{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;overflow:hidden}body[data-route=transactions] tbody tr,body[data-route=fixed] tbody tr{display:grid;grid-template-columns:1fr auto;gap:8px 10px;border-bottom:1px solid var(--line);padding:17px 0}body[data-route=transactions] tbody td,body[data-route=fixed] tbody td{border:0;padding:0;min-width:0;max-width:none;font-size:.9rem}body[data-route=transactions] tbody td:nth-child(1){grid-column:2;grid-row:1}body[data-route=transactions] tbody td:nth-child(1) input{min-height:24px;width:23px;height:23px;float:right}body[data-route=transactions] tbody td:nth-child(2){grid-column:1;grid-row:1;display:flex;gap:8px;align-items:center;color:var(--muted);font-size:.8rem}body[data-route=transactions] tbody td:nth-child(3){grid-column:1/-1;grid-row:2;font-weight:600}body[data-route=transactions] tbody td:nth-child(3) small{font-weight:400}body[data-route=transactions] tbody td:nth-child(4){grid-column:1;grid-row:3;color:var(--muted)}body[data-route=transactions] tbody td:nth-child(5){grid-column:2;grid-row:3;font-weight:700;font-size:1.1rem}body[data-route=transactions] tbody td:nth-child(6){grid-column:1;grid-row:4}body[data-route=transactions] tbody td:nth-child(7){grid-column:1/-1;grid-row:5}body[data-route=transactions] tbody td .row-actions button{flex:1}body[data-route=transactions] .card>.card-head .row-actions{width:100%}body[data-route=transactions] .card>.card-head .row-actions button{flex:1}body[data-route=fixed] tbody td:first-child{grid-column:1/-1;font-weight:650}body[data-route=fixed] tbody td:nth-child(2){grid-column:1/-1;color:var(--muted)}body[data-route=fixed] tbody td:nth-child(2)::before{content:'Vencimento: '}body[data-route=fixed] tbody td:nth-child(3),body[data-route=fixed] tbody td:nth-child(4){text-align:left}body[data-route=fixed] tbody td:nth-child(3)::before,body[data-route=fixed] tbody td:nth-child(4)::before{content:attr(data-label) ': ';color:var(--muted)}body[data-route=fixed] tbody td:nth-child(5),body[data-route=fixed] tbody td:last-child{grid-column:1/-1}.desc small{font-size:.8rem}
}
@media screen and (max-width:350px){main{padding-inline:12px}.two-inputs{grid-template-columns:1fr}.kpi-value{font-size:1.3rem}.actions #upload-top{font-size:.8rem}.mobile-nav button{font-size:.75rem}}
@media print{.mobile-nav,#connection-status,.category-shortcuts,.notes-toolbar{display:none!important}.notes-grid{display:block}.note-body{font-size:12px;line-height:1.5}.note-card{break-inside:avoid;margin-bottom:12px}.note-card .badge{font-size:10px}.note-card .card-head{display:flex}body[data-route=notes] main>header p{font-size:12px}}

.auth-mode>aside,.auth-mode>main,.auth-mode>#mobile-nav{display:none!important}
.auth-mode{background:#f5f8f7;display:block;padding:0;min-height:100dvh}
#auth-screen{width:min(440px,100%);margin:0 auto;padding:48px 20px 30px}
.auth-brand{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:32px;font-size:22px;color:#123c32}
.auth-brand img{border-radius:14px}.auth-card{background:white;border:1px solid #dfe8e4;border-radius:24px;padding:32px;box-shadow:0 12px 50px #123c3207}
.auth-card h1{font-size:27px;letter-spacing:-1px;margin:10px 0}.auth-card p{font-size:14px;line-height:1.6;color:var(--muted)}
.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:700;color:var(--green)}
.auth-card input:not([type=checkbox]){width:100%;min-height:48px;font-size:16px}.auth-card label{margin-top:18px}
.auth-submit{width:100%;min-height:48px;margin-top:10px}.auth-link{border:0;background:none;width:100%;margin-top:14px;font-size:13px}.auth-footnote{text-align:center;font-size:12px;line-height:1.7;color:var(--muted);margin-top:22px}
#auth-error:empty{display:none}#auth-error{color:#ac3434}.account-logout{padding:3px 8px;margin-top:6px;font-size:11px}.sidebar-bottom div{min-width:0;overflow-wrap:anywhere}
@media(max-width:440px){#auth-screen{padding-top:30px}.auth-card{padding:25px 22px}.auth-brand{margin-bottom:24px}}

@media screen and (max-width:750px){#upload-top{display:none}}
/* Compact daily capture; all charts remain available under month details. */
.capture-card{padding:24px;background:#edf7f1;border:1px solid #d7e9de;border-radius:20px;margin-bottom:18px}.capture-card h2{font-size:27px;letter-spacing:-.8px;margin:5px 0}.capture-card p{color:#557466;margin:4px 0 18px;font-size:15px}.capture-primary{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;font-size:16px!important;border-radius:12px}.capture-primary svg{width:21px;height:21px}.capture-primary>span{margin-left:auto;font-size:22px}.capture-secondary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.capture-secondary button{border:0;background:#ffffffa8;min-height:45px;font-size:13px}.month-card{border:1px solid var(--line);border-radius:20px;background:#fff;padding:24px;margin-bottom:18px}.month-card-top{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:14px}.month-total{display:block;font-size:36px;letter-spacing:-1.4px;margin:8px 0 14px}.spent-split{display:flex;gap:20px;font-size:13px;color:var(--muted);flex-wrap:wrap}.spent-split b{color:var(--ink);font-weight:600;margin-left:5px}.month-balance{display:grid;grid-template-columns:1fr 1fr;gap:18px;border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.month-balance small{color:var(--muted);display:block;font-size:13px}.month-balance strong{font-size:20px;display:block;margin-top:4px;overflow-wrap:anywhere}.forecast-link{display:flex;align-items:center;gap:8px;width:100%;border:0;background:#f7f9f8;margin-top:18px;font-size:13px!important;padding:12px;border-radius:9px}.forecast-link b{margin-left:auto}.forecast-link span{font-size:20px}.recent-card{padding:20px;margin-bottom:14px}.recent-expense{display:flex;align-items:center;text-align:left;width:100%;gap:10px;border:0;border-radius:0;padding:15px 0;border-bottom:1px solid #eef2ef;background:none}.recent-expense:last-child{border-bottom:0}.expense-dot{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#f1f6f3;flex-shrink:0;color:var(--green)}.recent-description{flex:1;min-width:0}.recent-description strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.recent-description small{display:block;color:var(--muted);font-weight:400;font-size:12px;margin-top:3px}.recent-expense>b{white-space:nowrap;font-size:14px}.review-strip{width:100%;display:flex;justify-content:space-between;text-align:left;background:#fff9ed;border-color:#f3e8d1;color:#806021;margin:12px 0;font-size:13px}.month-details>summary{cursor:pointer;padding:18px 0;color:var(--green);font-size:14px;font-weight:600}.capture-tabs{display:flex;background:#f1f5f3;border-radius:11px;padding:4px;gap:4px;margin-bottom:22px}.capture-tabs button{flex:1;border:0;background:none;min-height:42px;font-size:13px!important;padding:8px}.capture-tabs .active{background:white;color:var(--green);box-shadow:0 2px 6px #123c3208}.phrase-dialog textarea{min-height:108px!important;resize:vertical;font-size:18px;line-height:1.5;padding:14px;border-radius:12px}.phrase-tip{font-size:13px;color:var(--muted);line-height:1.5;margin:-2px 0 18px}.phrase-preview-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:15px}.phrase-preview-title .badge{font-size:10px}.phrase-value{font-size:23px!important;font-weight:700;color:var(--green)}#phrase-preview{padding:16px;background:#f7faf8;border:1px solid #e1ebe5;border-radius:14px}#phrase-preview .field{font-size:13px}#phrase-preview input,#phrase-preview select{background:white}#phrase-preview .two-inputs{grid-template-columns:.85fr 1.15fr;gap:10px}.phrase-dialog .entry-details{margin:0}.phrase-dialog .entry-details summary{font-size:12px}.phrase-dialog .modal-actions{margin-top:16px}
@media screen and (min-width:1000px){body[data-route=overview] #content{max-width:1000px}.capture-card{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.capture-card>div:first-child{grid-row:span 2}.capture-card p{margin-bottom:0}.capture-primary{align-self:end}}
@media screen and (max-width:750px){body[data-route=overview] header{flex-direction:row;align-items:center;gap:8px}body[data-route=overview] header h1{font-size:24px}body[data-route=overview] header p{display:none}body[data-route=overview] .actions{width:auto}body[data-route=overview] .month-label{font-size:0}body[data-route=overview] #month{font-size:13px;padding:8px;max-width:165px;background:white;border-radius:10px}main{padding-top:18px}.capture-card,.month-card{padding:20px;margin-bottom:14px}.capture-card h2{font-size:26px}.capture-card p{font-size:14px}.capture-secondary button{font-size:12px!important;padding:10px 5px}.month-total{font-size:34px}.recent-card{padding:18px}.recent-card .card-head{margin-bottom:0}.recent-card .card-head button{border:0;color:var(--green);font-size:12px}.mobile-nav{backdrop-filter:none;background:#fff}.phrase-dialog{max-height:95dvh}.phrase-dialog .modal-head{margin-bottom:14px}.phrase-dialog .capture-tabs{margin-bottom:16px}.phrase-dialog .modal-actions{padding-top:10px}.phrase-dialog .two-inputs input,.phrase-dialog .two-inputs select{padding:9px 7px;font-size:16px}.phrase-dialog .field{margin-bottom:12px}.phrase-dialog #cancel-modal{font-size:14px}.phrase-dialog textarea{font-size:18px}}
@media print{.capture-card,.review-strip,.recent-card,.month-details>summary{display:none!important}.month-details::details-content{display:block!important}.month-card{break-inside:avoid}.month-details .kpis{display:none}}
/* Keep controls inside their visible container, including short/keyboard viewports. */
.field,.two-inputs>*{min-width:0}.category-shortcuts{flex-wrap:wrap;overflow:visible;gap:8px}.category-shortcuts button{white-space:normal;max-width:100%}.recent-description strong{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.recent-description small{overflow-wrap:anywhere}.month-total{overflow-wrap:anywhere}.badge{max-width:100%;white-space:normal}.row-actions{white-space:normal}.row-actions button{white-space:normal;overflow-wrap:anywhere}.phrase-preview-title{flex-wrap:wrap}.capture-tabs button{min-width:0;white-space:normal}.more-menu button{min-width:0;white-space:normal}.checkline input[type=checkbox]{min-height:20px;margin-top:1px}
@media screen{
 dialog[open]{display:flex;flex-direction:column;overflow:hidden;padding:0;max-height:calc(var(--visible-height,100dvh) - 32px)}
 dialog form{display:flex;flex-direction:column;min-height:0;max-height:inherit;padding:0;width:100%}
 dialog .modal-head{position:static;flex-shrink:0;margin:0;padding:18px 22px 12px;border-bottom:1px solid var(--line);background:white;gap:12px}
 dialog .modal-head h2{min-width:0;overflow-wrap:anywhere}dialog .modal-head .icon-button{flex-shrink:0}
 #modal-body{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0;padding:18px 22px;scroll-padding:20px}
 dialog .modal-actions{position:static;flex-shrink:0;bottom:auto;margin:0;padding:12px 22px;border-top:1px solid var(--line);background:white;flex-wrap:wrap}
 dialog .modal-actions button{white-space:normal;min-width:0;overflow-wrap:anywhere}
 dialog.choice-dialog{padding:0}dialog.choice-dialog .modal-actions{display:none}
 aside{overflow-y:auto}
}
@media screen and (max-width:750px){
 .mobile-nav{overflow:visible;align-items:center;padding-top:8px}.mobile-nav .add-circle{margin-top:0}.mobile-nav button{justify-content:center}
 dialog[open],dialog.phrase-dialog[open]{position:fixed;inset:auto 0 auto 0;top:calc(var(--visible-top,0px) + var(--visible-height,100dvh));transform:translateY(-100%);margin:0;width:100%;max-width:100%;max-height:calc(var(--visible-height,100dvh) - 10px);border-radius:20px 20px 0 0}
 dialog .modal-head,dialog.phrase-dialog .modal-head{padding:12px 16px 10px;margin:0}#modal-body{padding:16px}
 dialog .modal-actions,dialog.phrase-dialog .modal-actions{padding:10px 16px calc(10px + env(safe-area-inset-bottom));margin:0}
 dialog .modal-actions .primary{flex:1 1 145px}.category-shortcuts{margin-bottom:16px}.category-shortcuts button{font-size:13px;min-height:44px;padding:8px 12px}
 .phrase-dialog .two-inputs{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
 body[data-route=overview] .table-wrap,body[data-route=sales] .table-wrap{overflow:visible}
 body[data-route=overview] table,body[data-route=sales] table,body[data-route=overview] tbody,body[data-route=sales] tbody{display:block}
 body[data-route=overview] thead,body[data-route=sales] thead{display:none}
 body[data-route=overview] tbody tr,body[data-route=sales] tbody tr{display:block;padding:12px 0;border-bottom:1px solid var(--line)}
 body[data-route=overview] tbody td,body[data-route=sales] tbody td{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border:0;white-space:normal;text-align:right;overflow-wrap:anywhere}
 body[data-route=overview] tbody td::before,body[data-route=sales] tbody td::before{content:attr(data-label);font-weight:500;text-align:left;color:var(--muted);flex:1}
 body[data-route=transactions] .card-head .row-actions button{flex:1 1 140px}
 #content td{overflow-wrap:anywhere}.bar-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.bar-row>span:first-child{grid-column:1/-1}.bar-amount{overflow-wrap:anywhere}
}
@media screen and (max-width:360px){.two-inputs,#phrase-preview .two-inputs{grid-template-columns:minmax(0,1fr)}.month-balance{gap:10px}.forecast-link{flex-wrap:wrap}.capture-secondary{grid-template-columns:minmax(0,1fr)}.recent-expense{flex-wrap:wrap}.recent-expense>b{margin-left:auto}.month-card,.capture-card{padding:16px}}
.organizer-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 22px}.organizer-summary>div{padding:16px;background:#f1f7f3;border:1px solid #e1ebe4;border-radius:14px}.organizer-summary small{display:block;color:var(--muted);font-size:12px}.organizer-summary strong{display:block;font-size:22px;margin-top:7px;overflow-wrap:anywhere}.obligation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:14px}.obligation-card h2{margin-top:6px;overflow-wrap:anywhere}.obligation-card .card-head{align-items:flex-start}.obligation-card .card-head>div{min-width:0;flex:1}.obligation-card .row-actions{margin-top:16px;flex-wrap:wrap}.obligation-card .row-actions button{flex:1}.obligation-amount{font-size:26px;font-weight:750;letter-spacing:-.8px;overflow-wrap:anywhere}.organizer-section-title{margin:25px 0 15px}.task-list{display:grid;gap:12px}.task-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px}.task-card h2{overflow-wrap:anywhere;line-height:1.5}.task-check{width:44px;height:44px;padding:0;color:var(--green);font-size:23px}.task-done h2{text-decoration:line-through;color:var(--muted)}.task-done{background:#f7faf8}.task-card .row-actions{margin-top:12px;flex-wrap:wrap}.bill-tabs{margin:0}.organizer-summary~.obligation-grid{margin-bottom:18px}.sidebar-bottom{flex-shrink:0}aside #nav{gap:3px}aside #nav button{padding:10px 12px;font-size:13px;white-space:normal}.obligation-card .eyebrow{line-height:1.6;display:block}
@media(max-width:750px){.organizer-summary{gap:7px}.organizer-summary>div{padding:12px 9px}.organizer-summary strong{font-size:18px}.organizer-summary small{font-size:11px}.obligation-card{padding:17px}.obligation-card .badge{font-size:11px}.organizer-section-title{font-size:17px}.task-card{padding:16px;gap:10px}.task-card h2{font-size:15px}.task-card .row-actions button{font-size:13px}.obligation-grid{grid-template-columns:1fr}.obligation-card .summary-line{flex-wrap:wrap}}
@media(max-width:350px){.organizer-summary{grid-template-columns:1fr}.organizer-summary>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.organizer-summary strong{margin:0}}
.month-label[hidden]{display:none}
.daily-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.due-item{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--line,#e5e9e9)}.due-item>div{min-width:0}.due-item strong{display:block;overflow-wrap:anywhere}.due-item small{display:block;margin-top:6px;color:#64748b}.due-item button{flex-shrink:0}.budget-number{font-size:28px}.budget-card progress{width:100%;height:12px;accent-color:#0c8065}.evolution-link{width:100%;display:flex;justify-content:space-between;margin:16px 0;padding:18px}.status-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.status-filters .active{background:#0c8065;color:white}.bill-actions{margin-top:14px}.bill-actions summary{cursor:pointer;padding:8px 0;color:#52677d}.evolution-card,.budget-card{margin-bottom:20px}.evolution-row{display:grid;grid-template-columns:70px 1fr 220px;gap:16px;padding:18px 0;border-bottom:1px solid #e5e9e9;align-items:center}.evolution-bar{height:10px;border-radius:4px;margin:7px 0}.evolution-bar.income{background:#0c8065}.evolution-bar.spent{background:#8d9cab}.evolution-values{display:grid;gap:4px;font-size:14px}.evolution-values small{color:#64748b}.daily-grid .card{margin:0;min-width:0}@media(max-width:680px){.daily-grid{grid-template-columns:1fr;gap:14px}.evolution-row{grid-template-columns:65px 1fr;gap:12px}.evolution-values{grid-column:2}.due-item strong{font-size:14px}.bill-actions .row-actions button{flex:1 1 130px}.budget-number{font-size:26px}}@media print{.status-filters,.bill-actions{display:none}}
.spent-groups{display:grid;gap:12px;margin:18px 0}.spent-groups>span{display:flex;gap:12px;justify-content:space-between;align-items:baseline;font-size:14px}.spent-groups b{white-space:nowrap}
/* Keep enlarged text inside narrow screens without hiding content. */
header>div{min-width:0;max-width:100%}header h1{overflow-wrap:anywhere}.mobile-nav button{min-width:0;white-space:normal;overflow-wrap:anywhere}#toast{max-width:calc(100vw - 24px);overflow-wrap:anywhere}
.kpi-note,.kpi-label,.kpi-value{overflow-wrap:anywhere}.add-circle{font-size:32px;line-height:1}
.brand img{flex-shrink:0}.auth-brand strong{font-size:30px;letter-spacing:-1px}.app-wordmark{display:none}@media screen and (max-width:750px){.app-wordmark{display:flex;align-items:center;gap:7px;margin-bottom:9px;font-size:15px;font-weight:750;color:var(--green);letter-spacing:-.3px}.app-wordmark img{border-radius:6px}}@media print{.app-wordmark{display:flex;align-items:center;gap:6px;margin-bottom:8px;font-size:14px;color:#0c8065}.app-wordmark img{width:20px;height:20px}}

/* Keep complete currency amounts readable in the monthly summary on phones. */
@media screen and (max-width:600px){
 .organizer-summary{grid-template-columns:minmax(0,1fr);gap:8px}
 .organizer-summary>div{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px;padding:14px 16px}
 .organizer-summary small{font-size:.8125rem}
 .organizer-summary strong{margin:0;font-size:clamp(1.125rem,5vw,1.375rem);line-height:1.25;white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums;letter-spacing:-.35px}
}

/* Quiet feedback: lightweight motion, clear focus and full-width mobile AI action. */
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #0c80654d;outline-offset:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #0c8065;outline-offset:2px}
.month-total,.month-balance strong,.obligation-amount,.kpi-value,.summary-line strong{font-variant-numeric:tabular-nums}
#ai-parse{width:100%;min-height:46px;border-radius:12px}
#ai-parse:disabled{opacity:.75}
@media(prefers-reduced-motion:no-preference){
 #content{animation:norte-appear .18s ease-out}
 dialog[open] #modal-body{animation:norte-appear .16s ease-out}
 button{transition:background-color .16s,border-color .16s,box-shadow .16s}
 button:active:not(:disabled){box-shadow:inset 0 0 0 2px #0c806518}
 @keyframes norte-appear{from{opacity:.5}to{opacity:1}}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.reconcile-option{border:1px solid var(--line);background:#fff;border-radius:12px;padding:14px;margin:12px 0;overflow-wrap:anywhere}.reconcile-option p{margin:6px 0}.reconcile-option button{width:100%;white-space:normal}.notice .checkline{align-items:flex-start;margin-top:16px}.notice .checkline input{flex:0 0 20px}.desc .badge{margin-top:6px}
