/* One-handed scan desk: one input, one result surface, four persistent actions. */
body.scan-touch-desk #appView { grid-template-columns:minmax(0,1fr); }
body.scan-touch-desk #appView > .sidebar { display:none; }
body.scan-touch-desk.tablet-nav-open #appView > .sidebar { display:flex; flex-direction:column; position:fixed; inset:0 auto 0 0; width:240px; max-width:85vw; height:100dvh; z-index:2800; background:#fff; overflow:auto; }
body.scan-touch-desk.tablet-nav-open .sidebar .menu,body.scan-touch-desk.tablet-nav-open .sidebar .menu-section,body.scan-touch-desk.tablet-nav-open .sidebar .menu-group { display:block; }
body.scan-touch-desk.tablet-nav-open .sidebar .menu button { width:100%; min-height:44px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] { padding:0 12px var(--tablet-dock-space,100px); }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] > .topbar { display:flex; flex-wrap:nowrap; align-items:center; gap:8px; padding:8px 0; min-height:60px; }
body.scan-touch-desk .topbar > div:first-child { flex:1!important; min-width:0; }
body.scan-touch-desk .topbar h1,body.scan-touch-desk .topbar h2 { font-size:18px; white-space:nowrap; }
body.scan-touch-desk .topbar p,body.scan-touch-desk #stats,body.scan-touch-desk #pageHeaderActions { display:none!important; }
body.scan-touch-desk #tabletTools { margin:0; flex-wrap:nowrap; }
body.scan-touch-desk #tabletTools > button { display:none; }
body.scan-touch-desk #tabletTools > .tablet-menu-button { display:inline-flex; min-width:64px; min-height:44px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] > #content { padding:12px 0; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-input-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-height:0; padding:0 0 12px; }
body.scan-touch-desk .scan-input-label { display:none; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] #scanInput { min-height:46px; height:46px; padding:0 12px; font-size:16px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-query-actions { display:block; margin:0; padding:0; }
body.scan-touch-desk .scan-query-actions > button { display:none!important; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-query-actions > button[onclick="scanOrder()"] { display:block!important; min-height:46px; height:46px; padding:0 18px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] #scanResult { padding-top:12px; }
body.scan-touch-desk .scan-idle { min-height:180px; gap:8px; }
body.scan-touch-desk .tablet-work-dock { padding:7px 12px max(8px,env(safe-area-inset-bottom)); }
body.scan-touch-desk .tablet-dock-buttons { grid-template-columns:1.25fr 1fr 1fr .8fr; gap:6px; }
body.scan-touch-desk .tablet-dock-buttons button { min-height:48px; font-size:14px; padding:8px 4px; }
body.scan-touch-desk .tablet-dock-summary { margin-bottom:6px; gap:8px; }
body.scan-touch-desk .tablet-dock-summary strong { max-width:62%; }
body.scan-touch-desk .scan-result-time,body.scan-touch-desk #scanCurrentWorkflow,body.scan-touch-desk #scanOrderWorkspace > .scan-carrier-summary { display:none; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-result-head { padding:6px 0 10px; }
body.scan-touch-desk #appView .order-card .scan-card-head { padding:10px; gap:6px; grid-template-columns:minmax(0,1fr); }
body.scan-touch-desk .scan-card-head-meta,body.scan-touch-desk .scan-card-settlement .order-head-download { display:none; }
body.scan-touch-desk .scan-card-settlement:empty { display:none; }
body.scan-touch-desk .scan-card-head .order-seq { display:none; }
body.scan-touch-desk #appView .workspace .order-card .order-card-grid { display:grid; grid-template-columns:minmax(0,1fr); padding:10px; gap:10px; }
body.scan-touch-desk #appView .workspace .order-card .order-card-grid > * { grid-column:auto; grid-row:auto; min-width:0; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) :is(.order-context-cell,.order-proof-cell,.order-actions) { display:none; }
.scan-touch-card-toggle { display:none; }
body.scan-touch-desk button.scan-touch-card-toggle { display:block; width:100%; min-height:44px; border-top:1px solid var(--line); border-radius:0 0 8px 8px; color:var(--primary); background:#f6f8fb; }
body.scan-touch-desk .scan-batch-toolbar .scan-batch-actions { display:none; }
body.scan-touch-desk .scan-batch-toolbar { position:static!important; padding:8px; }
body.scan-touch-desk .scan-batch-selection { flex-wrap:wrap; }
body.scan-touch-desk .order-product-name { font-size:14px; }
body.scan-touch-desk .scan-missing-notice { padding:0; border:0; background:transparent; }
body.scan-touch-desk .scan-missing-notice__summary { display:flex; flex-wrap:wrap; gap:10px 20px; margin-bottom:12px; }
body.scan-touch-desk .scan-missing-notice__summary > div { flex:1 1 260px; }
body.scan-touch-desk .scan-missing-notice__title { gap:8px; font-size:16px; }
body.scan-touch-desk .scan-missing-notice__code { margin-block:6px; overflow-wrap:anywhere; }
body.scan-touch-desk .scan-missing-notice__actions { gap:6px; margin-top:6px; }
body.scan-touch-desk .scan-missing-notice__actions button { min-height:44px; padding:8px 12px; }
body.scan-touch-desk .scan-label-photo { gap:6px; padding:0; }
body.scan-touch-desk button.scan-label-photo__capture { min-width:0; min-height:44px; padding:8px 14px; font-size:14px; box-shadow:none; }
body.scan-touch-desk .scan-label-photo__actions > button { min-height:44px; }
body.scan-touch-desk .scan-label-photo__preview img { max-height:88px; max-width:130px; }
.scan-notice-customer-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.scan-missing-notice__layout { grid-template-columns:minmax(0,560px); }
.scan-missing-notice__selected { gap:8px; }
.scan-missing-notice__recipients { padding-top:12px; }
.scan-notice-customer-row button { min-height:44px; }
body.scan-touch-desk .scan-missing-notice__selected-card,body.scan-touch-desk .scan-missing-notice__selected-card .scan-customer-card { min-height:58px; }
body.scan-touch-desk .scan-missing-notice__recipient-list { max-height:110px; overflow:auto; }
body.scan-touch-desk .scan-missing-notice__send-row button { width:100%; min-height:48px; }
body.scan-touch-desk .scan-missing-notice__hint:empty { display:none; }
body.scan-touch-desk .scan-customer-quick { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:180px; gap:6px; }
body.scan-touch-desk .scan-customer-card { min-height:60px; padding:10px; }
.scan-customer-modal__card .erp-dialog-body { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.scan-customer-modal__grid { overflow:auto; min-height:0; padding-bottom:8px; grid-auto-rows:max-content; align-content:start; }
.scan-customer-quick { grid-auto-rows:max-content; }
/* Keep names readable when the scroll container has many customer rows. */
.scan-customer-card > strong { flex-shrink:0; white-space:normal; overflow-wrap:anywhere; color:#172b45; }
.scan-customer-card > small { flex-shrink:0; }
.scan-customer-modal__card #scanCustomerSearch { flex-shrink:0; min-height:44px; font-size:16px; }
.touch-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.touch-action-grid button { min-height:48px; min-width:0; white-space:normal; }
.touch-action-group { display:grid; gap:10px; padding-block:8px 16px; }
.touch-action-group > strong { overflow-wrap:anywhere; }
#touchScanActions .tablet-ops-body,#touchScanMore .tablet-ops-body { padding:14px; }
.tablet-camera-card { width:min(740px,calc(100vw - 16px)); max-height:calc(100dvh - 16px); }
.tablet-camera-body { display:flex; flex-direction:column; gap:10px; padding:12px; }
.tablet-camera-preview { flex:1 1 auto; min-height:100px; max-height:48dvh; aspect-ratio:4/3; }
.tablet-camera-guide { inset:17.5% 5%; }
#tabletCameraStatus { margin:0; min-height:22px; line-height:1.4; font-size:14px; }
.tablet-camera-device { display:block; margin:0; }
.tablet-camera-device select { width:100%; min-height:44px; font-size:16px; }
.tablet-camera-actions { display:flex; flex-wrap:wrap; gap:8px; }
.tablet-camera-actions > * { flex:1; min-height:44px; padding:8px; text-align:center; white-space:nowrap; font-size:14px; }
.tablet-camera-actions > [hidden] { display:none; }
.tablet-camera-zoom { display:flex; align-items:center; gap:12px; }
.tablet-camera-zoom[hidden] { display:none; }
.tablet-camera-zoom input { flex:1; min-width:0; min-height:36px; }
body.scan-touch-desk .scan-missing-notice__preview summary { min-height:44px; display:flex; align-items:center; }
body.scan-touch-desk.tablet-soft-keyboard .tablet-work-dock { display:none; }
@media(min-width:700px) {
 body.scan-touch-desk #appView .workspace .order-card .order-card-grid { grid-template-columns:minmax(190px,.65fr) minmax(0,1fr); }
 body.scan-touch-desk #appView .workspace .order-card .order-card-grid > :is(.order-actions,.order-context-cell,.order-proof-cell) { grid-column:1/-1; }
}
@media(max-height:560px) and (min-width:600px) {
 .tablet-camera-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(200px,.65fr); gap:8px 12px; }
 .tablet-camera-preview { grid-row:1/5; max-height:70dvh; height:100%; }
 .tablet-camera-actions { flex-wrap:wrap; }
}
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] > .topbar { flex-direction:row; text-align:left; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] > .topbar > div:first-child { text-align:left; }
body.scan-touch-desk #tabletTools { width:auto; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-input-field { display:block; }
body.scan-touch-desk #appView .topbar #tabletTools { flex:0 0 auto!important; width:max-content!important; max-width:none; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-card-head-meta { display:none; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-card .order-card-grid > :is(.sign-cell,.order-products-cell) { padding:0; border:0; gap:6px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-routing { flex-direction:row; flex-wrap:wrap; padding-top:4px; gap:6px; border:0; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-card .order-product-line { padding:0; gap:10px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-product-line-img,body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-product-img { width:64px; max-height:86px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-product-line { grid-template-columns:64px minmax(0,1fr); }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .order-product-title { font-size:14px; }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] .scan-card-ozon-status > strong { font-size:15px; }
.scan-missing-notice__selected { display:grid; align-content:start; }
.scan-missing-notice__selected > * { min-width:0; }
#scanMissingSendStatus:empty { display:none; }
body.scan-touch-desk .scan-missing-notice__recipient-list { min-height:32px; flex-shrink:0; }
body.scan-touch-desk .scan-missing-notice__recipient-list:empty { display:none; }
.touch-action-group > details > summary { min-height:44px; cursor:pointer; padding:10px 0; color:var(--muted); }
body.scan-touch-desk #appView .workspace[data-view="scanDesk"] #scanResult .scan-match-receipt { margin-bottom:4px; }

body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .scan-card-stock-tools > :not(.weight-guard-alert) { display:none; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .scan-card-stock-tools:not(:has(.weight-guard-alert)) { display:none; }

/* Keep the frequent restore action reachable in the collapsed touch card. */
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .order-actions:has(.oa-reset-state) { display:block; padding:0; border:0; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .order-actions > :not(.oa-primary-row):not(.tablet-order-common),
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .order-actions .oa-primary-row > :not(.oa-reset-state),
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .tablet-order-common > :is(span,small),
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .tablet-order-common > div > :not(.oa-reset-state) { display:none !important; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .order-actions :is(.oa-primary-row,.tablet-order-common > div) { display:flex; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .tablet-order-common { padding:0; margin:0; border:0; background:transparent; }
body.scan-touch-desk #appView .workspace .order-card:not([data-touch-expanded]) .order-actions button.oa-reset-state { width:100%; min-height:44px; padding:8px 12px; }
