/* Rack steel and beams are confined to the physical map; forms follow the ERP surface. */
.gs-page{padding:16px;min-width:0}.gs-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;padding:14px 16px;border-radius:10px;box-shadow:0 2px 8px #1b29400a}.gs-toolbar label,.gs-dialog-toolbar label{display:flex;align-items:center;gap:8px;font-size:13px;color:#64748b}.gs-toolbar select{min-width:190px}.gs-toolbar>input{flex:1;min-width:180px;max-width:360px}.gs-toolbar button,.gs-toolbar input,.gs-toolbar select{min-height:36px}.gs-view-filters{display:flex;gap:4px;flex-wrap:wrap}.gs-view-filters button{border:0;background:#f3f5f8;color:#64748b}.gs-view-filters button[aria-pressed=true]{background:#eaf1ff;color:#165dff}.gs-view-filters span{margin-left:4px;font-size:12px}.gs-summary{display:flex;gap:24px;color:#7a879a;font-size:13px;margin:18px 2px}.gs-summary strong{color:#334155;margin-right:3px}.gs-racks{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;align-items:start}.gs-racks>.empty{grid-column:1/-1;background:white;padding:50px 20px}.gs-rack-card{display:flex;flex-direction:column;gap:16px;padding:20px 22px;background:#fff;border:0;text-align:left;min-width:0;border-radius:12px;box-shadow:0 3px 14px #152b4510;transition:box-shadow .15s,transform .15s;color:#243348}.gs-rack-card:hover{background:#fff;box-shadow:0 6px 22px #152b4520;transform:translateY(-2px)}.gs-rack-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.gs-rack-heading>strong{font-size:20px;letter-spacing:.3px}.gs-rack-heading>span{font-size:12px;color:#8894a5}/* Preview rows represent occupied rows, while the editable rack keeps its full dimensions. */
.gs-rack-display{height:calc(clamp(48px,calc(var(--gs-display-rows,5)*29px + 20px),190px) + 56px);display:flex;flex-direction:column;justify-content:space-between;gap:12px;min-width:0}
.gs-mini-rack{display:flex;flex-direction:column;flex-shrink:0;gap:var(--gs-preview-gap,7px);padding:10px 8px;border-left:7px solid #53657b;border-right:7px solid #53657b;background:linear-gradient(100deg,#edf1f5,#f8fafc 50%,#e8edf2);box-shadow:inset 3px 0 3px #253a5520,inset -3px 0 3px #253a5520;height:clamp(48px,calc(var(--gs-preview-rows)*29px + 20px),190px);box-sizing:border-box;position:relative}
.gs-mini-rack:after{content:"";position:absolute;inset:auto -10px -4px;height:5px;background:#415469;border-radius:2px}
.gs-mini-row{display:flex;align-items:flex-end;gap:3px;padding:0 2px var(--gs-preview-padding,2px);border-bottom:var(--gs-preview-beam,4px) solid #8194a9;box-shadow:0 2px 0 #53657a;flex:1;min-height:0}
.gs-mini-row i{display:block;flex:1;min-width:0;height:65%;max-height:15px;border-radius:2px;background:#dbe3ec}
.gs-mini-row i.filled{background:linear-gradient(120deg,#8ba7c6,#617f9f);box-shadow:inset -2px 0 #3e60842a,inset 0 2px #b9cde2}
.gs-rack-meta{display:flex;justify-content:space-between;font-size:12px;color:#788598;gap:8px;flex-wrap:wrap}.gs-rack-meta b{font-weight:600;color:#334155}.gs-rack-open{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#165dff}.gs-unplaced{display:flex;align-items:center;gap:12px;text-align:left;min-width:0;padding:16px;border:0;background:white;box-shadow:0 2px 10px #152b4510}.gs-unplaced img,.gs-no-image{width:52px;height:68px;object-fit:contain;flex-shrink:0;background:#f3f5f8;border-radius:5px}.gs-unplaced>span:not(.gs-no-image){min-width:0;display:grid;gap:7px;flex:1}.gs-unplaced strong{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.gs-unplaced small{color:#8390a2;font-size:11px}.gs-unplaced b{font-size:18px;color:#334155}.gs-unplaced em{font-style:normal;font-size:12px;color:#165dff;white-space:nowrap}
.gs-mask{z-index:2800;padding:24px;background:#17233770;backdrop-filter:blur(3px)}
.gs-mask .gs-dialog{display:flex;flex-direction:column;max-width:1520px;width:96vw;height:calc(100dvh - 48px);max-height:980px;background:#f4f6f9;border-radius:14px;box-shadow:0 22px 70px #0d172e40;min-width:0;overflow:hidden}
.gs-dialog-head{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px 24px;background:#fff;flex-shrink:0}
.gs-dialog-head span{font-size:12px;color:#7d899b}.gs-dialog-head h2{font-size:23px;margin:4px 0 0;color:#263549;font-weight:650}
.gs-dialog-head .actions{display:flex;align-items:center;gap:10px}.gs-dialog-head button[data-gs-close]{font-size:22px;min-width:36px;padding:0;background:#f2f4f7;border:0}
.gs-dialog-toolbar{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;flex-shrink:0;padding:10px 24px;background:#fff;border-top:1px solid #f2f4f7;border-bottom:1px solid #e7ecf2;font-size:12px;color:#7d899b}
.gs-row-options{display:flex;flex-wrap:wrap;align-items:center;gap:14px;flex-shrink:0}.gs-row-options label{white-space:nowrap;flex:none}.gs-row-options select{width:auto;min-width:108px;max-width:160px;flex:none;min-height:36px;margin:0}.gs-row-options [data-gs-positions-count]{white-space:nowrap;padding:5px 9px;background:#f4f6f9;border-radius:5px;line-height:1.6}
.gs-legend{display:flex;align-items:center;gap:7px;margin-left:auto;white-space:nowrap}.gs-legend i{width:8px;height:8px;background:#165dff;border-radius:2px;margin-left:10px}.gs-legend i.gs-legend-empty{background:#cbd5e1}.gs-legend i.warn{background:#d87545}
.gs-dialog-workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:0;flex:1;overflow:hidden}
.gs-board{padding:18px;overflow:auto;min-width:0;min-height:0;overscroll-behavior:contain;scrollbar-width:auto;scrollbar-color:#8294ab #e7ecf2}
.gs-shelf-frame{position:relative;border-left:11px solid #53657a;border-right:11px solid #53657a;background:linear-gradient(90deg,#e0e6ed,#eff2f6 45%,#e2e7ee);padding:6px 0;box-shadow:inset 4px 0 4px #20324c25,inset -4px 0 4px #20324c25,0 6px 14px #21395216;border-radius:4px}
.gs-shelf-frame:before,.gs-shelf-frame:after{content:"";position:absolute;inset:8px auto 12px -8px;width:3px;background:repeating-linear-gradient(to bottom,#263b5440 0 4px,transparent 4px 22px)}.gs-shelf-frame:after{left:auto;right:-8px}
.gs-shelf-row{padding-top:8px;margin:0 0 8px;min-width:0}.gs-row-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 12px 8px}.gs-row-heading h3{font-size:13px;font-weight:650;color:#43556d;margin:0}.gs-row-heading>span{font-size:11px;color:#63758c;font-variant-numeric:tabular-nums}
.gs-row-scroll{overflow-x:auto;overscroll-behavior-x:contain;padding:0 12px 4px;scrollbar-width:none}.gs-row-scroll::-webkit-scrollbar{display:none}
.gs-row-slots{display:grid;grid-auto-columns:210px;grid-auto-flow:column;gap:8px;width:max-content;min-width:100%;align-items:stretch}
.gs-cell{position:relative;display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:10px;min-width:0;min-height:148px;padding:26px 10px 10px;background:#ffffffed;color:#334155;border:1px solid transparent;border-radius:7px;text-align:left;box-shadow:0 3px 6px #20344b0c;transition:background .1s;box-sizing:border-box}
.gs-cell:hover{background:white;box-shadow:0 0 0 1px #165dff70}.gs-cell.selected{border-color:#165dff;background:#f3f7ff;box-shadow:inset 0 0 0 1px #165dff}
.gs-slot-number{position:absolute;top:5px;left:10px;font-size:12px;font-weight:650;color:#64748b;font-variant-numeric:tabular-nums}
.gs-cell img,.gs-cell .gs-box{height:112px;width:84px;object-fit:contain;background:#f6f8fa;border-radius:4px}
.gs-cell-info{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}.gs-cell-name{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.45;overflow-wrap:anywhere;max-width:100%}
.gs-cell-stock{font-size:25px;font-weight:650;line-height:1.15;color:#26364e;overflow-wrap:anywhere}.gs-cell-stock small{font-size:11px;margin-left:4px;color:#7d899b;font-weight:400}
.gs-cell.empty-slot{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;background:#ffffff55;box-shadow:none;border:1px dashed #a6b5c5;color:#8b98a8}.gs-empty-plus{font-size:25px;color:#9aabbd}.gs-cell.conflict{background:#fff4eb;border-color:#d99764}.gs-cell em{font-size:10px;font-style:normal;color:#b86835}.gs-cell.negative .gs-cell-stock{color:#dc4b43}.gs-box{display:flex;align-items:center;justify-content:center;font-size:12px;color:#93a2b4;background:#e4eaf1}
/* Explicit range controls stay visible regardless of macOS/Windows scrollbar settings. */
.gs-row-navigation{display:flex;align-items:center;gap:10px;margin:6px 12px 0;padding:4px 6px;background:#d2dce7;border:1px solid #b7c5d5;border-bottom:3px solid #7589a0;border-radius:6px}
.gs-row-navigation button{display:flex;align-items:center;justify-content:center;font-size:27px;line-height:1;min-width:32px;width:32px;min-height:30px;height:30px;padding:0;background:#fff;color:#476482;border:1px solid #a9bacd;border-radius:5px;flex-shrink:0}.gs-row-navigation button:disabled{opacity:.45;cursor:default}
.gs-row-navigation input[type=range]{appearance:none;-webkit-appearance:none;flex:1;min-width:0;width:100%;height:30px;min-height:30px;padding:0;margin:0;border:0;box-shadow:none;cursor:ew-resize;background:transparent;accent-color:#165dff}
.gs-row-navigation input[type=range]::-webkit-slider-runnable-track{height:10px;border-radius:6px;background:#a6b8cc;box-shadow:inset 0 1px 3px #53657a20}
.gs-row-navigation input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:50px;height:20px;margin-top:-5px;border-radius:6px;background:#416b9d;border:2px solid #fff;box-shadow:0 1px 3px #23395240}
.gs-row-navigation input[type=range]::-moz-range-track{height:10px;border-radius:6px;background:#a6b8cc}.gs-row-navigation input[type=range]::-moz-range-thumb{width:46px;height:16px;border-radius:6px;background:#416b9d;border:2px solid #fff}.gs-row-navigation input:disabled{opacity:.5;cursor:default}.gs-row-navigation input:focus-visible{outline:2px solid #165dff;outline-offset:2px}
.gs-editor{background:#fff;overflow-y:auto;padding:16px 18px;min-height:0;overscroll-behavior:contain;border-left:1px solid #e5eaf0;display:flex;flex-direction:column;gap:12px;scrollbar-width:auto;scrollbar-color:#8294ab #eef2f7}
.gs-editor-empty{color:#8794a6;text-align:center;padding:40px 8px}.gs-editor-location{font-size:12px;font-weight:650;color:#165dff;padding:7px 10px;background:#edf3ff;border-radius:6px;flex-shrink:0}
.gs-editor-product{display:flex;gap:10px;min-width:0;align-items:flex-start}.gs-editor-product img{height:96px;width:72px;object-fit:contain;background:#f4f6f9;border-radius:5px;flex-shrink:0}.gs-editor-product h3{font-size:14px;line-height:1.45;margin:0 0 6px;overflow-wrap:anywhere;color:#334155}.gs-editor-product small{color:#8190a3;font-size:11px;overflow-wrap:anywhere}
.gs-editor-stock{display:flex;align-items:baseline;gap:6px;padding:0 2px;color:#8290a3;font-size:12px}.gs-editor-stock strong{font-size:26px;color:#26364e;line-height:1;font-weight:650;margin-left:auto}
.gs-editor label{display:grid;gap:6px;font-size:12px;color:#64748b}.gs-editor input,.gs-editor select{min-width:0;width:100%;min-height:36px;box-sizing:border-box}.gs-editor form{display:grid;gap:9px;background:#f6f8fb;border:1px solid #e7ecf2;border-radius:9px;padding:12px;margin:0}
.gs-editor .gs-count-label,.gs-editor form>label:not(.gs-count-label){grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}.gs-count-label input{font-size:23px;text-align:center;height:42px;font-weight:650;color:#26364e;background:white}
.gs-quick-count{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.gs-quick-count button{font-size:13px;padding:6px 4px;min-height:34px;background:#e9eef5;border:0}.gs-save-count{display:grid;grid-template-columns:1fr 1fr;gap:6px}.gs-save-count button{padding:8px 3px;min-height:38px;font-size:12px;white-space:nowrap}
.gs-editor-section{padding-top:12px;border-top:1px solid #e7ecf2;display:flex;flex-direction:column;gap:9px}.gs-editor-section h4{font-size:13px;color:#334155;margin:0}.gs-move-fields{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:7px}.gs-editor-section>button{min-height:36px}.gs-editor>[data-gs-clear]{flex-shrink:0;font-size:12px;background:#fff3f2;border:1px solid #f5dcda;color:#ce5148;padding:7px 10px;min-height:34px;border-radius:6px}
.gs-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;padding:9px 24px;flex-shrink:0;border-top:1px solid #e5eaf0;font-size:12px;color:#778598;min-height:50px;box-sizing:border-box}.gs-dialog-footer>span{overflow-wrap:anywhere}
.gs-pick-items{display:flex;flex-direction:column;gap:8px}.gs-pick-items button{display:grid;gap:5px;text-align:left;background:#f5f7fa;border:0;padding:12px}.gs-pick-items strong{font-size:13px;font-weight:500;line-height:1.5}.gs-pick-items small{font-size:11px;color:#8995a4}.gs-conflict-note,[data-gs-occupant]{background:#fff2e7;padding:12px;color:#b56e38;border-radius:6px;font-size:12px;line-height:1.6}.gs-conflict-items{display:flex;flex-direction:column;gap:6px}.gs-conflict-items button{font-size:12px;white-space:normal;text-align:left}.gs-empty-slot-detail{font-size:21px;color:#8795a6;padding:20px 0}.gs-mask button:focus-visible,.gs-page button:focus-visible{outline:2px solid #165dff;outline-offset:3px}
@media(max-width:1050px){.gs-dialog-workspace{grid-template-columns:minmax(0,1fr) 290px}.gs-board{padding:14px 10px}.gs-editor{padding:14px 12px}.gs-page{padding:12px}.gs-toolbar{gap:8px}.gs-mask{padding:12px}.gs-mask .gs-dialog{width:98vw;height:calc(100dvh - 24px);max-height:980px}.gs-dialog-toolbar{gap:10px}.gs-drag-hint{display:none}}
@media(max-width:680px){.gs-page{padding:10px}.gs-toolbar{padding:12px;gap:10px}.gs-toolbar>label{width:100%}.gs-toolbar select{flex:1}.gs-view-filters{width:100%;flex-wrap:nowrap}.gs-view-filters button{flex:1;font-size:12px;padding:7px 4px}.gs-toolbar>input{max-width:none;flex-basis:100%;width:100%;min-width:0}.gs-racks{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gs-rack-card{padding:14px 12px;gap:12px}.gs-rack-heading{flex-wrap:wrap}.gs-rack-heading>strong{font-size:17px}.gs-mini-rack{padding:8px 4px;height:clamp(42px,calc(var(--gs-preview-rows)*22px + 16px),150px);gap:min(5px,var(--gs-preview-gap,5px));border-left-width:6px;border-right-width:6px}.gs-mini-row{gap:2px;border-bottom-width:min(3px,var(--gs-preview-beam,3px));padding-bottom:var(--gs-preview-padding,2px)}.gs-mini-row i{max-height:11px}.gs-rack-meta{font-size:11px;gap:6px}.gs-summary{gap:12px;font-size:11px;flex-wrap:wrap}.gs-unplaced{grid-column:1/-1;padding:12px}.gs-mask{padding:0}.gs-mask .gs-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.gs-dialog-head{padding:10px 14px}.gs-dialog-head h2{font-size:20px}.gs-dialog-toolbar{padding:8px 12px;gap:8px}.gs-row-options{gap:8px;flex:1}.gs-row-options label{font-size:12px}.gs-row-options select{min-width:94px}.gs-row-options [data-gs-positions-count]{font-size:11px;padding:4px 6px}.gs-legend{display:none}.gs-dialog-workspace{display:flex;flex-direction:column;overflow:auto}.gs-board{padding:12px 8px;flex:none;max-height:42dvh;overflow-y:auto}.gs-editor{padding:14px;overflow:visible;flex:none;border-left:0;border-top:1px solid #e5eaf0}.gs-editor-empty{padding:14px 0}.gs-shelf-frame{border-left-width:8px;border-right-width:8px}.gs-row-slots{grid-auto-columns:184px;gap:7px}.gs-cell{grid-template-columns:72px minmax(0,1fr);gap:8px;min-height:130px;padding:24px 8px 8px}.gs-cell img,.gs-cell .gs-box{width:72px;height:96px}.gs-cell-stock{font-size:23px}.gs-cell-name{font-size:11px}.gs-row-heading{margin:0 8px 8px}.gs-row-scroll{padding:0 8px 4px}.gs-row-navigation{margin:5px 8px 0;gap:8px;padding:2px 4px}.gs-dialog-footer{padding:8px 14px;padding-bottom:max(8px,env(safe-area-inset-bottom));min-height:54px}.gs-mask button,.gs-mask input,.gs-mask select,.gs-page button{min-height:44px}.gs-row-navigation input[type=range]{height:36px;min-height:36px}.gs-row-navigation button{min-width:40px;width:40px;min-height:40px}.gs-save-count button{font-size:13px}.gs-editor-stock{padding:2px 0}.gs-editor-product img{height:88px;width:66px}.gs-editor-location{padding:8px 10px}.gs-dialog-workspace:has(.gs-editor input:focus){scroll-padding-bottom:20px}.gs-conflict-items button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.gs-rack-card,.gs-cell{transition:none}.gs-rack-card:hover{transform:none}}

.gs-dialog-toolbar label{white-space:nowrap}.gs-dialog-toolbar select{flex-shrink:0}
.gs-cell[draggable="true"]{cursor:grab;-webkit-touch-callout:none;user-select:none}
.gs-cell img{pointer-events:none;-webkit-user-drag:none}
.gs-cell.gs-drag-source{opacity:.45;cursor:grabbing}
.gs-cell.gs-drop-target{background:#e9f6ef;box-shadow:inset 0 0 0 3px #26965f}
.gs-cell.gs-drop-conflict{background:#fff1e5;box-shadow:inset 0 0 0 3px #d98331}
.gs-drag-active .gs-cell{cursor:grabbing}
.gs-cell.gs-drag-ghost{position:fixed;width:184px;min-width:184px;max-height:170px;z-index:5000;pointer-events:none;opacity:.9;box-shadow:0 12px 32px #1e33544d;background:white;transform:rotate(-3deg);box-sizing:border-box}
.gs-drag-hint{color:#7d8da2;font-size:12px}
@media(max-width:600px){.gs-drag-hint{display:none}}

.gs-editor [data-gs-print]{width:100%;color:#165dff;background:#edf3ff;border-color:#dce7ff}.gs-editor-section>small{display:block;font-size:11px;line-height:1.6;color:#7d899b;margin:0}

/* Keep the chat launcher from covering rack controls; it returns when the rack closes. */
body:has(.gs-mask) .wchat-launcher{visibility:hidden;pointer-events:none}
.gs-mask .gs-editor form .gs-count-label input[type=number][data-gs-count]{font-size:23px;font-weight:650}
@media(max-width:680px){.gs-rack-display{height:calc(clamp(42px,calc(var(--gs-display-rows,5)*22px + 16px),150px) + 74px)}}
