#inventory{--inv-line:#3a5266;--inv-panel:#20394e;--inv-ink:#f2f7fb;--inv-muted:#b7c9d8;color:var(--inv-ink)}
#inventory .sec>div>.muted{color:var(--inv-muted)!important}
.inv-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 24px}
.inv-overview>div,.inv-overview>button{padding:18px 20px;background:linear-gradient(140deg,#23455e,#1a3043);border:1px solid #456078;border-radius:13px;color:#fff;text-align:left}
.inv-overview span{display:block;font-size:11px;letter-spacing:1px;font-weight:800;color:#b9d2e4}
.inv-overview b{display:block;font-size:34px;margin-top:7px;line-height:1}
.inv-overview button b{color:#ffb087}
#inventoryStats.dashboard-grid{display:block!important}
.inv-section-caption{display:flex;align-items:center;justify-content:space-between;margin:18px 0 12px}
.inv-section-caption h2{font-size:18px;color:#fff!important}
.inv-section-caption button{background:transparent;border:0;color:#ffae72;font-weight:750;cursor:pointer}
.inv-families{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin-bottom:22px;max-height:300px;overflow:auto;padding:3px}
.inv-family{--family-color:#ea8634;background:#1b3145;border:1px solid #3b5368;border-radius:12px;padding:14px;color:#f2f7fb;text-align:left;display:grid;grid-template-columns:38px 1fr;gap:5px 10px;align-items:center;min-height:90px;cursor:pointer}
.inv-family:hover,.inv-family.selected{border-color:var(--family-color);background:#2d4355;box-shadow:inset 3px 0 var(--family-color)}
.inv-family-icon{grid-row:1/3;background:color-mix(in srgb,var(--family-color) 20%,transparent);color:var(--family-color);font-size:26px;border-radius:9px;width:38px;height:40px;display:grid;place-items:center}
.inv-family b{font-size:13px;line-height:1.3;overflow-wrap:anywhere}.inv-family small{color:#b8cbd9;font-size:11px}
.inv-toolbar{background:#1b3145;border:1px solid #3b5368;padding:14px;border-radius:12px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#inventory .inv-toolbar .input{background:#132a3d!important;color:#fff!important;border-color:#4a657c!important;margin:0!important;width:auto;max-width:100%;min-height:44px}
#inventory .inv-toolbar .input::placeholder{color:#b8cbd9!important}
#inventory #inventorySearch{flex:1 1 260px!important}
.inv-toolbar select{flex:1 1 150px}.inv-view-switch{display:flex;gap:3px}
.inv-view-switch button{border:1px solid #4a657c;border-radius:8px;padding:10px;background:#183044;color:#c6d5e0;cursor:pointer}
.inv-view-switch button.active{background:#e7822c;color:#132331;border-color:#e7822c}
#inventoryResultsHead h2{color:#fff!important;font-size:20px}#inventoryResultCount{color:#b8cbd9}
.inv-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-top:12px}
.inv-product{background:linear-gradient(150deg,#234158,#1a3043);border:1px solid #3f596f;border-radius:13px;padding:18px;min-width:0;display:flex;flex-direction:column;color:#fff;border-top:3px solid var(--family-color)}
.inv-product-top{display:flex;gap:10px;align-items:center;margin-bottom:13px}
.inv-product-symbol{color:var(--family-color);font-size:26px;line-height:1}.inv-family-tag{font-size:10px;letter-spacing:.6px;font-weight:800;color:#b9cddd;text-transform:uppercase}
.inv-product-name h3{font-size:17px;line-height:1.3;color:#fff!important;overflow-wrap:anywhere;margin:0 0 5px}.inv-product-name>span{font-size:12px;color:#b9cddd}
.inv-product-place{font-size:12px;color:#cfdfec;margin:12px 0;overflow-wrap:anywhere}
.inv-stock-row{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:5px;border-block:1px solid #3b5368;padding:12px 0;margin-top:auto}
.inv-stock-row b{display:block;font-size:18px}.inv-stock-row div:first-child b{font-size:24px;color:#70e3ad}.inv-stock-row div:first-child.is-low b{color:#ffad87}.inv-stock-row span{font-size:10px;color:#b8cbd9}
.inv-source-stock{color:#b8cbd9;font-size:11px;margin:10px 0 0}.inv-product-notes{margin-top:10px;font-size:12px;color:#c5d6e3}.inv-product-notes p{line-height:1.55;white-space:pre-wrap}.inv-product-notes summary{cursor:pointer}
.inv-product-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}
.inv-product-actions button{border:1px solid #49657c;border-radius:7px;background:#182e40;color:#dfebf4;padding:8px 12px;font-size:12px;cursor:pointer}
.inv-product-actions button:hover{border-color:#e7822c;color:#ffbd8b}
.inv-products.as-list{grid-template-columns:1fr}
.inv-products.as-list .inv-product{display:grid;grid-template-columns:130px minmax(180px,1fr) 140px 290px;gap:10px 18px;align-items:center}
.inv-products.as-list .inv-product-top{margin:0}.inv-products.as-list .inv-stock-row{border:0;margin:0;padding:0}
.inv-products.as-list .inv-product-actions,.inv-products.as-list .inv-product-notes,.inv-products.as-list .inv-source-stock{grid-column:2/-1;margin:0}
.inv-empty{grid-column:1/-1;padding:42px;text-align:center;border:1px dashed #4a657c;border-radius:13px;color:#b8cbd9}.inv-empty>span{font-size:38px;color:#e7822c}.inv-empty h3{color:#fff!important;margin:12px 0}.inv-empty p{margin:0 0 18px}
.inv-pagination{display:flex;gap:14px;align-items:center;justify-content:center;margin:20px 0;font-size:13px}
.inv-import-head{display:flex;gap:16px;align-items:center}.inv-import-head>span{font-size:40px;color:#e7822c}
.inv-upload-zone{display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px;border:2px dashed #6b89a1;border-radius:12px;background:#20394e;margin:20px 0;color:#fff}
.inv-upload-zone span{font-size:12px;color:#c2d4e1}.inv-upload-zone input{max-width:100%;font-size:13px}
.inv-preview-summary{display:flex;gap:14px;flex-wrap:wrap;background:#24435a;color:#fff;padding:15px;border-radius:10px}
.inv-preview-table{max-height:55vh;overflow:auto;margin:16px 0;border:1px solid #5b758b;border-radius:10px}
.inv-preview-table table{border-collapse:collapse;min-width:1550px;width:100%;font-size:12px}
.inv-preview-table th{position:sticky;top:0;background:#1b354b;color:#fff;text-align:left;padding:10px;z-index:1}.inv-preview-table td{padding:5px;border-bottom:1px solid #52687a}
.inv-preview-table input{width:100%;min-width:75px;background:#152e42;color:#fff;border:1px solid #52687a;padding:8px;border-radius:5px}
.inv-preview-table td:first-child input{min-width:240px}.inv-preview-table td:nth-child(3) input{min-width:170px}
.inv-warnings{background:#5b411f;padding:14px;border-radius:10px;color:#ffe0a5;margin-top:12px}
.inv-document{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border:1px solid #4b657b;border-radius:10px;padding:15px;margin:10px 0;background:#20394e;color:#fff}
.inv-document>div{flex:1 1 230px;min-width:0}.inv-document b{overflow-wrap:anywhere}.inv-document small{display:block;margin-top:5px;color:#bfd2e1}
@media(max-width:1200px){.inv-products.as-list .inv-product{grid-template-columns:90px 1fr 130px}.inv-products.as-list .inv-stock-row{grid-column:2/-1}}
@media(max-width:600px){
 .inv-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.inv-overview>div,.inv-overview>button{padding:15px}.inv-overview b{font-size:29px}.inv-overview span{font-size:9px}
 .inv-families{grid-template-columns:repeat(2,minmax(0,1fr));max-height:320px}.inv-family{padding:11px;grid-template-columns:28px 1fr;gap:5px 7px;min-height:86px}.inv-family-icon{width:28px;height:34px;font-size:22px}.inv-family b{font-size:11px}.inv-family small{font-size:10px}
 .inv-products{grid-template-columns:1fr}.inv-products.as-list .inv-product{display:flex}.inv-products.as-list .inv-stock-row{width:100%}
 .inv-toolbar{padding:11px}.inv-toolbar select{min-width:0;flex-basis:calc(50% - 10px)}.inv-toolbar #inventorySearch{flex-basis:100%!important}
 .inv-product-actions button{min-height:42px}.inv-document .btn{flex:1}.inv-preview-table{max-height:45vh}
}

/* Keep the inventory palette readable under the application's shared theme. */
html body #inventory{background:#142a3d!important;border:1px solid #3b5368;border-radius:16px;padding:22px}
html body #inventory>.sec:first-child{flex-wrap:wrap;gap:16px;align-items:flex-start}
html body #inventory>.sec:first-child>div:first-child{flex:1 1 220px}
html body #inventory>.sec:first-child>.row{flex:1 1 340px;justify-content:flex-end}
html body #inventory :is(h1,h2),html body #inventory .inv-product-name h3{color:#f2f7fb!important}
html body #inventory :is(.inv-overview,.inv-family,.inv-product) b{color:#f2f7fb!important}
html body #inventory .inv-overview span,html body #inventory .inv-family small,html body #inventory .inv-stock-row span{color:#bfd2e1!important}
html body #inventory .inv-overview button b,html body #inventory .inv-stock-row .is-low b{color:#ffad87!important}
html body #inventory .inv-stock-row>div:first-child:not(.is-low) b{color:#70e3ad!important}
html body #inventory .inv-family-tag,html body #inventory .inv-product-name>span,html body #inventory .inv-source-stock{color:#bfd2e1!important}
html body #inventory .inv-product-place{color:#dfebf4!important}
html body #inventory .inv-family-icon,html body #inventory .inv-product-symbol{color:var(--family-color)!important}
html body #inventory .inv-section-caption button{color:#ffae72!important}
@media(max-width:600px){html body #inventory{padding:12px;border-radius:12px}html body #inventory>.sec:first-child>.row{justify-content:flex-start}html body #inventory>.sec:first-child>div:first-child{flex-basis:100%}}