.module-details{display:grid;gap:12px;margin-top:18px}
.module-details details{border:1px solid #dce6f2;border-radius:14px;background:#fff}
.module-details summary{cursor:pointer;padding:14px 16px;font-weight:800}
.module-details details[open] summary{border-bottom:1px solid #dce6f2}
.module-details .card-list{padding:12px}
.module-details .detail-actions{display:flex;gap:8px;padding:12px 12px 0}
.assortment-badge,.assortment-legend span{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-weight:700;font-size:12px}
.assortment-leader{background:#dcfce7!important;color:#166534!important}.assortment-core{background:#dbeafe!important;color:#1d4ed8!important}.assortment-chance{background:#fef3c7!important;color:#92400e!important}.assortment-exit{background:#ffedd5!important;color:#c2410c!important}.assortment-stop{background:#fee2e2!important;color:#991b1b!important}
.row-assortment-leader td:first-child{box-shadow:inset 5px 0 #22c55e}.row-assortment-core td:first-child{box-shadow:inset 5px 0 #3b82f6}.row-assortment-chance td:first-child{box-shadow:inset 5px 0 #eab308}.row-assortment-exit td:first-child{box-shadow:inset 5px 0 #f97316}.row-assortment-stop td:first-child{box-shadow:inset 5px 0 #dc2626}
.ai-assortment-card{border:2px solid #c4b5fd!important;background:#faf5ff!important}.ai-label{display:inline-block;background:#6d28d9;color:#fff;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}
.help-panel{margin:16px 0 22px;border:1px solid #bfd5ee;border-radius:16px;background:#f8fbff}.help-panel summary{cursor:pointer;padding:15px 18px;font-weight:800;color:#123a66}.help-panel[open] summary{border-bottom:1px solid #d7e5f4}.help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;padding:16px}.help-grid article{padding:13px;border:1px solid #dce8f5;border-radius:12px;background:#fff}.help-grid p,.help-hint{margin:6px 0 0;color:#52657a;line-height:1.45;font-size:13px}.help-hint{padding:0 18px 16px}
button[data-help]{position:relative}

[data-warehouse-page]:not(.is-active){display:none!important}
.warehouse-subnav{position:sticky;top:72px;z-index:90;border-bottom:1px solid #d8e4f0;background:rgba(255,255,255,.97);box-shadow:0 7px 22px rgba(31,66,105,.06);backdrop-filter:blur(10px)}
.warehouse-subnav-scroll{display:flex;gap:7px;width:min(1500px,94vw);margin:auto;padding:9px 0;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin}
.warehouse-subnav a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:42px;padding:9px 14px;border-radius:10px;color:#3e526b;text-decoration:none;font-size:13px;font-weight:750;white-space:nowrap;scroll-snap-align:start}
.warehouse-subnav a:hover{background:#f0f6fc;color:#146cb0}.warehouse-subnav a.active{background:#1976bd;color:#fff;box-shadow:0 5px 13px rgba(25,118,189,.2)}
.overview-actions{margin-top:12px}.overview-actions .panel-head{margin:0}.overview-actions p{margin:4px 0 0;color:#65738b}
.dialog-help{margin:14px 0 0;padding:10px 12px;border-radius:9px;background:#f1f6fb;color:#53677f;font-size:12px;line-height:1.45}
.action-dialog .dialog-head{align-items:flex-start}.action-dialog .dialog-head h2{margin-bottom:5px}.action-dialog .dialog-head p{max-width:600px;margin:0;color:#64748b;font-size:13px;line-height:1.45}.action-dialog-fields:empty{display:none}.action-dialog .check-label{display:flex;align-items:center;gap:9px;min-height:48px;padding:10px 12px;border:1px solid #d6e1ed;border-radius:9px;background:#f8fbff}.action-dialog .check-label input{flex:0 0 auto;width:20px;height:20px;margin:0}.action-dialog button.danger{background:#c62828;color:#fff}.action-dialog.danger-dialog{border-top:5px solid #dc2626}
.slot-monitor-card{border-left:4px solid #3b82f6}.slot-monitor-card.slot-slot_found{border-left-color:#16a34a;background:#f3fbf5}.slot-monitor-card.slot-moved{border-left-color:#16a34a;background:#eefbf2}.slot-monitor-card.slot-stopped{border-left-color:#94a3b8;background:#f8fafc}.slot-monitor-card.slot-expired{border-left-color:#f59e0b;background:#fffaf0}.slot-monitor-meta{margin-top:7px!important;color:#49627c!important;font-weight:700}

.cluster-panel-head{align-items:flex-start}.cluster-product-picker{width:min(520px,45vw)}.cluster-product-picker label{display:block;margin-bottom:6px;color:#64748b;font-size:12px;font-weight:800}.cluster-product-picker select{font-weight:700}
.cluster-product-overview{display:grid;grid-template-columns:minmax(280px,1.1fr) minmax(460px,1.8fr);gap:14px;margin:8px 0 12px;padding:15px;border:1px solid #cfe0f1;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#eef6ff)}
.cluster-overview-product{display:flex;align-items:center;gap:13px;min-width:0}.cluster-overview-product img{width:84px;height:84px;object-fit:contain;border:1px solid #d7e3ef;border-radius:11px;background:#fff}.cluster-overview-product h3{margin:7px 0 4px;font-size:18px}.cluster-overview-product p{margin:0;color:#64748b}.cluster-overview-metrics{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:8px}.cluster-overview-metrics div{padding:11px;border-radius:10px;background:#fff;border:1px solid #dde8f3}.cluster-overview-metrics small,.cluster-overview-metrics b{display:block}.cluster-overview-metrics small{color:#64748b;font-size:11px}.cluster-overview-metrics b{margin-top:4px;font-size:23px}.cluster-overview-metrics .accent{border-color:#f4cf79;background:#fff8df;color:#a84b00}.cluster-overview-metrics .purchase{border-color:#c9e8d2;background:#effaf2;color:#176b38}.cluster-season-summary{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:11px;border-top:1px solid #d8e5f2;color:#475569}.cluster-season-summary b{color:#9a5600}.cluster-season-summary span{font-size:12px}
.cluster-toolbar{position:sticky;top:72px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:9px;border:1px solid #d8e5f2;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 8px 24px rgba(32,73,115,.08);backdrop-filter:blur(8px)}.cluster-sort{display:flex;align-items:center;gap:6px}.cluster-sort span{margin:0 5px;color:#64748b;font-size:12px;font-weight:700}.cluster-sort button{padding:9px 12px}.cluster-sort button.active{background:#116dd5;color:#fff}
.cluster-recommendation-list{display:grid;gap:10px}.cluster-empty{padding:28px;border:1px dashed #b8cce0;border-radius:12px;text-align:center;color:#64748b}.cluster-recommendation{position:relative;display:grid;grid-template-columns:42px 1fr;border:1px solid #d9e5f0;border-radius:13px;overflow:hidden;background:#f8fbff}.cluster-recommendation.needs-supply{border-color:#eecb71}.cluster-rank{display:grid;place-items:center;background:#eaf1f8;color:#5d7188;font-size:18px;font-weight:900}.needs-supply .cluster-rank{background:#fff0bd;color:#9a5600}.cluster-recommendation-body{padding:14px}.cluster-recommendation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.cluster-recommendation h3{margin:0 0 7px;font-size:17px}.stock-line{display:flex;gap:14px;flex-wrap:wrap;color:#64748b;font-size:12px}.stock-line b{color:#253650}.supply-number{flex:0 0 112px;padding:9px 10px;border:1px solid #e1e8f0;border-radius:11px;background:#fff;text-align:center}.supply-number strong,.supply-number small{display:block}.supply-number strong{color:#64748b;font-size:34px;line-height:1}.supply-number small{margin-top:4px;color:#64748b;font-size:10px;font-weight:900}.needs-supply .supply-number{border-color:#f0d28a;background:#fffaf0;box-shadow:0 8px 18px rgba(183,104,0,.1)}.needs-supply .supply-number strong,.needs-supply .supply-number small{color:#b45309}
.cluster-calculation{display:flex;gap:18px;flex-wrap:wrap;margin:11px 0 8px;padding:9px 11px;border-radius:9px;background:#fff;color:#56677c;font-size:12px}.cluster-calculation b{color:#17233c;font-size:14px}.cluster-basis{margin:6px 0;color:#a05a00;font-size:12px;font-weight:800}.cluster-advice{margin:8px 0;padding:9px 11px;border:1px solid #bcd5f0;border-radius:8px;background:#f4f9ff;color:#1b568d;font-size:12px}.cluster-card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px;color:#64748b;font-size:12px}.cluster-card-actions button{padding:7px 9px;font-size:11px}
@media(max-width:1050px){.cluster-product-overview{grid-template-columns:1fr}.cluster-overview-metrics{grid-template-columns:repeat(2,1fr)}.cluster-toolbar{top:62px;align-items:stretch;flex-direction:column}.cluster-toolbar>.row-actions{justify-content:flex-end}}
@media(max-width:700px){.cluster-panel-head{display:block}.cluster-product-picker{width:100%;margin-top:12px}.cluster-overview-metrics{grid-template-columns:1fr 1fr}.cluster-season-summary,.cluster-card-actions,.cluster-recommendation-head{align-items:stretch;flex-direction:column}.cluster-sort{overflow-x:auto}.cluster-sort span{display:none}.cluster-sort button{white-space:nowrap}.supply-number{align-self:flex-start;min-width:112px}.cluster-recommendation{grid-template-columns:30px 1fr}.cluster-recommendation-body{padding:11px}.cluster-toolbar>.row-actions{justify-content:flex-start;flex-wrap:wrap}}

@media(max-width:760px){
  .warehouse-subnav{top:62px}.warehouse-subnav-scroll{width:100%;padding:7px 8px}.warehouse-subnav a{min-height:44px;padding:10px 13px}
  body[data-warehouse-page]:not([data-warehouse-page="overview"]) .hero{margin-bottom:8px}
  .hero{gap:13px}.hero h1{font-size:28px}.hero>div:first-child>p:last-child{font-size:13px}.hero-actions{display:grid;grid-template-columns:1fr}.hero-actions button{width:100%;min-height:46px;white-space:normal}
  .status{padding:7px 2px;font-size:12px}.panel{margin:10px 0;border-radius:13px;box-shadow:none}.panel-head h2{font-size:20px}.panel-head .row-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.panel-head .row-actions button{min-height:46px;padding:9px 11px}
  button,input,select,textarea{font-size:16px}button{min-height:44px}.item-card{align-items:stretch;flex-direction:column}.item-card .qty{font-size:24px}.item-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.item-actions .qty{grid-column:1/-1}.item-actions button{min-height:44px;font-size:13px}.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-details summary{min-height:52px;padding:16px}.module-details .detail-actions{display:grid;grid-template-columns:1fr;padding:10px}.module-details .detail-actions button{min-height:46px}
  dialog{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}dialog form{min-height:100%;padding:16px 14px 88px}.dialog-head{position:sticky;top:-16px;z-index:3;margin:-16px -14px 12px;padding:14px;background:#fff;border-bottom:1px solid #dce6f2}.dialog-head h2{margin:0;font-size:21px}.dialog-head .close{min-width:46px;min-height:46px}.form-grid{gap:14px}.form-grid input,.form-grid select,.form-grid textarea{min-height:48px}.dialog-actions{position:fixed;right:0;bottom:0;left:0;z-index:4;display:grid;grid-template-columns:1fr 1fr;margin:0;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce6f2}.dialog-actions button{min-height:50px}
}
.warning-text{color:#a34b00!important;font-weight:700}
