.costs-app{--cost-band:#44546a;--cost-border:var(--border,#d8dde5)}
.costs-app .cost-toolbar,.costs-app .cost-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:16px 0}
.costs-app .cost-toolbar label{display:flex;align-items:center;gap:8px;font-weight:600}
.costs-app select,.costs-app input,.costs-app textarea{background:var(--cost-paper);color:var(--ink);border:1px solid var(--cost-border);border-radius:7px;padding:10px;font:inherit}
.costs-app input{width:150px;text-align:right;font-variant-numeric:tabular-nums;background:var(--cost-field)}
.costs-app input:focus,.costs-app textarea:focus{outline:2px solid var(--accent,#cc9551);outline-offset:1px}
.costs-app textarea{width:100%;min-height:72px;resize:vertical}
.costs-app .cost-months{display:grid;grid-template-columns:repeat(12,minmax(60px,1fr));gap:5px;margin:14px 0}
.costs-app .cost-months button{padding:10px 3px;border:1px solid var(--cost-border);border-radius:8px;background:var(--cost-paper);color:var(--ink);cursor:pointer}
.costs-app button.active{background:var(--cost-band);color:white;border-color:var(--cost-band)}
.costs-app .cost-months small{display:block;font-size:10px;margin-top:5px;opacity:.75}
.costs-app .cost-label{font-size:11px;letter-spacing:1.5px;color:var(--accent,#956b3b);font-weight:800}
.costs-app h1{margin:8px 0;font-size:30px}.costs-app h2{font-size:17px;margin:0 0 8px}
.costs-app .cost-caption{color:var(--muted,#607080);font-size:13px;line-height:1.6}
.costs-app .cost-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.costs-app .cost-metric strong{font-size:25px;display:block;margin:8px 0}.costs-app .cost-metric small{color:var(--muted,#607080)}
.costs-app .cost-section{margin:20px 0}.costs-app .cost-scroll{overflow:auto;max-height:65vh;border:1px solid var(--cost-border);border-radius:8px}
.costs-app table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;font-variant-numeric:tabular-nums}
.costs-app th,.costs-app td{padding:11px 14px;border-bottom:1px solid var(--cost-border);text-align:right;white-space:nowrap}
.costs-app th:first-child,.costs-app td:first-child{text-align:left;min-width:260px;white-space:normal}
.costs-app thead th{position:sticky;top:0;background:var(--cost-band);color:#fff;z-index:2}
.costs-app .cost-group th{background:var(--cost-band);color:#fff;text-align:left;font-size:12px;letter-spacing:.5px}
.costs-app .cost-total td{font-weight:800;border-top:2px solid var(--cost-band)}
.costs-app .cost-wide td:first-child,.costs-app .cost-wide th:first-child{position:sticky;left:0;background:var(--cost-paper);z-index:1}
.costs-app .cost-wide thead th:first-child{background:var(--cost-band);z-index:3}
.costs-app .cost-quincena{border-left:3px solid var(--cost-band)}
.costs-app .cost-notice{padding:12px 16px;border-left:3px solid var(--accent,#b88947);background:var(--cost-field);border-radius:5px;line-height:1.6;margin:12px 0}
.costs-app .cost-status{min-height:24px;font-size:13px;flex:1}.costs-app .cost-error{color:#c34836}
.costs-app .cost-savebar{position:sticky;bottom:0;background:var(--cost-paper);padding:12px 16px;border:1px solid var(--cost-border);border-radius:10px;z-index:4;box-shadow:0 -4px 18px #0000000a}
.costs-app button:disabled{opacity:.5;cursor:not-allowed}.costs-app input:disabled{border-style:dashed}
.costs-app .cost-history{margin:16px 0}.costs-app .cost-history summary{cursor:pointer}
.costs-app .cost-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.costs-app .cost-section-heading .btn{font-size:12px;padding:6px 10px;background:#ffffff15;color:#fff;border:1px solid #ffffff50}
.costs-app .cost-add-form{border:1px solid var(--accent);border-radius:10px;padding:18px;margin:14px 0;background:var(--cost-field);display:grid;gap:8px;max-width:620px}
.costs-app .cost-add-form h3{margin:0 0 4px;font-size:16px}
.costs-app .cost-add-form input,.costs-app .cost-add-form select{width:100%;text-align:left}
.costs-app .cost-add-form .cost-actions{margin:4px 0}
.costs-app .cost-add-form .cost-error:empty{display:none}
@media(max-width:900px){.costs-app .cost-months{grid-template-columns:repeat(6,1fr)}.costs-app .cost-metrics{grid-template-columns:1fr}.costs-app h1{font-size:25px}.costs-app th,.costs-app td{padding:10px}.costs-app .cost-toolbar{align-items:stretch}}

.costs-app{--cost-paper:#0d1a28;--cost-field:#08131f;--cost-border:var(--line)}
body[data-theme="light"] .costs-app{--cost-paper:#fff;--cost-field:#f6f8fa}

body.costs-active header .monthbar,body.costs-active header #status,body.costs-active header #refresh{display:none!important}
@media(max-width:600px){
 .costs-app .cost-entry,.costs-app .cost-entry tbody{display:block}
 .costs-app .cost-entry thead{display:none}
 .costs-app .cost-entry tr{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center;border-bottom:1px solid var(--cost-border)}
 .costs-app .cost-entry td{border:0;white-space:normal;padding:10px 8px}
 .costs-app .cost-entry td:first-child{min-width:0;grid-row:1 / span 2}
 .costs-app .cost-entry input{width:104px}
 .costs-app .cost-entry td[data-daily]{grid-column:2;font-size:11px;color:var(--muted);padding-top:0}
 .costs-app .cost-entry td[data-daily]:before{content:'Diario: '}
 .costs-app .cost-entry .cost-group{display:block}
 .costs-app .cost-entry .cost-group th{display:block;min-width:0}
 .costs-app .cost-status{flex-basis:100%}
}

.costs-app .btn.cost-delete{color:#ff7777;border:1px solid #c74a4a;background:transparent;font-size:23px;line-height:1;min-width:32px;min-height:32px;padding:3px 7px;margin-right:8px}.costs-app .btn.cost-delete:hover{background:#a8202033}.costs-app .btn.cost-delete:focus-visible{outline:2px solid #ff7777;outline-offset:3px}

.cost-confirm{background:var(--panel,#102130);color:var(--text,#f5f7fa);border:1px solid #8995a8;border-radius:14px;padding:24px;max-width:480px;width:calc(100% - 48px)}.cost-confirm::backdrop{background:#0009}.cost-confirm p{white-space:pre-line;line-height:1.6}.cost-confirm .cost-actions{justify-content:flex-end}

.costs-app .btn.cost-delete-icon{border:0;background:transparent;color:#c87979;font-size:18px;font-weight:400;min-width:28px;min-height:28px;padding:4px;margin:0;border-radius:6px;opacity:.75}.costs-app .btn.cost-delete-icon:hover,.costs-app .btn.cost-delete-icon:focus-visible{color:#ef8585;background:#b74c4c18;opacity:1}.costs-app .cost-remove-cell{width:36px;min-width:36px;padding:8px;text-align:right}.costs-app .cost-section-heading .cost-actions{margin:0;flex-wrap:nowrap;gap:12px}
@media(max-width:600px){.costs-app .cost-entry tr{grid-template-columns:minmax(0,1fr) 120px 32px}.costs-app .cost-entry .cost-remove-cell{grid-column:3;grid-row:1 / span 2;min-width:0;width:auto;padding:2px}.costs-app .cost-section-heading{flex-wrap:nowrap}.costs-app .cost-section-heading .cost-actions{gap:3px}}

.explore-demo{display:grid;gap:5px;padding:16px;border:1px solid var(--accent);border-radius:10px;background:var(--cost-field);margin:18px 0}.explore-demo strong{color:var(--accent);letter-spacing:1px}.explore-demo span{font-size:13px}.explore-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:18px 0}.explore-filters label{display:grid;gap:7px;font-size:13px}.explore-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.explore-metrics strong{display:block;font-size:26px;margin:12px 0}.explore-metrics small{display:block;color:var(--muted);line-height:1.5}.explore-counts{font-size:16px;margin:18px 0}.explore-selected{background:var(--cost-field)}.costs-app .explore-time td:first-child,.costs-app .explore-time th:first-child{min-width:160px}@media(max-width:1000px){.explore-metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.explore-metrics{grid-template-columns:1fr}.explore-filters label{flex:1 1 130px}.explore-filters select{width:100%}}
