.menu-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}

/* Screenshot-matched classic shop layout. Keep the page width; only compact the controls. */
.button.compact{padding:7px 9px;font-size:11px;gap:5px}.button.compact i{width:14px;height:14px}
.shop-classic{overflow:hidden}.classic-merchants{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:7px 9px 0;background:#f7f9fa;border-bottom:1px solid var(--line)}
.classic-merchants .store-tab{border:1px solid #d3dce0;border-bottom:0;border-radius:3px 3px 0 0;padding:7px 5px;text-align:center;font-size:12px}.classic-merchants .store-tab.active{border-top:2px solid var(--accent);background:#fff;color:var(--accent-deep)}
.classic-menus{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:8px 9px;border-bottom:1px solid var(--line);background:#fff}.classic-menus .menu-tab{padding:7px 4px;text-align:center;border-radius:3px;font-size:12px}.classic-menus .menu-tab.active{background:var(--nav);border-color:var(--nav);color:#fff}
.classic-workspace{display:grid;grid-template-columns:86px minmax(0,1fr);min-height:620px}.classic-branches{display:grid;align-content:start;gap:2px;padding:8px 6px;background:#f7f9fa;border-right:1px solid var(--line)}.classic-branches .branch-tab{padding:6px 3px;text-align:center;border-radius:2px;font-size:12px}.classic-branches .branch-tab.active{background:#fff5f1;border-color:#e3a18d;color:var(--accent-deep)}
.classic-content{min-width:0;display:grid;grid-template-rows:auto minmax(210px,1fr) auto;overflow:hidden}.classic-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line)}.classic-list-head h2,.classic-catalog-head h2{font-size:15px;margin:0}.classic-list-head p,.classic-catalog-head p{font-size:11px;color:var(--muted);margin:3px 0 0}.classic-list-head .search{width:230px}.classic-product-scroll{min-height:0;max-height:390px;overflow:auto}.classic-product-scroll .data-table{min-width:650px}.classic-product-scroll .shop-table td{height:54px;padding:9px 10px}.classic-product-scroll .shop-number{width:74px}
.classic-catalog{border-top:1px solid var(--line);padding:12px 14px;display:grid;grid-template-rows:auto auto minmax(120px,210px) auto;min-height:280px;overflow:hidden}.classic-catalog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.classic-catalog-head .shop-type-tabs{padding:0;border:0;display:flex;gap:2px}.classic-catalog-head .tab{font-size:11px;padding:6px 8px}.classic-catalog>.search{width:260px;margin:10px 0}.classic-catalog .catalog-list{max-height:none;min-height:0;overflow:auto}.classic-catalog .catalog-item{padding:7px 8px}.classic-catalog .catalog-item b{font-size:12px}.classic-catalog .catalog-item small{font-size:10px}.classic-catalog .selected-product{margin-top:8px;padding:7px 9px}.classic-catalog .shop-fields{margin-top:7px}.classic-catalog .shop-fields input{padding:7px}.classic-catalog .shop-fields .button{padding:8px 10px}
@media(max-width:700px){.classic-workspace{grid-template-columns:72px minmax(0,1fr)}.classic-list-head{display:block}.classic-list-head .search{width:100%;margin-top:8px}.classic-catalog-head{display:block}.classic-catalog-head .shop-type-tabs{margin-top:8px}.classic-catalog>.search{width:100%}}

/* Shop tree + split workspace */
.shop-shell{display:grid;grid-template-columns:232px minmax(0,1fr);height:calc(100vh - 205px);min-height:560px;max-height:760px}
.shop-category-sidebar{min-width:0;overflow-y:auto;background:#f7f9fa;border-right:1px solid var(--line);padding:16px 13px}
.shop-side-title{font-size:15px;font-weight:800;padding:0 5px 14px;border-bottom:1px solid var(--line)}
.shop-side-section{padding:15px 0;border-bottom:1px solid var(--line)}
.shop-side-label{font-size:11px;color:#7c8992;font-weight:800;margin:0 5px 8px}
.store-tabs,.menu-tabs,.shop-branch-list{display:grid;gap:5px;padding:0;background:transparent;border:0}
.store-tab,.menu-tab,.branch-tab{width:100%;text-align:left;border:1px solid #dce2e6;background:#fff;color:#52626d;border-radius:5px;padding:9px 10px;font-size:12px;white-space:nowrap}
.store-tab.active,.menu-tab.active,.branch-tab.active{background:#fff4ef;border-color:#e9a087;color:var(--accent-deep);font-weight:800}
.shop-side-path{padding:15px 5px 4px;color:#89949b;font-size:10px;line-height:1.5}.shop-side-path span,.shop-side-path b{display:block}.shop-side-path b{color:var(--ink);font-size:11px;margin-top:4px}
.shop-main{min-width:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.shop-main-head{display:flex;justify-content:space-between;align-items:center;padding:17px 20px 14px;border-bottom:1px solid var(--line)}
.shop-main-head h2{font-size:16px;margin:0}.shop-main-head p{font-size:12px;color:var(--muted);margin:4px 0 0}
.shop-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 370px;min-height:0;overflow:hidden}
.shop-list-panel{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;border-right:1px solid var(--line)}
.shop-product-scroll{min-height:0;overflow:auto}.shop-product-scroll .data-table{min-width:640px}
.shop-add-panel{min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}.shop-add-body{min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:14px 16px}.catalog-list{max-height:none;min-height:0;overflow:auto}
.drop-uploader{padding:18px 20px;margin-bottom:16px}.drop-upload-copy{display:flex;gap:12px;align-items:center;margin-bottom:17px}.drop-upload-copy h2{font-size:16px;margin:0}.drop-upload-copy p{font-size:12px;color:var(--muted);margin:4px 0 0}.drop-upload-form{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.drop-file-field{display:grid;gap:6px;font-size:12px;color:#52616b;font-weight:700}.drop-file-field input{width:100%;border:1px solid var(--line);border-radius:5px;padding:9px;background:#fff;font-size:12px}.drop-file-field small{font-size:11px;color:var(--muted);font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drop-history{overflow:hidden}.drop-record-scroll{max-height:560px;overflow:auto}.drop-record-table{min-width:920px}.drop-record-actions{display:flex;justify-content:flex-end;gap:6px}.drop-record-actions .button{padding:8px 10px;font-size:11px;white-space:nowrap}
.page-heading{margin-bottom:16px;align-items:center}.page-heading h1{font-size:26px;margin-bottom:3px}.page-heading p{font-size:12px}.heading-actions{gap:6px}.heading-actions .button{padding:9px 11px;font-size:12px}
@media(max-width:1050px){.shop-main-grid{grid-template-columns:minmax(0,1fr) 320px}.shop-shell{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:800px){.shop-shell{height:auto;max-height:none;grid-template-columns:1fr}.shop-category-sidebar{max-height:330px;border-right:0;border-bottom:1px solid var(--line)}.shop-main-grid{grid-template-columns:1fr}.shop-list-panel{border-right:0;border-bottom:1px solid var(--line);min-height:420px}.shop-add-panel{min-height:500px}.drop-upload-form{grid-template-columns:1fr}.drop-record-scroll{max-height:420px}}

/* Keep the previous rail width and only compact/reflow its category controls. */
.shop-category-sidebar .store-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
.shop-category-sidebar .menu-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:0;background:transparent;border:0}
.shop-category-sidebar .store-tab,.shop-category-sidebar .menu-tab{min-width:0;padding:6px 1px;text-align:center;font-size:10px;line-height:1.25;white-space:normal;border-radius:3px}
.shop-category-sidebar .shop-branch-list{gap:3px}
.shop-category-sidebar .branch-tab{padding:6px 4px;text-align:center;font-size:11px;border-radius:3px}
.shop-category-sidebar .shop-side-section{padding:11px 0}
.shop-category-sidebar .shop-side-label{font-size:10px;margin-bottom:6px}
