/* Almacén — a quiet working ledger, scoped to this department. */
body.is-warehouse-view{--depot-paper:#e5e4d9;--depot-muted:#92968a;--depot-accent:#d0d891;--depot-line:#30352c;--depot-base:#111410;--depot-soft:#181c16}
body.is-warehouse-view main{background:var(--depot-base)}
body.is-warehouse-view main>header{border-bottom:0;margin-bottom:20px;padding:0}
body.is-warehouse-view #heading{color:var(--depot-paper);font-size:clamp(25px,2.4vw,34px);font-weight:500;letter-spacing:-1.1px;line-height:1.15}
body.is-warehouse-view .wh-workspace{--wh-bg:var(--depot-base);--wh-line:var(--depot-line);--wh-muted:var(--depot-muted);--wh-accent:var(--depot-accent);color:var(--depot-paper)}
body.is-warehouse-view .wh-workspace .wh-toolbar{display:flex;align-items:stretch;gap:18px;margin:0 0 8px}
body.is-warehouse-view .wh-workspace nav.wh-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:0;background:transparent;border:0;border-bottom:1px solid var(--depot-line);border-radius:0;overflow:visible}
body.is-warehouse-view .wh-workspace .wh-tabs button{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:13px 8px 16px;min-height:48px;background:transparent;border:0;border-radius:0;color:#a4a89a;font-size:12px;font-weight:500;white-space:normal;line-height:1.3;text-align:left;box-shadow:none;transition:color .16s,background .16s}
body.is-warehouse-view .wh-workspace .wh-tabs button:first-child{padding-left:0}
body.is-warehouse-view .wh-workspace .wh-tabs button:after{content:'';position:absolute;bottom:-1px;left:8px;right:8px;height:2px;background:transparent}
body.is-warehouse-view .wh-workspace .wh-tabs button:first-child:after{left:0}
body.is-warehouse-view .wh-workspace .wh-tabs button:hover{color:var(--depot-paper);background:#ffffff03}
body.is-warehouse-view .wh-workspace .wh-tabs button[aria-pressed=true]{color:var(--depot-paper);background:transparent;box-shadow:none}
body.is-warehouse-view .wh-workspace .wh-tabs button[aria-pressed=true]:after{background:var(--depot-accent)}
body.is-warehouse-view .wh-nav-index{font:10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;color:#636d5d;letter-spacing:-.3px;flex:none}
body.is-warehouse-view [aria-pressed=true]>.wh-nav-index{color:var(--depot-accent)}
body.is-warehouse-view .wh-workspace .primary,body.is-warehouse-view .wh-dialog .primary{background:var(--depot-accent)!important;color:#202617!important;border:0!important;border-radius:5px;font-weight:600;font-size:11px;box-shadow:none}
body.is-warehouse-view .wh-create-record{align-self:center;min-height:34px;padding:8px 12px!important;margin-bottom:6px}
body.is-warehouse-view .wh-workspace .secondary{background:transparent;color:var(--depot-paper);border:1px solid var(--depot-line);border-radius:5px;box-shadow:none}
body.is-warehouse-view .wh-workspace .textbtn{color:#b7c093}
body.is-warehouse-view .wh-workspace :focus-visible{outline-color:var(--depot-accent)}
body.is-warehouse-view .wh-workspace .wh-summary{display:grid;grid-template-columns:1.1fr 1.1fr 1fr 1fr;gap:0;margin:0;padding:12px 0;border:0;border-bottom:1px solid var(--depot-line);border-radius:0;background:transparent}
body.is-warehouse-view .wh-workspace .wh-summary>div{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:10px;background:transparent;border:0;border-left:1px solid var(--depot-line);border-radius:0;padding:5px 20px}
body.is-warehouse-view .wh-workspace .wh-summary>div:first-child{border-left:0;padding-left:0}
body.is-warehouse-view .wh-workspace .wh-summary strong{color:var(--depot-paper);font:400 30px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-2px}
body.is-warehouse-view .wh-workspace .wh-summary small{max-width:95px;color:#a6ab9c;font-size:10px;line-height:1.4}
body.is-warehouse-view .wh-workspace .wh-summary>div:nth-child(n+3) strong{font-size:24px;color:#aab59d}
body.is-warehouse-view .wh-workspace .wh-summary-amber strong{color:#dac18a}
body.is-warehouse-view .wh-workspace .wh-search-row{margin:0;padding:7px 0;border-bottom:1px solid var(--depot-line)}
body.is-warehouse-view .wh-search-row label{display:flex;align-items:center;gap:9px;max-width:none!important;width:100%;background:transparent;border:0;padding:0}
body.is-warehouse-view .wh-search-icon{display:block;width:15px;height:15px;color:#7f8975;flex:none}
body.is-warehouse-view .wh-search-row input{background:transparent!important;border:0!important;border-radius:0;box-shadow:none!important;min-height:34px;padding:7px 0;font-size:12px;color:var(--depot-paper)!important}
body.is-warehouse-view .wh-search-row input::placeholder{color:#747e6a}
body.is-warehouse-view .wh-receipt-list{display:grid;gap:0}
body.is-warehouse-view .wh-receipt-row{display:grid;grid-template-columns:48px minmax(0,1fr) 130px 145px 22px;align-items:center;gap:18px;margin:0;padding:17px 0;border:0;border-bottom:1px solid var(--depot-line);border-radius:0;background:transparent;color:var(--depot-paper);text-align:left;box-shadow:none;transform:none}
body.is-warehouse-view .wh-receipt-row:hover{background:#d0d89105;border-color:#596447}
body.is-warehouse-view .wh-receipt-date{display:grid;gap:4px;justify-items:start;min-width:0}
body.is-warehouse-view .wh-receipt-date b{font:400 25px/1 ui-monospace,SFMono-Regular,Consolas,monospace;color:#d5d9c7;letter-spacing:-1.5px}
body.is-warehouse-view .wh-receipt-date small{font-size:9px;color:#78826f;white-space:nowrap}
body.is-warehouse-view .wh-receipt-copy{display:grid;gap:5px;min-width:0}
body.is-warehouse-view .wh-receipt-copy>b{font-size:13px;font-weight:500;color:var(--depot-paper)}
body.is-warehouse-view .wh-receipt-copy small{font-size:10px;color:#858f7b;line-height:1.4}
body.is-warehouse-view .wh-receipt-reference{display:grid;gap:5px;min-width:0}
body.is-warehouse-view .wh-receipt-reference>b{font-size:11px;font-weight:400;color:#b1ba9f}
body.is-warehouse-view .wh-receipt-reference small{font:9px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:#707a64;overflow-wrap:anywhere}
body.is-warehouse-view .wh-row-arrow{color:#899774;font-size:18px}
body.is-warehouse-view .wh-workspace .wh-badge{display:inline-flex;align-items:center;gap:5px;justify-self:start;max-width:100%;padding:0;border:0;border-radius:0;background:transparent;font-size:10px;line-height:1.4;white-space:normal;font-weight:400}
body.is-warehouse-view .wh-workspace .wh-badge:before{content:'';width:4px;height:4px;border-radius:50%;background:currentColor;flex:none}
body.is-warehouse-view .wh-workspace .wh-approved,body.is-warehouse-view .wh-workspace .wh-active{color:#a5c68f}
body.is-warehouse-view .wh-workspace .wh-pending,body.is-warehouse-view .wh-workspace .wh-inspection,body.is-warehouse-view .wh-workspace .wh-retained{color:#d1bd89}
body.is-warehouse-view .wh-workspace .wh-catalog-grid{display:block}
body.is-warehouse-view .wh-catalog-card{display:grid;grid-template-columns:145px minmax(130px,1fr) minmax(180px,1.5fr) 86px;align-items:start;gap:20px;padding:20px 0;margin:0;background:transparent;border:0;border-bottom:1px solid var(--depot-line);border-radius:0;box-shadow:none}
body.is-warehouse-view .wh-catalog-card>div:first-child{display:grid;justify-content:start;gap:7px}
body.is-warehouse-view .wh-code{font:10px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace;color:#a6b68d;letter-spacing:.2px}
body.is-warehouse-view .wh-catalog-card h3{font-size:14px;font-weight:500;line-height:1.4;margin:0;color:var(--depot-paper)}
body.is-warehouse-view .wh-catalog-detail{min-width:0;color:#8d9981;font-size:11px;line-height:1.5}
body.is-warehouse-view .wh-catalog-detail p{color:#919c86;font-size:11px;line-height:1.5;margin:5px 0 7px}
body.is-warehouse-view .wh-catalog-card .textbtn{padding:0;font-size:10px;margin:0;justify-self:end;white-space:nowrap;min-height:22px}
body.is-warehouse-view .wh-tags{gap:6px}
body.is-warehouse-view .wh-tags i{background:transparent;border:1px solid #333e2b;color:#8d9f77;border-radius:3px;padding:2px 5px;font-size:9px}
body.is-warehouse-view .wh-stock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
body.is-warehouse-view .wh-stock-card{background:transparent;border:0;border-bottom:1px solid var(--depot-line);border-right:1px solid var(--depot-line);border-radius:0;padding:20px 20px 16px 0;min-width:0}
body.is-warehouse-view .wh-stock-card:nth-child(2n){border-right:0;padding-left:20px}
body.is-warehouse-view .wh-stock-card h3{font-size:14px;color:var(--depot-paper);font-weight:500}
body.is-warehouse-view .wh-stock-card p{color:#88957b}
body.is-warehouse-view .wh-stock-card p b{color:#bcc6ac;font-weight:500}
body.is-warehouse-view .wh-stock-numbers{padding:18px 0 15px}
body.is-warehouse-view .wh-stock-numbers strong{font:400 32px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-1.7px;color:#d6dfb8}
body.is-warehouse-view .wh-stock-numbers :is(small,span){color:#8e9c80}
body.is-warehouse-view .wh-stock-numbers>div:last-child,body.is-warehouse-view .wh-stock-bottom{border-color:var(--depot-line)}
body.is-warehouse-view .wh-stock-bottom small{color:#8e9c80}
body.is-warehouse-view .wh-empty{min-height:220px;padding:40px 0;align-items:flex-start;justify-content:center;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--depot-line);border-radius:0;gap:8px}
body.is-warehouse-view .wh-empty>span{display:none}
body.is-warehouse-view .wh-empty h3{font-size:23px;letter-spacing:-.6px;font-weight:400;color:#b9c3a9;margin:0 0 4px}
body.is-warehouse-view .wh-empty p{font-size:11px;color:#7e8c70;margin:0 0 10px;max-width:420px}
body.is-warehouse-view .wh-pagination{justify-content:flex-end;border:0;gap:12px;padding:12px 0}
body.is-warehouse-view .wh-pagination span{font:10px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:#7a896a}
body.is-warehouse-view .wh-dispatch-profile{border:0;border-top:1px solid var(--depot-line);border-radius:0;background:transparent;padding:14px 0}
/* The drawing surface and its controls share one frame. Custom object colors stay intact. */
body.is-warehouse-view .wh-map.wh-map-editor{background:#10130f;border:1px solid var(--depot-line);border-radius:8px;padding:0;margin-top:10px;overflow:hidden}
body.is-warehouse-view .wh-map-editor .wh-map-top{padding:7px 10px;margin:0;border-bottom:1px solid var(--depot-line)}
body.is-warehouse-view .wh-map-floor-tabs{padding:0;gap:14px;background:transparent;border:0;border-radius:0}
body.is-warehouse-view .wh-map-floor-tabs button{border-radius:0;background:transparent;color:#7f8c72;padding:7px 0;border-bottom:1px solid transparent;font-size:11px}
body.is-warehouse-view .wh-map-floor-tabs button[aria-pressed=true]{background:transparent;color:#d8dfc7;border-bottom-color:var(--depot-accent)}
body.is-warehouse-view .wh-map-editor .wh-map-tools{margin:0;padding:6px 10px;background:#171b14;border-bottom:1px solid #252e1e;gap:5px}
body.is-warehouse-view .wh-map-editor .wh-map-tools .textbtn{color:#9ca98c;background:transparent}
body.is-warehouse-view .wh-map-editor .wh-map-tools button:hover:not(:disabled){color:#e1e9d3;background:#ffffff05}
body.is-warehouse-view .wh-map-editor .wh-map-tools .secondary{border:0;background:transparent;padding:5px 7px;color:#c8d4b8}
body.is-warehouse-view .wh-map-editor [data-map-create][aria-pressed=true]{background:#d0d891!important;color:#202617!important;border:0}
body.is-warehouse-view .wh-map-editor .wh-map-layout{gap:0}
body.is-warehouse-view .wh-map-editor .wh-map-viewport{border:0;border-radius:0;background:#090c09;height:clamp(460px,calc(100dvh - 225px),1100px)}
body.is-warehouse-view .wh-map-editor .wh-map-inspector{background:#151a12!important;border:0!important;border-left:1px solid var(--depot-line)!important;border-radius:0;padding:10px!important}
body.is-warehouse-view .wh-map-editor .wh-map-inspector .wh-field{color:#a5b394;font-size:10px}
body.is-warehouse-view .wh-map-editor .wh-map-inspector input,body.is-warehouse-view .wh-map-editor .wh-map-inspector select{background:#10150d!important;color:#cbd6bc!important;border-color:#37432c!important;border-radius:4px;min-height:28px}
body.is-warehouse-view .wh-map-editor .wh-map-object-list button{border:0;border-bottom:1px solid #283321;border-radius:0;background:transparent;color:#a1b28e}
body.is-warehouse-view .wh-map-editor .wh-map-object-list button[aria-pressed=true]{background:#c7df8c09;color:#dce9c8}
body.is-warehouse-view .wh-map-editor .wh-map-inspector h4{color:#6f815d;font-weight:500;letter-spacing:.3px}
body.is-warehouse-view .wh-map-editor [data-map-scale]{font:10px/1 ui-monospace,SFMono-Regular,Consolas,monospace;color:#82956d;min-width:34px;text-align:center}
body.is-warehouse-view .wh-map-editor [data-map-status]{color:#a1b28b;font-size:10px}
body.is-warehouse-view .wh-map-context{background:#1b2217f5;border-color:#465536;border-radius:6px}
body.is-warehouse-view .wh-map-context button{color:#c8d8b8;border-radius:3px}
body.is-warehouse-view .wh-map-context button:hover,body.is-warehouse-view .wh-map-context button:focus-visible{background:#35412a}
body.is-warehouse-view .wh-map-context [data-context=delete]{color:#e3a496}
@media(max-width:1100px){body.is-warehouse-view .wh-workspace .wh-toolbar{gap:10px}body.is-warehouse-view .wh-workspace nav.wh-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}body.is-warehouse-view .wh-workspace .wh-tabs button{padding:9px 6px;min-height:36px}body.is-warehouse-view .wh-workspace .wh-tabs button:first-child{padding-left:6px}body.is-warehouse-view .wh-catalog-card{grid-template-columns:120px minmax(0,1fr) 80px;gap:12px}body.is-warehouse-view .wh-catalog-detail{grid-column:2;grid-row:2}body.is-warehouse-view .wh-catalog-card .textbtn{grid-column:3;grid-row:1}body.is-warehouse-view .wh-workspace .wh-summary>div{padding:5px 12px}body.is-warehouse-view .wh-receipt-row{grid-template-columns:42px minmax(0,1fr) 100px 112px 16px;gap:10px}}
@media(max-width:720px){body.is-warehouse-view main>header{margin-bottom:14px}body.is-warehouse-view #heading{font-size:26px}body.is-warehouse-view .wh-workspace .wh-toolbar{flex-wrap:wrap;gap:8px}body.is-warehouse-view .wh-workspace nav.wh-tabs{width:100%;flex:1 1 100%}body.is-warehouse-view .wh-workspace .wh-tabs button{font-size:11px;gap:7px}body.is-warehouse-view .wh-create-record{margin-bottom:2px}body.is-warehouse-view .wh-workspace .wh-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 0}body.is-warehouse-view .wh-workspace .wh-summary>div:nth-child(3){border-left:0;padding-left:0}body.is-warehouse-view .wh-workspace .wh-summary strong{font-size:26px}body.is-warehouse-view .wh-receipt-row{grid-template-columns:40px minmax(0,1fr) 20px;padding:15px 0;gap:8px 12px}body.is-warehouse-view .wh-receipt-copy{min-width:0}body.is-warehouse-view .wh-receipt-date{grid-column:1;grid-row:1/3}body.is-warehouse-view .wh-receipt-reference{grid-column:2;grid-row:2}body.is-warehouse-view .wh-receipt-reference small{display:none}body.is-warehouse-view .wh-receipt-row>.wh-badge{grid-column:2;grid-row:3;margin:0}body.is-warehouse-view .wh-row-arrow{grid-column:3;grid-row:1;margin:0}body.is-warehouse-view .wh-catalog-card{grid-template-columns:minmax(0,1fr) 78px;gap:8px;padding:16px 0}body.is-warehouse-view .wh-catalog-card>div:first-child{grid-column:1;grid-row:1;display:flex;gap:10px;align-items:center}body.is-warehouse-view .wh-catalog-card h3{grid-column:1;grid-row:2}body.is-warehouse-view .wh-catalog-detail{grid-column:1/-1;grid-row:3}body.is-warehouse-view .wh-catalog-card .textbtn{grid-column:2;grid-row:1}body.is-warehouse-view .wh-stock-grid{grid-template-columns:minmax(0,1fr)}body.is-warehouse-view .wh-stock-card,body.is-warehouse-view .wh-stock-card:nth-child(2n){padding:18px 0;border-right:0}body.is-warehouse-view .wh-map-editor .wh-map-inspector{border-left:0!important;border-top:1px solid var(--depot-line)!important}body.is-warehouse-view .wh-map-editor .wh-map-viewport{height:clamp(360px,calc(100dvh - 255px),800px)}body.is-warehouse-view .wh-map-editor .wh-map-tools{padding:5px 7px}body.is-warehouse-view .wh-map-editor .wh-map-top{padding:5px 8px}}
@media(prefers-reduced-motion:reduce){body.is-warehouse-view .wh-workspace *{scroll-behavior:auto!important;transition:none!important}}

/* Opening counts remain inside Existencias, without another workspace tab. */
.wh-opening-form .wh-fields{gap:8px 12px}
.wh-opening-lines{display:grid;gap:10px;margin-top:12px}
.wh-opening-line{margin:0!important;padding:12px!important}
.wh-opening-confirm{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:#dce2d3;line-height:1.4}
.wh-opening-confirm input{margin:2px 0 0;flex:none}
.wh-opening-setup{display:grid;gap:8px}.wh-opening-setup p{font-size:13px;margin:8px 0}
.wh-opening-history-row{grid-template-columns:minmax(0,1fr) auto 16px!important;text-align:left}
body.is-warehouse-view .wh-search-row{gap:12px;align-items:center}
.wh-search-row [data-wh-opening-history]{flex:none;white-space:nowrap;font-size:11px}
@media(max-width:620px){.wh-search-row:has([data-wh-opening-history]){flex-wrap:wrap}.wh-opening-form .wh-fields{grid-template-columns:1fr}}

/* Materials: compact category filter alongside the existing search. */
.wh-search-row .wh-material-filter{flex:0 1 240px;min-width:180px}
.wh-search-row .wh-material-filter select{width:100%;min-height:40px;padding:9px 32px 9px 12px;border:1px solid #48533f;border-radius:10px;background:#20271f;color:#edf0e6;font:inherit;font-size:12px;color-scheme:dark}
.wh-search-row .wh-material-filter select:focus-visible{outline:2px solid #bed792;outline-offset:2px}
@media(max-width:680px){.wh-search-row:has([data-wh-material-category]){flex-direction:row;flex-wrap:wrap;gap:4px}.wh-search-row:has([data-wh-material-category])>label{flex:1 1 100%;min-width:0}.wh-search-row .wh-material-filter select{min-height:44px;font-size:16px}}

.wh-material-complement{border:1px solid #3c4b41;border-radius:12px;padding:12px;background:#1a2421}
.wh-complement-toggle{display:flex;align-items:center;gap:9px;color:#e5eee8;font-size:13px;cursor:pointer}
.wh-complement-toggle input{accent-color:#94d7c2;width:17px;height:17px;margin:0;flex:none}
.wh-complement-toggle span{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.wh-complement-toggle small{font-size:10px;color:#adbdaf}
.wh-material-complement fieldset{margin:12px 0 0;padding:0;border:0;min-width:0}.wh-material-complement fieldset[hidden]{display:none}
.wh-complement-fields{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(72px,.55fr);gap:10px}
.wh-complement-total{display:block;margin-top:10px;color:#b9dfcf;font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
.wh-complement-card{display:grid;gap:4px;margin:10px 0;color:#bddbca;font-size:11px;line-height:1.5}.wh-complement-card b{color:#e4efe8;font-size:12px}
@media(max-width:520px){.wh-complement-fields{grid-template-columns:minmax(0,1fr) 85px}.wh-complement-fields>.wh-field:first-child{grid-column:1/-1}}
