/* Approved live stock, reference B: wide low-stock sidebar + dense cards + batch modal */
.stock-approved-layout{grid-template-columns:minmax(0,1fr) 584px;align-items:start;gap:12px}
.stock-approved-layout .stock-main,.stock-approved-layout .stock-alerts{min-width:0}
.stock-product-grid{grid-template-columns:repeat(auto-fit,minmax(min(245px,100%),1fr));align-items:stretch;gap:10px}
.stock-approved-card{overflow:hidden}
.stock-approved-card .product-top{min-height:100px}
.stock-approved-card .variant-list{margin-top:auto}
.stock-approved-card .variant-row{grid-template-columns:29px minmax(0,1fr) 45px 43px 28px}
.stock-approved-card .variant-row .thumb{overflow:hidden}
.stock-approved-card .variant-row .thumb img{width:100%;height:100%;object-fit:contain}
.stock-card-actions{display:flex;gap:8px;margin-top:6px}
.stock-card-actions .stock-add{flex:1;min-width:0;font-size:11px}
.stock-card-actions .danger{flex:none;white-space:nowrap;font-size:11px}
.stock-alerts .alert-list{padding:13px}
.stock-alerts .sectionhead{padding:4px 3px 12px}
.stock-alerts .alert{padding:9px 3px;min-height:66px}
.stock-alerts .stock-alert-photo{width:58px;height:58px;display:flex;align-items:center;justify-content:center;background:#f6f8fb;border-radius:7px;flex:none;overflow:hidden}
.stock-alerts .stock-alert-photo img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.stock-alerts .alert .grow b{display:block;font-size:12px;line-height:1.4}
.stock-alerts .alert small{font-size:11px;line-height:1.4}
.stock-alerts .alert button{min-width:62px}
.stock-alerts .hint{padding:14px}
.stock-alerts .hint p{margin:5px 0 0}
.stock-color-modal{width:min(900px,95vw)!important;max-height:calc(100dvh - 40px);padding:21px 22px 16px;overflow:auto}
.stock-color-modal .modal-head{align-items:flex-start;gap:12px;margin:0 0 14px}
.stock-color-modal .modal-head h2{font-size:19px;color:#1e3256}
.stock-color-modal .modal-head p{margin:5px 0 0;font-size:11px;color:#73839d}
.stock-modal-product{border:1px solid #e7edf7;border-radius:11px;padding:12px;display:flex;gap:14px;align-items:center;margin-bottom:14px;min-width:0}
.stock-modal-product>img{width:95px;height:86px;max-width:23%;object-fit:contain;flex:none;background:#f6f8fc;border-radius:9px}
.stock-modal-meta{display:grid;justify-items:start;gap:6px;min-width:0;flex:1}
.stock-modal-meta strong{font-size:15px}
.stock-modal-meta small{color:#60738f}
.stock-modal-code{width:195px;max-width:28%;display:grid;gap:5px;justify-items:center;flex:none}
.stock-modal-code small{color:#8798b1}
.stock-modal-code svg{display:block;width:100%;height:33px}
.stock-modal-code span{font-size:10px}
.stock-color-editor{border:1px solid #e3eaf6;border-radius:10px;overflow:hidden}
.stock-color-header,.stock-color-row{display:grid;grid-template-columns:32px minmax(130px,1.2fr) minmax(90px,.75fr) minmax(135px,1.1fr) 78px;align-items:center;gap:11px;padding:7px 12px}
.stock-color-header{background:#f2f7ff;color:#637b9e;font-weight:700;font-size:12px}
.stock-color-row{border-top:1px solid #eaf0f7;min-height:64px}
.stock-color-row input:not([type=file]){width:100%;height:37px;padding:8px}
.stock-row-index{color:#7d8ba2;text-align:center}
.stock-color-upload{display:flex;align-items:center;gap:8px;min-width:0;cursor:pointer;color:#1a71e6;font-size:11px}
.stock-color-preview{width:46px;height:46px;min-width:46px;background:#f3f6fa;border:1px solid #e2e9f1;border-radius:6px;display:flex;justify-content:center;align-items:center;overflow:hidden}
.stock-color-preview img{width:100%;height:100%;object-fit:contain;display:block}
.stock-no-photo{font-size:22px;color:#9cadc1}
.stock-upload-word{white-space:nowrap}
.stock-color-row .stock-remove-row{font-size:11px;white-space:nowrap}
.stock-color-footer{display:flex;align-items:center;gap:9px;margin-top:13px;flex-wrap:wrap}
.stock-color-footer .grow{flex:1}
.stock-color-footer .stock-add-row{background:#eaf3ff;color:#0869df;border-color:#eaf3ff}
.stock-help{font-size:11px;line-height:1.5;color:#7f90a6;margin:12px 0 0}
@media(max-width:1580px){.stock-approved-layout{grid-template-columns:minmax(0,1fr) 510px}}
@media(max-width:1350px){.stock-approved-layout{grid-template-columns:minmax(0,1fr) 430px}.stock-product-grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}}
@media(max-width:1100px){.stock-approved-layout{grid-template-columns:1fr}.stock-approved-layout .alerts{display:block!important}.stock-product-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.stock-alerts .alert-list{max-height:420px;overflow:auto}}
@media(max-width:700px){.stock-approved-layout{grid-template-columns:1fr}.stock-product-grid{grid-template-columns:1fr}.stock-color-modal{padding:12px;width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)}.stock-modal-product{padding:7px;gap:7px}.stock-modal-product>img{width:58px;height:60px}.stock-modal-code{max-width:90px;width:90px}.stock-modal-code svg{height:24px}.stock-color-editor{overflow-x:auto}.stock-color-header,.stock-color-row{min-width:560px;gap:6px;padding:6px;grid-template-columns:24px 145px 75px 150px 75px}.stock-color-header{position:sticky;top:0}.stock-color-row{min-height:60px}.stock-color-footer{position:sticky;bottom:0;background:white;padding:9px 0}.stock-card-actions .stock-add{font-size:12px}}

.stock-alerts .stock-alert-photo .stock-alert-missing{color:#8b9aaf;font-size:10px;text-align:center;line-height:1.5;max-width:52px}
.stock-alerts .stock-alert-photo [hidden]{display:none!important}
.stock-alerts .stock-alert-photo img{object-fit:contain;max-width:100%;max-height:100%}

/* Per-color low stock; sidebar removed from stock management */
.stock-full-width{width:100%;min-width:0}
.stock-full-width .stock-product-grid{column-width:295px;column-gap:12px}
.live-low-number{color:#dc2626!important;font-weight:800!important}
.stock-approved-card .stock-card-actions{flex-wrap:wrap}
.stock-card-actions .stock-add{flex:1 1 auto}
.stock-card-actions .stock-edit-category{white-space:nowrap}
.stock-color-header,.stock-color-row{grid-template-columns:28px minmax(130px,1.2fr) minmax(80px,.65fr) minmax(100px,.8fr) minmax(125px,1fr) 85px;gap:8px}
@media(max-width:700px){.stock-color-header,.stock-color-row{min-width:730px;grid-template-columns:25px 145px 85px 105px 155px 85px}.stock-full-width .stock-product-grid{column-width:auto;column-count:1}}


/* Product main-photo editing and per-color photo-only removal. */
.stock-modal-product{gap:15px;align-items:flex-start}
.stock-main-photo-block{flex:0 0 166px;min-width:145px;max-width:25%;display:flex;flex-direction:column;gap:7px}
.stock-main-photo-preview{width:100%;height:118px!important;object-fit:contain;background:#f5f8fc;border:1px solid #e1e9f5;border-radius:7px}
.stock-main-photo-actions{display:grid;grid-template-columns:1fr;gap:5px}
.stock-upload-main,.stock-delete-main{min-height:29px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:5px 8px;border:1px solid #cbdff9;border-radius:6px;background:#eff6ff;color:#1764c9;line-height:1.15;font-size:12px!important;text-align:center}
.stock-delete-main{color:#ce4654;border-color:#f2c8ce;background:#fff6f7}
.stock-color-image-cell{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.stock-color-image-cell .stock-color-upload{flex:1 1 auto;min-width:96px;gap:5px}
.stock-color-image-cell .stock-color-preview{width:43px;height:43px;min-width:43px}
.stock-remove-image{flex:none;min-height:30px;padding:4px 6px;border-radius:5px;font-size:11px!important;line-height:1.15;background:#fff6f7;border:1px solid #f2c8ce;color:#c84e59;white-space:nowrap}
.stock-remove-image:disabled{opacity:.38;cursor:not-allowed}
.stock-color-header,.stock-color-row{grid-template-columns:28px minmax(120px,1fr) minmax(73px,.55fr) minmax(90px,.7fr) minmax(195px,1.4fr) 74px;gap:7px}
@media(max-width:760px){
 .stock-main-photo-block{flex-basis:135px;min-width:100px;max-width:33%}
 .stock-main-photo-preview{height:92px!important}
 .stock-color-header,.stock-color-row{min-width:800px;grid-template-columns:25px 135px 75px 100px 250px 80px}
 .stock-modal-product{align-items:flex-start}
}
