:root{font-family:Montserrat,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#16213b;background:#f5f8fb;font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #5b83a9;outline-offset:2px}a{color:#163a5c;text-decoration:none}.app{display:flex;min-height:100vh}.sidebar{width:250px;background:#fff;border-right:1px solid #e8edf6;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;flex-shrink:0;padding:23px 15px}.brand{display:flex;align-items:center;gap:11px;padding:5px 13px 29px;font-size:19px;font-weight:800;letter-spacing:-.7px}.brand-logo{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#163a5c;color:#fff;font-weight:900;font-size:21px;box-shadow:0 8px 17px #163a5c2b}.brand small{font-size:10px;font-weight:600;color:#9aa9bf;display:block;letter-spacing:1.9px}.section-kicker{font-size:10px;text-transform:uppercase;color:#a3acc2;font-weight:800;letter-spacing:1.7px;padding:15px 15px 10px}.navigation{display:grid;gap:3px}.nav-button{display:flex;align-items:center;gap:13px;padding:12px 14px;border:0;background:transparent;border-radius:11px;color:#65748e;text-align:left;font-weight:650;white-space:nowrap}.nav-button:hover{background:#f3f6fd}.nav-button.active{background:#eaf0f5;color:#163a5c}.nav-icon{font-size:18px;width:22px;text-align:center}.side-footer{margin-top:auto;padding:15px 12px 9px;border-top:1px solid #eef1f8}.side-user{display:flex;align-items:center;gap:10px;font-size:12px;color:#68758f;min-width:0}.avatar{width:35px;height:35px;display:grid;place-items:center;background:#eaf0f5;color:#163a5c;border-radius:100%;font-weight:800}.side-user strong{display:block;overflow:hidden;text-overflow:ellipsis;max-width:140px;color:#1e2c45;font-size:12px}.link-button{border:0;background:transparent;color:#6f7f98;padding:12px 0 0 45px;text-align:left;font-size:12px}.main{width:100%;min-width:0}.topbar{height:85px;background:#fff;border-bottom:1px solid #e8edf5;display:flex;align-items:center;justify-content:space-between;padding:0 39px}.breadcrumbs{display:flex;align-items:center;gap:10px;font-size:12px;color:#97a5bc}.breadcrumbs strong{color:#34425e;font-weight:700}.top-actions{display:flex;align-items:center;gap:15px}.small-date{color:#9aabc2;font-size:12px}.online-indicator{display:flex;align-items:center;gap:6px;color:#527a66;font-size:12px}.dot{width:7px;height:7px;background:#41b988;border-radius:50%}.content{max-width:1330px;margin:0 auto;padding:34px 38px 110px}.heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:27px;flex-wrap:wrap}.eyebrow{font-size:11px;letter-spacing:2px;color:#163a5c;text-transform:uppercase;font-weight:800;margin-bottom:8px}.heading h1{margin:0 0 7px;font-size:29px;line-height:1.16;letter-spacing:-1.1px}.subtitle{margin:0;color:#8a98af;line-height:1.5;font-size:13px}.primary,.secondary,.quiet,.danger{border:0;border-radius:10px;padding:11px 16px;font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:8px;white-space:nowrap}.primary{background:#163a5c;color:white;box-shadow:0 6px 14px #163a5c24}.primary:hover{background:#0d2c49}.secondary{background:#eaf0f5;color:#163a5c}.quiet{background:white;color:#465a7a;border:1px solid #e4eaf4}.danger{color:#b54045;background:#fff0f0}.small{font-size:12px;padding:8px 11px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.stat-card{background:#fff;border:1px solid #edf0f7;border-radius:16px;padding:20px;min-height:137px;box-shadow:0 6px 25px #1e448009}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#77869e;font-size:12px;font-weight:650}.stat-icon{width:35px;height:35px;background:#eaf0f5;color:#163a5c;border-radius:10px;display:grid;place-items:center;font-size:18px}.stat-card.green .stat-icon{background:#e9f8f2;color:#35a476}.stat-card.orange .stat-icon{background:#fff4e6;color:#d79635}.stat-card.pink .stat-icon{background:#fff0f1;color:#ca6871}.stat-number{font-size:26px;font-weight:800;letter-spacing:-.9px;margin:18px 0 4px;color:#202c45;white-space:nowrap}.stat-sub{font-size:11px;color:#93a0b6}.two-col{display:grid;grid-template-columns:1.65fr 1fr;gap:18px}.panel{background:#fff;border:1px solid #ecf0f7;border-radius:16px;box-shadow:0 7px 28px #28518b08;min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 18px;gap:12px}.panel-head h2{margin:0;font-size:15px;letter-spacing:-.2px}.panel-head p{margin:4px 0 0;font-size:12px;color:#98a5b8}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:12px}th{text-align:left;background:#fbfcff;text-transform:uppercase;letter-spacing:.85px;font-size:10px;color:#9aa8c0;font-weight:800;padding:13px 22px;white-space:nowrap;border-bottom:1px solid #eef2f7}td{padding:17px 22px;border-bottom:1px solid #f0f3f8;color:#52627b;vertical-align:middle}tr:last-child td{border-bottom:0}.td-main{font-weight:750;color:#24324b}.td-sub{display:block;color:#9aa6b8;margin-top:5px;font-size:11px}.status{display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border-radius:20px;font-size:11px;font-weight:700;white-space:nowrap;background:#eff2f7;color:#68768b}.status.green{color:#26855e;background:#e5f7ec}.status.blue{color:#163a5c;background:#eaf0f5}.status.orange{color:#b77b28;background:#fff4e1}.status.purple{color:#805ac3;background:#f2ecff}.status.red{color:#c05a64;background:#fff0f2}.panel-list{padding:0 24px 13px}.mini-row{padding:14px 0;border-bottom:1px solid #f0f2f8;display:flex;align-items:center;justify-content:space-between;gap:10px}.mini-row:last-child{border:0}.mini-label{font-weight:750;font-size:12px}.mini-hint{font-size:11px;color:#9ba8bd;padding-top:5px}.minor-tag{font-size:11px;font-weight:750;color:#61718d}.toolbar{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin-bottom:19px}.search{flex:1;min-width:210px;background:#fff;border:1px solid #e6ebf3;border-radius:11px;padding:10px 13px;color:#263751}.search:focus{border-color:#163a5c}.filter{background:#fff;border:1px solid #e6ebf3;border-radius:11px;padding:11px 13px;color:#596985;min-height:42px}.empty{padding:50px 20px;text-align:center;color:#8392a8}.empty .empty-icon{font-size:34px;display:block;margin-bottom:10px}.empty strong{display:block;color:#34445e;font-size:15px;margin-bottom:7px}.empty p{font-size:12px;line-height:1.7;max-width:340px;margin:0 auto 17px}.text-action{background:transparent;border:0;color:#163a5c;font-weight:700;font-size:12px;padding:7px 0}.text-action:hover{text-decoration:underline}.modal-backdrop{position:fixed;inset:0;background:#1d2a4270;z-index:20;display:flex;justify-content:center;align-items:center;padding:16px;backdrop-filter:blur(3px)}.modal{width:min(570px,100%);max-height:min(740px,94vh);overflow:auto;background:#fff;border-radius:20px;box-shadow:0 30px 100px #14244045}.modal-head{padding:24px 26px 16px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #eff2f8}.modal-head h2{margin:0 0 5px;font-size:20px}.modal-head p{margin:0;color:#9ba5b8;font-size:12px;line-height:1.5}.x{border:0;background:#eff2f8;color:#7b87a0;border-radius:9px;width:32px;height:32px;font-size:20px}.form-body{padding:23px 26px;display:grid;gap:15px}.field{display:grid;gap:6px}.field label{font-size:12px;font-weight:750;color:#52627e}.field input,.field select,.field textarea{width:100%;padding:11px 12px;border:1px solid #e2e8f1;border-radius:9px;color:#243551;background:#fff;outline:0}.field textarea{min-height:85px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#163a5c;box-shadow:0 0 0 3px #163a5c19}.fields-two{display:grid;grid-template-columns:1fr 1fr;gap:13px}.hint{font-size:11px;line-height:1.5;color:#97a4b7}.modal-foot{display:flex;justify-content:flex-end;gap:9px;padding:16px 26px 24px;border-top:1px solid #eff2f8}.notice{border-radius:11px;padding:12px 14px;font-size:12px;line-height:1.65;background:#edf4ff;color:#4e6fa6}.warning{background:#fff5e8;color:#9a692f}.config-page,.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 30% 10%,#e5edff,transparent 34%),radial-gradient(circle at 90% 80%,#e8f8f3,transparent 33%),#fafcff}.login-card{width:min(440px,100%);background:#fff;padding:32px;border-radius:22px;box-shadow:0 24px 72px #21427b18;border:1px solid #eff3fa}.login-card h1{font-size:25px;margin:16px 0 6px;letter-spacing:-.8px}.login-card p{color:#8795ad;line-height:1.65;font-size:13px;margin:0 0 24px}.login-card form{display:grid;gap:17px}.login-card .primary{width:100%;margin-top:4px;padding:13px}.login-foot{margin-top:21px;font-size:12px;color:#97a2b8;text-align:center;line-height:1.7}.divider{height:1px;background:#edf1f8;margin:14px 0}.key-value{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 0;border-bottom:1px solid #edf1f7}.key-value:last-child{border:0}.kv-label{color:#6a7791;font-size:12px}.kv-number{font-weight:800;font-size:14px}.trend-bars{height:160px;display:flex;align-items:flex-end;gap:13px;padding:18px 25px 30px}.trend-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px;position:relative}.trend-bar{background:linear-gradient(#4776ea,#b7cbff);border-radius:6px 6px 0 0;width:min(38px,70%);min-height:3px}.trend-label{position:absolute;top:100%;font-size:10px;color:#91a0b5;padding-top:6px}.stacked-line{display:flex;height:9px;overflow:hidden;border-radius:10px;background:#f0f3f8}.stacked-line span{display:block}.report-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:17px}.report-metric{padding:26px}.report-metric .label{font-size:12px;color:#8b98ae}.report-metric strong{font-size:26px;display:block;margin-top:14px}.report-metric small{font-size:11px;color:#91a0b6}.report-section{margin-top:20px}.info-list{list-style:none;margin:0;padding:0}.info-list li{margin:12px 0;font-size:12px;color:#78879e;line-height:1.6}.pill{display:inline-block;border-radius:12px;background:#eef3fd;color:#4664ad;padding:5px 9px;font-weight:700;font-size:10px}.boot{padding:100px;text-align:center;color:#657a9a}.toast{position:fixed;bottom:25px;right:25px;background:#243557;color:#fff;padding:14px 19px;border-radius:11px;box-shadow:0 12px 35px #26375833;font-size:12px;z-index:40;max-width:360px}.toast.error{background:#af4447}.mobile-nav{display:none}.cta-card{background:linear-gradient(126deg,#2b5cdb,#3e7ae7);color:white;border-radius:16px;padding:25px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:21px}.cta-card strong{font-size:16px;display:block;margin-bottom:6px}.cta-card p{color:#e3ebff;font-size:12px;margin:0;line-height:1.5}.cta-card .quiet{background:#fff;color:#2c56bb}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
@media(max-width:1130px){.stats{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.content{padding:26px 22px 105px}.topbar{padding:0 22px}.sidebar{width:222px}.heading h1{font-size:26px}}
@media(max-width:720px){.sidebar{display:none}.topbar{height:62px;padding:0 18px}.top-actions .small-date{display:none}.content{padding:23px 16px 100px}.heading h1{font-size:25px}.stats{gap:10px}.stat-card{padding:15px;min-height:116px;border-radius:13px}.stat-number{font-size:21px;margin-top:14px}.stat-top{font-size:11px}.stat-icon{width:29px;height:29px}.panel-head{padding:19px 17px 14px}th,td{padding:14px 14px}.panel-list{padding:0 18px 12px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;background:#ffffffed;backdrop-filter:blur(12px);border-top:1px solid #e8edf6;display:flex;justify-content:space-around;z-index:10;padding:9px 5px max(8px,env(safe-area-inset-bottom))}.mobile-nav button{border:0;background:transparent;color:#8b9ab0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:56px;padding:3px 4px;font-size:10px}.mobile-nav button.active{color:#2d5bd7;font-weight:800}.mobile-nav .nav-icon{font-size:19px}.modal-backdrop{padding:0;align-items:flex-end}.modal{max-height:93vh;border-radius:20px 20px 0 0;width:100%}.form-body{padding:18px}.modal-head{padding:20px 18px 15px}.modal-foot{padding:16px 18px max(25px,env(safe-area-inset-bottom))}.fields-two{grid-template-columns:1fr 1fr}.cta-card{padding:19px;align-items:flex-start;flex-direction:column}.report-grid{grid-template-columns:1fr 1fr}.report-metric{padding:18px}.report-metric strong{font-size:21px}}
@media(max-width:400px){.fields-two{grid-template-columns:1fr}.stat-number{font-size:18px}.status{font-size:10px}}
/* ALTARIUM V2: catalog and multi-product order editor */
.section-divider{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #edf1f8;padding-top:16px;margin-top:3px}.section-divider strong{font-size:13px;color:#263751}.order-lines{display:flex;flex-direction:column;gap:10px}.order-line{background:#f8fbff;border:1px solid #e7edf7;border-radius:13px;padding:12px;display:grid;grid-template-columns:minmax(0,2fr) minmax(90px,.72fr) auto auto;gap:10px;align-items:end}.order-line .field{min-width:0}.order-line .field label{font-size:11px}.order-line .line-price{font-weight:800;color:#263751;white-space:nowrap;font-size:12px;padding-bottom:12px;text-align:right}.order-line .quiet{margin-bottom:2px}.order-total{padding:14px 18px;background:#edf5ff;border:1px solid #dce9ff;border-radius:12px;display:grid;gap:8px}.order-total>div{display:flex;justify-content:space-between;gap:15px;font-size:12px;color:#536783}.order-total .big{padding-top:9px;border-top:1px solid #d8e3f5;font-size:17px;font-weight:800;color:#173862}.order-total .hint{margin:0}.modal:has(.order-lines){width:min(760px,100%)}
@media(max-width:720px){.order-line{grid-template-columns:minmax(0,1fr) 86px;gap:8px}.order-line .line-price{padding:6px 2px;text-align:left}.order-line .quiet{justify-self:end}.section-divider{flex-wrap:wrap}}
/* ALTARIUM V3: mobile-ready product grouping, accessible destructive actions */
.view-picker{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 17px}
.order-group{margin-bottom:17px}.order-group .panel-head h2{font-size:16px}
.row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
button.danger{background:#fff0f0;border:1px solid #ffd0d3;border-radius:9px;color:#b43940;padding:9px 10px;font-weight:750;cursor:pointer}
button.danger:hover{background:#ffe4e5}
button.danger.small{font-size:11px;padding:7px 9px}
.order-line{grid-template-columns:minmax(0,1.65fr) 83px 118px auto auto}
.order-line .field input[name=line_price]{min-width:95px}
@media(max-width:720px){.order-line{grid-template-columns:minmax(0,1fr) 80px}.order-line .line-price{padding:0}.row-actions{min-width:120px}.modal .danger{flex-shrink:0}}

/* ALTARIUM V4 — identidad corporativa, navegación y legibilidad */
:root{--brand:#163a5c;--surface:#fff;--background:#f6f8fa;--ink:#163a5c;color:#1c334b;background:var(--background)}
body,button,input,select,textarea{font-family:Montserrat,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,.primary,.secondary,.quiet{transition:background-color .15s ease,box-shadow .15s ease,transform .15s ease}
button:hover:not(:disabled){filter:brightness(.98)}
.primary{background:var(--brand);color:#fff;box-shadow:0 5px 14px #163a5c1f}
.primary:hover{background:#0c2d4b}
.secondary{background:#e7eef4;color:var(--brand)}
.quiet{color:var(--brand);border-color:#d8e2ea}
.nav-button.active{background:#e7eef4;color:var(--brand)}
.nav-button:hover,.mobile-button:hover{background:#e7eef4}
.nav-icon{display:flex;align-items:center;justify-content:center;flex:none}
.brand-logo{background:var(--brand);border-radius:10px}
.brand small{color:#667f96}
.heading{margin-bottom:20px}
.heading h1{font-size:clamp(24px,2.5vw,30px);letter-spacing:-.7px}
.subtitle{max-width:620px}
.eyebrow{color:#496a84}
.stat-card{border:1px solid #e7edf2;box-shadow:none}
.stat-number{font-size:clamp(20px,2.2vw,27px);letter-spacing:-.5px}
.panel{box-shadow:0 3px 14px #163a5c05}
.panel-head h2{font-weight:800}
.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 24px}
.quick-actions button{min-height:42px}
.archive-stack{display:grid;gap:11px;margin-top:25px}
.archive-panel{background:#fff;border:1px solid #dbe6ee;border-radius:14px;overflow:hidden}
.archive-panel>summary{display:flex;gap:13px;align-items:center;cursor:pointer;padding:19px 22px;list-style:none;color:var(--brand)}
.archive-panel>summary::-webkit-details-marker{display:none}
.archive-icon{height:38px;width:38px;display:grid;place-items:center;border-radius:10px;background:#e9f0f6;font-size:20px}
.archive-panel summary strong{display:block;font-size:14px}
.archive-panel summary small{color:#708399;font-size:11px;display:block;margin-top:5px}
.archive-chevron{margin-left:auto;font-size:22px;transition:transform .2s}
.archive-panel[open] .archive-chevron{transform:rotate(180deg)}
.archive-inside{border-top:1px solid #e7eef3}
.secondary-archive{background:#fafdff}
.finance-panel{margin-top:5px}
.finance-table td:not(:first-child),.finance-table th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.finance-total td{font-weight:800;color:#163a5c;background:#edf3f7;border-top:2px solid #c7d8e5}
.positive{color:#1c7351;font-weight:800}.negative{color:#b33844;font-weight:800}
.year-picker{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;color:#4e6780}
.year-picker select{padding:8px;border:1px solid #ccdae5;border-radius:8px;color:#163a5c;background:white}
.report-note{color:#5f7386;font-size:12px;line-height:1.8;margin-bottom:12px}
.stats-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.mobile-nav .mobile-button{color:#6b7e92}
.mobile-nav .mobile-button.active{color:#163a5c;background:#e8f0f5}
.mobile-nav .nav-icon svg{width:21px;height:21px}
@media(max-width:850px){.stats-three{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-actions{display:grid;grid-template-columns:1fr 1fr}.archive-panel>summary{padding:16px}}
@media(max-width:540px){.stats-three{grid-template-columns:1fr}.quick-actions button{white-space:normal}.finance-table td,.finance-table th{padding:12px 9px}.year-picker{flex-direction:column;align-items:flex-end;gap:4px}.panel-head{align-items:flex-start}}

@media(max-width:540px){.finance-table{width:100%;table-layout:fixed;min-width:0}.finance-table td,.finance-table th{padding:11px 4px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:clip}.finance-table td:first-child,.finance-table th:first-child{width:26%;text-align:left}.finance-table td:not(:first-child),.finance-table th:not(:first-child){width:24.6%;text-align:right}}

.order-mobile-list{display:none}
@media(max-width:760px){
 .orders-table{display:none}.order-mobile-list{display:grid;gap:10px;padding:0 13px 15px}
 .order-mobile-card{border:1px solid #e4edf3;border-radius:12px;padding:14px;background:white}
 .order-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
 .order-card-client{font-size:13px;text-align:left;color:#163a5c}
 .order-card-summary{font-size:12px;color:#4b637b;margin:10px 0;line-height:1.6}
 .order-card-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px;font-size:10px;color:#7c90a1;padding-bottom:12px}
 .order-card-footer{border-top:1px solid #eef3f6;padding-top:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
 .order-card-footer strong{display:block;font-size:14px;color:#163a5c}.order-card-footer small{display:block;color:#8392a5;font-size:10px;margin-top:4px}
 .order-card-footer .row-actions{display:flex;gap:6px}
}

.product-report-cards{display:none}
@media(max-width:760px){.product-report-table{display:none}.product-report-cards{display:grid;gap:9px;padding:0 12px 12px}.product-report-cards article{border:1px solid #e6edf3;border-radius:12px;padding:13px}.report-product-head strong{display:block;color:#163a5c;font-size:12px}.report-product-head small{color:#8392a5;font-size:10px}.report-product-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px;padding-top:10px;border-top:1px solid #edf2f6}.report-product-stats span{display:grid;gap:3px;text-align:center}.report-product-stats b{color:#163a5c;font-size:16px}.report-product-stats small{font-size:9px;color:#8494a6}}
/* ALTARIUM V5 - navegación depurada, informes de pedidos y calculadora */
.mobile-more{display:none}.more-grid{display:grid;gap:6px;padding:0 17px 20px}.more-link{background:#fff;border:1px solid #e8edf4;border-radius:10px;padding:13px;color:#163a5c;display:flex;align-items:center;gap:11px;font-weight:700}.more-link span:nth-child(2){flex:1;text-align:left}.more-link svg{width:20px;height:20px}
.report-counts{padding:0 22px 20px}.report-count-row{padding:15px 0;border-bottom:1px solid #eef2f7}.report-count-row:last-child{border-bottom:0}.report-count-top{display:flex;justify-content:space-between;align-items:start;gap:12px;font-size:12px}.report-count-top strong{font-weight:700;color:#253854}.report-count-top>span:last-child{color:#163a5c;font-weight:750;white-space:nowrap}.report-count-top small{display:block;color:#92a0b5;margin-top:3px}.report-bar{margin-top:9px;background:#eaf0f5;border-radius:99px;height:7px;overflow:hidden}.report-bar>span{height:100%;display:block;border-radius:99px}
.calc-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(305px,1fr);gap:18px;align-items:start}.calc-side{display:grid;gap:18px}.calc-form{padding:0 24px 22px}.calc-form h3,.calc-settings h3{color:#163a5c;font-size:13px;margin:24px 0 13px}.calc-table{border:1px solid #e8edf4;border-radius:12px;overflow:hidden}.calc-table-head,.calc-table-row{display:grid;grid-template-columns:minmax(0,1.35fr) 90px 90px 90px;align-items:center;gap:10px;padding:10px 14px}.calc-table-head{background:#edf3f8;color:#64768d;text-transform:uppercase;letter-spacing:.6px;font-weight:800;font-size:10px}.calc-table-row:not(:last-child){border-bottom:1px solid #edf0f5}.calc-table-row strong{color:#263850;font-size:12px}.calc-table-row small,.calc-accessory small{display:block;color:#7d8c9f;font-size:10px;margin-top:5px;font-weight:500}.calc-table-row input,.calc-accessory input{max-width:100%;min-width:0;border:1px solid #dfe6f0;border-radius:7px;padding:8px;background:#f4f0fb;color:#163a5c}.calc-table-row output{text-align:right;color:#253850;font-weight:700;font-size:12px}.calc-total-line{margin:10px 0;display:grid;grid-template-columns:1fr auto 1fr auto;gap:10px;background:#f3f7fa;border-radius:9px;padding:11px;font-size:11px}.calc-total-line span{color:#667893}.calc-total-line strong{color:#163a5c}.calc-accessories{display:grid;gap:7px}.calc-accessory{border:1px solid #e7edf3;border-radius:10px;padding:9px 12px;display:grid;grid-template-columns:minmax(0,1fr) 90px 80px;gap:10px;align-items:center}.calc-accessory strong{font-size:12px;color:#243750}.calc-accessory output{font-size:12px;font-weight:700;text-align:right}.calc-form .fields-two{margin-top:20px}.calc-result{border:1px solid #d5e1ec;background:#f8fafc;border-radius:13px;padding:17px 19px;margin-top:21px;display:grid;gap:10px}.calc-result h3{margin:0 0 5px}.calc-result>div{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#536783}.calc-result strong{color:#163a5c}.calc-result-total{border-top:1px solid #d8e3ee;padding-top:13px;margin-top:3px;font-weight:800;font-size:15px!important}.calc-result-profit{border-top:1px solid #d8e3ee;padding-top:11px;margin-top:4px;font-weight:700}.calc-footer{margin-top:18px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.calc-footer small{color:#b74040}.calc-settings summary{cursor:pointer;padding:0 22px 22px;font-weight:700;color:#163a5c}.calc-settings-body{padding:0 20px 23px}.calc-settings-body h3:first-child{margin-top:3px}.calc-rate-row{display:grid;grid-template-columns:1.25fr 1fr;gap:10px;margin:10px 0}.calc-settings .field{min-width:0}.calc-settings .field input{width:100%;background:#f4f0fb}.calc-energy-result{padding:13px;background:#edf3f8;border-radius:9px;margin:14px 0 17px;display:flex;justify-content:space-between}.calc-energy-result strong{color:#163a5c}.calc-saved-list{padding:0 18px 13px}.calc-saved-item{display:grid;gap:12px;padding:16px 0;border-bottom:1px solid #edf1f6}.calc-saved-item strong,.calc-saved-item small,.calc-saved-item span{display:block}.calc-saved-item strong{font-size:12px;color:#183553}.calc-saved-item small{font-size:11px;color:#8d9bb0;margin:6px 0}.calc-saved-item span{font-size:11px;color:#526785}.calc-saved-actions{display:flex;gap:6px}.calc-empty{padding:14px 0 24px;color:#8596ad;font-size:12px}
@media(max-width:1120px){.calc-layout{grid-template-columns:1fr}.calc-side{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.mobile-more{display:block;margin-bottom:18px}.calc-layout,.calc-side{grid-template-columns:1fr}.calc-form{padding:0 17px 18px}.calc-table-head,.calc-table-row{grid-template-columns:minmax(0,1.25fr) 66px 70px 73px;gap:5px;padding:9px 7px}.calc-table-row strong{font-size:10px}.calc-table-row input{font-size:11px;padding:9px 4px}.calc-table-row output{font-size:11px}.calc-accessory{grid-template-columns:minmax(0,1fr) 70px 65px;gap:6px}.calc-total-line{grid-template-columns:1fr auto;gap:7px}.report-counts{padding:0 16px 16px}.mobile-nav button.active{color:#163a5c}}

/* ALTARIUM V5.1: decimal accessory amounts and hour:minute print times */
.calc-accessory{grid-template-columns:minmax(0,1.3fr) minmax(72px,.65fr) minmax(82px,.75fr) minmax(80px,.7fr);gap:9px}
.calc-mini-field{display:grid;gap:4px;min-width:0}
.calc-mini-field>span{font-size:10px;font-weight:700;color:#657d94}
.calc-mini-field input{width:100%;min-width:0;font-variant-numeric:tabular-nums}
.calc-table-row input[name^="hours_"]{font-variant-numeric:tabular-nums;text-align:center}
@media(max-width:720px){
  .calc-accessory{grid-template-columns:minmax(0,1fr) 66px 72px 68px;gap:5px;padding:9px 7px}
  .calc-accessory input{padding:9px 4px;font-size:11px}
  .calc-mini-field>span{font-size:9px}
  .calc-accessory strong{font-size:11px}
  .calc-accessory output{font-size:11px}
  .calc-table-head,.calc-table-row{grid-template-columns:minmax(0,1fr) 62px 78px 69px}
}

/* ALTARIUM V5.3: opciones avanzadas y filtros compactos */
.advanced-fields{border:1px solid #dce6ee;border-radius:12px;background:#fbfdff;overflow:hidden}.advanced-fields>summary{cursor:pointer;list-style:none;padding:13px 15px;font-size:12px;font-weight:800;color:#163a5c}.advanced-fields>summary::-webkit-details-marker{display:none}.advanced-fields>summary:before{content:"+ ";font-size:16px}.advanced-fields[open]>summary:before{content:"− "}.advanced-inner{padding:4px 15px 17px;display:grid;gap:13px}.toolbar select.filter{max-width:220px}.modal .hint{margin:0}
/* ALTARIUM V5.5 - visual system refresh. Existing data/schema untouched. */
:root {
  --navy:#163a5c; --navy-dark:#102d49; --navy-soft:#e9f2f8;
  --sea:#008e91; --sky:#dcecf4; --line:#e4ebf2; --ink:#182d43;
  --muted:#6b8094; --canvas:#f3f7fb;
  background:var(--canvas); color:var(--ink);
  -webkit-tap-highlight-color:transparent;
}
body{background:var(--canvas);}
button{transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s;}
button:active:not(:disabled){transform:translateY(1px)}
.app{background:var(--canvas)}
.sidebar{width:246px;background:linear-gradient(160deg,#163a5c 0%,#102a44 90%);border-right:0;padding:25px 13px 18px;box-shadow:8px 0 30px #1439590e;z-index:3}
.sidebar .brand{color:white;padding:4px 12px 34px;letter-spacing:-.6px}
.sidebar .brand small{color:#9ebed3}
.sidebar .brand-logo{background:#ffffff20;color:white;border:1px solid #ffffff4a;box-shadow:none}
.sidebar .section-kicker{color:#86a9c0;font-size:10px;letter-spacing:1.8px;padding-top:16px}
.sidebar .nav-button{width:100%;font-size:12.5px;font-weight:650;color:#bdcede;border:1px solid transparent;border-radius:12px;padding:11px 13px}
.sidebar .nav-button:hover{background:#ffffff10;color:#fff}
.sidebar .nav-button.active{background:#fff;color:var(--navy);box-shadow:0 8px 20px #00000018}
.sidebar .nav-button.active svg{color:var(--sea)}
.sidebar .side-footer{border-color:#ffffff25;padding:15px 12px 5px}
.sidebar .side-user{color:#b9d0e0;overflow:hidden}.sidebar .side-user strong{max-width:150px;color:white;font-weight:600}
.sidebar .avatar{background:#ffffff28;color:#fff;flex-shrink:0}
.sidebar .link-button{color:#d5e3ee;padding-left:43px}
.main{min-width:0;background:radial-gradient(circle at top right,#e6f2f8 0%,#f3f7fb 42%)}
.topbar{height:76px;background:#ffffffd9;backdrop-filter:blur(20px);border-bottom:1px solid #e2eaf2;padding:0 33px;position:relative;z-index:5}
.breadcrumbs{font-size:12px;color:#8396a8}.breadcrumbs strong{color:var(--navy);font-weight:800}
.top-actions{gap:15px}.online-indicator{padding:7px;border:1px solid #e1ede8;border-radius:100%;background:#f4fbf7}
.online-indicator .dot{width:8px;height:8px}
.quick-trigger{border:0;border-radius:12px;background:var(--navy);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:7px 15px;font-size:18px;font-weight:800;box-shadow:0 5px 13px #163a5c28}
.quick-trigger span{font-size:12px;font-weight:700}.quick-trigger:hover,.quick-trigger.is-open{background:#215475}
.quick-menu{position:absolute;right:32px;top:66px;z-index:20;min-width:212px;background:#fff;border:1px solid var(--line);box-shadow:0 15px 42px #10345230;border-radius:16px;padding:7px;display:grid;gap:3px}
.quick-menu button{display:flex;gap:11px;align-items:center;text-align:left;color:var(--navy);background:transparent;border:0;border-radius:10px;padding:12px 13px;font-size:12px;font-weight:700}
.quick-menu button svg{width:19px;height:19px;flex-shrink:0;color:var(--sea)}.quick-menu button:hover{background:#eff7fa}
.content{max-width:1400px;padding:29px 32px 100px}
.heading{margin-bottom:21px;align-items:center}.heading h1{color:var(--navy-dark);font-size:27px;font-weight:800;letter-spacing:-.9px;margin:0}
.heading-actions{display:flex;gap:8px;flex-wrap:wrap}.heading-actions:empty{display:none}
.heading .eyebrow,.heading .subtitle,.stat-sub,.panel-head p{display:none}
.panel{border-color:#e3ebf3;border-radius:18px;box-shadow:0 4px 20px #133d6008;background:white;overflow:hidden}
.panel-head{padding:20px 22px 16px}.panel-head h2{font-size:14px;letter-spacing:-.2px;color:var(--navy-dark)}
.stat-card{border:1px solid #e2ebf2;border-radius:18px;box-shadow:0 5px 18px #153d6008;padding:20px;min-height:116px;position:relative;overflow:hidden}
.stat-card::before{content:"";position:absolute;left:0;top:15px;bottom:15px;width:3px;border-radius:0 4px 4px 0;background:#77b6c4}
.stat-top{font-size:11px;font-weight:700;color:#637e92}.stat-number{font-size:23px;font-weight:800;color:var(--navy);margin-top:12px;letter-spacing:-.8px}
.stat-icon{background:#eef5f8;color:var(--sea);border-radius:11px}
.primary,.secondary,.quiet,.danger{border-radius:10px;font-weight:700}
.primary{background:var(--navy);box-shadow:0 4px 12px #163a5c18}.primary:hover{background:#215274}
.secondary{color:var(--navy);border-color:#cedee8;background:#eef5fa}.secondary:hover{background:#dcebf4}
.quiet{color:#58748a}.quiet:hover{background:#e9f3f7}
.toolbar{margin-bottom:15px;gap:10px}.toolbar .search{min-height:41px;border:1px solid #dbe7ee;background:white;border-radius:11px;max-width:560px}.toolbar select.filter{border:1px solid #dbe7ee;background:white;min-height:41px;border-radius:11px}
.table-wrap{max-width:100%}table{border-collapse:collapse}th{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:#7d91a3;background:#f8fafc}td{color:#40586c}th,td{border-bottom-color:#edf1f5}
.text-action{color:var(--navy);text-align:left!important;justify-content:flex-start!important;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.td-main{color:var(--navy-dark)}.td-sub{color:#8a9bab}
.status{font-weight:750;border-radius:9px;white-space:nowrap}
.empty{padding:28px 18px}.empty p{font-size:12px;color:#8799a8}
.mini-row{gap:14px}.mini-label{min-width:0;overflow-wrap:anywhere}.mini-row>div:first-child{min-width:0}
.more-panel .more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding:22px}
.more-grid .more-link{border-radius:15px;padding:20px 15px;min-height:77px;gap:11px;text-align:left;background:#f8fbfd;border:1px solid #e1ebf2;font-size:13px}
.more-link svg{color:var(--sea)}.more-link:hover{background:#ecf6f9;border-color:#bad8e4}.more-link span:last-child{color:#7e9ba9;font-size:20px}
.settings-actions{padding:10px 0}.settings-actions button{max-width:100%}
.advanced-fields{background:#f9fbfd;border-color:#dfebf1}
.modal{border-radius:20px;box-shadow:0 26px 80px #0d2f4e38}.modal-head{border-color:#ebf0f5}.modal-head h2{color:var(--navy-dark)}
.field input,.field select,.field textarea{border-color:#dce5ed;border-radius:10px;background:#fff;min-width:0;max-width:100%}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#6fa2b9;box-shadow:0 0 0 3px #76b6d024}
.order-mobile-card{box-shadow:0 3px 12px #183f600a;overflow:hidden;min-width:0}
.order-card-top{align-items:flex-start!important;justify-content:space-between;gap:10px}
.order-card-client{display:block;text-align:left!important;flex:1 1 auto;min-width:0;width:100%;max-width:100%;overflow-wrap:anywhere;word-break:normal;font-size:13px;font-weight:800;line-height:1.45;padding:0}
.order-card-top .status{flex:0 0 auto;margin-top:0}
.order-card-summary{overflow-wrap:anywhere}.order-card-footer{min-width:0}.order-card-footer .row-actions{min-width:0;flex:0 1 auto;justify-content:flex-end}
.quick-payment-list{max-height:min(60vh,520px);overflow:auto}.quick-pay-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #e7edf3;border-radius:12px;background:#fbfdfe;padding:14px;margin-bottom:8px;text-align:left;color:var(--navy)}
.quick-pay-item:hover{background:#eef6fa}.quick-pay-item span{min-width:0}.quick-pay-item strong{display:block;overflow-wrap:anywhere}.quick-pay-item small{display:block;font-size:10px;color:#6f8194;margin-top:5px}.quick-pay-item b{flex-shrink:0;font-size:12px}
@media(max-width:1130px){.sidebar{width:218px}.content{padding:25px 22px 105px}}
@media(max-width:760px){
 .content{padding:21px 14px calc(104px + env(safe-area-inset-bottom))}
 .topbar{height:63px;padding:0 16px}.quick-menu{top:58px;right:13px}
 .heading{margin-bottom:17px;gap:10px}.heading h1{font-size:24px}.heading-actions button{font-size:11px}
 .mobile-nav{position:fixed;bottom:0;left:0;right:0;border-top:1px solid #e2eaf1;background:#ffffffef;backdrop-filter:blur(18px);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));z-index:12;gap:3px;padding:6px 6px max(8px,env(safe-area-inset-bottom));box-shadow:0 -8px 24px #143d5c0c}
 .mobile-nav .mobile-button{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 2px;border:0;border-radius:11px;background:transparent;font-size:10px;color:#788da0;font-weight:650;line-height:1.2}
 .mobile-nav .mobile-button.active{background:#eaf4f8;color:var(--navy);font-weight:800}
 .mobile-nav .nav-icon svg{width:20px;height:20px}
 .mobile-nav .mobile-button span:last-child{display:block;white-space:nowrap}
 .order-mobile-list{padding:0 11px 14px;gap:11px}
 .order-mobile-card{padding:15px;border-radius:14px}
 .order-card-top{align-items:flex-start}.order-card-client{font-size:13px}
 .order-card-footer{align-items:flex-start;flex-wrap:wrap;gap:8px}.order-card-footer .row-actions{flex:1 1 auto;justify-content:flex-end}
 .panel-head{padding:17px 17px 13px}
 .more-panel .more-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:15px}
 .more-grid .more-link{padding:15px 12px;min-height:70px;font-size:12px}
 .modal{border-radius:19px 19px 0 0;max-width:100%;max-height:95dvh;overflow:auto}
 .stat-card{padding:17px;min-height:108px}.stat-number{font-size:21px}
}
@media(max-width:390px){
 .order-card-top .status{font-size:9px;padding:5px 6px}
 .quick-trigger{padding:7px 13px}.quick-trigger span{display:none}
 .mobile-nav .mobile-button{font-size:9px}
 .more-panel .more-grid{gap:8px}
}

.brand img.brand-logo{object-fit:cover;border-radius:11px;background:#163a5c;flex-shrink:0}.sidebar .brand img.brand-logo{border:1px solid #ffffff3c;box-shadow:0 5px 13px #0000001a}

/* ALTARIUM V5.6 — 2026: expressive hierarchy, restrained material depth,
   responsive bento summaries, larger touch targets, reduced visual noise. */
:root{
  --navy:#163a5c;--navy-dark:#112c46;--sea:#087e80;--accent:#bdedd9;
  --canvas:#f5f7f8;--ink:#172d40;--muted:#5e7181;--line:#e2e9ed;
  --shadow:0 2px 3px rgba(13,48,67,.025),0 16px 42px rgba(13,48,67,.055);
}
body,.app{background:var(--canvas);color:var(--ink)}
.main{background:radial-gradient(ellipse at 90% 0%,#e3f1ef 0,transparent 44%),radial-gradient(ellipse at 5% 95%,#e9eef5 0,transparent 32%),#f5f7f8}
.sidebar{width:242px;background:#102e49;box-shadow:none;border-right:1px solid #224864;}
.sidebar .brand{padding-bottom:31px;font-size:18px;gap:13px}
.sidebar .brand-logo{width:44px;height:44px;border-radius:14px;border:0;background:none;object-fit:cover}
.sidebar .nav-button{font-size:12.5px;padding:12px 13px;letter-spacing:-.1px;border-radius:13px}
.sidebar .nav-button.active{background:#eaf8f4;color:#173b50;box-shadow:none}
.sidebar .nav-button.active svg{color:#087e80}
.sidebar .nav-button:not(.active){color:#c5d9e4}
.sidebar .section-kicker{color:#90b4c6;letter-spacing:1.55px}
.topbar{position:sticky;top:0;z-index:7;height:72px;background:rgba(253,254,255,.85);border-bottom:1px solid rgba(203,220,226,.65);backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%)}
.content{max-width:1480px;padding:34px 38px 120px}
.heading{margin-bottom:22px;gap:16px}.heading h1{font-size:clamp(27px,2.5vw,37px);line-height:1.14;letter-spacing:-1.35px;color:#102e49}
.panel{border:1px solid #e6edf0;border-radius:23px;box-shadow:var(--shadow);background:#fff}
.panel-head{padding:23px 25px 18px}.panel-head h2{font-size:15px;font-weight:800;letter-spacing:-.35px}
.stats{gap:15px;margin-bottom:25px}
.stat-card{min-height:129px;border-radius:22px;border:1px solid #e6ebee;background:#fff;padding:21px 22px;box-shadow:var(--shadow)}
.stat-card::before{display:none}.stat-card:nth-child(3){background:#163a5c;border-color:#163a5c;color:white}
.stat-card:nth-child(3) .stat-top,.stat-card:nth-child(3) .stat-number{color:#fff}
.stat-card:nth-child(3) .stat-icon{background:#ffffff24;color:#fff}
.stat-card .stat-number{font-size:clamp(21px,2vw,29px);line-height:1.15;margin-top:15px;font-weight:800;letter-spacing:-1px}
.stat-top{font-size:11px;letter-spacing:.1px}.stat-icon{background:#e7f6ef;color:#087e80;border-radius:13px}
.primary{background:#163a5c;color:#fff;border-radius:12px;box-shadow:none}
.primary:hover{background:#245377}.secondary{background:#eaf4f3;border:1px solid #d4e9e6;color:#17555c;border-radius:12px}
.secondary:hover{background:#d8eeeb}.quiet{border-radius:12px}
.quick-trigger{border-radius:13px;background:#163a5c;box-shadow:none;min-height:44px}
.quick-menu{border-radius:18px;box-shadow:0 15px 50px #102e4930}
.table-wrap thead th{background:#f8faf9;color:#687d88;letter-spacing:.7px}
.table-wrap tr:hover td{background:#fbfdfc}
.table-wrap td{color:#435a6e}
.text-action{color:#164764!important}
input,select,textarea{accent-color:#087e80}
.field input,.field select,.field textarea,.search,select.filter{border-radius:12px;min-height:43px;border-color:#dce7ea}
.field label{color:#42586a;font-size:12px}
.modal{border-radius:25px;box-shadow:0 40px 100px #0a213d3d}
.modal-head{border-bottom:1px solid #eef1f2}.modal-foot{border-top:1px solid #eef1f2}
.status{border-radius:999px;font-weight:750}
.notice{background:#edf5f6;color:#285b69}
.notice.warning{background:#fff6eb;color:#885b2b}
.advanced-fields{border-radius:15px;border-color:#dfebea;background:#fafffd}
.advanced-fields>summary{padding:14px 17px}
.empty{padding:43px 20px}
/* Monthly interactive accounting */
.finance-panel{overflow:hidden}
.finance-panel .panel-head{border-bottom:1px solid #eef1f2}
.months-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;padding:19px 21px}
.month-card{appearance:none;text-align:left;display:grid;gap:15px;background:#f9fbfa;border:1px solid #e5eced;color:#18384d;border-radius:18px;padding:16px 17px;min-height:136px;min-width:0;box-shadow:none;transition:transform .18s,background-color .18s,border-color .18s,box-shadow .18s}
.month-card:hover{border-color:#99c9c4;background:#f2f9f7;transform:translateY(-1px)}
.month-card:focus-visible{outline:3px solid #087e80;outline-offset:2px}
.month-card.is-current{background:#e7f5f2;border:2px solid #087e80;padding:15px 16px;box-shadow:0 5px 18px #0b777419}
.month-card.is-empty{opacity:.64}.month-card.is-current.is-empty{opacity:1}
.month-card-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px;font-weight:800}
.month-card-chevron{font-size:17px;line-height:1;color:#3c908b}
.month-card-profit{font-size:clamp(17px,1.7vw,22px);line-height:1;font-weight:800;letter-spacing:-.6px;white-space:nowrap;font-variant-numeric:tabular-nums}
.month-card-grid{display:grid;grid-template-columns:1fr;gap:3px;font-size:10.5px;color:#60798a}
.month-card-grid>span{display:flex;justify-content:space-between;align-items:center;gap:7px}
.month-card-grid b{color:#3c5a69;font-size:11px;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}
.annual-summary{border-top:1px solid #edf1f0;display:flex;gap:14px 26px;flex-wrap:wrap;align-items:center;padding:17px 22px;font-size:12px;color:#486373}
.annual-summary span{font-weight:800;color:#1c4058;margin-right:auto}.annual-summary strong{font-weight:700}
.month-detail{margin-top:18px;scroll-margin-top:94px;overflow:hidden}
.month-detail .panel-head{align-items:center;border-bottom:1px solid #eef1f3}
.month-detail .panel-head h2{font-size:20px;margin-top:4px;letter-spacing:-.75px}
.section-label{font-size:9px;letter-spacing:1.4px;color:#087e80;font-weight:800}
.pill-count{padding:7px 10px;color:#205b62;background:#e6f4f1;font-size:11px;font-weight:800;border-radius:999px;white-space:nowrap}
.period-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px 21px 8px;gap:12px}
.period-summary>div{display:grid;gap:10px;border:1px solid #e5ecee;border-radius:16px;padding:18px;background:#fbfcfc;min-width:0}
.period-summary span{font-size:11px;color:#637d8e;font-weight:700}
.period-summary strong{font-size:clamp(15px,1.6vw,22px);color:#1e465d;letter-spacing:-.7px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.period-summary .period-summary-profit{background:#153c59;border-color:#153c59}
.period-summary .period-summary-profit span,.period-summary .period-summary-profit strong{color:white}
.month-detail-columns{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr);gap:26px;padding:25px 22px 26px}
.month-detail-columns h3{font-size:13px;color:#17374e;margin:0 0 18px;letter-spacing:-.3px}
.category-breakdown-row{margin-bottom:18px}.category-breakdown-name{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin-bottom:8px}
.category-breakdown-name span{color:#486173;font-weight:650}.category-breakdown-name strong{color:#163a5c;font-size:12px;font-variant-numeric:tabular-nums}
.category-breakdown-track{height:8px;border-radius:99px;background:#edf3f2;overflow:hidden}.category-breakdown-track i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#163a5c,#14a19b)}
.month-movements{min-width:0}.ledger-entry{display:flex;align-items:center;gap:11px;min-width:0;border-bottom:1px solid #edf1f2;padding:12px 0}
.ledger-entry:last-child{border:0}.ledger-entry-icon{width:35px;height:35px;display:grid;place-items:center;flex-shrink:0;font-weight:800;color:#1b776f;background:#e9f6f1;border-radius:12px}
.ledger-entry-icon.gasto,.ledger-entry-icon.devolucion{background:#fff2ea;color:#ae6e42}
.ledger-entry-info{min-width:0;flex:1;display:grid;gap:5px}.ledger-entry-name{border:0;padding:0;background:none;text-align:left;font-size:12px;font-weight:800;color:#1b405a;overflow-wrap:anywhere}
button.ledger-entry-name:hover{text-decoration:underline}.ledger-entry-meta{font-size:10.5px;color:#758899;line-height:1.5;overflow-wrap:anywhere}
.ledger-entry-amount{font-size:12px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.positive{color:#087e69}.negative{color:#ad5256}
/* Expense family management */
.category-manager-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #edf1f2}
.category-manager-row>div:first-child{display:grid;gap:4px;min-width:0}
.category-manager-row strong{font-size:12px;color:#203e54;overflow-wrap:anywhere}
.category-manager-row small{color:#738695;font-size:10px}
.category-manager-row .row-actions{flex-shrink:0}
.category-locked{font-size:10px;font-weight:750;color:#4c8880;padding:7px 4px}
.category-manager .section-divider{margin-top:12px}
/* Fit long text and 320px screens */
.td-main,.mini-label,.order-card-client,.order-card-summary{overflow-wrap:anywhere;text-align:left}
.order-mobile-card .order-card-client{text-align:left!important;justify-self:start}
@media(min-width:721px) and (max-width:1200px){.months-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.month-detail-columns{grid-template-columns:1fr 1.15fr}}
@media(max-width:900px){.period-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.month-detail-columns{grid-template-columns:1fr;gap:21px}}
@media(max-width:720px){
 .content{padding:23px 15px 126px}.topbar{height:63px;position:sticky;top:0;background:#f9fbfaed}
 .heading h1{font-size:29px;letter-spacing:-1.1px}
 .stat-card{border-radius:18px;padding:15px;min-height:113px}.stat-card .stat-number{font-size:21px}
 .panel{border-radius:19px}.panel-head{padding:17px 16px}
 .months-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px}
 .month-card{min-height:135px;padding:13px;gap:12px;border-radius:15px}.month-card.is-current{padding:12px}
 .month-card-profit{font-size:18px}.month-card-heading{font-size:12px}
 .month-card-grid b{font-size:10px}
 .annual-summary{padding:15px;gap:9px 15px}.annual-summary span{flex-basis:100%}
 .month-detail{scroll-margin-top:72px}.month-detail .panel-head h2{font-size:18px}
 .period-summary{grid-template-columns:repeat(2,minmax(0,1fr));margin:14px 13px 0;gap:8px}
 .period-summary>div{padding:13px;min-height:86px;border-radius:13px}.period-summary .period-summary-profit{grid-column:1/-1;min-height:82px}
 .period-summary strong{font-size:19px}.month-detail-columns{padding:20px 15px}
 .ledger-entry{gap:9px}.ledger-entry-icon{width:31px;height:31px;border-radius:10px}
 .ledger-entry-amount{font-size:11px}
 .mobile-nav{left:10px;right:10px;bottom:calc(6px + env(safe-area-inset-bottom));border:1px solid #dbe8e6;border-radius:20px;padding:6px;box-shadow:0 10px 40px #0b315129;background:rgba(255,255,255,.94);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
 .mobile-nav .mobile-button{border-radius:14px;min-height:55px}
 .mobile-nav .mobile-button.active{background:#e4f3ee;color:#163a5c}
 .modal{border-radius:24px 24px 0 0;max-height:94dvh}
 .category-manager-row{align-items:flex-start}.category-manager-row .row-actions{flex-direction:column;align-items:flex-end}
 .form-body{gap:14px}
}
@media(max-width:359px){.months-grid{gap:7px;padding:9px}.month-card{padding:10px}.month-card.is-current{padding:9px}.month-card-profit{font-size:16px}.period-summary strong{font-size:17px}.stat-card .stat-number{font-size:18px}.category-manager .row-actions button{padding:7px}}
@media(prefers-reduced-motion:reduce){button,.month-card{transition:none!important}.month-card:hover{transform:none}}

/* Mobile: selected month first in a swipeable rail; no twelve-row scroll. */
@media(max-width:720px){
 .finance-hero.stats-three{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .finance-hero .stat-card{min-height:105px}
 .finance-hero .stat-card .stat-number{font-size:19px;white-space:normal;overflow-wrap:anywhere}
 .finance-hero .stat-card:nth-child(3){grid-column:1/-1;min-height:100px}
 .months-grid{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;gap:10px;padding:14px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .months-grid::-webkit-scrollbar{display:none}
 .month-card{flex:0 0 min(64vw,205px);scroll-snap-align:start;min-height:139px}
 .month-card-profit{font-size:21px}
 .month-card-grid b{font-size:11px}
}
.receipt-subheading{margin-top:28px!important;border-top:1px solid #e7edee;padding-top:22px}
.receipt-breakdown-row{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid #edf1f2;font-size:12px}
.receipt-breakdown-row span{color:#536c7e}.receipt-breakdown-row strong{color:#163a5c;font-variant-numeric:tabular-nums}

/* ALTARIUM V5.7: responsive team activity and attribution */
html,body{touch-action:pan-x pan-y;overscroll-behavior-x:none}
.app-credit{margin:42px 0 0;text-align:center;color:#8595a4;font-size:10px;font-weight:600;letter-spacing:.2px}
.app-credit-side{display:block;font-size:10px;color:#8ba0b1;line-height:1.4;margin-bottom:12px}
.notice-trigger{height:39px;width:39px;position:relative;border:1px solid #dfe7ee;border-radius:13px;background:#fff;display:grid;place-items:center;color:#163a5c;flex-shrink:0}
.notice-trigger:hover{background:#eaf2f4}
.notice-indicator{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;border-radius:99px;padding:2px 4px;display:grid;place-items:center;background:#087e80;color:#fff;font-size:10px;font-weight:800;box-shadow:0 0 0 2px #fff}
.notice-indicator.hidden{display:none}
.topbar{position:relative}
.notification-panel{position:absolute;top:calc(100% - 6px);right:26px;width:min(380px,calc(100vw - 24px));max-height:min(480px,80vh);display:flex;flex-direction:column;background:#fff;border:1px solid #dfe9ee;border-radius:19px;box-shadow:0 18px 55px #143f5638;z-index:24;overflow:hidden}
.notification-head{padding:17px 18px;border-bottom:1px solid #edf0f1;display:flex;gap:10px;align-items:center;justify-content:space-between}
.notification-head strong{color:#163a5c;font-size:13px}.notification-head button{font-size:11px}
.notification-list{overflow:auto;overscroll-behavior:contain;max-height:365px}
.notification-item{width:100%;text-align:left;border:0;border-bottom:1px solid #ecf1f1;background:#fff;display:flex;gap:11px;align-items:flex-start;padding:14px 17px;color:#203e54}
.notification-item:hover,.notification-item.is-unread{background:#f2faf8}
.notification-item>span:last-child{min-width:0;display:grid;gap:5px}
.notification-item strong{font-size:11.5px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.notification-item small{font-size:10px;color:#7c8c9a}
.notification-dot{display:block;flex-shrink:0;width:7px;height:7px;margin-top:5px;background:#08a09a;border-radius:50%}
.notification-empty{padding:18px;margin:0;font-size:12px;color:#718798}
.notification-permission{border:0;border-top:1px solid #e9f0f1;background:#f5faf9;padding:12px 14px;color:#067c7e;font-weight:800;font-size:11px}
.team-panel{margin-top:20px;max-width:780px}
.team-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:12px}
.team-list{margin-top:15px;border-top:1px solid #edf2f2}
.team-member{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 2px;border-bottom:1px solid #eef2f3}
.team-member>div{display:grid;gap:5px;min-width:0}.team-member strong{color:#163a5c;font-size:12px}
.team-member small{font-size:10px;color:#728795;overflow-wrap:anywhere}
@media(max-width:720px){
 .top-actions{gap:9px}.notice-trigger{width:36px;height:36px;border-radius:11px}
 .notification-panel{top:calc(100% - 1px);right:10px;max-height:70vh}
 .team-form{grid-template-columns:1fr}.team-form button{width:100%}
 .app-credit{padding-bottom:28px;margin-top:32px}
 .content input,.content select,.content textarea,.modal input,.modal select,.modal textarea,.login-card input{font-size:16px}
}

/* V5.7.2 - Cuenta y salida visibles también en la navegación móvil. */
.more-account{margin:0 22px 22px;padding:18px 0 0;border-top:1px solid #e1eaf0;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.more-account-email{font-size:12px;color:#5c7387;overflow-wrap:anywhere;max-width:100%}
.mobile-logout,.settings-logout{min-height:44px;border:1px solid #ccdae5;background:#fff;color:#163a5c;font-weight:750}
.change-password-form{display:grid;gap:13px;padding:12px 0 4px}
.change-password-form .field{margin:0}
.change-password-form input{min-height:44px}
.change-password-form button{justify-self:start}
@media(max-width:720px){
 .more-account{margin:0 15px 17px;display:grid;gap:12px}
 .mobile-logout,.settings-logout{width:100%;justify-content:center}
 .settings-actions:has(.settings-logout){padding:8px 0 16px}
 .change-password-form button{width:100%}
}



/* V5.10: original ALTARIUM layout with discreet team notifications. */
#toast{pointer-events:none;position:relative;z-index:60}
#toast .toast{position:fixed;top:auto;bottom:25px;right:25px;max-width:min(360px,calc(100vw - 24px));padding:12px 15px;
  color:#163a5c;background:rgba(255,255,255,.94);border:1px solid rgba(209,224,234,.85);
  border-left:3px solid #163a5c;border-radius:12px;box-shadow:0 12px 32px rgba(22,58,92,.12);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);font-size:12px;line-height:1.5;z-index:60}
#toast .toast.error{color:#9f343d;background:rgba(255,247,248,.96);border-color:#efcdd1;border-left-color:#c94851}
.notification-panel{width:min(372px,calc(100vw - 24px));max-height:min(475px,calc(100dvh - 110px));
  display:flex;flex-direction:column;background:rgba(255,255,255,.975);border:1px solid rgba(215,228,238,.85);
  border-radius:16px;box-shadow:0 18px 45px rgba(22,58,92,.16);overflow:hidden;
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.notification-head{padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:9px;
  background:rgba(247,250,253,.65);border-bottom:1px solid rgba(223,231,238,.8)}
.notification-title,.notification-head-actions{display:flex;align-items:center;gap:9px}
.notification-title-icon{display:grid;place-items:center;width:29px;height:29px;flex:0 0 29px;
  background:#e9f0f6;color:#163a5c;border-radius:9px}
.notification-title-icon svg{width:16px;height:16px}
.notification-title strong{font-size:12px;color:#163a5c}
.notification-head-actions .text-action{border:0;background:transparent;color:#55718a;font-weight:700;font-size:10px;cursor:pointer;padding:7px 5px}
.notification-head-actions .text-action:disabled{opacity:.34;cursor:default}
.notification-close{width:28px;height:28px;border:0;background:#eaf0f5;border-radius:8px;color:#45627d;font-size:20px;line-height:1}
.notification-list{overflow:auto;overscroll-behavior:contain;min-height:80px;max-height:390px}
.notification-item{background:transparent;border-bottom:1px solid rgba(223,232,238,.65);padding:12px 14px;gap:10px}
.notification-item:hover,.notification-item.is-unread{background:rgba(230,240,247,.48)}
.notification-dot{background:#bdcad4;flex-shrink:0}
.notification-item.is-unread .notification-dot{background:#163a5c}
.notification-empty{padding:24px 14px;text-align:center;color:#8a9aaa;font-size:11px}
.push-settings .panel-list{display:grid;gap:12px}
.push-simple-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.push-simple-row button{min-height:39px}
.push-status{display:inline-flex;align-items:center;gap:6px;color:#7b8b99;font-size:12px;font-weight:700}
.push-status::before{content:'';width:7px;height:7px;border-radius:50%;background:#a5b5c1}
.push-status.is-enabled::before{background:#1c9a76}
@media(max-width:720px){
  #toast .toast{top:calc(67px + env(safe-area-inset-top));bottom:auto;left:12px;right:12px;width:auto;max-width:none}
  .notification-panel{position:fixed;top:calc(68px + env(safe-area-inset-top));right:12px;left:12px;
    width:auto;max-width:none;bottom:auto;max-height:calc(100dvh - 168px - env(safe-area-inset-bottom));z-index:35}
  .notification-list{max-height:calc(100dvh - 239px - env(safe-area-inset-bottom))}
  .notification-head{padding:12px}
  .notification-item{padding:12px}
  .push-simple-row button{flex:0 0 auto}
}

/* NEXO v1: light multi-brand shell and isolated brand identities */
body[data-brand="nexo"]{background:#f6f7f5;color:#1f3440}
.nexo-home{min-height:100vh;padding:clamp(24px,6vw,68px) max(22px,calc((100vw - 1100px)/2));display:flex;flex-direction:column;gap:38px;background:radial-gradient(circle at 85% 8%,#e3eceb 0,transparent 36%),#f8f9f7}
.nexo-overline{font-size:11px;font-weight:800;letter-spacing:.22em;color:#557478}
.nexo-hero h1{font-size:clamp(62px,11vw,132px);font-weight:800;letter-spacing:-.095em;margin:14px 0 6px;color:#123e48;line-height:1}
.nexo-point{color:#a9c3b5}.nexo-hero>p{font-size:15px;color:#5d7680;max-width:490px;line-height:1.65}
.nexo-account{color:#607b83;font-size:12px;display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-top:22px}
.nexo-signout{border:0;background:none;color:#365b64;text-decoration:underline;padding:3px;font-size:12px}
.nexo-brand-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.nexo-brand-card{padding:clamp(26px,4vw,44px);min-height:305px;border:1px solid #dfe8e7;border-radius:22px;box-shadow:0 8px 36px #1b3c460c;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;transition:transform .18s,box-shadow .18s}
.nexo-brand-card:hover{transform:translateY(-3px);box-shadow:0 16px 34px #1b3c4617;filter:none}
.nexo-altarium{background:#f0f5f8;color:#163a5c}.nexo-tactum{background:#f0eee6;color:#414936}
.nexo-card-icon{height:58px;width:58px;border-radius:18px;background:#163a5c;color:white;display:grid;place-items:center;font-size:26px;font-weight:800}
.nexo-tactum .nexo-card-icon{background:#566344}
.nexo-brand-card small{font-size:10px;letter-spacing:.22em;opacity:.67;font-weight:800}
.nexo-brand-card h2{font-size:clamp(28px,4vw,40px);letter-spacing:-.035em;margin:10px 0 7px}
.nexo-brand-card p{font-size:13px;color:inherit;opacity:.7;line-height:1.55}
.nexo-enter{font-size:13px;font-weight:750;margin-top:22px}
.nexo-home-footer{color:#83999b;font-size:11px;margin-top:auto;padding-top:22px}
.nexo-brand-back,.nexo-breadcrumb{border:0;background:transparent;color:#537084;font-size:12px;text-align:left;cursor:pointer}
.nexo-brand-back{padding:1px 13px 16px;font-weight:700}.nexo-breadcrumb{padding:5px}
body[data-brand="tactum"]{--brand:#596746;--background:#f8f8f3;--ink:#33442e;background:#f8f8f3}
body[data-brand="tactum"] .sidebar{background:#fcfdf8;border-color:#e8ebde}
body[data-brand="tactum"] .topbar{background:#fcfdf8;border-color:#e8ebde}
body[data-brand="tactum"] .brand-logo,body[data-brand="tactum"] .primary{background:#596746}
body[data-brand="tactum"] .primary:hover{background:#475638}
body[data-brand="tactum"] .nav-button.active,body[data-brand="tactum"] .secondary{background:#e8ecdf;color:#435b3b}
body[data-brand="tactum"] .eyebrow,body[data-brand="tactum"] .nav-button.active{color:#435b3b}
@media(max-width:720px){.nexo-brand-grid{grid-template-columns:1fr}.nexo-brand-card{min-height:250px}.nexo-home{gap:25px}.nexo-brand-back{margin-bottom:5px}}

/* NEXO v1.1 · multi-brand identities: only styles, common functional engine */
body[data-brand="tactum"]{background:#FFFAFD;color:#34263E;--t-magenta:#D6249F;--t-purple:#7539B7;--t-orange:#F17D2B;--t-yellow:#FFE052;--t-gradient:linear-gradient(115deg,#CF259F 0%,#743CB8 36%,#F17D2B 72%,#FFE052 100%)}
body[data-brand="tactum"] .sidebar,body[data-brand="tactum"] .topbar{background:#FFFFFF;border-color:#F1E3F0}
body[data-brand="tactum"] .brand>span{font-family:Impact,Haettenschweiler,'Arial Narrow Bold',sans-serif;font-weight:400;letter-spacing:.035em;font-size:25px;color:#612A8D}
body[data-brand="tactum"] .brand small{font-family:Montserrat,Arial,sans-serif;font-size:9px;font-weight:700;letter-spacing:.16em;color:#A54B9D}
body[data-brand="tactum"] .brand-logo{background:#FFF9FC;box-shadow:0 3px 17px #8B368719}
body[data-brand="tactum"] .content{background:#FFFAFD}
body[data-brand="tactum"] .primary,body[data-brand="tactum"] .quick-trigger{background:linear-gradient(106deg,#BA279B,#783DBB);color:#FFF;box-shadow:0 6px 18px #8C2A9F33;border:0}
body[data-brand="tactum"] .primary:hover,body[data-brand="tactum"] .quick-trigger:hover{background:linear-gradient(106deg,#A21F87,#622C9F)}
body[data-brand="tactum"] .secondary,body[data-brand="tactum"] .nav-button.active,body[data-brand="tactum"] .mobile-button.active{background:#FAE8F7;color:#77289E}
body[data-brand="tactum"] .nav-button:hover{background:#FFF1FB}
body[data-brand="tactum"] .eyebrow,body[data-brand="tactum"] .text-action{color:#8D319C}
body[data-brand="tactum"] .heading h1{color:#472A55}
body[data-brand="tactum"] .panel,body[data-brand="tactum"] .stat-card{border-color:#F3E7F1;background:#FFF}
body[data-brand="tactum"] .stat-card .stat-icon{background:#FCE8F7;color:#8B3AAC}
body[data-brand="tactum"] .mobile-nav{border-color:#F2DCEB}
body[data-brand="tactum"] .nexo-brand-back,body[data-brand="tactum"] .nexo-breadcrumb{color:#8C399A}
body[data-brand="tactum"] .section-kicker{color:#AF75B0}
body[data-brand="tactum"] .notification-item.is-unread{background:#FFF0FA}
body[data-brand="tactum"] .topbar::before{content:'';position:absolute;left:0;right:0;top:0;height:3px;background:var(--t-gradient)}
body[data-brand="tactum"] .topbar{position:relative}
/* Main NEXO selector: bright, clearly separate branded destination cards */
.nexo-brand-card .nexo-card-icon{background:transparent;padding:0;box-shadow:none;overflow:hidden}
.nexo-brand-card .nexo-card-icon img{width:100%;height:100%;object-fit:contain}
.nexo-tactum{background:linear-gradient(135deg,#FFF5FC 0%,#FFF9F2 60%,#FFFBE8 100%);border-color:#F0DBE8;color:#422D4D}
.nexo-tactum h2{font-family:Impact,Haettenschweiler,'Arial Narrow Bold',sans-serif;font-size:clamp(32px,4.5vw,48px);letter-spacing:.05em;font-weight:400;background:linear-gradient(100deg,#CA258F,#713CB5,#E67631);-webkit-background-clip:text;background-clip:text;color:transparent}
.nexo-tactum .nexo-enter{color:#7C338F}
.nexo-altarium{background:#EFF5F9}
body[data-brand="nexo"] .login-page{background:radial-gradient(circle at 10% 10%,#e2eff0 0,transparent 38%),radial-gradient(circle at 100% 100%,#fff0e9 0,transparent 44%),#FAFCFC}
body[data-brand="nexo"] .login-card .brand>span{color:#204B57}
.nexo-home{background:radial-gradient(circle at 85% 8%,#E4EFED 0,transparent 36%),#FAFCFB}
@media(max-width:720px){body[data-brand="tactum"] .topbar::before{position:absolute}}
