.costs-page{padding-bottom:18px}.costs-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:6px 0 30px}.costs-heading h1{margin:0}.costs-heading .subtitle{margin:8px 0 0}.costs-heading>.primary-button{white-space:nowrap}.costs-back{display:flex;align-items:center;gap:8px}.costs-page svg{width:20px;height:20px;flex-shrink:0}
.cost-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.cost-status{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.cost-status button{border:0;border-radius:9px;padding:12px 18px;background:none;color:var(--muted);font:inherit;font-size:13px;min-height:44px}.cost-status button[aria-pressed=true]{background:var(--soft);color:var(--accent)}.cost-toolbar .custom-select-toggle{min-height:50px}.cost-search{display:flex;align-items:center;gap:12px;padding:0 17px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted)}.cost-search input{width:100%;min-width:0;min-height:52px;background:none;border:0;color:var(--text);font:inherit;font-size:15px;outline:none}.cost-search:focus-within{outline:2px solid var(--accent);outline-offset:2px}.cost-search input::placeholder{color:var(--muted)}#cost-count{margin:18px 0 12px}
#cost-list{display:grid;gap:8px}.cost-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(120px,.4fr) 110px 100px;gap:12px 24px;align-items:center;padding:20px 24px;background:var(--panel);border:1px solid var(--line);border-radius:14px}.cost-name,.cost-price,.cost-weight{display:grid;gap:6px;min-width:0}.cost-name strong{font-size:16px;overflow-wrap:anywhere}.cost-name span,.cost-price span,.cost-weight span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.cost-price strong{font-size:18px;font-variant-numeric:tabular-nums}.cost-weight strong{font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}.cost-price,.cost-weight{text-align:right}.cost-actions{display:flex;justify-content:flex-end;gap:4px}.cost-icon{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:9px;background:none;color:var(--muted)}.cost-icon:hover,.cost-icon:focus-visible{background:var(--soft);color:var(--accent)}.cost-actions .text-button{font-size:13px}.cost-usage{grid-column:1/-1;font-size:11px;color:var(--muted);margin:0}.cost-disabled .cost-name strong{color:var(--muted)}.cost-footer{font-size:12px;line-height:1.7;color:var(--muted);max-width:660px;margin:22px 0 0}.cost-notice{font-size:13px;color:var(--good);margin:16px 0}#cost-feedback:empty{display:none}
.cost-form,.cost-confirm{max-width:720px;margin:0 auto;padding:28px}.cost-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:24px 0 12px}.cost-form .quote-field{font-size:13px}.cost-form .custom-select-toggle{font-size:14px}.cost-form .quote-hint{margin:0 0 22px}.cost-form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:28px}.cost-form-note{font-size:12px;line-height:1.7;color:var(--muted);padding-top:20px;border-top:1px solid var(--line);margin:24px 0 0}.cost-confirm h2{font-size:22px}.cost-confirm>p{font-size:14px;color:var(--muted);line-height:1.7}.cost-form input[name=unitCost]{font-size:20px;font-weight:600;color:var(--accent)}.costs-page button:disabled{opacity:.5;cursor:wait}
@media(max-width:680px){.costs-heading{gap:12px;margin-bottom:24px}.costs-heading>.primary-button{font-size:13px;padding:12px 14px}.costs-heading .subtitle{font-size:13px}.cost-toolbar{flex-wrap:wrap;gap:12px}.cost-status{flex:1}.cost-status button{flex:1;padding:10px 12px}.cost-toolbar>.custom-select{width:100%}.cost-toolbar .custom-select-toggle{width:100%;justify-content:space-between}.cost-toolbar .custom-select-menu{left:0;right:0}.cost-search input{font-size:16px}.cost-row{grid-template-columns:minmax(0,1fr) minmax(90px,.65fr);gap:14px;padding:18px}.cost-name strong{font-size:15px}.cost-price strong{font-size:18px}.cost-weight{grid-column:1;text-align:left;display:flex;align-items:center;gap:7px}.cost-weight strong{font-size:12px}.cost-actions{grid-column:2;grid-row:2}.cost-icon{width:40px;height:40px}.cost-usage{padding-top:0}.cost-form,.cost-confirm{padding:20px}.cost-form-grid{gap:18px 14px;margin-top:22px}.cost-form .quote-field{font-size:12px}.cost-form input,.cost-form textarea{font-size:16px}.cost-form .custom-select-toggle{font-size:13px;min-height:46px}.cost-form .custom-select-menu{min-width:210px;left:auto;right:0}.cost-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cost-form-actions button{font-size:13px;padding:12px 10px}.cost-form-note{font-size:12px}}

.cost-heading-actions{display:flex;gap:10px;flex-wrap:wrap}.cost-default{display:flex;align-items:center;gap:10px;margin:18px 0;font-size:14px}.cost-default input{width:18px;height:18px;accent-color:var(--accent)}#cost-net-weight{display:block;min-height:46px;padding:12px 14px;background:var(--bg);border:1px solid var(--line);border-radius:10px;color:var(--good);font-variant-numeric:tabular-nums}@media(max-width:600px){.cost-heading-actions{width:100%}.cost-heading-actions button{flex:1}}

/* Product groups share the palette; price age retains its warning meaning. */
.cost-row[data-cost-type="otros"]{background:var(--insumo-bg)}
.cost-price-date{grid-column:1/-1;margin:0;font-size:12px;color:var(--muted)}
:root .cost-row[data-price-age]{background:var(--panel)}
:root .cost-row[data-price-age="warning"]{background:var(--pending-bg);border-color:var(--pending-line)}
:root .cost-row[data-price-age="old"]{background:var(--danger-bg);border-color:var(--danger-line)}
.cost-age-guide{margin:0 0 12px}
@media(max-width:680px){.cost-status{min-width:0;max-width:100%;overflow-x:auto}.cost-status button{font-size:12px;padding:10px 8px;white-space:nowrap}}

.cost-filters{display:flex;gap:12px;flex-wrap:wrap}.cost-form select{font:inherit;width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text)}
.cost-filters .custom-select-toggle span{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media(max-width:680px){.cost-filters{width:100%}.cost-filters .custom-select{flex:1;min-width:0}.cost-filters .custom-select-toggle{font-size:13px;padding:12px}}

/* The native edit button covers the card; other actions keep their own hit area. */
.cost-row{position:relative;cursor:pointer}
.cost-icon[data-cost-edit]::after{content:"";position:absolute;inset:0;border-radius:14px}
.cost-icon[data-cost-edit]:focus-visible::after{outline:2px solid var(--accent);outline-offset:2px}
.cost-actions [data-cost-remove],.cost-actions [data-cost-restore]{position:relative;z-index:1}
.costs-back{margin:0 0 20px;padding-inline:0;border-inline-width:0}
