/* v125.0.0 build 34.5 — shared recovery layout and interaction contracts. */
:root{
  --recovery-page-gap:10px;
  --recovery-panel-radius:9px;
  --recovery-control-height:40px;
}
*{box-sizing:border-box}
.workspace-description,.inventory-v22-header p,.wr6-title>p{display:none!important}
.shell-version{display:flex;align-items:center;min-height:42px;padding:7px 9px;border-radius:7px;background:rgba(255,255,255,.045)}
.shell-version>span{display:grid;gap:2px}.shell-version strong{font-size:11px;color:#f5f8fb}.shell-version small{font:9px/1.2 var(--font-mono);color:#93a5b6}
.sidebar-collapsed .shell-version{display:none}

.startup{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(150deg,#eef3f8,#f8fafc)}
.startup-card{width:min(360px,100%);display:grid;justify-items:center;gap:12px;padding:28px;border:1px solid #d9e1ea;border-radius:14px;background:#fff;box-shadow:0 14px 42px rgba(18,40,65,.1)}
.startup-card img{width:66px;height:66px;object-fit:contain}.startup-card h1{margin:0;font-size:20px;color:#14263a}.startup-card p{min-height:20px;margin:0;color:#4f6174;font-size:13px;font-weight:600}.startup-card small{font:10px/1.2 var(--font-mono);color:#758599}
.startup-progress{width:100%;height:6px;overflow:hidden;border-radius:99px;background:#e5ebf1}.startup-progress i{display:block;height:100%;border-radius:inherit;background:#276dcc;transition:width .18s ease}

@media(min-width:761px){
  .main-content{padding:10px 12px 14px!important}
  .workspace-header,.inventory-v22-header,.wr6-header{min-height:58px!important;margin:0 0 8px!important;padding:5px 2px!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .orders-list-workspace,.inventory-v22-workspace,.collection-gate-store-panel,.collection-gate-editor,.user-management-surface{border:1px solid var(--ux-border)!important;border-radius:var(--recovery-panel-radius)!important;background:var(--ux-surface)!important;overflow:hidden}
  .orders-list-workspace{gap:0!important}.orders-list-panel,.orders-detail-panel{border:0!important;border-radius:0!important;background:#fff!important}.orders-list-splitter{background:var(--ux-border)!important}
  #page[data-page="inventory"]{padding:10px 12px 14px!important}.inventory-v22-page{height:100%!important;border-radius:0!important;background:transparent!important}.inventory-v22-workspace{margin-top:0}
  body[data-route="warehouse-reference"] .warehouse-r6{border-radius:0!important;background:transparent!important}
}

/* Administrator user management */
#page[data-page="user-management"]{display:grid;grid-template-rows:auto auto minmax(0,1fr);height:calc(100dvh - var(--topbar-height));min-height:0;overflow:hidden;gap:8px}
.user-management-toolbar{min-height:58px;display:grid;grid-template-columns:minmax(220px,1fr) 160px 150px auto;align-items:end;gap:8px;padding:8px;border:1px solid var(--ux-border);background:#fff}
.user-management-toolbar label{display:grid;gap:4px;margin:0}.user-management-toolbar label>span{font-size:9px;font-weight:700;color:var(--ux-ink-muted)}
.user-management-toolbar input,.user-management-toolbar select{height:40px;min-height:40px}.user-search{position:relative;display:flex!important;align-items:center;height:40px;min-height:40px;border:1px solid var(--ux-border-strong);border-radius:8px;overflow:hidden}.user-search>.app-icon{position:absolute;z-index:1;inset-inline-start:12px;width:18px;height:18px;color:var(--ux-ink-muted);pointer-events:none}.user-search input{width:100%;height:100%!important;min-height:0!important;border:0!important;padding-inline-start:40px!important;box-shadow:none!important}
.user-result-count{align-self:center;color:var(--ux-ink-muted);font-size:11px;white-space:nowrap}
.user-filter-button{display:none}
.user-management-surface{min-height:0;overflow:auto}.user-table{min-width:720px}.user-table-head,.user-row{display:grid;grid-template-columns:minmax(250px,1.4fr) 160px 130px 140px 90px;align-items:center;gap:10px;padding:8px 12px}.user-table-head{position:sticky;top:0;z-index:2;min-height:38px;border-bottom:1px solid var(--ux-border);background:#f5f7fa;color:var(--ux-ink-muted);font-size:9px;font-weight:800;text-transform:uppercase}.user-row{min-height:64px;border-bottom:1px solid var(--ux-border);background:#fff}.user-row:last-child{border-bottom:0}.user-identity{display:flex;align-items:center;gap:10px;min-width:0}.user-avatar{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#e7eff9;color:#1d5799;font-size:11px;font-weight:800}.user-identity>span:last-child{min-width:0;display:grid;gap:3px}.user-identity strong,.user-identity bdi{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-identity strong{font-size:12px}.user-identity strong small{padding:2px 5px;border-radius:9px;background:#e7eff9;color:#245f9f}.user-identity bdi,.user-last-sign-in{font-size:10px;color:var(--ux-ink-muted)}
.user-admin-form{width:min(520px,82vw);display:grid;gap:14px}.user-admin-form h2{margin:0}.user-admin-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.user-admin-fields label{display:grid;gap:5px;color:var(--ux-ink-muted);font-size:11px;font-weight:650}.user-active-toggle{grid-column:1/-1;display:flex!important;align-items:center;gap:9px;min-height:44px;padding:9px;border:1px solid var(--ux-border);border-radius:8px;background:#f7f9fb}.user-active-toggle input{width:18px;height:18px}.user-admin-form footer{display:flex;justify-content:flex-end;gap:8px;padding-top:12px;border-top:1px solid var(--ux-border)}

@media(max-width:760px){
  :root{--topbar-height:52px;--mobile-bottom-nav:0px}
  html,body,#app,.app-shell{height:100%;min-height:0;overflow:hidden}
  .shell-main{height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:var(--topbar-height) minmax(0,1fr)!important;overflow:hidden!important}
  .main-content{height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;align-content:stretch!important}
  #page{min-height:0}
  .workspace-header{min-height:44px!important;height:44px!important;max-height:44px!important;margin:0!important;padding:5px 8px!important;border:0!important;background:transparent!important;overflow:hidden}
  .workspace-title-row h1,.inventory-title-line h1,.wr6-title-row h1{font-size:17px!important;line-height:1.15!important}
  .workspace-meta{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* Collection owns every remaining pixel; rails and lines are independently reachable. */
  #page[data-page="collection"]{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:44px 52px minmax(0,1fr) 58px!important;padding:0 6px!important;overflow:hidden!important}
  #page[data-page="collection"]>.workspace-header{grid-row:1}
  .collection-header-summary{display:none!important}
  .collection-context-toolbar{grid-row:2;height:52px!important;min-height:52px!important;margin:0!important;padding:4px 0!important;border-block:1px solid var(--ux-border)!important;grid-template-columns:44px minmax(0,1fr) auto!important;gap:6px!important}
  .collection-context-toolbar>.button{width:44px!important;height:44px!important;min-width:44px!important}
  .collection-context-toolbar .order-context-switcher{min-width:0!important}.collection-context-toolbar .order-context-switcher select{width:100%;height:44px!important;min-height:44px!important}
  .collection-order-context{display:none!important}.collection-sync-chip{min-width:70px!important;max-width:84px;height:34px!important;padding:4px 6px!important}.collection-sync-chip small{display:none!important}
  .collection-gate-surface{grid-row:3;min-height:0!important;margin:6px 0!important;overflow:hidden!important}
  .collection-gate-workspace{height:100%!important;min-height:0!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:78px minmax(0,1fr)!important;gap:6px!important}
  .collection-gate-store-panel{min-height:0!important;display:grid!important;grid-template-rows:26px 52px!important;border:1px solid var(--ux-border)!important;border-radius:8px!important;overflow:hidden!important}
  .collection-gate-store-panel>header{height:26px!important;min-height:26px!important;padding:0 8px!important}.collection-gate-store-panel>header small{display:none!important}
  .collection-gate-store-list{min-height:0!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;scrollbar-width:thin!important}
  .collection-dispatch-group{display:contents!important}.collection-dispatch-group>header{display:none!important}
  .collection-gate-store{flex:0 0 86px!important;width:86px!important;min-width:86px!important;height:52px!important;min-height:52px!important}
  .collection-gate-editor{min-height:0!important;height:100%!important;display:grid!important;grid-template-rows:58px minmax(0,1fr)!important;border:1px solid var(--ux-border)!important;border-radius:8px!important;overflow:hidden!important}
  .collection-gate-editor-head{height:58px!important;min-height:58px!important;padding:6px 8px!important}.collection-gate-editor-head p{display:none!important}
  .collection-category-head{display:none!important}.collection-category-list{min-height:0!important;height:100%!important;padding:5px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
  .collection-category-row{min-height:116px!important;margin:0 0 5px!important;padding:7px!important;border:1px solid var(--ux-border)!important;border-radius:7px!important}
  .collection-gate-actionbar{grid-row:4;position:static!important;height:58px!important;min-height:58px!important;margin:0 -6px!important;padding:5px 6px!important;border-top:1px solid var(--ux-border)!important;background:#fff!important}
  .collection-gate-actionbar>div:first-child{display:none!important}.collection-gate-actionbar>div:last-child{width:100%!important}.collection-gate-actionbar .button.primary{width:100%!important;max-width:none!important;height:48px!important}
  .collection-operation-panel{position:fixed!important;inset-inline:8px!important;bottom:66px!important;margin:0!important;width:auto!important}

  /* Warehouse: visible title, compact pallet rail, full-height scrollable map. */
  body[data-route="warehouse-reference"] .main-content{height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important}
  body[data-route="warehouse-reference"] .warehouse-r6{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:50px minmax(0,1fr) 58px!important;overflow:hidden!important;background:var(--ux-canvas)!important}
  body[data-route="warehouse-reference"] .wr6-header{display:flex!important;grid-row:1;height:50px!important;min-height:50px!important;margin:0!important;padding:5px 8px!important;border:0!important;border-bottom:1px solid var(--ux-border)!important;background:transparent!important}
  .wr6-title-row{gap:6px!important}.wr6-title-row .wr6-badge{display:none!important}.wr6-summary{display:none!important}
  .warehouse-placement-toolbar{display:none!important}
  .warehouse-placement-workspace{grid-row:2;min-height:0!important;height:100%!important;padding:6px!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:112px minmax(0,1fr)!important;gap:6px!important;overflow:hidden!important}
  .warehouse-pallet-tray{height:112px!important;max-height:112px!important;min-height:0!important;display:grid!important;grid-template-rows:38px 74px!important;border-radius:8px!important}
  .warehouse-pallet-tray>header{height:38px!important;min-height:38px!important;padding:4px 7px!important}.warehouse-pallet-tray>header small{display:none!important}
  .warehouse-pallet-tray-scroll{min-height:0!important;height:74px!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;padding:4px!important;overscroll-behavior-x:contain;scrollbar-width:thin!important}
  .warehouse-pallet-token{flex:0 0 108px!important;width:108px!important;height:64px!important;min-height:64px!important;padding:5px 6px!important}
  .warehouse-placement-workspace>.wr6-map-panel{min-height:0!important;height:100%!important;display:block!important;overflow:hidden!important}
  .warehouse-placement-workspace>.wr6-map-panel>.placement-map-component{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;overflow:hidden!important}
  .placement-map-scroll{min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
  .warehouse-placement-workspace>.wr6-detail{display:none!important}.warehouse-placement-workspace.mobile-detail{grid-template-rows:minmax(0,1fr)!important}.warehouse-placement-workspace.mobile-detail>.warehouse-pallet-tray,.warehouse-placement-workspace.mobile-detail>.wr6-map-panel{display:none!important}.warehouse-placement-workspace.mobile-detail>.wr6-detail{display:grid!important;height:100%!important}
  .warehouse-placement-actionbar{grid-row:3;position:static!important;height:58px!important;min-height:58px!important;padding:5px 6px!important}
  .warehouse-placement-actionbar>div:first-child{max-width:42%!important}.warehouse-placement-actionbar .button{height:46px!important;min-height:46px!important}

  /* Inventory category routes always expose a real return to the full list. */
  #page[data-page="inventory"]{height:100%!important;min-height:0!important}.inventory-v22-page{height:100%!important;min-height:0!important}
  .inventory-mobile-back{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}

  #page[data-page="user-management"]{height:100%!important;grid-template-rows:44px 54px minmax(0,1fr)!important;padding:0 6px 6px!important;gap:5px!important}
  .user-management-toolbar{min-height:54px!important;height:54px!important;grid-template-columns:minmax(0,1fr) 44px!important;padding:5px!important;align-items:center!important}.user-management-toolbar>label:not(.user-search),.user-result-count{display:none!important}.user-management-toolbar .user-search{height:44px!important}.user-filter-button{display:grid!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
  .user-management-surface{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;border:0!important;background:transparent!important}.user-table{min-width:0!important}.user-table-head{display:none!important}.user-table-body{display:grid;gap:6px}.user-row{min-height:90px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;padding:9px;border:1px solid var(--ux-border);border-radius:8px}.user-row>span:nth-of-type(1),.user-row>span:nth-of-type(2),.user-last-sign-in{grid-row:2}.user-row>.button{grid-column:2;grid-row:1}.user-last-sign-in{display:none}.user-admin-form{width:100%;max-height:78dvh;overflow:auto}.user-admin-fields{grid-template-columns:1fr}.user-active-toggle{grid-column:1}.user-admin-form footer{position:sticky;bottom:0;background:#fff}
}

