/* =====================================================================
   AWMS Design System v2  ·  2026-10
   Visual layer only. Loaded last (after awm.css / po.css / awm-ux.css).
   - Inter variable font (self-hosted)  - Lucide icons (assets/awm-icons.js)
   - Semantic status colours            - Toasts, modal and page motion
   - Tables that never break words      - Phone-first layout + bottom nav
   Selectors are prefixed with ":root" so they win over the older,
   heavily !important rules in awm.css without touching that file.
   ===================================================================== */

@font-face{font-family:"InterVar";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"InterVar";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin-ext.woff2") format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --t-font:"InterVar",Inter,"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  --t-bg:#f3f5f9;
  --t-surface:#ffffff;
  --t-surface-2:#f8fafc;
  --t-surface-3:#f1f4f9;
  --t-line:#e4e8ef;
  --t-line-2:#d0d6e1;
  --t-text:#101828;
  --t-text-2:#344054;
  --t-muted:#667085;
  --t-faint:#98a2b3;
  --t-brand:#2563eb;
  --t-brand-600:#1d4ed8;
  --t-brand-700:#1e40af;
  --t-brand-50:#eff4ff;
  --t-brand-100:#dbe6fe;
  --t-ring:0 0 0 4px rgba(37,99,235,.16);
  --t-nav:#0c1424;
  --t-nav-2:#111b2e;
  --t-nav-text:#aab4c5;
  --t-org:var(--org-color,#2563eb);
  --t-r-sm:8px; --t-r:10px; --t-r-lg:14px; --t-r-xl:18px;
  --t-sh-xs:0 1px 2px rgba(16,24,40,.05);
  --t-sh-sm:0 1px 3px rgba(16,24,40,.08),0 1px 2px rgba(16,24,40,.04);
  --t-sh-md:0 6px 16px -4px rgba(16,24,40,.10),0 2px 6px -2px rgba(16,24,40,.05);
  --t-sh-lg:0 24px 48px -12px rgba(16,24,40,.22);
  --t-ease:cubic-bezier(.2,.8,.2,1);
  /* semantic tones: text / background / ring */
  --ok:#067647;   --ok-bg:#ecfdf3;   --ok-ring:#abefc6;   --ok-dot:#17b26a;
  --warn:#b54708; --warn-bg:#fffaeb; --warn-ring:#fedf89; --warn-dot:#f79009;
  --bad:#b42318;  --bad-bg:#fef3f2;  --bad-ring:#fecdca;  --bad-dot:#f04438;
  --info:#175cd3; --info-bg:#eff8ff; --info-ring:#b2ddff; --info-dot:#2e90fa;
  --vio:#5925dc;  --vio-bg:#f4f3ff;  --vio-ring:#d9d6fe;  --vio-dot:#7a5af8;
  --org2:#c4320a; --org2-bg:#fef6ee; --org2-ring:#f9dbaf; --org2-dot:#ef6820;
  --neu:#344054;  --neu-bg:#f2f4f7;  --neu-ring:#e4e7ec;  --neu-dot:#98a2b3;
  --bg:var(--t-bg); --line:var(--t-line); --text:var(--t-text); --muted:var(--t-muted); --brand:var(--t-brand); --brand2:var(--t-brand-600);
}

/* ---------------------------------------------------------------- base */
:root body{font-family:var(--t-font)!important;background:var(--t-bg)!important;color:var(--t-text);font-size:14px;line-height:1.5;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","tnum" 0;text-rendering:optimizeLegibility}
:root body :is(button,input,select,textarea,table){font-family:inherit}
:root body :is(h1,h2,h3,h4){letter-spacing:-.018em;color:var(--t-text)}
:root body ::selection{background:var(--t-brand-100)}
:root body :is(.muted,small){color:var(--t-muted)}
:root body a{color:var(--t-brand-600);text-underline-offset:3px}
:root body *{scrollbar-width:thin;scrollbar-color:#cbd2dd transparent}
:root body ::-webkit-scrollbar{width:10px;height:10px}
:root body ::-webkit-scrollbar-thumb{background:#cdd3dd;border-radius:10px;border:2px solid transparent;background-clip:padding-box}
:root body ::-webkit-scrollbar-thumb:hover{background:#aab3c2;background-clip:padding-box;border:2px solid transparent}
:root body .num, :root body td{font-variant-numeric:tabular-nums}

/* ---------------------------------------------------------------- icons (Lucide) */
.lu{width:1.15em;height:1.15em;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.2em;flex:none;display:inline-block}
:root body i.ux-lucide{font-style:normal;display:inline-flex;align-items:center;justify-content:center;width:auto!important;line-height:1}
:root body i.ux-lucide::before{content:none!important;display:none!important}
:root body i.ux-lucide.fa-spin .lu,:root body i.ux-lucide.fa-spinner .lu{animation:t-spin .8s linear infinite}
@keyframes t-spin{to{transform:rotate(360deg)}}

/* ---------------------------------------------------------------- sidebar */
:root body .pro-sidebar{background:linear-gradient(180deg,var(--t-nav) 0%,var(--t-nav-2) 100%)!important;border-right:1px solid rgba(255,255,255,.06)!important;box-shadow:none!important;width:272px}
:root body .pro-sidebar::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--t-org);opacity:.95;pointer-events:none}
:root body .brand-pro{padding:18px 18px 12px!important}
:root body .brand-pro .bolt{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,var(--t-org),color-mix(in srgb,var(--t-org) 60%,#000))!important;box-shadow:0 8px 20px -6px color-mix(in srgb,var(--t-org) 70%,transparent)!important;color:#fff}
:root body .brand-copy b{font-size:16px!important;font-weight:700!important;letter-spacing:-.01em;color:#fff}
:root body .brand-copy span{color:#7f8aa3!important;font-size:12px!important}
:root body .user-card{margin:4px 12px 10px!important;padding:10px 12px!important;border-radius:12px!important;background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.07)!important}
:root body .user-card .avatar{width:34px!important;height:34px!important;border-radius:10px!important;background:color-mix(in srgb,var(--t-org) 22%,transparent)!important;color:#fff!important}
:root body .user-card b{color:#f1f5f9!important;font-size:13px!important;font-weight:600!important}
:root body .user-card span{color:#7f8aa3!important;font-size:11.5px!important}
:root body .nav-panel{padding:4px 10px 16px!important}
:root body .nav-section-label{color:#5f6b82!important;font-size:10.5px!important;font-weight:600!important;letter-spacing:.09em!important;text-transform:uppercase;margin:16px 10px 6px!important;padding:0!important}
:root body .pro-sidebar .nav-item{position:relative;display:flex!important;align-items:center;gap:10px!important;width:100%;min-height:38px;padding:8px 10px!important;margin:1px 0!important;border:0!important;border-radius:9px!important;
  background:transparent!important;color:var(--t-nav-text)!important;font-size:13.5px!important;font-weight:500!important;box-shadow:none!important;text-align:left;transition:background .15s,color .15s}
:root body .pro-sidebar .nav-item i:first-child{width:20px;font-size:16px;color:#7d889e;display:inline-flex;justify-content:center}
:root body .pro-sidebar .nav-item:hover{background:rgba(255,255,255,.05)!important;color:#fff!important}
:root body .pro-sidebar .nav-item:hover i:first-child{color:#cfd6e3}
:root body .pro-sidebar .nav-item.active{background:rgba(255,255,255,.09)!important;color:#fff!important;font-weight:600!important}
:root body .pro-sidebar .nav-item.active i:first-child{color:#fff}
:root body .pro-sidebar .nav-item.active::after{content:"";position:absolute;left:-10px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--t-org)}
:root body .pro-sidebar .nav-group{background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;padding:0!important}
:root body .pro-sidebar .nav-group.open > .group-title{color:#fff!important}
:root body .pro-sidebar .chev{margin-left:auto;font-size:13px;transition:transform .2s var(--t-ease);opacity:.7}
:root body .pro-sidebar .nav-group.open .chev{transform:rotate(180deg)}
:root body .pro-sidebar .subnav{margin:2px 0 6px 19px!important;padding:0 0 0 10px!important;border-left:1px solid rgba(255,255,255,.08)!important;background:transparent!important}
:root body .pro-sidebar .nav-item.sub{min-height:34px;font-size:13px!important;padding:7px 10px!important}
:root body .pro-sidebar .nav-item.sub i:first-child{font-size:14px}
:root body .pro-sidebar .nav-item.sub.active{background:color-mix(in srgb,var(--t-org) 26%,transparent)!important}
:root body .pro-sidebar .nav-item.sub.active::after{left:-11px}
:root body .side-footer{border-top:1px solid rgba(255,255,255,.07)!important;padding:12px!important;background:transparent!important}
:root body .side-footer .logout{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:#cdd5e2!important;font-weight:500!important;font-size:13.5px!important;text-decoration:none;transition:background .15s}
:root body .side-footer .logout:hover{background:rgba(255,255,255,.06)}

/* ---------------------------------------------------------------- top bar */
:root body .topbar{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.86)!important;backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--t-line)!important;box-shadow:none!important;min-height:60px;padding:8px 24px!important;gap:12px!important}
:root body .topbar .awms-logo{width:150px}
:root body .topbar .org-switcher{display:flex!important;align-items:center;gap:8px;background:var(--t-surface)!important;border:1px solid var(--t-line)!important;border-radius:10px!important;
  padding:3px 4px 3px 12px!important;box-shadow:var(--t-sh-xs)!important;transition:border-color .15s,box-shadow .15s}
:root body .topbar .org-switcher:hover{border-color:var(--t-line-2)!important}
:root body .topbar .org-switcher:focus-within{border-color:var(--t-brand)!important;box-shadow:var(--t-ring)!important}
:root body .topbar .org-switcher label{font-size:10.5px!important;font-weight:600!important;color:var(--t-muted)!important;letter-spacing:.06em;text-transform:uppercase;margin:0!important}
:root body .topbar .org-switcher select{border:0!important;background-color:transparent!important;box-shadow:none!important;font-weight:600!important;font-size:13.5px!important;color:var(--t-text)!important;min-height:32px;padding:4px 30px 4px 6px!important}
:root body .topbar .pill{background:var(--t-brand-50)!important;color:var(--t-brand-700)!important;border:1px solid var(--t-brand-100)!important;border-radius:999px!important;font-weight:600!important;font-size:12px!important;padding:6px 12px!important}
:root body .hamb{border-radius:10px!important;border:1px solid var(--t-line)!important;background:#fff!important;color:var(--t-text)!important;box-shadow:var(--t-sh-xs)!important}

/* ---------------------------------------------------------------- page frame */
:root body .main-panel{background:var(--t-bg)!important}
:root body #view{padding:0}
:root body #view > .page,:root body .po > .page{padding:24px 28px 40px!important;max-width:none}
:root body .page h1{font-size:24px!important;font-weight:700!important;line-height:1.25!important;letter-spacing:-.025em!important;margin:0 0 4px!important}
:root body .page h1 + p,:root body .page-title-row p,:root body .page > p.muted,:root body .po-page-head p{font-size:14px!important;color:var(--t-muted)!important;margin:0 0 18px!important;max-width:880px}
:root body .page h2{font-size:17px!important;font-weight:650!important}
:root body .page h3{font-size:15px!important;font-weight:650!important}
:root body .page-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:6px!important}
:root body .page-hero{background:linear-gradient(120deg,#fff 0%,#f5f8ff 55%,#eef3ff 100%)!important;border:1px solid var(--t-line)!important;border-radius:var(--t-r-xl)!important;box-shadow:var(--t-sh-xs)!important;padding:20px 24px!important}
:root body .page-hero::before{background:radial-gradient(circle,rgba(37,99,235,.12),transparent 70%)!important}
:root body #view.ux-enter > *{animation:t-enter .32s var(--t-ease) both}
@keyframes t-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------------------------------------------------------------- cards */
:root body :is(.card,.table-wrap,.settings-card,.module-report-card,.dashboard-module-card,.d365-load-card,.cp-search-card,.logs-tab-card,.quick-actions,.po-worker-standard){
  background:var(--t-surface)!important;border:1px solid var(--t-line)!important;border-radius:var(--t-r-lg)!important;box-shadow:var(--t-sh-xs)!important}
:root body .card.metric,:root body .card.mini{border-radius:var(--t-r-lg)!important;padding:16px 18px!important;transition:transform .18s var(--t-ease),box-shadow .18s var(--t-ease),border-color .18s}
:root body .card.metric:hover{transform:translateY(-2px);box-shadow:var(--t-sh-md)!important;border-color:var(--t-line-2)!important}
:root body .card.metric b,:root body .card.metric strong{font-size:26px!important;font-weight:700!important;letter-spacing:-.02em;color:var(--t-text)}
:root body .card.metric .muted,:root body .card.metric span{font-size:13px;color:var(--t-muted);font-weight:500}
:root body .ico{border-radius:12px!important;width:42px!important;height:42px!important;display:grid;place-items:center;font-size:19px}
:root body .ico.blue,:root body .ico:not([class*=" "]){background:var(--info-bg)!important;color:var(--info)!important}
:root body .ico.green{background:var(--ok-bg)!important;color:var(--ok)!important}
:root body .ico.orange{background:var(--warn-bg)!important;color:var(--warn)!important}
:root body .ico.purple{background:var(--vio-bg)!important;color:var(--vio)!important}
:root body .ico.red{background:var(--bad-bg)!important;color:var(--bad)!important}
:root body .table-head,:root body .log-card-head,:root body .module-report-head{padding:14px 18px!important;border-bottom:1px solid var(--t-line)!important;font-size:15px!important;font-weight:650!important;display:flex;align-items:center;gap:10px;background:transparent!important}
:root body .table-head i:first-child{color:var(--t-brand)}
:root body .quick-card,:root body .dashboard-module-card{transition:transform .18s var(--t-ease),box-shadow .18s var(--t-ease),border-color .18s}
:root body .quick-card{border:1px solid var(--t-line)!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important;font-weight:600!important;color:var(--t-text-2)!important}
:root body .quick-card:hover{transform:translateY(-2px);box-shadow:var(--t-sh-md)!important;border-color:var(--t-brand-100)!important;color:var(--t-brand-700)!important}
:root body .quick-card i:first-child{background:var(--t-brand-50)!important;color:var(--t-brand)!important;border-radius:10px!important}
:root body .notice{border-radius:12px!important;border:1px solid var(--info-ring)!important;background:var(--info-bg)!important;color:#0b4a8f!important;padding:12px 14px!important;font-size:13.5px}
:root body .danger-text{color:var(--bad)!important}

/* ---------------------------------------------------------------- tabs / segmented / pills */
:root body .tabs,:root body .log-tabs,:root body .analytics-tabs{display:inline-flex!important;width:auto;gap:2px!important;padding:3px!important;background:var(--t-surface-3)!important;border:1px solid var(--t-line)!important;border-radius:11px!important;margin:4px 0 16px!important;flex-wrap:wrap}
:root body .tabs .tab,:root body .log-tabs > button,:root body .analytics-tab{flex:0 0 auto!important;width:auto!important;display:inline-flex!important;align-items:center;gap:7px;min-height:34px;padding:6px 14px!important;border:0!important;border-radius:8px!important;
  background:transparent!important;color:var(--t-muted)!important;font-weight:600!important;font-size:13.5px!important;box-shadow:none!important;white-space:nowrap!important;transition:background .15s,color .15s,box-shadow .15s}
:root body .tabs .tab:hover,:root body .log-tabs > button:hover,:root body .analytics-tab:hover{color:var(--t-text)!important}
:root body .tabs .tab.active,:root body .log-tabs > button.active,:root body .analytics-tab.active{background:#fff!important;color:var(--t-text)!important;box-shadow:0 1px 3px rgba(16,24,40,.12),0 1px 2px rgba(16,24,40,.06)!important}
:root body .tabs .tab.active i,:root body .analytics-tab.active i{color:var(--t-brand)}
:root body :is(.stage-pill,.stage-filter-pills button){border-radius:999px!important;border:1px solid var(--t-line)!important;background:#fff!important;color:var(--t-text-2)!important;font-weight:600!important;font-size:12.5px!important;padding:5px 12px!important;box-shadow:none!important;white-space:nowrap}
:root body :is(.stage-pill.active,.stage-filter-pills button.active){background:var(--t-brand)!important;border-color:var(--t-brand)!important;color:#fff!important}
:root body .settings-side-nav{background:#fff!important;border:1px solid var(--t-line)!important;border-radius:var(--t-r-lg)!important;padding:6px!important;box-shadow:var(--t-sh-xs)!important}
:root body .settings-side-nav button{display:flex!important;align-items:center;gap:10px;justify-content:flex-start!important;width:100%;border:0!important;border-radius:9px!important;padding:9px 12px!important;background:transparent!important;color:var(--t-text-2)!important;font-weight:550!important;box-shadow:none!important}
:root body .settings-side-nav button:hover{background:var(--t-surface-3)!important}
:root body .settings-side-nav button.active{background:var(--t-brand-50)!important;color:var(--t-brand-700)!important;font-weight:650!important}

/* ---------------------------------------------------------------- buttons */
:root body .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 15px;border-radius:var(--t-r)!important;border:1px solid transparent!important;
  background:var(--t-brand)!important;color:#fff!important;font-weight:600!important;font-size:13.5px!important;line-height:1.2!important;letter-spacing:0;
  box-shadow:0 1px 2px rgba(16,24,40,.08),inset 0 1px 0 rgba(255,255,255,.12)!important;white-space:nowrap;text-decoration:none;
  transition:background .15s,box-shadow .15s,transform .08s,border-color .15s,color .15s}
:root body .btn:hover:not(:disabled){background:var(--t-brand-600)!important}
:root body .btn.gray,:root body .btn.export-btn{background:#fff!important;color:var(--t-text-2)!important;border-color:var(--t-line-2)!important;box-shadow:var(--t-sh-xs)!important}
:root body .btn.gray:hover:not(:disabled),:root body .btn.export-btn:hover:not(:disabled){background:var(--t-surface-2)!important;color:var(--t-text)!important}
:root body .btn.secondary{background:var(--t-brand-50)!important;color:var(--t-brand-700)!important;border-color:var(--t-brand-100)!important;box-shadow:none!important}
:root body .btn.secondary:hover:not(:disabled){background:var(--t-brand-100)!important}
:root body .btn.success{background:#079455!important;color:#fff!important}
:root body .btn.success:hover:not(:disabled){background:#067647!important}
:root body .btn.warning{background:#dc6803!important;color:#fff!important}
:root body .btn.warning:hover:not(:disabled){background:#b54708!important}
:root body .btn.danger{background:#d92d20!important;color:#fff!important}
:root body .btn.danger:hover:not(:disabled){background:#b42318!important}
:root body .btn.tiny{min-height:30px!important;height:auto!important;padding:5px 10px!important;font-size:12.5px!important;border-radius:8px!important;gap:5px;line-height:1.2!important;white-space:nowrap!important}
:root body .btn:disabled,:root body .btn[disabled]{opacity:.5!important;cursor:not-allowed!important;box-shadow:none!important;filter:none!important}
:root body .icon-action{display:inline-flex!important;align-items:center;justify-content:center;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border-radius:9px!important;
  border:1px solid var(--t-line-2)!important;background:#fff!important;color:var(--t-text-2)!important;box-shadow:var(--t-sh-xs)!important;font-size:15px;transition:background .15s,color .15s,border-color .15s,transform .08s}
:root body .icon-action:hover:not(:disabled){background:var(--t-surface-2)!important;color:var(--t-text)!important;border-color:var(--t-faint)!important}
:root body .icon-action:not(.gray):not(.danger):not(.red){background:var(--t-brand-50)!important;color:var(--t-brand-600)!important;border-color:var(--t-brand-100)!important}
:root body .icon-action:not(.gray):not(.danger):not(.red):hover:not(:disabled){background:var(--t-brand)!important;color:#fff!important;border-color:var(--t-brand)!important}
:root body :is(.icon-action.danger,.icon-action.red,.btn.danger.tiny,td .btn.danger){background:var(--bad-bg)!important;color:var(--bad)!important;border-color:var(--bad-ring)!important;box-shadow:none!important}
:root body :is(.icon-action.danger,.icon-action.red,.btn.danger.tiny,td .btn.danger):hover:not(:disabled){background:#d92d20!important;color:#fff!important;border-color:#d92d20!important}
:root body .row-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:6px!important}
:root body :is(.linkbtn,.link-btn){background:none!important;border:0!important;padding:0!important;color:var(--t-brand-600)!important;font-weight:600!important;cursor:pointer;box-shadow:none!important}
:root body :is(.order-copy-btn,.copy-mini,.po-row-copy){display:inline-flex!important;align-items:center;justify-content:center;width:26px!important;height:26px!important;min-width:26px;padding:0!important;border-radius:7px!important;border:1px solid transparent!important;background:transparent!important;color:var(--t-faint)!important;box-shadow:none!important;vertical-align:middle;transition:background .15s,color .15s}
:root body :is(.order-copy-btn,.copy-mini,.po-row-copy):hover{background:var(--t-surface-3)!important;color:var(--t-text-2)!important}
:root body :is(.order-number-copy){display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
:root body :is(.order-link,.po-order-link,.order-number-copy a,.shortage-order-link),:root body :is(.order-link,.po-order-link,.order-number-copy a,.shortage-order-link) :is(b,strong){font-weight:650!important;color:var(--t-brand-600)!important;text-decoration:none!important;white-space:nowrap}
:root body :is(.order-link,.po-order-link,.order-number-copy a):hover{text-decoration:underline!important}

/* ---------------------------------------------------------------- form controls */
:root body :where(.input,input[type=text],input[type=number],input[type=date],input[type=email],input[type=search],input[type=password],input:not([type]),select,textarea):where(:not([type=checkbox]):not([type=radio]):not(.scan-big):not(.scan):not(.scanner-only-input)){
  border:1px solid var(--t-line-2)!important;border-radius:var(--t-r)!important;background-color:#fff!important;color:var(--t-text)!important;font-size:14px;min-height:38px;padding:8px 12px;box-shadow:var(--t-sh-xs)!important;transition:border-color .15s,box-shadow .15s}
:root body :where(.input,input,select,textarea):where(:not([type=checkbox]):not([type=radio])):hover{border-color:#b6bfcc!important}
:root body :where(.input,input,select,textarea):where(:not([type=checkbox]):not([type=radio])):focus{border-color:var(--t-brand)!important;box-shadow:var(--t-ring)!important;outline:none!important}
:root body :is(.input,input,textarea)::placeholder{color:var(--t-faint)!important;opacity:1}
:root body select:not([multiple]){appearance:none;-webkit-appearance:none;padding-right:34px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:16px!important}
:root body input[type=checkbox],:root body input[type=radio]{accent-color:var(--t-brand);width:16px;height:16px}
:root body label{color:var(--t-text-2);font-weight:600;font-size:12.5px}
:root body .searchbox{position:relative}
:root body .searchbox > i{position:absolute!important;left:12px;top:50%;transform:translateY(-50%);color:var(--t-faint)!important;pointer-events:none;z-index:1;font-size:16px}
:root body .searchbox > :is(.input,input){padding-left:38px!important;width:100%}
:root body .pro-table-tools,:root body .pro-toolbar,:root body .toolbar{gap:10px!important;align-items:center}
:root body .pro-table-tools{padding:12px 14px!important;margin:0!important;border-bottom:1px solid var(--t-line)!important;background:transparent!important}
:root body :is(.scan-big,.scanner-only-input,.scan){border:2px solid var(--t-line-2)!important;border-radius:14px!important;font-weight:600!important;letter-spacing:.01em;box-shadow:inset 0 1px 2px rgba(16,24,40,.05)!important;transition:border-color .15s,box-shadow .15s}
:root body :is(.scan-big,.scanner-only-input,.scan):focus{border-color:var(--t-brand)!important;box-shadow:0 0 0 5px rgba(37,99,235,.14)!important}
:root body .dropdown-check-btn{border:1px solid var(--t-line-2)!important;border-radius:var(--t-r)!important;background:#fff!important;box-shadow:var(--t-sh-xs)!important;font-weight:550!important;color:var(--t-text-2)!important;white-space:nowrap}
:root body .dropdown-check-menu{border:1px solid var(--t-line)!important;border-radius:12px!important;box-shadow:var(--t-sh-lg)!important;padding:6px!important}

/* ---------------------------------------------------------------- status badges */
:root body .badge{display:inline-flex!important;align-items:center;gap:6px;width:auto!important;max-width:100%;min-height:22px;padding:2px 9px 2px 8px!important;border-radius:999px!important;
  font-size:12px!important;font-weight:600!important;line-height:1.35!important;letter-spacing:0;border:1px solid var(--neu-ring)!important;background:var(--neu-bg)!important;color:var(--neu)!important;
  white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;box-shadow:none!important;text-transform:none;vertical-align:middle}
:root body .badge::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--neu-dot);flex:none}
:root body .badge[data-tone=ok]{background:var(--ok-bg)!important;color:var(--ok)!important;border-color:var(--ok-ring)!important}
:root body .badge[data-tone=ok]::before{background:var(--ok-dot)}
:root body .badge[data-tone=warn]{background:var(--warn-bg)!important;color:var(--warn)!important;border-color:var(--warn-ring)!important}
:root body .badge[data-tone=warn]::before{background:var(--warn-dot)}
:root body .badge[data-tone=bad]{background:var(--bad-bg)!important;color:var(--bad)!important;border-color:var(--bad-ring)!important}
:root body .badge[data-tone=bad]::before{background:var(--bad-dot)}
:root body .badge[data-tone=info]{background:var(--info-bg)!important;color:var(--info)!important;border-color:var(--info-ring)!important}
:root body .badge[data-tone=info]::before{background:var(--info-dot)}
:root body .badge[data-tone=vio]{background:var(--vio-bg)!important;color:var(--vio)!important;border-color:var(--vio-ring)!important}
:root body .badge[data-tone=vio]::before{background:var(--vio-dot)}
:root body .badge[data-tone=org]{background:var(--org2-bg)!important;color:var(--org2)!important;border-color:var(--org2-ring)!important}
:root body .badge[data-tone=org]::before{background:var(--org2-dot)}
:root body .badge[data-tone=info][data-live]::before,:root body .badge[data-tone=org][data-live]::before{animation:t-pulse 1.8s ease-in-out infinite}
@keyframes t-pulse{0%,100%{box-shadow:0 0 0 0 currentColor;opacity:1}50%{box-shadow:0 0 0 3px transparent;opacity:.55}}
:root body .location-suggestion-pill{margin:4px 0 2px}

/* ---------------------------------------------------------------- tables */
:root body .table-wrap,:root body .mobile-table{overflow-x:auto!important;overflow-y:visible}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table,.mobile-table table){border-collapse:separate!important;border-spacing:0!important;background:transparent}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table,.mobile-table table) thead th{background:var(--t-surface-2)!important;color:var(--t-muted)!important;font-size:11.5px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;
  padding:10px 14px!important;border-bottom:1px solid var(--t-line)!important;border-top:0!important;text-align:left;white-space:nowrap!important;vertical-align:middle}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table,.mobile-table table) tbody td{padding:12px 14px!important;border-bottom:1px solid var(--t-line)!important;color:var(--t-text-2);font-size:13.5px;vertical-align:middle!important;background:transparent}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table) tbody tr{transition:background .12s}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table) tbody tr:hover > td{background:#f9fafc}
:root body :is(.pro-table,.professional-log-table,.table-wrap > table) tbody tr:last-child > td{border-bottom:0!important}
:root body :is(.pro-table,.table-wrap > table) td b,:root body :is(.pro-table,.table-wrap > table) td strong{color:var(--t-text);font-weight:600}
:root body .sortable{cursor:pointer;user-select:none}
:root body .sortable:hover{color:var(--t-text)!important}
:root body .ux-full-cell{padding:44px 16px!important;text-align:center!important;color:var(--t-muted)!important;font-weight:500}
:root body .ux-full-cell::before{content:""!important;display:block!important;position:static!important;width:40px!important;height:40px;margin:0 auto 10px;
  background:var(--t-faint);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/contain no-repeat}
:root body tr:has(> .ux-full-cell):hover > td{background:transparent!important}

/* Desktop: content decides column widths, words never split mid-word */
@media (min-width:781px){
  :root body :is(table.pro-table,table.professional-log-table,.table-wrap > table,.mobile-table table,table.worker-card-table,table.cp-fixed-table,table.shortage-list-table,table.shortage-missing-table,table.fixed-layout){
    table-layout:auto!important;width:100%!important;min-width:0!important;display:table!important}
  :root body :is(table.pro-table,table.professional-log-table,.table-wrap > table,.mobile-table table) :is(th,td){width:auto!important;max-width:none!important;min-width:0;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}
  :root body :is(table.pro-table,.table-wrap > table) td{max-width:380px!important}
  :root body :is(table.pro-table,.table-wrap > table) td:first-child{min-width:190px}
  :root body :is(table.pro-table,.table-wrap > table) td :is(.badge,.btn,.icon-action,.row-actions,.order-number-copy,.worker-action-grid){white-space:nowrap!important}
  :root body :is(table.pro-table,.table-wrap > table) td .muted{white-space:normal}
  :root body :is(table.pro-table,.table-wrap > table) td :is(.short-cell-ellipsis){max-width:240px}
  :root body .ux-hscroll > table.ux-sticky-actions tr > :last-child{background:#fff!important}
  :root body .ux-hscroll > table.ux-sticky-actions thead tr > :last-child{background:var(--t-surface-2)!important}
  :root body .ux-hscroll > table.ux-sticky-actions tbody tr:hover > :last-child{background:#f9fafc!important}
}

/* ---------------------------------------------------------------- pagination */
:root body :is(.pagination,.awm-standard-pagination,.professional-pager,.pager){display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 14px!important;color:var(--t-muted);font-size:13px}
:root body :is(.pagination,.awm-standard-pagination,.professional-pager,.pager) :is(button,.btn){min-height:32px!important;padding:5px 11px!important;border-radius:8px!important;border:1px solid var(--t-line-2)!important;background:#fff!important;color:var(--t-text-2)!important;font-weight:600!important;font-size:12.5px!important;box-shadow:var(--t-sh-xs)!important}
:root body :is(.pagination,.awm-standard-pagination,.professional-pager,.pager) :is(button,.btn):disabled{opacity:.45!important}
:root body :is(.pagination,.awm-standard-pagination,.professional-pager,.pager) :is(.active,.pager-num.active){background:var(--t-brand)!important;border-color:var(--t-brand)!important;color:#fff!important}
:root body :is(.pagination,.awm-standard-pagination,.professional-pager,.pager) select{min-height:32px!important;padding-top:4px!important;padding-bottom:4px!important;width:auto}

/* ---------------------------------------------------------------- modal */
:root body .modal{background:rgba(16,24,40,.45)!important;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
:root body .modal:not(.hidden){animation:t-fade .18s ease-out}
:root body .modal-card{border-radius:var(--t-r-xl)!important;border:1px solid var(--t-line)!important;box-shadow:var(--t-sh-lg)!important;background:#fff!important}
:root body .modal:not(.hidden) .modal-card{animation:t-pop .24s var(--t-ease)}
:root body .modal-card > .x,:root body .modal-x,:root body .po-detail-close{width:36px!important;height:36px!important;border-radius:10px!important;border:1px solid var(--t-line)!important;background:#fff!important;color:var(--t-text-2)!important;font-size:20px!important;line-height:1!important;box-shadow:var(--t-sh-xs)!important;display:inline-grid;place-items:center;transition:background .15s}
:root body .modal-card > .x:hover,:root body .modal-x:hover,:root body .po-detail-close:hover{background:var(--t-surface-3)!important}
:root body :is(.po-modal,.po-detail-modal){background:rgba(16,24,40,.45)!important;backdrop-filter:blur(4px)}
:root body :is(.po-modal-card,.po-detail-dialog){border-radius:var(--t-r-xl)!important;box-shadow:var(--t-sh-lg)!important;border:1px solid var(--t-line)}
:root body :is(.po-modal.show .po-modal-card,.po-detail-modal.show .po-detail-dialog){animation:t-pop .24s var(--t-ease)}
@keyframes t-fade{from{opacity:0}to{opacity:1}}
@keyframes t-pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

/* ---------------------------------------------------------------- toasts */
:root body #toast,:root body #poToast,:root body .po-toast-host{position:fixed!important;top:16px!important;right:16px!important;left:auto!important;bottom:auto!important;width:min(400px,calc(100vw - 32px))!important;z-index:100001!important;display:flex!important;flex-direction:column;gap:10px;pointer-events:none}
:root body #toast .toast,:root body .po-toast{pointer-events:auto;position:relative;display:grid!important;grid-template-columns:32px 1fr 28px;align-items:start;gap:12px;padding:14px 12px 16px 14px!important;margin:0!important;border-radius:14px!important;
  background:#fff!important;color:var(--t-text)!important;border:1px solid var(--t-line)!important;box-shadow:0 16px 36px -10px rgba(16,24,40,.28),0 2px 6px rgba(16,24,40,.06)!important;overflow:hidden;font-size:13.5px;line-height:1.45;font-weight:500;animation:t-toast-in .32s var(--t-ease) both}
:root body #toast .toast::before,:root body .po-toast::before{content:""!important;font-family:inherit!important;width:32px;height:32px;border-radius:10px;grid-column:1;grid-row:1 / span 2;
  background:var(--ok-bg) center/18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067647' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
:root body #toast .toast.error::before,:root body .po-toast.error::before{background:var(--bad-bg) center/18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E")}
:root body .t-toast-title{grid-column:2;font-weight:650;font-size:13.5px;color:var(--t-text)}
:root body .t-toast-msg{grid-column:2;color:var(--t-text-2);overflow-wrap:anywhere}
:root body #toast .ux-toast-x{position:static!important;transform:none!important;grid-column:3;grid-row:1;width:28px;height:28px;border-radius:8px;background:transparent!important;color:var(--t-faint)!important;font-size:20px}
:root body #toast .ux-toast-x:hover{background:var(--t-surface-3)!important;color:var(--t-text)!important}
:root body .t-toast-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--ok-dot);transform-origin:left;animation:t-toast-bar linear forwards}
:root body .toast.error .t-toast-bar,:root body .po-toast.error .t-toast-bar{background:var(--bad-dot)}
:root body .toast:hover .t-toast-bar{animation-play-state:paused}
@keyframes t-toast-in{from{opacity:0;transform:translateX(24px) scale(.98)}to{opacity:1;transform:none}}
@keyframes t-toast-bar{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* ---------------------------------------------------------------- misc components */
:root body .ux-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--t-brand),transparent)!important;background-size:40% 100%!important;background-repeat:no-repeat!important}
:root body .global-loader-card{border-radius:var(--t-r-xl)!important;box-shadow:var(--t-sh-lg)!important;border:1px solid var(--t-line)!important}
:root body :is(.bar-track){background:var(--t-surface-3)!important;border-radius:999px!important;overflow:hidden}
:root body :is(.bar-track > *,.progress-line > *,#pickProgressBar,.bar){background:linear-gradient(90deg,var(--t-brand),#60a5fa)!important;border-radius:999px!important;transition:width .4s var(--t-ease)}
:root body .scanner-only-card,:root body .jobs-square,:root body .login-card{border:1px solid var(--t-line)!important;border-radius:22px!important;box-shadow:var(--t-sh-md)!important}
:root body .jobs-square{transition:transform .18s var(--t-ease),box-shadow .18s var(--t-ease)!important}
:root body .jobs-square:hover{transform:translateY(-3px)}
:root body :is(.guided-stage,.guided-scanner .card){border-radius:var(--t-r-lg)!important}
:root body .ux-field-error{color:var(--bad)!important}
:root body .ux-invalid{border-color:var(--bad-dot)!important;background:#fffbfa!important;box-shadow:0 0 0 4px rgba(240,68,56,.12)!important}

/* =====================================================================
   PHONE (≤ 780px)
   ===================================================================== */
@media (max-width:780px){
  :root body{font-size:15px}
  :root body .topbar{padding:8px 12px!important;min-height:56px}
  :root body .topbar .org-switcher{flex:1 1 0!important;min-width:0!important;padding:2px!important;border-radius:10px!important}
  :root body .topbar .org-switcher select{font-size:16px!important;min-height:38px}
  :root body :is(.order-copy-btn,.copy-mini,.po-row-copy){width:36px!important;height:36px!important;min-width:36px!important}
  :root body .topbar .pill{display:none!important}
  :root body #view > .page,:root body .po > .page{padding:16px 14px calc(96px + env(safe-area-inset-bottom))!important}
  :root body .page h1{font-size:21px!important}
  :root body .page h1 + p,:root body .page-title-row p{font-size:13.5px!important;margin-bottom:14px!important}
  :root body .tabs{display:flex!important;width:100%}
  :root body .tabs .tab{flex:1 1 0!important;justify-content:center}
  :root body .btn{min-height:42px}
  :root body .btn.tiny{min-height:36px!important}
  :root body .icon-action{width:40px!important;height:40px!important;min-width:40px!important}
  /* card tables */
  :root body .ux-cardtable{display:block!important;width:100%!important;min-width:0!important}
  :root body .ux-cardtable thead{display:none!important}
  :root body .ux-cardtable tbody{display:block!important}
  :root body .ux-cardtable tbody tr{display:block!important;background:#fff!important;border:1px solid var(--t-line)!important;border-radius:16px!important;margin:0 0 12px!important;padding:6px 14px!important;box-shadow:var(--t-sh-xs)!important}
  :root body .ux-cardtable tbody tr:hover > td{background:transparent!important}
  :root body .ux-cardtable tbody td{border-bottom:1px dashed var(--t-line)!important;padding-top:10px!important;padding-bottom:10px!important;font-size:14px!important}
  :root body .ux-cardtable tbody td:last-child{border-bottom:0!important}
  :root body .ux-cardtable tbody td[data-label]{padding-left:calc(min(34%,128px) + 12px)!important;padding-right:2px!important}
  :root body .ux-cardtable tbody td[data-label]::before{left:2px!important}
  :root body .ux-cardtable tbody td:is([data-label=""],[data-label="Action"],[data-label="Actions"],[data-label="Email"]){padding-left:2px!important}
  :root body .ux-cardtable tbody td.ux-full-cell{padding:36px 12px!important}
  :root body .ux-cardtable tbody td[data-label]::before{color:var(--t-muted)!important;font-size:11px!important;font-weight:600!important;letter-spacing:.05em;text-transform:uppercase;top:12px!important}
  :root body .ux-cardtable tbody td:first-child{font-size:15px!important}
  :root body .ux-cardtable .badge{white-space:normal!important;text-align:left}
  :root body .table-wrap{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important}
  :root body .table-wrap > .table-head,:root body .table-wrap > .pro-table-tools{background:#fff!important;border:1px solid var(--t-line)!important;border-radius:14px!important;margin-bottom:10px!important}
  :root body .pro-table-tools{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  /* toasts at the bottom, above the tab bar */
  :root body #toast,:root body #poToast,:root body .po-toast-host{top:auto!important;bottom:calc(76px + env(safe-area-inset-bottom))!important;left:10px!important;right:10px!important;width:auto!important}
  :root body.ux-no-tabbar #toast{bottom:calc(12px + env(safe-area-inset-bottom))!important}
  @keyframes t-toast-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
  /* modal sheet */
  :root body #modal .modal-card{border-radius:22px 22px 0 0!important;animation:t-sheet .28s var(--t-ease)!important}
  :root body #modal .modal-card::before{content:"";display:block;width:40px;height:4px;border-radius:4px;background:#d0d5dd;margin:-8px auto 10px}
  @keyframes t-sheet{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
  :root body .pro-sidebar{width:min(300px,86vw)!important;transition:transform .28s var(--t-ease)!important}
  :root body .mobile-backdrop.show{backdrop-filter:blur(2px);background:rgba(16,24,40,.45)!important}
}

/* ---------------------------------------------------------------- phone bottom tab bar */
.t-tabbar{display:none}
@media (max-width:780px){
  .t-tabbar{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:45;grid-auto-flow:column;grid-auto-columns:1fr;
    background:rgba(255,255,255,.94);backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);
    border-top:1px solid var(--t-line);padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -8px 24px -12px rgba(16,24,40,.18)}
  .t-tabbar button{appearance:none;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border-radius:12px;
    color:var(--t-muted);font:600 11px/1.1 var(--t-font);padding:4px 2px;-webkit-tap-highlight-color:transparent;transition:color .15s,background .15s}
  .t-tabbar button .lu{width:22px;height:22px;stroke-width:1.9}
  .t-tabbar button.active{color:var(--t-brand)}
  .t-tabbar button.active .t-tab-ico{background:var(--t-brand-50)}
  .t-tabbar .t-tab-ico{display:grid;place-items:center;width:46px;height:28px;border-radius:999px;transition:background .2s}
  .t-tabbar button:active{transform:scale(.96)}
  html.ux-modal-open .t-tabbar{display:none}
}
@media print{.t-tabbar{display:none!important}}
@media (prefers-reduced-motion:reduce){:root body *{animation:none!important;transition:none!important}}

/* label safety: labels never split inside a word */
:root body td[data-label]::before{word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important}
:root body .badge{justify-self:start;align-self:center}
@media (max-width:780px){:root body .worker-card-table td[data-label]::before{font-size:10.5px!important;letter-spacing:.02em!important}}

/* worker job action tiles (PICK / PACK / DELIVERY / PLACE BACK / TRACK / EXCEL) */
:root body .worker-action-grid{display:grid!important;grid-template-columns:repeat(4,minmax(66px,auto))!important;gap:6px!important;width:auto!important;justify-content:start}
:root body .worker-action-slot{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;padding:6px 6px 7px!important;min-height:0!important;min-width:66px;
  background:var(--t-surface-2)!important;border:1px solid var(--t-line)!important;border-radius:12px!important;box-shadow:none!important}
:root body .worker-action-slot em{font-style:normal;font-size:10px!important;font-weight:600!important;letter-spacing:.05em;color:var(--t-muted)!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;max-width:none!important;line-height:1.1}
:root body .worker-action-slot .icon-action{width:34px!important;height:34px!important;min-width:34px!important}
:root body .worker-action-slot.empty{opacity:.5}
@media (max-width:780px){:root body .worker-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important}
  :root body .worker-action-slot{min-width:0}
  :root body .worker-action-slot .icon-action{width:40px!important;height:40px!important}}
:root body input[type=file]{padding:6px!important;min-height:auto!important;cursor:pointer}
:root body input[type=file]::file-selector-button{margin-right:12px;border:1px solid var(--t-line-2);border-radius:8px;background:var(--t-surface-2);color:var(--t-text-2);font:600 13px var(--t-font);padding:7px 12px;cursor:pointer;transition:background .15s}
:root body input[type=file]::file-selector-button:hover{background:var(--t-surface-3)}
:root body svg.lu{width:1.15em!important;height:1.15em!important;max-width:none!important;min-width:0!important;display:inline-block!important;margin:0!important}
:root body #toast .toast,:root body .po-toast{gap:2px 12px!important}
:root body .t-toast-title{align-self:center}
@media (max-width:780px){
  :root body .pro-sidebar{z-index:70!important}
  :root body .mobile-backdrop{z-index:65!important}
}
/* filter bars wrap instead of pushing buttons off-screen */
@media (min-width:781px){
  :root body :is(.scan-log-filters,.log-search-row,.professional-search,.analytics-filters,.inventory-tools,.find-location-toolbar,.cp-search-card form){display:flex!important;flex-wrap:wrap!important;align-items:center;gap:10px!important}
  :root body .scan-log-filters > *,:root body .professional-search > *{flex:0 1 auto;min-width:0;width:auto!important;max-width:none!important}
  :root body .scan-log-filters > select,:root body .scan-log-filters > input[type=date]{min-width:150px}
  :root body .scan-log-filters > :is(.searchbox,.scan-log-searchbox),:root body .professional-search > .searchbox{flex:1 1 280px}
}
:root body :is(.module-report-head,.table-head,.log-card-head){flex-wrap:wrap}
:root body :is(.module-report-head,.log-card-head) > div:first-child{flex:1 1 240px;min-width:0}
:root body .module-report-head p{font-weight:400!important;color:var(--t-muted)!important;font-size:13.5px!important}
:root body .t-tabbar svg.lu{width:22px!important;height:22px!important;stroke-width:1.9}

/* ---------------------------------------------------------------- button text wrapper */
ux-t{display:inline;white-space:nowrap}
/* Phone: icon-only buttons (text stays as tooltip + screen-reader label). Full-row primary buttons keep their text. */
@media (max-width:780px){
  :root body .ux-has-text:not(.ux-fullrow) > ux-t{display:none!important}
  :root body .ux-has-text:not(.ux-fullrow){gap:0!important;min-width:42px!important;padding-left:11px!important;padding-right:11px!important;justify-content:center!important}
  :root body .ux-has-text:not(.ux-fullrow) i{margin:0!important}
  :root body .ux-has-text:not(.ux-fullrow) svg.lu{width:19px!important;height:19px!important}
}
/* scanner input + button row: button keeps its natural width */
:root body .scan-search{align-items:stretch}
:root body .scan-search > .btn{width:auto!important;min-width:max-content!important;flex:0 0 auto;white-space:nowrap!important}
@media (min-width:781px){:root body .scan-search{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;grid-auto-flow:column!important;grid-auto-columns:max-content!important;gap:8px!important}
  :root body .scan-search > :first-child{grid-column:1}}
/* verified location bar: actions never overlap the label */
:root body .location-confirmed{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px 14px}
:root body .guided-location-actions{display:flex!important;gap:6px;margin-left:auto;flex-wrap:nowrap}
:root body .guided-location-actions .btn{width:36px!important;min-width:36px!important;height:36px!important;padding:0!important}
/* Desktop: a button with text is never narrower than its text (no clipped labels like "Sca" / "Ski") */
@media (min-width:781px){
  :root body .btn.ux-has-text{min-width:max-content!important;flex-shrink:0}
  :root body .guided-skip-btn{width:auto!important;padding:6px 12px!important}
}
/* Phone: rows of icon buttons sit side by side */
@media (max-width:780px){
  :root body :is(.toolbar,.pick-top,.actions-row,.d365-load-actions,.po-page-actions):has(> .ux-has-text:not(.ux-fullrow)){display:flex!important;flex-wrap:wrap!important;gap:8px!important;grid-template-columns:none!important}
  :root body :is(.toolbar,.pick-top,.actions-row,.d365-load-actions,.po-page-actions) > .ux-has-text:not(.ux-fullrow){flex:1 1 52px!important;width:auto!important;max-width:none;grid-column:auto!important;min-height:44px}
  :root body .guided-skip-btn{width:44px!important;min-width:44px!important;padding:0!important}
}
:root body .guided-item-image img{font-size:11px;color:var(--t-muted);overflow:hidden;object-fit:cover}

/* ---- Tables v2.1: no floating/sticky column (it covered other columns), compact icon actions ---- */
:root body .ux-hscroll > table.ux-sticky-actions tr > :last-child{position:static!important;box-shadow:none!important}
@media (min-width:781px){
  :root body :is(table.pro-table,.table-wrap > table) thead th{padding:10px 12px!important}
  :root body :is(table.pro-table,.table-wrap > table) tbody td{padding:11px 12px!important}
  /* action buttons inside table rows: icons only (label shown as tooltip), wrap to a 2nd line if needed */
  :root body :is(table.pro-table,.table-wrap > table) td .ux-has-text > ux-t{display:none!important}
  :root body :is(table.pro-table,.table-wrap > table) td .btn.ux-has-text{min-width:34px!important;width:34px!important;height:34px!important;padding:0!important;gap:0!important;justify-content:center!important}
  :root body :is(table.pro-table,.table-wrap > table) td .row-actions{flex-wrap:wrap!important;max-width:124px;gap:6px!important}
  :root body :is(table.pro-table,.table-wrap > table) td:is([data-label="Handled By"],[data-label="Handled by"]){min-width:130px}
  /* keep simple text buttons inside tables (e.g. "Send Email") readable */
  :root body :is(table.pro-table,.table-wrap > table) td .btn:not(.ux-has-text){width:auto!important}
}
/* modal/track page labels and dropdown text never spill */
:root body label{overflow-wrap:normal;white-space:normal}
:root body .dropdown-check-btn{max-width:100%;overflow:hidden;text-overflow:ellipsis}
:root body .dropdown-check-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
@media (max-width:780px){
  :root body .badge{white-space:normal!important;text-align:left;line-height:1.25!important}
  :root body .worker-action-slot em{white-space:normal!important;text-align:center;font-size:9.5px!important}
  :root body #modal .modal-card :is(b,strong,span){overflow-wrap:break-word}
}

/* ---------------------------------------------------------------- sidebar sizes */
@media (min-width:1501px){
  :root body .main-panel{margin-left:272px!important;width:calc(100% - 272px)!important}
}
/* Laptops (821–1500px): icon rail that expands on hover, so tables get the full width */
@media (min-width:821px) and (max-width:1500px){
  :root body .main-panel{margin-left:72px!important;width:calc(100% - 72px)!important}
  :root body .pro-sidebar{width:72px!important;overflow-x:hidden!important;transition:width .22s var(--t-ease),box-shadow .22s!important;z-index:60!important}
  :root body .pro-sidebar:is(:hover,:has(:focus-visible)){width:272px!important;box-shadow:16px 0 40px -12px rgba(2,6,23,.45)!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) :is(.brand-copy,.user-card > div:not(.avatar),.nav-section-label,.chev,.nav-item > span,.logout > span){display:none!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .nav-item{justify-content:center!important;padding:9px 0!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .subnav{margin:2px 0 6px!important;padding:0!important;border-left:0!important;background:rgba(255,255,255,.03)!important;border-radius:10px}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .nav-section-label + *{margin-top:10px!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .brand-pro{justify-content:center;padding:18px 0 12px!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .user-card{justify-content:center;padding:8px 0!important;margin:4px 10px 10px!important}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .logout{justify-content:center}
  :root body .pro-sidebar:not(:hover):not(:has(:focus-visible)) .nav-item.active::after{left:-10px}
  :root body .pro-sidebar .nav-item > span,:root body .pro-sidebar .brand-copy{white-space:nowrap}
}
/* headers may wrap between words so they don't force tables wider than the screen */
@media (min-width:781px){
  :root body :is(table.pro-table,.table-wrap > table,.professional-log-table) thead th{white-space:normal!important;line-height:1.3!important;vertical-align:bottom!important}
  :root body :is(table.pro-table,.table-wrap > table) td[data-label="D365"]{min-width:0!important}
  :root body :is(table.pro-table,.table-wrap > table) td:first-child{min-width:170px}
}
@media (min-width:781px){
  :root body :is(table.pro-table,.table-wrap > table) td[data-label]:not(:first-child){min-width:0!important}
  :root body :is(table.pro-table,.table-wrap > table) td:is([data-label="Handled By"],[data-label="Handled by"]){min-width:120px!important}
}
/* modal: close button never sits on top of the title */
:root body #modalBody > :first-child,:root body #modalBody > .modal-title-row,:root body #modalBody > h2:first-child{padding-right:52px}
:root body #modalBody .modal-title-row{display:flex;align-items:flex-start;gap:10px}
:root body #modalBody .modal-title-row > :first-child{flex:1 1 auto;min-width:0}
/* info tiles (label + value): label on top, value below – never side by side */
:root body .card.mini:not(.ux-stat){display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:4px!important;min-width:0}
:root body .card.mini:not(.ux-stat) > b:first-child{font-size:11.5px!important;font-weight:600!important;color:var(--t-muted)!important;text-transform:uppercase;letter-spacing:.04em;line-height:1.3!important}
:root body .card.mini:not(.ux-stat) > :not(:first-child){font-size:15px!important;font-weight:650!important;color:var(--t-text)!important;line-height:1.35!important;overflow-wrap:anywhere;max-width:100%}
:root body .card.mini:not(.ux-stat) > :not(:first-child) .badge{font-size:12px!important}
/* card titles with a badge: wrap instead of overflowing */
:root body .mobile-card-title{flex-wrap:wrap;gap:6px 8px;min-width:0}
@media (max-width:780px){:root body .worker-mobile-summary{flex-wrap:wrap;gap:6px 8px;min-width:0}}
:root body .stage-filter-pills,:root body .stage-filter{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
:root body .stage-filter-pills > *,:root body .stage-filter > button{flex:0 0 auto!important;width:auto!important}
/* settings > page access */
:root body .user-access-combo > :not(summary){padding-left:16px;padding-right:16px}
:root body .user-access-combo label{display:inline-flex;align-items:center;gap:8px}
:root body table .mobile-card-title,:root body .po .mobile-card-title{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 8px!important;min-width:0!important}
:root body table .mobile-card-title > *{min-width:0;max-width:100%}
:root body .table-head > *{min-width:0;overflow-wrap:anywhere}
:root body .table-head{row-gap:6px}

/* =====================================================================
   COMMON TABLE SYSTEM (all modules) – v2.2
   Organisation colour drives header + row tint (set by awm-ux.js).
   ===================================================================== */
:root{--t-th-bg:#eef3ff;--t-th-text:#1e3a8a;--t-row-alt:#fafbff;--t-row-hover:#f1f5ff}
:root body table.ux-table thead th{background:var(--t-th-bg)!important;color:var(--t-th-text)!important;border-bottom:1px solid color-mix(in srgb,var(--t-brand) 18%,transparent)!important;font-weight:700!important;font-size:11px!important;letter-spacing:.05em}
:root body table.ux-table thead th:first-child{border-top-left-radius:0}
:root body table.ux-table thead{position:relative;z-index:4;will-change:transform}
:root body table.ux-table.ux-stuck thead th{box-shadow:0 6px 12px -8px rgba(16,24,40,.35)}
:root body table.ux-table > tbody > tr:nth-child(even) > td{background:var(--t-row-alt)}
:root body table.ux-table > tbody > tr:hover > td{background:var(--t-row-hover)!important}
:root body table.ux-table > tbody > tr > td:first-child{box-shadow:inset 3px 0 0 transparent}
:root body table.ux-table > tbody > tr[data-tone=ok] > td:first-child{box-shadow:inset 3px 0 0 var(--ok-dot)}
:root body table.ux-table > tbody > tr[data-tone=warn] > td:first-child{box-shadow:inset 3px 0 0 var(--warn-dot)}
:root body table.ux-table > tbody > tr[data-tone=bad] > td:first-child{box-shadow:inset 3px 0 0 var(--bad-dot)}
:root body table.ux-table > tbody > tr[data-tone=info] > td:first-child{box-shadow:inset 3px 0 0 var(--info-dot)}
:root body table.ux-table > tbody > tr[data-tone=vio] > td:first-child{box-shadow:inset 3px 0 0 var(--vio-dot)}
:root body table.ux-table > tbody > tr[data-tone=org] > td:first-child{box-shadow:inset 3px 0 0 var(--org2-dot)}

/* column menu (⋮) */
:root body th.ux-has-colbtn{position:relative;padding-right:40px!important}
:root body .ux-colbtn{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--t-th-text);display:inline-grid;place-items:center;cursor:pointer;padding:0;transition:background .15s,border-color .15s}
:root body .ux-colbtn:hover,:root body .ux-colbtn:focus-visible{background:#fff;border-color:color-mix(in srgb,var(--t-brand) 30%,transparent)}
:root body .ux-colbtn svg.lu{width:18px!important;height:18px!important}
.ux-colmenu{position:fixed;z-index:100003;background:#fff;border:1px solid var(--t-line);border-radius:14px;box-shadow:var(--t-sh-lg);display:flex;flex-direction:column;overflow:hidden;animation:t-pop .18s var(--t-ease);font-family:var(--t-font)}
.ux-colmenu-head{padding:12px 14px 10px;border-bottom:1px solid var(--t-line);background:var(--t-th-bg)}
.ux-colmenu-head b{display:block;font-size:13.5px;color:var(--t-th-text)}
.ux-colmenu-head span{display:block;font-size:11.5px;color:var(--t-muted);margin-top:2px}
.ux-colmenu-list{overflow:auto;padding:6px;flex:1 1 auto}
.ux-colmenu-item{display:flex!important;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;cursor:pointer;font-size:13.5px!important;font-weight:500!important;color:var(--t-text)!important;text-transform:none!important;letter-spacing:0!important}
.ux-colmenu-item:hover{background:var(--t-surface-3)}
.ux-colmenu-item input{accent-color:var(--t-brand);width:16px;height:16px;margin:0}
.ux-colmenu-foot{padding:10px;border-top:1px solid var(--t-line);display:flex;justify-content:flex-end}

/* compact rows */
@media (min-width:781px){
  :root body table.ux-table tbody td{padding:8px 12px!important;font-size:13px!important;line-height:1.38!important}
  :root body table.ux-table thead th{padding:9px 12px!important}
  :root body table.ux-table td:first-child > br{display:none}
  :root body table.ux-table td:first-child .mobile-card-title{display:inline-flex!important;justify-content:flex-start!important;width:auto!important;margin-right:6px;vertical-align:middle}
  :root body table.ux-table td:first-child > .mobile-card-title + div:has(> .badge:only-child){display:inline-flex;vertical-align:middle}
  :root body table.ux-table td:first-child > .mobile-card-title + div > .badge{font-size:11px!important;min-height:20px;padding:1px 8px 1px 7px!important}
  :root body table.ux-table td:is([data-label='Handled By'],[data-label='Handled by']){min-width:150px!important}
  :root body table.ux-table td:first-child :is(.order-number-copy,.location-suggestion-pill){display:inline-flex!important;vertical-align:middle;margin:0 6px 2px 0!important}
  :root body table.ux-table td:first-child .location-suggestion-pill .badge{font-size:11px!important;min-height:20px;padding:1px 8px 1px 7px!important}
  :root body table.ux-table td:first-child > :is(span.muted,div.muted,small){display:inline-block!important;font-size:11.5px!important;line-height:1.35!important;margin:1px 8px 0 0;color:var(--t-muted)}
  :root body table.ux-table td:first-child > :is(span.muted,div.muted,small) b{font-weight:600;color:var(--t-text-2)}
  :root body table.ux-table td:first-child > div:first-child + br + span.muted,:root body table.ux-table td:first-child .location-suggestion-pill + br + span.muted{display:block!important}
  :root body table.ux-table td .row-actions{max-width:none!important;flex-wrap:wrap!important;gap:4px!important}
  :root body table.ux-table td .row-actions > *{width:30px!important;height:30px!important;min-width:30px!important}
  :root body table.ux-table td .icon-action,:root body table.ux-table td .btn.ux-has-text{width:30px!important;height:30px!important;min-width:30px!important;border-radius:8px!important}
  :root body table.ux-table .badge{min-height:20px;font-size:11.5px!important;padding:1px 8px 1px 7px!important}
  :root body table.ux-table td .worker-action-slot{padding:4px 5px 5px!important;gap:2px!important}
  :root body table.ux-table td .worker-action-slot .icon-action{width:30px!important;height:30px!important;min-width:30px!important}
  :root body table.ux-table td .worker-action-grid{gap:4px!important}
}
/* Handled By: 2 lines + see more */
:root body .ux-clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-width:220px}
:root body .ux-clamp br{display:block}
:root body .ux-clamp.open{display:block;-webkit-line-clamp:unset;overflow:visible}
:root body .ux-more{border:0;background:none;padding:0;margin-top:2px;color:var(--t-brand-600);font:600 11.5px var(--t-font);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
@media (max-width:780px){:root body .ux-clamp{max-width:none}}

/* =====================================================================
   COMMON LOADING SCREEN (animated AWMS logo)
   ===================================================================== */
:root body .ux-loading-block{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:240px;width:100%;text-align:center!important;color:var(--t-muted)!important;font-size:13px!important;font-weight:500!important;background:transparent!important;border:0!important;box-shadow:none!important}
:root body .ux-loading-block::before{content:"";display:block;width:150px;height:150px;background:url("icons/awms-loader.gif") center/contain no-repeat}
:root body td.ux-loading-block{display:table-cell!important}
:root body td.ux-loading-block::before{margin:0 auto 4px}
:root body #view:empty,:root body #app:empty{min-height:70vh;background:url("icons/awms-loader.gif") center 38%/170px no-repeat}
:root body .global-loader-card{display:flex!important;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:24px 28px!important;min-width:300px}
:root body .global-loader-card::before{content:"";display:block;width:130px;height:130px;background:url("icons/awms-loader.gif") center/contain no-repeat}
:root body .global-loader-card > .loader,:root body .global-loader-card > .spinner{display:none!important}
:root body .upload-progress{align-items:center}
:root body .upload-progress > .spinner{width:72px!important;height:72px!important;border:0!important;animation:none!important;background:url("icons/awms-loader.gif") center/contain no-repeat;flex:none}
@media (min-width:781px){
  :root body table.ux-table td:first-child :is(span,div).muted > br{display:block!important;content:""}
  :root body table.ux-table td .worker-action-grid{display:flex!important;flex-wrap:wrap!important;grid-template-columns:none!important;width:auto!important}
  :root body table.ux-table td .worker-action-slot{min-width:58px!important}
  :root body table.ux-table td .worker-action-slot em{font-size:9px!important}
}
:root body .ux-loading-block :is(.loader,.spinner){display:none!important}

/* =====================================================================
   ORDER POP-UP: one layout for TO / SO / PO
   ===================================================================== */
:root body :is(.order-popup-barcode,.po-popup-barcode){display:flex!important;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:12px 16px!important;border:1px solid var(--t-line)!important;border-radius:14px!important;background:var(--t-surface-2)!important;margin:6px 0 12px!important}
:root body :is(.order-popup-barcode,.po-popup-barcode) svg:not(.lu){max-height:56px;width:auto!important}
:root body :is(.po-detail-meta){color:var(--t-muted);font-size:13px;margin:4px 0 10px}
:root body :is(.po-actor-grid,.actor-cards){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))!important;gap:10px!important;margin:10px 0!important}
:root body :is(.po-actor-card,.actor-cards > .card){padding:12px 14px!important;border-radius:12px!important;border:1px solid var(--t-line)!important;background:var(--t-surface-2)!important;min-height:0!important;box-shadow:none!important;display:flex!important;flex-direction:column;gap:2px}
:root body :is(.po-actor-card,.actor-cards > .card) > :first-child{font-size:11px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.05em;color:var(--t-muted)!important}
:root body :is(.po-actor-card,.actor-cards > .card) > :nth-child(2){font-size:16px!important;font-weight:700!important;color:var(--t-text)!important}
:root body :is(.po-actor-card,.actor-cards > .card) > :nth-child(n+3){font-size:12.5px!important;color:var(--t-muted)!important}
:root body :is(.po-detail-metrics,#modalBody .cards:not(.actor-cards):not(.compact-cards)){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:10px!important;margin:10px 0 14px!important}
:root body :is(.po-detail-metrics > .card,#modalBody .cards:not(.actor-cards):not(.compact-cards) > .card){padding:12px 14px!important;min-height:0!important;border-radius:12px!important;box-shadow:none!important;border:1px solid var(--t-line)!important;border-top:3px solid var(--t-brand)!important;display:flex!important;flex-direction:column;gap:4px}
:root body :is(.po-detail-metrics > .card,#modalBody .cards:not(.actor-cards):not(.compact-cards) > .card) > :first-child{font-size:11px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.05em;color:var(--t-muted)!important}
:root body :is(.po-detail-metrics > .card,#modalBody .cards:not(.actor-cards):not(.compact-cards) > .card) > :nth-child(2){font-size:22px!important;font-weight:700!important;line-height:1.15!important;color:var(--t-text)!important}
:root body #modalBody :is(h3,.section-title){font-size:15px!important;font-weight:650!important;margin:16px 0 8px!important}
:root body .modal-card.wide{width:min(1500px,calc(100vw - 32px))!important;max-width:min(1500px,calc(100vw - 32px))!important}
:root body .awm-more-text{font-weight:400!important;color:var(--t-text-2)}

/* =====================================================================
   PHONE CARDS v3 – compact multi-column cards for every list table
   ===================================================================== */
@media (max-width:780px){
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr:not(:has(> .ux-full-cell)){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0 12px!important;
    padding:12px 14px 10px!important;margin:0 0 10px!important;border-radius:16px!important;border:1px solid var(--t-line)!important;
    background:#fff!important;box-shadow:0 1px 2px rgba(16,24,40,.05),0 4px 14px -8px rgba(16,24,40,.12)!important;position:relative;overflow:hidden}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td{display:block!important;position:static!important;min-width:0!important;width:auto!important;
    padding:6px 0!important;border:0!important;border-top:1px dashed var(--t-line)!important;text-align:left!important;font-size:13.5px!important;line-height:1.35!important;background:transparent!important;box-shadow:none!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td[data-label]::before{position:static!important;display:block!important;width:auto!important;margin:0 0 2px!important;
    font-size:10px!important;font-weight:700!important;letter-spacing:.06em!important;color:var(--t-faint)!important;text-transform:uppercase!important;line-height:1.2!important;top:auto!important;left:auto!important}
  /* full-width parts of the card */
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child,
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:is([data-label="Action"],[data-label="Actions"],[data-label="Email"],[data-label*="Handled"],[data-label*="Item"],[data-label*="Reason"],[data-label="Description"],[data-label="Message"],[data-label="Error"]),
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td.worker-actions-cell,
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td.order-main-cell{grid-column:1 / -1!important}
  /* header of the card: order number big, no label, no top border */
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child{border-top:0!important;padding:0 0 8px!important;font-size:13px!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child::before{display:none!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child > br{display:none}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child :is(.order-number-copy,.mobile-card-title,.location-suggestion-pill){display:inline-flex!important;vertical-align:middle;margin:0 6px 4px 0!important;width:auto!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child :is(.order-number-copy a,.po-order-link,.order-link,b:first-child){font-size:16px!important;font-weight:750!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child :is(span.muted,div.muted,small){display:block;font-size:12px!important;color:var(--t-muted)!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child :is(span.muted,div.muted) b{color:var(--t-text-2)}
  /* two cells side by side get the dashed line only on top */
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:nth-child(2),:root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:nth-child(3){border-top:1px dashed var(--t-line)!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td .badge{white-space:nowrap!important;font-size:11.5px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td .muted{font-size:12px!important}
  /* actions: one row of icon buttons */
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:is([data-label="Action"],[data-label="Actions"]){display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding-top:10px!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:is([data-label="Action"],[data-label="Actions"])::before{display:none!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:is([data-label="Action"],[data-label="Actions"]) :is(.btn,.icon-action){width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;flex:0 0 auto!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:is([data-label="Action"],[data-label="Actions"]) .row-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:none!important}
  /* worker job tiles: compact strip */
  :root body .worker-card-table .worker-action-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(62px,1fr))!important;gap:6px!important;width:100%!important}
  :root body .worker-card-table .worker-action-slot{min-width:0!important;padding:5px 2px 6px!important;gap:3px!important;border-radius:12px!important}
  :root body .worker-card-table .worker-action-slot em{font-size:8.5px!important;letter-spacing:.02em!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%!important}
  :root body .worker-card-table .worker-action-slot .icon-action{width:36px!important;height:36px!important;min-width:36px!important}
  :root body .worker-card-table .worker-mobile-summary{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin-top:8px}
  /* status colour: left edge of the card */
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--neu-ring)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=ok]::before{background:var(--ok-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=warn]::before{background:var(--warn-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=bad]::before{background:var(--bad-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=info]::before{background:var(--info-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=vio]::before{background:var(--vio-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr[data-tone=org]::before{background:var(--org2-dot)}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child{box-shadow:none!important}
  :root body .ux-clamp{-webkit-line-clamp:2}
}
@media (max-width:780px){
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td[data-label]{padding-left:0!important;padding-right:0!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td[data-label]::before{position:static!important;width:auto!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td[data-label]:first-child{padding:0 0 8px!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td .badge{white-space:normal!important;overflow:visible;text-overflow:clip;line-height:1.25!important}
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child :is(span.muted,div.muted,small) b{font-size:12px!important;font-weight:600!important}
  :root body .worker-card-table > tbody > tr:has(.worker-mobile-summary) > td:is([data-label="Route"],[data-label="SKUs"],[data-label="Qty"],.desktop-status-only){display:none!important}
  :root body .worker-card-table > tbody > tr > td.worker-actions-cell::before{display:none!important}
  :root body .worker-card-table .worker-mobile-summary span{font-size:12px!important;padding:5px 8px!important;border-radius:9px!important}
}
@media (max-width:780px){
  :root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td[data-label]:not(:first-child)::before{content:attr(data-label)!important}
  :root body .worker-card-table .worker-mobile-summary b{font-size:9.5px!important}
}
@media (max-width:780px){
  :root body table.ux-cardtable,:root body table.worker-card-table{width:100%!important;min-width:0!important;max-width:100%!important}
  :root body table.ux-cardtable > tbody,:root body table.worker-card-table > tbody{width:100%!important}
}
@media (max-width:780px){
  :root body :is(#view,#app,#modalBody) table:is(.ux-cardtable,.worker-card-table){width:100%!important;min-width:0!important;max-width:100%!important}
  :root body :is(#view,#app,#modalBody) :is(.table-foot){min-width:0!important}
}

/* =====================================================================
   AWMS ASSISTANT (chat + voice)
   ===================================================================== */
.aw-assist{position:fixed;right:20px;bottom:20px;z-index:100000;font-family:var(--t-font)}
.aw-fab{width:56px;height:56px;border-radius:18px;border:0;cursor:pointer;color:#fff;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--t-brand),var(--t-brand-700));box-shadow:0 12px 28px -8px color-mix(in srgb,var(--t-brand) 70%,transparent),0 2px 6px rgba(16,24,40,.15);transition:transform .18s var(--t-ease)}
.aw-fab:hover{transform:translateY(-2px) scale(1.03)}
.aw-fab svg.lu{width:26px!important;height:26px!important}
.aw-fab::after{content:"";position:absolute;inset:-4px;border-radius:22px;border:2px solid color-mix(in srgb,var(--t-brand) 40%,transparent);animation:aw-ring 2.4s ease-out infinite;pointer-events:none}
@keyframes aw-ring{0%{opacity:.9;transform:scale(.92)}100%{opacity:0;transform:scale(1.18)}}
.aw-assist.open .aw-fab{transform:rotate(-8deg) scale(.92)}
.aw-panel{position:absolute;right:0;bottom:70px;width:min(400px,calc(100vw - 24px));height:min(620px,calc(100vh - 120px));display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--t-line);border-radius:22px;box-shadow:0 30px 70px -20px rgba(16,24,40,.45);overflow:hidden;
  opacity:0;transform:translateY(14px) scale(.97);transform-origin:bottom right;pointer-events:none;transition:opacity .2s,transform .24s var(--t-ease)}
.aw-assist.open .aw-panel{opacity:1;transform:none;pointer-events:auto}
.aw-head{display:flex;align-items:center;gap:10px;padding:14px 14px 12px;color:#fff;background:linear-gradient(135deg,var(--t-brand),var(--t-brand-700))}
.aw-avatar{width:36px;height:36px;border-radius:12px;background:rgba(255,255,255,.18);display:grid;place-items:center}
.aw-title{flex:1;min-width:0}.aw-title b{display:block;font-size:15px}.aw-sub{font-size:12px;opacity:.85}
.aw-hbtn{width:32px;height:32px;border-radius:10px;border:0;background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center;cursor:pointer}
.aw-hbtn:hover,.aw-hbtn.on{background:rgba(255,255,255,.3)}
.aw-body{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--t-surface-2)}
.aw-msg{max-width:88%;padding:10px 12px;border-radius:16px;font-size:13.5px;line-height:1.45;animation:t-pop .2s var(--t-ease);overflow-wrap:anywhere}
.aw-msg.me{align-self:flex-end;background:var(--t-brand);color:#fff;border-bottom-right-radius:6px}
.aw-msg.bot{align-self:flex-start;background:#fff;color:var(--t-text);border:1px solid var(--t-line);border-bottom-left-radius:6px}
.aw-msg.bot.warn{background:var(--warn-bg);border-color:var(--warn-ring);color:#7a2e0e}
.aw-msg ul{margin:6px 0 0;padding-left:18px}.aw-msg li{margin:3px 0}
.aw-typing{display:flex;gap:4px;padding:12px 14px}.aw-typing i{width:7px;height:7px;border-radius:50%;background:var(--t-faint);animation:aw-dot 1s infinite}
.aw-typing i:nth-child(2){animation-delay:.15s}.aw-typing i:nth-child(3){animation-delay:.3s}
@keyframes aw-dot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.aw-chips{display:flex;gap:6px;overflow-x:auto;padding:8px 12px;border-top:1px solid var(--t-line);background:#fff;scrollbar-width:none}
.aw-chips::-webkit-scrollbar{display:none}
.aw-chip{flex:0 0 auto;border:1px solid var(--t-brand-100);background:var(--t-brand-50);color:var(--t-brand-700);border-radius:999px;padding:6px 11px;font:600 12px var(--t-font);cursor:pointer;white-space:nowrap}
.aw-chip:hover{background:var(--t-brand);color:#fff;border-color:var(--t-brand)}
.aw-opts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.aw-input{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--t-line);background:#fff}
.aw-input input{flex:1;min-width:0;border:1px solid var(--t-line-2);border-radius:12px;padding:10px 12px;font:14px var(--t-font);outline:none}
.aw-input input:focus{border-color:var(--t-brand);box-shadow:var(--t-ring)}
.aw-mic,.aw-send{width:42px;height:42px;flex:none;border-radius:12px;border:0;cursor:pointer;display:grid;place-items:center}
.aw-send{background:var(--t-brand);color:#fff}
.aw-mic{background:var(--t-surface-3);color:var(--t-text-2)}
.aw-mic.on{background:var(--bad-dot);color:#fff;animation:aw-pulse 1.2s infinite}
@keyframes aw-pulse{0%{box-shadow:0 0 0 0 rgba(240,68,56,.5)}100%{box-shadow:0 0 0 12px rgba(240,68,56,0)}}
.aw-card{display:flex;flex-direction:column;gap:8px;min-width:250px}
.aw-card-h{display:flex;align-items:center;gap:10px}.aw-card-h > svg{width:20px!important;height:20px!important;color:var(--t-brand)}
.aw-card-h div{flex:1;min-width:0}.aw-card-h b{display:block;font-size:14px}.aw-card-h span{display:block;font-size:12px;color:var(--t-muted)}
.aw-card-h em{font-style:normal;font-size:11.5px;font-weight:700;color:var(--t-brand-700);background:var(--t-brand-50);border-radius:999px;padding:2px 9px}
.aw-kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:6px}
.aw-kpi span{background:var(--t-surface-2);border:1px solid var(--t-line);border-radius:10px;padding:6px 8px;font-size:10.5px;color:var(--t-muted);text-transform:uppercase;letter-spacing:.04em}
.aw-kpi b{display:block;font-size:16px;color:var(--t-text);letter-spacing:0;text-transform:none}
.aw-tbl{width:100%;border-collapse:collapse;font-size:12.5px}.aw-tbl th{text-align:left;font-size:10.5px;color:var(--t-muted);text-transform:uppercase;padding:4px 6px;border-bottom:1px solid var(--t-line)}
.aw-tbl td{padding:5px 6px;border-bottom:1px dashed var(--t-line)}
.aw-stages{display:flex;flex-direction:column;gap:4px}
.aw-stage{font-size:12px;padding:4px 8px;border-radius:8px;background:var(--neu-bg);color:var(--neu)}
.aw-stage.ok{background:var(--ok-bg);color:var(--ok)}.aw-stage.info{background:var(--info-bg);color:var(--info)}.aw-stage.warn{background:var(--warn-bg);color:var(--warn)}
.aw-actions{display:flex;flex-wrap:wrap;gap:6px}
.aw-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--t-brand-100);background:var(--t-brand-50);color:var(--t-brand-700);border-radius:10px;padding:6px 10px;font:600 12.5px var(--t-font);cursor:pointer}
.aw-btn:hover{background:var(--t-brand);color:#fff}
.aw-cfgform{display:grid;gap:8px;margin-top:8px}.aw-cfgform label{display:grid;gap:4px;font-size:12px}
.aw-cfgform input{border:1px solid var(--t-line-2);border-radius:10px;padding:8px 10px;font:13px var(--t-font)}
@media (max-width:780px){
  .aw-assist{right:14px;bottom:calc(84px + env(safe-area-inset-bottom))}
  .aw-fab{width:50px;height:50px;border-radius:16px}
  .aw-assist.open{inset:0;right:0;bottom:0}
  .aw-assist.open .aw-fab{display:none}
  .aw-panel{position:fixed;inset:0;width:100%;height:100%;border-radius:0;bottom:0;right:0}
  .aw-input input{font-size:16px}
}
html.ux-modal-open .aw-assist:not(.open){display:none}
@media (max-width:780px){html:has(.aw-assist.open) :root body #toast,html:has(.aw-assist.open) #toast{top:72px!important;bottom:auto!important}}
.aw-panel{visibility:hidden}.aw-assist.open .aw-panel{visibility:visible}
@media (max-width:780px){.aw-hbtn{width:38px;height:38px}.aw-chip{padding:9px 13px}:root body .ux-more{padding:8px 0!important;margin:0}}
@media (max-width:780px){:root body :is(.ux-cardtable,.worker-card-table) > tbody > tr > td:first-child .worker-mobile-summary span b{font-size:9.5px!important;font-weight:700!important;color:var(--t-faint)!important;letter-spacing:.05em}}

/* =====================================================================
   v2.6 – coloured table header, warehouse chips, Status+D365, copy, bell
   ===================================================================== */
:root body table.ux-table thead th,:root body #modalBody table thead th,:root body .po-detail-dialog table thead th{
  background:linear-gradient(180deg,var(--t-brand) 0%,var(--t-brand-600) 100%)!important;color:#fff!important;border-bottom:0!important;text-shadow:0 1px 0 rgba(0,0,0,.12)}
:root body table.ux-table thead th *,:root body #modalBody table thead th *{color:inherit!important}
:root body table.ux-table thead th:first-child{border-top-left-radius:10px}
:root body table.ux-table thead th:last-child{border-top-right-radius:10px}
:root body .ux-colbtn{color:#fff!important}
:root body .ux-colbtn:hover,:root body .ux-colbtn:focus-visible{background:rgba(255,255,255,.18)!important;border-color:rgba(255,255,255,.35)!important}
:root body .ux-th-sub{opacity:.75;font-weight:600}
.ux-merged-hidden{display:none!important}
:root body .ux-d365-in{margin-top:5px}
:root body .ux-d365-in:empty{display:none}

.ux-wh{display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:700;letter-spacing:.02em;line-height:1.5;white-space:nowrap;vertical-align:middle;
  background:hsl(var(--wh-h) 85% 94%);color:hsl(var(--wh-h) 65% 28%);border:1px solid hsl(var(--wh-h) 60% 82%)}
:root body td :is(b,strong):has(> .ux-wh:only-child){font-weight:inherit}

:root body .ux-copy{margin-left:4px;vertical-align:middle}
:root body .ux-copy.copied{color:var(--ok)!important;background:var(--ok-bg)!important}

/* notifications */
.nf{position:relative;margin-left:auto;order:4}
.nf-bell{position:relative;width:40px;height:40px;border-radius:12px;border:1px solid var(--t-line);background:#fff;color:var(--t-text-2);display:grid;place-items:center;cursor:pointer;box-shadow:var(--t-sh-xs);transition:background .15s}
.nf-bell:hover{background:var(--t-surface-2)}
.nf-bell svg.lu{width:20px!important;height:20px!important}
.nf-bell.has svg{animation:nf-ring 2.8s ease-in-out infinite;transform-origin:50% 10%}
@keyframes nf-ring{0%,88%,100%{transform:rotate(0)}91%{transform:rotate(14deg)}94%{transform:rotate(-12deg)}97%{transform:rotate(6deg)}}
.nf-count{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#d92d20;color:#fff;font:700 11px/20px var(--t-font);text-align:center;border:2px solid #fff;box-shadow:0 2px 6px rgba(217,45,32,.35)}
.nf-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(380px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 90px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--t-line);border-radius:16px;box-shadow:var(--t-sh-lg);overflow:hidden;z-index:200;animation:t-pop .18s var(--t-ease)}
.nf-panel[hidden]{display:none}
.nf-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--t-line);background:linear-gradient(180deg,var(--t-brand-50),#fff)}
.nf-head b{font-size:14px}.nf-org{font-size:11px;font-weight:700;color:var(--t-brand-700);background:var(--t-brand-100);border-radius:999px;padding:1px 8px}
.nf-all{margin-left:auto;border:0;background:none;color:var(--t-brand-600);font:600 12.5px var(--t-font);cursor:pointer;padding:6px 4px}
.nf-all:disabled{color:var(--t-faint);cursor:default}
.nf-list{overflow:auto}
.nf-item{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:start;width:100%;text-align:left;border:0;border-bottom:1px solid var(--t-line);background:#fff;padding:11px 14px;cursor:pointer;font-family:var(--t-font);position:relative}
.nf-item:hover{background:var(--t-surface-2)}
.nf-item.unread{background:var(--t-brand-50)}
.nf-item.unread::before{content:"";position:absolute;left:5px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:var(--t-brand)}
.nf-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--ok-bg);color:var(--ok)}
.nf-txt b{font-size:13px;color:var(--t-text)}.nf-txt em{font-style:normal;font-size:12px;color:var(--ok);font-weight:600}
.nf-txt small{display:block;color:var(--t-muted);font-size:12px;margin-top:2px}
.nf-time{font-size:11px;color:var(--t-faint);white-space:nowrap}
.nf-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:36px 16px;color:var(--t-muted);font-size:13px}
.nf-empty svg{width:28px!important;height:28px!important;opacity:.5}
@media (max-width:780px){
  .nf{order:2;margin-left:0}
  .nf-bell{width:42px;height:42px}
  .nf-panel{position:fixed;left:10px;right:10px;top:60px;width:auto}
}
@media (max-width:780px){:root body .topbar > .hamb + div{flex:1 1 0!important}:root body .topbar .nf{order:1}:root body .topbar > .hamb{order:0}:root body .topbar > .hamb + div{order:0}}
:root body .topbar .nf .nf-count{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#d92d20!important;color:#fff!important;font:700 11px/16px var(--t-font)!important;text-align:center;border:2px solid #fff;display:block}
:root body .topbar .nf .nf-count[hidden]{display:none!important}
@media (min-width:781px){:root body table.ux-table td[data-label="Route"]{white-space:nowrap}}
:root body #modal,:root body .po-modal,:root body .po-detail-modal{z-index:9000!important}
:root body .item-id-line{white-space:nowrap}
:root body :is(table,tbody,tr) > .ux-merged-hidden,:root body tr > td.ux-merged-hidden,:root body tr > th.ux-merged-hidden{display:none!important}
@media (max-width:780px){
  :root body .topbar > .hamb + div{flex:1 1 calc(100% - 120px)!important}
  :root body .topbar .org-switcher{flex:1 1 calc(50% - 4px)!important;order:5!important}
  /* worker cards: status lives in the card title, so show only the D365 part of the merged cell */
  :root body .worker-card-table > tbody > tr > td.desktop-status-only:has(> .ux-d365-in){display:block!important}
  :root body .worker-card-table > tbody > tr > td.desktop-status-only:has(> .ux-d365-in) > :not(.ux-d365-in){display:none!important}
  :root body .worker-card-table > tbody > tr > td.desktop-status-only:has(> .ux-d365-in)::before{content:"D365"!important}
  :root body .worker-card-table > tbody > tr > td.desktop-status-only .ux-d365-in{margin:0}
  :root body .worker-mobile-summary span{white-space:nowrap}
}
:root body :is(#view,#app,#modalBody) :is(.ux-cardtable,.worker-card-table,table) > :is(thead,tbody) > tr > .ux-merged-hidden{display:none!important}
:root body :is(#view,#app,#modalBody) table > :is(thead,tbody) > tr > .ux-merged-hidden{display:none!important}
@media (max-width:780px){:root body .worker-mobile-summary span{white-space:normal}:root body .worker-mobile-summary span:first-child{white-space:nowrap}}
.aw-panel{display:none}
.aw-assist.open .aw-panel{display:flex;animation:t-pop .22s var(--t-ease)}
/* Respect rows hidden by the pager / filters (inline display:none) – the card layout must never re-show them */
:root body :is(#view,#app,#modalBody) table > tbody > tr[style*="display: none"],:root body :is(#view,#app,#modalBody) table > tbody > tr[style*="display:none"],:root body :is(#view,#app,#modalBody) table > tbody > tr[hidden]{display:none!important}
:root body :is(#view,#app,#modalBody) table > tbody > tr > td[style*="display: none"],:root body :is(#view,#app,#modalBody) table > tbody > tr > td[style*="display:none"]{display:none!important}


/* ---- JSON viewer (API Logs & Activity: Request / Response / Activity details) ---- */
:root body #modalBody > .json-modal{padding-right:0!important}
:root body .json-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 44px 12px 0}
:root body .json-modal-head h2{margin:0}
:root body .json-modal-tools{display:flex;align-items:center;gap:8px}
:root body .json-modal .json-copy-btn.copied{background:var(--ok,#16a34a)!important;border-color:var(--ok,#16a34a)!important;color:#fff!important}
:root body .json-modal pre.json-view{margin:0;width:100%;box-sizing:border-box;max-height:min(68vh,720px);overflow:auto;padding:14px 16px;border-radius:12px;border:1px solid #1e293b;background:#0f172a!important;color:#e2e8f0!important;font:500 12.5px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;white-space:pre;tab-size:2;text-align:left;-webkit-overflow-scrolling:touch}
:root body .json-modal.wrap pre.json-view{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
:root body .json-modal.wrap .json-wrap-btn{background:var(--brand-soft,#e0e7ff)!important}
:root body .json-view .jk{color:#7dd3fc}
:root body .json-view .js{color:#86efac}
:root body .json-view .jn{color:#fbbf24}
:root body .json-view .jl{color:#f0abfc}
@media (max-width:760px){
  :root body .json-modal-head{margin-right:40px}
  :root body .json-modal pre.json-view{font-size:11.5px;max-height:70vh;padding:10px 12px}
}

/* Product thumbnail: never let the alt text of a missing image spill over the row */
:root body .item-with-img img{overflow:hidden;font-size:0;color:transparent;background:#f1f5f9}


/* ---- Modal title bar: solid, edge to edge, so content never shows above it while scrolling ---- */
:root body #modal .modal-card{--mpad-y:24px;--mpad-x:24px}
@media (max-width:760px){:root body #modal .modal-card{--mpad-y:18px;--mpad-x:14px}}
:root body #modal .modal-card #modalBody > .modal-title-row{top:0!important;background:#fff!important;border-bottom:1px solid var(--t-line)!important;margin:0 0 14px!important;padding:0 52px 12px 0!important;box-shadow:0 0 0 100vmax #fff!important;clip-path:inset(-100vmax -100vmax 0 -100vmax)}

/* ---- Release Approval popup ---- */
:root body #modalBody .release-fields{display:grid;grid-template-columns:minmax(200px,280px) 1fr;gap:14px 18px;margin:16px 0 4px;align-items:start}
:root body #modalBody .release-fields > div{min-width:0}
:root body #modalBody .release-fields .wide{grid-column:auto}
:root body #modalBody .release-fields textarea{min-height:44px;resize:vertical}
:root body #modalBody .release-approved-qty{width:110px;max-width:100%;text-align:center;font-weight:700}
:root body #modalBody .checkbox-inline{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-weight:600;cursor:pointer}
:root body #modalBody .checkbox-inline input{width:18px;height:18px;margin:0;flex:0 0 auto}
:root body #modalBody .release-decision-actions{position:sticky;bottom:calc(-1 * var(--mpad-y,24px));z-index:6;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin:18px calc(-1 * var(--mpad-x,24px)) calc(-1 * var(--mpad-y,24px));padding:14px var(--mpad-x,24px);background:#fff;border-top:1px solid var(--t-line);border-radius:0 0 var(--t-r-xl) var(--t-r-xl)}

:root body .release-shortage-panel{margin:18px 0 0;padding:0;border:1px solid #fecaca;border-radius:var(--t-r-lg);background:#fff;overflow:hidden;color:var(--t-text)}
:root body .release-shortage-panel .rsp-head{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;background:#fef2f2;border-bottom:1px solid #fecaca}
:root body .release-shortage-panel .rsp-ico{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#fee2e2;color:#b91c1c}
:root body .release-shortage-panel .rsp-head b{display:block;color:#991b1b;font-size:14.5px;line-height:1.35}
:root body .release-shortage-panel .rsp-head span:not(.rsp-ico){display:block;margin-top:2px;color:var(--t-muted);font-size:12.5px}
:root body .release-shortage-panel .rsp-errors{margin:12px 16px 0;padding-left:18px;color:#991b1b;font-size:13px}
:root body .release-shortage-panel .release-suggestion-line{padding:14px 16px;border-bottom:1px solid var(--t-line)}
:root body .release-shortage-panel .release-suggestion-line:last-of-type{border-bottom:0}
:root body .release-shortage-panel .rsp-line-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
:root body .release-shortage-panel .rsp-line-title{min-width:0;flex:1 1 240px}
:root body .release-shortage-panel .rsp-line-title b{display:block;font-size:14px;overflow-wrap:anywhere}
:root body .release-shortage-panel .rsp-line-title small{display:block;margin-top:2px;color:var(--t-muted);font-size:12.5px;overflow-wrap:anywhere}
:root body .release-shortage-panel .rsp-facts{display:flex;gap:8px;flex-wrap:wrap}
:root body .release-shortage-panel .rsp-facts > span{display:flex;flex-direction:column;gap:2px;padding:7px 12px;border:1px solid var(--t-line);border-radius:var(--t-r);background:var(--t-surface-2);min-width:96px}
:root body .release-shortage-panel .rsp-facts small{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--t-muted)}
:root body .release-shortage-panel .rsp-facts b{font-size:13px;overflow-wrap:anywhere}
:root body .release-shortage-panel .rsp-facts .sug{background:#ecfdf3;border-color:#abefc6}
:root body .release-shortage-panel .rsp-facts .sug b{color:#067647}
:root body .release-shortage-panel .rsp-shorts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
:root body .release-shortage-panel .rsp-short{padding:4px 10px;border-radius:999px;background:#fef2f2;border:1px solid #fecaca;color:#991b1b;font-size:12px}
:root body .release-shortage-panel .rsp-hint{margin:12px 0 8px;color:var(--t-muted);font-size:12.5px}
:root body .release-shortage-panel .rsp-none{margin-top:12px;padding:10px 12px;border-radius:var(--t-r);background:var(--t-surface-2);color:var(--t-text-2);font-size:13px;display:flex;gap:8px;align-items:center}
:root body .release-shortage-panel .release-location-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:8px}
:root body .release-shortage-panel .release-location-option{display:grid;grid-template-columns:20px minmax(0,1fr) auto 96px;align-items:center;gap:10px;margin:0;padding:9px 12px;border:1px solid var(--t-line);border-radius:var(--t-r);background:#fff;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s;text-transform:none;letter-spacing:0;font-weight:500;color:var(--t-text)}
:root body .release-shortage-panel .release-location-option:hover{border-color:var(--t-line-2)}
:root body .release-shortage-panel .release-location-option.selected{border-color:#16a34a;background:#f0fdf4;box-shadow:0 0 0 3px rgba(22,163,74,.12)}
:root body .release-shortage-panel .release-location-check{width:18px;height:18px;margin:0;accent-color:#16a34a}
:root body .release-shortage-panel .rlo-name{min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:root body .release-shortage-panel .rlo-name b{font-size:13.5px;overflow-wrap:anywhere}
:root body .release-shortage-panel .rlo-name em{font-style:normal;font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:999px;background:#dcfae6;color:#067647}
:root body .release-shortage-panel .rlo-avail{font-size:12px;color:var(--t-muted);white-space:nowrap}
:root body .release-shortage-panel .rlo-avail b{color:var(--t-text)}
:root body .release-shortage-panel .release-location-qty{width:96px!important;min-width:0!important;height:36px!important;padding:6px 8px!important;margin:0!important;text-align:center;font-weight:700}
:root body .release-shortage-panel .release-location-qty:disabled{background:var(--t-surface-3)!important;color:var(--t-faint)!important}
:root body .release-shortage-panel .rsp-line-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
:root body .release-shortage-panel .rsp-total{display:inline-flex;align-items:baseline;gap:6px;padding:6px 12px;border-radius:999px;font-size:12.5px;border:1px solid var(--t-line);background:var(--t-surface-2)}
:root body .release-shortage-panel .rsp-total b{font-size:15px}
:root body .release-shortage-panel .rsp-total.ok{background:#ecfdf3;border-color:#abefc6;color:#067647}
:root body .release-shortage-panel .rsp-total.bad{background:#fffaeb;border-color:#fedf89;color:#b54708}
:root body .release-shortage-panel .rsp-foot{display:flex;justify-content:flex-end;padding:12px 16px;background:var(--t-surface-2);border-top:1px solid var(--t-line)}
:root body .release-shortage-panel .btn.is-loading{opacity:.7;pointer-events:none}
@media (max-width:760px){
  :root body #modalBody .release-fields{grid-template-columns:1fr}
  :root body #modalBody .release-decision-actions{justify-content:stretch}
  :root body #modalBody .release-decision-actions .btn{flex:1 1 0;justify-content:center}
  :root body .release-shortage-panel .release-location-options{grid-template-columns:1fr}
  :root body .release-shortage-panel .release-location-option{grid-template-columns:20px minmax(0,1fr) 84px;row-gap:2px}
  :root body .release-shortage-panel .rlo-avail{grid-column:2;grid-row:2}
  :root body .release-shortage-panel .release-location-qty{grid-column:3;grid-row:1 / span 2;width:84px!important}
  :root body .release-shortage-panel .rsp-facts{width:100%;flex-direction:column;gap:6px}
  :root body .release-shortage-panel .rsp-facts > span{flex-direction:row;justify-content:space-between;align-items:center;gap:12px;min-width:0}
  :root body .release-shortage-panel .rsp-facts b{text-align:right}
  :root body .release-shortage-panel .rsp-foot .btn{width:100%;justify-content:center}
}

/* ---- Confetti (shown once after an order is approved) ---- */
.ux-confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:99999}

/* ---- Order Receive (Transfer Order) ---- */
:root body .order-receive-page .rcv-head-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
:root body .order-receive-page .rcv-next{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--t-line);border-radius:999px;background:#fff;font-size:12.5px;color:var(--t-muted);white-space:nowrap}
:root body .order-receive-page .rcv-next b{color:var(--t-text);font-variant-numeric:tabular-nums}
:root body .order-receive-page .rcv-store-card{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:14px 0;padding:14px 16px;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;box-shadow:var(--t-sh-xs)}
:root body .order-receive-page .rcv-store-field{flex:0 1 380px;min-width:240px}
:root body .order-receive-page .rcv-store-field label{display:flex;align-items:center;gap:6px;margin-bottom:6px}
:root body .order-receive-page .rcv-store-field select{width:100%}
:root body .order-receive-page .rcv-store-meta{padding-bottom:10px;font-size:13px}
:root body .order-receive-page .rcv-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:56px 16px;border:1px dashed var(--t-line-2);border-radius:var(--t-r-lg);background:var(--t-surface-2);text-align:center;color:var(--t-muted)}
:root body .order-receive-page .rcv-empty svg,:root body .order-receive-page .rcv-empty i{width:34px;height:34px;font-size:30px;color:var(--t-faint);margin-bottom:6px}
:root body .order-receive-page .rcv-empty b{color:var(--t-text);font-size:15px}
:root body .order-receive-page .rcv-count{display:inline-block;min-width:20px;margin-left:4px;padding:1px 7px;border-radius:999px;background:rgba(15,23,42,.08);font-size:11.5px;font-weight:700;text-align:center}
:root body .order-receive-page .tab.active .rcv-count{background:rgba(255,255,255,.25)}
:root body .rcv-progress{display:flex;align-items:center;gap:6px;white-space:nowrap}
:root body .rcv-progress-bar{flex:0 0 64px;height:6px;border-radius:999px;background:var(--t-surface-3);overflow:hidden}
:root body .rcv-progress-bar span{display:block;height:100%;border-radius:999px;background:#16a34a}
:root body .rcv-extra-flag{display:inline-flex;align-items:center;gap:4px;margin-top:4px;padding:1px 8px;border-radius:999px;background:#fffaeb;border:1px solid #fedf89;color:#b54708;font-size:11.5px;font-weight:600}
:root body .rcv-extra-flag svg{width:12px;height:12px}
:root body .btn.is-loading{opacity:.7;pointer-events:none}

:root body #modalBody .rcv-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
:root body #modalBody .rcv-stats > div{padding:10px 14px;border:1px solid var(--t-line);border-radius:var(--t-r);background:var(--t-surface-2);min-width:0}
:root body #modalBody .rcv-stats small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--t-muted)}
:root body #modalBody .rcv-stats b{display:block;margin-top:2px;font-size:18px;overflow-wrap:anywhere}
:root body #modalBody .rcv-line-tools{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}
:root body #modalBody .rcv-qty{display:flex;align-items:center;gap:8px;white-space:nowrap}
:root body #modalBody .rcv-qty-input{width:96px!important;min-width:0!important;height:36px!important;padding:6px 8px!important;margin:0!important;text-align:center;font-weight:700}
:root body #modalBody .rcv-qty-input.rcv-capped{border-color:#f59e0b!important;box-shadow:0 0 0 3px rgba(245,158,11,.2)!important}
:root body #modalBody .rcv-section{margin-top:18px;padding-top:16px;border-top:1px solid var(--t-line)}
:root body #modalBody .rcv-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
:root body #modalBody .rcv-section-title h3{display:flex;align-items:center;gap:8px;margin:0;font-size:15px}
:root body #modalBody .rcv-extras{display:grid;gap:8px;margin-bottom:10px}
:root body #modalBody .rcv-extras:empty{display:none}
:root body #modalBody .rcv-extra-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) 90px 80px minmax(0,1.6fr) auto;gap:8px;align-items:end;padding:10px 12px;border:1px solid #fedf89;border-radius:var(--t-r);background:#fffcf5}
:root body #modalBody .rcv-extra-row > div{min-width:0}
:root body #modalBody .rcv-extra-row label{display:block;margin-bottom:4px;font-size:11px}
:root body #modalBody .rcv-extra-row .input{width:100%;min-width:0;margin:0}
:root body #modalBody .rcv-extra-remove{height:38px;padding:0 10px}
:root body #modalBody .rcv-two{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px}
:root body #modalBody .rcv-two > div{min-width:0}
:root body #modalBody .rcv-two textarea{width:100%;resize:vertical}
:root body #modalBody .rcv-attach-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
:root body #modalBody .rcv-file-btn{cursor:pointer;text-transform:none;letter-spacing:0}
:root body #modalBody .rcv-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
:root body #modalBody .rcv-thumbs:empty{display:none}
:root body #modalBody .rcv-thumb{position:relative;display:block;width:68px;height:68px;border-radius:10px;border:1px solid var(--t-line);background:var(--t-surface-2);overflow:hidden}
:root body #modalBody .rcv-thumb img{width:100%;height:100%;object-fit:cover;display:block}
:root body #modalBody .rcv-thumb-file{display:grid;place-items:center;width:100%;height:100%;font-size:11px;font-weight:700;color:var(--t-muted)}
:root body #modalBody .rcv-thumb-x{position:absolute;top:2px;right:2px;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:rgba(15,23,42,.75);color:#fff;font-size:15px;line-height:22px;cursor:pointer}
:root body #modalBody .rcv-receipt{padding:10px 12px;border:1px solid var(--t-line);border-radius:var(--t-r);background:var(--t-surface-2);margin-bottom:8px}
:root body #modalBody .rcv-receipt-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
:root body #modalBody .rcv-receipt-tags{display:flex;gap:6px;flex-wrap:wrap}
:root body #modalBody .rcv-receipt-lines{margin:8px 0 0;padding-left:18px;font-size:13px}
:root body #modalBody .rcv-receipt-lines .rcv-x{color:#b54708}
:root body #modalBody .rcv-receipt-remarks{margin-top:6px;font-size:13px}
:root body #modalBody .rcv-actions{align-items:center}
:root body #modalBody .rcv-summary{margin-right:auto;padding:6px 12px;border-radius:999px;border:1px solid var(--t-line);background:var(--t-surface-2);font-size:12.5px}
:root body #modalBody .rcv-summary.full{background:#ecfdf3;border-color:#abefc6;color:#067647}
:root body #modalBody .rcv-summary.partial{background:#fffaeb;border-color:#fedf89;color:#b54708}
@media (max-width:760px){
  :root body .order-receive-page .rcv-head-actions{width:100%;flex-wrap:wrap}
  :root body .order-receive-page .rcv-store-field{flex:1 1 100%}
  :root body #modalBody .rcv-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  :root body #modalBody .rcv-two{grid-template-columns:1fr}
  :root body #modalBody .rcv-extra-row{grid-template-columns:1fr 1fr}
  :root body #modalBody .rcv-extra-row .rcv-extra-remarks{grid-column:1 / -1}
  :root body #modalBody .rcv-extra-remove{grid-column:1 / -1;justify-self:end}
  :root body #modalBody .rcv-summary{flex:1 1 100%;margin-right:0;text-align:center}
  :root body #modalBody .rcv-qty-input{width:84px!important}
}
:root body #modalBody .rcv-count-hint{display:inline-flex;align-items:center;gap:6px;font-size:12.5px}
:root body .to-d365-chip{margin-top:3px}

/* ---- Settings > Users & Access ---- */
:root body .ua-layout{display:grid;grid-template-columns:minmax(260px,320px) minmax(0,1fr);gap:18px;align-items:start;margin-top:6px}
:root body .ua-list{position:sticky;top:84px;display:flex;flex-direction:column;gap:8px;min-width:0}
:root body .ua-search{width:100%}
:root body .ua-search .input{width:100%}
:root body .ua-list-count{font-size:12px;color:var(--t-muted);padding:0 2px}
:root body .ua-users{display:flex;flex-direction:column;gap:6px;max-height:calc(100vh - 250px);overflow:auto;padding:2px}
:root body .ua-user{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border:1px solid var(--t-line);border-radius:var(--t-r);background:#fff;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s;color:var(--t-text)}
:root body .ua-user:hover{border-color:var(--t-line-2);background:var(--t-surface-2)}
:root body .ua-user.active{border-color:var(--t-org);background:var(--t-brand-50);box-shadow:0 0 0 3px rgba(37,99,235,.10)}
:root body .ua-user > svg,:root body .ua-user > i{flex:0 0 auto;width:14px;height:14px;color:var(--t-faint)}
:root body .ua-avatar{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--t-surface-3);color:var(--t-text-2);font-size:12.5px;font-weight:700;letter-spacing:.02em}
:root body .ua-user.active .ua-avatar,:root body .ua-avatar.big{background:var(--t-org);color:#fff}
:root body .ua-avatar.big{width:48px;height:48px;font-size:16px}
:root body .ua-user-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
:root body .ua-user-text b{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body .ua-user-text small{font-size:11.5px;color:var(--t-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body .ua-user-text em{font-style:normal;font-size:11.5px;color:var(--t-text-2)}
:root body .ua-detail{min-width:0;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;padding:18px}
:root body .ua-placeholder{display:flex;flex-direction:column;align-items:center;gap:6px;padding:64px 16px;text-align:center;color:var(--t-muted)}
:root body .ua-placeholder svg,:root body .ua-placeholder i{width:34px;height:34px;font-size:30px;color:var(--t-faint);margin-bottom:6px}
:root body .ua-placeholder b{font-size:15px;color:var(--t-text)}
:root body .ua-detail-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--t-line);margin-bottom:6px}
:root body .ua-detail-name{min-width:0;flex:1 1 200px}
:root body .ua-detail-name h2{margin:0;font-size:18px;overflow-wrap:anywhere}
:root body .ua-roles{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
:root body .ua-back{display:none}
:root body .ua-section{padding:16px 0;border-bottom:1px solid var(--t-line)}
:root body .ua-section[hidden]{display:none}
:root body .ua-sec-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:12px}
:root body .ua-sec-ico{flex:0 0 auto;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--t-brand-50);color:var(--t-brand-700)}
:root body .ua-sec-title{flex:1 1 0;min-width:0}
:root body .ua-sec-title h3{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;font-size:14.5px}
:root body .ua-sec-title p{margin:2px 0 0;font-size:12.5px;color:var(--t-muted)}
:root body .ua-count{padding:1px 8px;border-radius:999px;background:var(--t-surface-3);font-size:11.5px;font-weight:600;color:var(--t-text-2)}
:root body .ua-sec-tools{flex:0 0 auto;display:flex;gap:12px;padding-top:2px}
:root body .ua-link{border:0;background:none;padding:2px 0;font-size:12.5px;font-weight:600;color:var(--t-brand-700);cursor:pointer}
:root body .ua-link:hover{text-decoration:underline}
:root body .ua-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
:root body .ua-chip{position:relative;display:flex;align-items:center;gap:10px;margin:0;padding:9px 12px;min-height:44px;border:1px solid var(--t-line);border-radius:var(--t-r);background:#fff;cursor:pointer;text-transform:none;letter-spacing:0;font-weight:500;color:var(--t-text);transition:border-color .15s,background .15s}
:root body .ua-chip:hover{border-color:var(--t-line-2)}
:root body .ua-chip input{position:absolute;opacity:0;width:1px;height:1px}
:root body .ua-chip-box{flex:0 0 auto;width:18px;height:18px;border-radius:5px;border:1.5px solid var(--t-line-2);background:#fff;display:grid;place-items:center;transition:background .15s,border-color .15s}
:root body .ua-chip.on{border-color:#16a34a;background:#f0fdf4}
:root body .ua-chip.on .ua-chip-box{background:#16a34a;border-color:#16a34a}
:root body .ua-chip.on .ua-chip-box::after{content:"";width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
:root body .ua-chip input:focus-visible + .ua-chip-box{box-shadow:var(--t-ring)}
:root body .ua-chip input:disabled ~ .ua-chip-text{color:var(--t-muted)}
:root body .ua-chip-text{min-width:0;display:flex;flex-direction:column}
:root body .ua-chip-text b{font-size:13px;font-weight:600;overflow-wrap:anywhere}
:root body .ua-chip-text small{font-size:11.5px;color:var(--t-muted);overflow-wrap:anywhere}
:root body .ua-group + .ua-group{margin-top:12px}
:root body .ua-group-title{margin-bottom:6px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--t-muted)}
:root body .ua-group-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
:root body .ua-group-tools{margin-left:auto;display:inline-flex;align-items:center;gap:10px;text-transform:none;letter-spacing:0;font-size:12px}
:root body .ua-group-count{font-weight:600;color:var(--t-muted)}
:root body .ua-section[data-ua-section="whs"] .ua-group{padding:12px;border:1px solid var(--t-line);border-radius:var(--t-r);background:var(--t-surface-2)}
:root body .ua-switch-row{display:flex;align-items:flex-start;gap:12px;cursor:pointer;margin:0;text-transform:none;letter-spacing:0;font-weight:500}
:root body .ua-switch-row .ua-sec-title{flex:1;min-width:0}
:root body .ua-switch{position:relative;flex:0 0 auto;width:46px;height:26px;margin-top:4px}
:root body .ua-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
:root body .ua-switch span{position:absolute;inset:0;border-radius:999px;background:var(--t-line-2);transition:background .15s}
:root body .ua-switch span::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:var(--t-sh-xs);transition:transform .15s}
:root body .ua-switch input:checked + span{background:#16a34a}
:root body .ua-switch input:checked + span::after{transform:translateX(20px)}
:root body .ua-switch input:focus-visible + span{box-shadow:var(--t-ring)}
:root body .ua-sa.on .ua-sec-ico{background:#dcfce7;color:#15803d}
:root body .ua-sa-ico{color:#15803d;font-size:12px}
:root body .ua-orgblock{margin-top:12px;padding:12px;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:var(--t-surface-2)}
:root body .ua-orgblock-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
:root body .ua-orgblock-head b{font-size:14px}
:root body .ua-orgblock-head .muted{font-size:12.5px}
:root body .ua-addwh{margin-left:auto;width:auto;min-width:190px;max-width:100%;height:38px}
:root body .ua-whcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:10px}
:root body .ua-whcard{background:#fff;border:1px solid var(--t-line);border-radius:var(--t-r);padding:12px;min-width:0}
:root body .ua-whcard.empty{border-style:dashed;border-color:#f59e0b}
:root body .ua-whcard-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:root body .ua-wh-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:var(--t-brand-50);color:var(--t-brand-700);font-weight:700;font-size:13px}
:root body .ua-wh-sum{flex:1 1 140px;min-width:0;color:var(--t-muted);font-size:12px;overflow-wrap:anywhere}
:root body .ua-whcard.empty .ua-wh-sum{color:#b45309}
:root body .ua-whcard-tools{display:flex;gap:12px;margin-left:auto;flex-wrap:wrap}
:root body .ua-link.danger{color:#b42318}
:root body .ua-presets{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0 4px;font-size:12px;color:var(--t-muted)}
:root body .ua-preset{border:1px solid var(--t-line);background:var(--t-surface-2);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600;color:var(--t-text-2);cursor:pointer;min-height:30px}
:root body .ua-preset:hover{border-color:var(--t-brand);color:var(--t-brand-700)}
:root body .ua-rgroups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin-top:8px}
:root body .ua-rgroup-title{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--t-muted);margin-bottom:4px}
:root body .ua-rchips{display:flex;gap:6px;flex-wrap:wrap}
:root body .ua-rchip{position:relative;display:inline-flex;align-items:center;gap:7px;margin:0;padding:6px 10px;min-height:36px;border:1px solid var(--t-line);border-radius:var(--t-r);background:#fff;cursor:pointer;font-size:13px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--t-text)}
:root body .ua-rchip input{position:absolute;opacity:0;width:1px;height:1px}
:root body .ua-rchip .ua-chip-box{width:16px;height:16px}
:root body .ua-rchip.on{border-color:#16a34a;background:#f0fdf4}
:root body .ua-rchip.on .ua-chip-box{background:#16a34a;border-color:#16a34a}
:root body .ua-rchip.on .ua-chip-box::after{content:"";width:8px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
:root body .ua-rchip.is-viewer.on{border-color:#2563eb;background:#eff6ff}
:root body .ua-rchip.is-viewer.on .ua-chip-box{background:#2563eb;border-color:#2563eb}
:root body .ua-rchip input:focus-visible + .ua-chip-box{box-shadow:var(--t-ring)}
:root body .wd-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 14px}
:root body .wd-tab{border:1px solid var(--t-line);background:#fff;border-radius:999px;padding:7px 16px;font-weight:700;cursor:pointer;min-height:38px;color:var(--t-text-2)}
:root body .wd-tab.active{background:var(--t-brand);border-color:var(--t-brand);color:#fff}
:root body .wd-showall{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:13px;text-transform:none;letter-spacing:0;font-weight:500}
:root body .wd-rows{display:grid;gap:10px}
:root body .wd-row{border:1px solid var(--t-line);border-radius:var(--t-r-lg);padding:12px;background:#fff}
:root body .wd-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
:root body .wd-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
:root body .wd-field{display:flex;flex-direction:column;gap:4px;margin:0;min-width:0;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--t-muted)}
:root body .wd-field select{width:100%;min-width:0;text-transform:none;letter-spacing:0;font-weight:500}
@media (max-width:1200px){:root body .wd-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){
  :root body .ua-whcards{grid-template-columns:1fr}
  :root body .ua-rgroups{grid-template-columns:1fr}
  :root body .ua-addwh{margin-left:0;width:100%}
  :root body .ua-whcard-tools{margin-left:0;width:100%}
  :root body .wd-fields{grid-template-columns:1fr}
  :root body .wd-showall{margin-left:0}
}
:root body .ua-empty-note{padding:12px;border-radius:var(--t-r);background:var(--t-surface-2);color:var(--t-muted);font-size:13px}
:root body .ua-savebar{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0 -18px -18px;padding:12px 18px;background:#fff;border-top:1px solid var(--t-line);border-radius:0 0 var(--t-r-lg) var(--t-r-lg)}
:root body .ua-dirty{margin-right:auto;font-size:12.5px;color:var(--t-muted)}
:root body .ua-dirty.on{color:#b54708;font-weight:600}
@media (max-width:900px){
  :root body .ua-layout{grid-template-columns:1fr}
  :root body .ua-list{position:static}
  :root body .ua-users{max-height:none}
  :root body .ua-root.has-selection .ua-list{display:none}
  :root body .ua-root:not(.has-selection) .ua-detail{display:none}
  :root body .ua-back{display:inline-flex;flex:1 1 100%;justify-content:flex-start;width:max-content;max-width:100%}
  :root body .ua-detail{padding:14px}
  :root body .ua-savebar{position:fixed;left:10px;right:78px;bottom:calc(72px + env(safe-area-inset-bottom,0px));margin:0;padding:8px 10px;border:1px solid var(--t-line);border-radius:14px;box-shadow:var(--t-sh-lg);gap:8px}
  :root body .ua-savebar .ua-dirty{flex:1 1 auto;min-width:0;font-size:12px}
  :root body .ua-savebar .btn{padding-left:12px;padding-right:12px}
  :root body .ua-root.has-selection .ua-detail{padding-bottom:84px}
  :root body .ua-chips{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
  :root body .ua-sec-head{flex-wrap:wrap}
  :root body .ua-sec-tools{flex:1 1 100%;padding-left:46px}
}

/* ---- Table action buttons: never squeeze text into an icon square ---- */
/* A button without an icon keeps its text at natural width (e.g. "Print" in the Boxes table). */
:root:root body table.ux-table td :is(.btn,.icon-action):not(:has(> svg, > i, > .loader, > img)){width:auto!important;min-width:0!important;height:auto!important;min-height:30px;padding:5px 10px!important;white-space:nowrap!important;flex:0 0 auto!important}
/* Inside popups there is room, so icon + text buttons show their text on desktop. */
@media (min-width:781px){
  :root:root body #modalBody table.ux-table td .btn.ux-has-text{width:auto!important;min-width:0!important;height:auto!important;min-height:30px;padding:5px 10px!important;white-space:nowrap!important;gap:6px}
  :root:root body #modalBody table.ux-table td .row-actions{flex-wrap:wrap!important;gap:6px!important}
}
/* Popup tables: second line of the first cell (e.g. box barcode) stays on its own line. */
:root:root body table.ux-table td:first-child > br + :is(span.muted,small){display:block!important;margin:2px 0 0!important}

/* ---- PO Item Verification (before RECEIVE item scan) ---- */
:root body .po-vchip{display:inline-flex;align-items:center;gap:4px;width:max-content;margin-top:4px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.5;font-style:normal}
:root body .po-vchip svg,:root body .po-vchip i{width:12px;height:12px;font-size:11px}
:root body .po-vchip.ok{background:var(--ok-bg,#ecfdf3);color:#067647}
:root body .po-vchip.pending{background:var(--t-surface-3,#eef2f6);color:var(--t-text-2,#475467)}
:root body .po-vchip.hold{background:#fffaeb;color:#b54708;border:1px solid #fedf89}
:root body .po-verify-stage{display:grid;gap:14px}
:root body .po-verify-progress{display:grid;gap:6px}
:root body .po-verify-progress-text{font-size:13px;color:var(--t-muted)}
:root body .po-verify-progress-text b{color:var(--t-text)}
:root body .po-verify-progress-text .hold{color:#b54708;font-weight:600}
:root body .po-verify-bar{height:6px;border-radius:999px;background:var(--t-surface-3,#eef2f6);overflow:hidden}
:root body .po-verify-bar span{display:block;height:100%;border-radius:999px;background:#16a34a;transition:width .3s var(--t-ease,ease)}
:root body .po-verify-card{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:center;padding:16px;border:1px solid var(--t-line);border-radius:var(--t-r-lg,14px);background:#fff}
:root body .po-verify-media{width:112px;height:112px;border-radius:var(--t-r,10px);background:var(--t-surface-2,#f8fafc);display:grid;place-items:center;overflow:hidden}
:root body .po-verify-media img{width:100%;height:100%;object-fit:contain}
:root body .po-verify-info{min-width:0}
:root body .po-verify-kicker{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--t-brand,#2563eb)}
:root body .po-verify-info h2{margin:4px 0 10px;font-size:19px;line-height:1.25;overflow-wrap:anywhere}
:root body .po-verify-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
:root body .po-verify-facts > div{min-width:0;padding:8px 10px;border-radius:var(--t-r,10px);background:var(--t-surface-2,#f8fafc)}
:root body .po-verify-facts dt{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--t-muted)}
:root body .po-verify-facts dd{margin:2px 0 0;font-size:15px;font-weight:700;overflow-wrap:anywhere}
:root body .po-verify-facts dd small{font-size:11px;font-weight:600;color:var(--t-muted)}
:root body .po-verify-codes{border:1px solid var(--t-line);border-radius:var(--t-r-lg,14px);background:#fff;overflow:hidden}
:root body .po-verify-codes-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--t-line);background:var(--t-surface-2,#f8fafc);font-size:13px}
:root body .po-verify-codes-head span{color:var(--t-muted);font-size:12px}
:root body .po-verify-codes ul{list-style:none;margin:0;padding:0}
:root body .po-vcode{display:grid;grid-template-columns:110px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 14px;border-top:1px solid var(--t-line)}
:root body .po-vcode:first-child{border-top:0}
:root body .po-vcode code{font:600 15px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em;color:var(--t-text);overflow-wrap:anywhere}
:root body .po-vcode-type{justify-self:start;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
:root body .po-vcode-type.item{background:var(--t-brand-50,#eff6ff);color:var(--t-brand-700,#1d4ed8)}
:root body .po-vcode-type.multi{background:#f4f3ff;color:#5925dc}
:root body .po-vcode-type.box{background:#fffaeb;color:#b54708}
:root body .po-vcode-qty{font-size:12.5px;color:var(--t-text-2);white-space:nowrap}
:root body .po-vcode small{font-size:11px;color:var(--t-faint,#98a2b3);white-space:nowrap}
:root body .po-verify-empty{padding:16px 14px;font-size:13px;color:var(--t-muted)}
:root body .po-verify-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:10px}
:root:root body .po-verify-actions .btn{width:100%!important;min-height:52px;font-size:16px;justify-content:center;margin:0!important}
:root body .po-verify-hint{display:flex;align-items:center;gap:6px;margin:0;font-size:12.5px;color:var(--t-muted)}
:root body .po-verify-hint svg,:root body .po-verify-hint i{width:14px;height:14px;flex:0 0 auto}
:root body .po-hold-banner,:root body .po-verified-banner{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:var(--t-r-lg,14px)}
:root body .po-hold-banner{background:#fffaeb;border:1px solid #fedf89;color:#93370d}
:root body .po-verified-banner{margin:0 0 12px;background:#ecfdf3;border:1px solid #abefc6;color:#067647}
:root body .po-hold-banner > div,:root body .po-verified-banner > div{flex:1;min-width:0;display:grid;gap:1px}
:root body .po-hold-banner span,:root body .po-verified-banner span{font-size:12.5px;opacity:.9}
:root body .po-hold-banner > svg,:root body .po-verified-banner > svg,:root body .po-hold-banner > i,:root body .po-verified-banner > i{width:20px;height:20px;font-size:18px;flex:0 0 auto}
:root body .po-verify-queue{border:1px solid var(--t-line);border-radius:var(--t-r-lg,14px);background:#fff}
:root body .po-verify-queue summary{display:flex;align-items:center;gap:8px;padding:11px 14px;cursor:pointer;font-weight:700;font-size:13px;list-style:none}
:root body .po-verify-queue summary::-webkit-details-marker{display:none}
:root body .po-verify-queue summary span{padding:1px 8px;border-radius:999px;background:var(--t-surface-3,#eef2f6);font-size:11.5px}
:root body .po-vq-list{display:grid;border-top:1px solid var(--t-line);max-height:340px;overflow:auto}
:root body .po-vq-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto auto;gap:10px;align-items:center;width:100%;padding:9px 14px;border:0;border-top:1px solid var(--t-line);background:#fff;text-align:left;cursor:pointer;font:inherit;color:inherit}
:root body .po-vq-row:first-child{border-top:0}
:root body .po-vq-row:hover{background:var(--t-surface-2,#f8fafc)}
:root body .po-vq-row.current{background:var(--t-brand-50,#eff6ff);box-shadow:inset 3px 0 0 var(--t-brand,#2563eb)}
:root body .po-vq-line{font-size:12px;color:var(--t-muted);font-variant-numeric:tabular-nums}
:root body .po-vq-item{display:grid;min-width:0}
:root body .po-vq-item small{color:var(--t-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root body .po-vq-qty{font-weight:700;font-variant-numeric:tabular-nums}
:root body .po-vq-row .po-vchip{margin:0}
:root body .po-hold-reasons{display:flex;flex-wrap:wrap;gap:8px}
:root body .po-hold-reason{display:inline-flex!important;margin:0!important;cursor:pointer}
:root body .po-hold-reason input{position:absolute;opacity:0;pointer-events:none}
:root body .po-hold-reason span{padding:7px 12px;border:1px solid var(--t-line-2,#d0d5dd);border-radius:999px;font-size:13px;font-weight:600;background:#fff}
:root body .po-hold-reason input:checked + span{border-color:#f79009;background:#fffaeb;color:#93370d;box-shadow:0 0 0 3px rgba(247,144,9,.15)}
:root body .po-hold-reason input:focus-visible + span{outline:2px solid var(--t-brand,#2563eb);outline-offset:2px}
@media (max-width:700px){
  :root body .po-verify-card{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px}
  :root body .po-verify-media{width:72px;height:72px}
  :root body .po-verify-info h2{font-size:16px}
  :root body .po-verify-facts{grid-template-columns:repeat(2,minmax(0,1fr));grid-column:1 / -1}
  :root body .po-vcode{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}
  :root body .po-vcode code{grid-column:1 / -1;order:-1}
  :root body .po-vcode small{display:none}
  :root body .po-verify-actions{grid-template-columns:1fr 1.6fr}
  :root body .po-vq-row{grid-template-columns:36px minmax(0,1fr) auto}
  :root body .po-vq-row .po-vq-qty{display:none}
}
:root:root body .po-hold-banner > .btn,:root:root body .po-verified-banner > .btn{flex:0 0 auto;width:auto!important;min-width:0!important;height:auto!important;min-height:32px;padding:6px 12px!important;white-space:nowrap!important;margin:0!important}
@media (max-width:700px){
  :root body .po-hold-banner{flex-wrap:wrap}
  :root body .po-hold-banner > div{flex:1 1 calc(100% - 40px)}
  :root:root body .po-hold-banner > .btn{margin-left:32px!important}
}

/* ---- Pallets (optional) for TO / SO packing ---- */
:root body .plt-boxes-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:18px}
:root body .plt-boxes-head h3{margin:0}
:root body #modalBody .plt-sub{margin:4px 0 14px;color:var(--t-text-2);font-size:13.5px}
:root body #modalBody .plt-loading{padding:40px;text-align:center}
:root body #modalBody .plt-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
:root body #modalBody .plt-stats > div{padding:10px 14px;border:1px solid var(--t-line);border-radius:var(--t-r);background:var(--t-surface-2)}
:root body #modalBody .plt-stats small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--t-muted)}
:root body #modalBody .plt-stats b{display:block;margin-top:2px;font-size:20px;font-variant-numeric:tabular-nums}
:root body #modalBody .plt-toolbar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:0 0 14px}
:root body #modalBody .plt-toolbar .plt-print-all{margin-left:auto}
:root body #modalBody .plt-auto{display:flex;align-items:flex-end;gap:8px;padding-left:10px;border-left:1px solid var(--t-line)}
:root body #modalBody .plt-auto label{display:grid;margin:0;font-size:11px;font-weight:700;color:var(--t-muted);align-self:center}
:root:root body #modalBody .plt-auto .input{width:84px!important;min-width:0!important;margin:0!important;text-align:center}
:root body #modalBody .plt-grid{display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr);gap:14px;align-items:start}
:root body #modalBody .plt-free,:root body #modalBody .plt-card{border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;overflow:hidden;min-width:0}
:root body #modalBody .plt-free{position:sticky;top:0}
:root body #modalBody .plt-col-head,:root body #modalBody .plt-card-head{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--t-line);background:var(--t-surface-2)}
:root body #modalBody .plt-col-head b{flex:1}
:root body #modalBody .plt-count{padding:1px 8px;border-radius:999px;background:var(--t-surface-3);font-size:11.5px;font-weight:700}
:root body #modalBody .plt-pallets{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px;min-width:0}
:root body #modalBody .plt-card.is-empty{border-style:dashed}
:root body #modalBody .plt-card-title{flex:1;min-width:0;display:grid}
:root body #modalBody .plt-card-title b{display:flex;align-items:center;gap:6px;font-size:15px}
:root body #modalBody .plt-card-title b svg,:root body #modalBody .plt-card-title b i{width:16px;height:16px;color:var(--t-brand)}
:root body #modalBody .plt-card-title small,:root body #modalBody .plt-box-main small{font-size:11px;color:var(--t-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body #modalBody .plt-card-count{display:block;text-align:right;font-size:12px;color:var(--t-muted);white-space:nowrap}
:root body #modalBody .plt-card-count small,:root body #modalBody .plt-box-qty small{display:block}
:root body #modalBody .plt-card-count b{font-size:18px;color:var(--t-text);line-height:1.1}
:root body #modalBody .plt-card-dims{display:flex;align-items:center;gap:6px;padding:8px 12px 0;font-size:12.5px;color:var(--t-text-2)}
:root body #modalBody .plt-card-dims svg,:root body #modalBody .plt-card-dims i{width:14px;height:14px}
:root body #modalBody .plt-card-actions{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 10px;border-bottom:1px solid var(--t-line)}
:root:root body #modalBody .plt-card-actions .btn{width:auto!important;min-width:0!important;height:auto!important;min-height:30px;padding:5px 10px!important;margin:0!important;white-space:nowrap}
:root body #modalBody .plt-dims-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px 12px 0}
:root body #modalBody .plt-dims-form label{display:grid;gap:3px;margin:0;font-size:11px;font-weight:700;color:var(--t-muted)}
:root:root body #modalBody .plt-dims-form .input{width:100%!important;min-width:0!important;margin:0!important;padding:6px 8px!important;height:36px!important}
:root body #modalBody .plt-dims-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}
:root body #modalBody .plt-list{display:grid;max-height:360px;overflow:auto}
:root body #modalBody .plt-box{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:10px;align-items:center;margin:0!important;padding:8px 12px;border-top:1px solid var(--t-line);cursor:pointer;font-weight:400}
:root body #modalBody .plt-list > .plt-box:first-child{border-top:0}
:root body #modalBody .plt-box:hover{background:var(--t-surface-2)}
:root body #modalBody .plt-box.is-selected{background:var(--t-brand-50);box-shadow:inset 3px 0 0 var(--t-brand)}
:root body #modalBody .plt-box.is-locked{cursor:default;opacity:.75}
:root body #modalBody .plt-box input,:root body #modalBody .plt-col-head input,:root body #modalBody .plt-card-head input{width:18px!important;height:18px!important;min-width:0!important;margin:0!important;accent-color:var(--t-brand)}
:root body #modalBody .plt-box-main{display:grid;min-width:0}
:root body #modalBody .plt-box-qty{display:block;text-align:right;font-size:12px;color:var(--t-muted);white-space:nowrap}
:root body #modalBody .plt-box-qty b{color:var(--t-text);font-size:13px}
:root body #modalBody .plt-box-qty small{font-size:11px}
:root body #modalBody .plt-chip{padding:1px 7px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}
:root body #modalBody .plt-chip.open{background:#ecfdf3;color:#067647}
:root body #modalBody .plt-chip.locked{background:var(--t-surface-3);color:var(--t-text-2)}
:root body #modalBody .plt-empty{display:flex;align-items:center;gap:6px;padding:16px 12px;font-size:13px;color:var(--t-muted)}
:root body #modalBody .plt-empty svg,:root body #modalBody .plt-empty i{width:15px;height:15px;color:#16a34a}
:root body #modalBody .plt-empty.big{justify-content:center;padding:30px 16px;border:1px dashed var(--t-line-2);border-radius:var(--t-r-lg);background:var(--t-surface-2);text-align:center}
:root body #modalBody .plt-movebar{position:sticky;bottom:-1px;z-index:3;display:none;align-items:center;gap:10px;margin:14px -4px 0;padding:10px 12px;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;box-shadow:var(--t-sh-lg)}
:root body #modalBody .plt-movebar.show{display:flex}
:root body #modalBody .plt-movebar span{white-space:nowrap}
:root:root body #modalBody .plt-movebar select{flex:1;min-width:0;max-width:280px;margin:0!important}
:root:root body #modalBody .plt-movebar .btn{width:auto!important;margin:0!important;white-space:nowrap}
@media (max-width:780px){
  :root body #modalBody .plt-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  :root body #modalBody .plt-grid{grid-template-columns:1fr}
  :root body #modalBody .plt-free{position:static}
  :root body #modalBody .plt-pallets{grid-template-columns:1fr}
  :root body #modalBody .plt-auto{padding-left:0;border-left:0;flex:1 1 100%}
  :root body #modalBody .plt-auto label{flex:1}
  :root body #modalBody .plt-toolbar .plt-print-all{margin-left:0}
  :root body #modalBody .plt-dims-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  :root body #modalBody .plt-movebar{position:fixed;left:10px;right:10px;bottom:10px;margin:0;flex-wrap:wrap}
  :root:root body #modalBody .plt-movebar select{flex:1 1 100%;max-width:none;order:2}
  :root:root body #modalBody .plt-movebar .btn{order:3;flex:1}
}

/* ---- PICK scanner: Switch location picker ---- */
:root body .guided-switch-another{margin-top:12px;display:flex;justify-content:center}
:root:root body .guided-switch-another .btn{width:100%!important;max-width:420px;min-height:46px;justify-content:center;margin:0!important}
:root body #modalBody .switch-loc-current{margin:10px 0 4px;font-size:13px}
:root body #modalBody .switch-loc-list{display:grid;gap:8px;margin-top:10px}
:root:root body #modalBody .switch-loc-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto 24px;gap:12px;align-items:center;width:100%!important;height:auto!important;min-height:58px;margin:0!important;padding:10px 14px!important;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;color:var(--t-text);text-align:left;cursor:pointer;font:inherit;box-shadow:none}
:root body #modalBody .switch-loc-row:hover{border-color:var(--t-brand);background:var(--t-brand-50)}
:root body #modalBody .switch-loc-row:disabled{opacity:.6;cursor:default}
:root body #modalBody .switch-loc-main{display:grid;min-width:0}
:root body #modalBody .switch-loc-main b{font-size:15px;overflow-wrap:anywhere}
:root body #modalBody .switch-loc-main small,:root body #modalBody .switch-loc-qty small{font-size:11.5px;color:var(--t-muted)}
:root body #modalBody .switch-loc-qty{display:grid;justify-items:end}
:root body #modalBody .switch-loc-qty b{font-size:17px;font-variant-numeric:tabular-nums}
:root body #modalBody .switch-loc-go{color:var(--t-brand)}
:root body #modalBody .switch-loc-go svg,:root body #modalBody .switch-loc-go i{width:18px;height:18px}
:root body #modalBody .switch-loc-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
@media (max-width:640px){
  :root:root body #modalBody .switch-loc-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main qty" "badge go"}
  :root body #modalBody .switch-loc-main{grid-area:main}:root body #modalBody .switch-loc-qty{grid-area:qty}
  :root body #modalBody .switch-loc-row .badge{grid-area:badge;justify-self:start}:root body #modalBody .switch-loc-go{grid-area:go;justify-self:end}
  :root body #modalBody .switch-loc-actions{flex-direction:column-reverse}:root:root body #modalBody .switch-loc-actions .btn{width:100%!important}
}
:root:root body #modalBody .switch-loc-row.is-empty{background:var(--t-surface-2);cursor:default;opacity:.75}
:root body #modalBody .switch-loc-row.is-empty:hover{border-color:var(--t-line);background:var(--t-surface-2)}
:root body #modalBody .switch-loc-row .badge.gray{background:var(--t-surface-3);color:var(--t-text-2)}
:root body #modalBody .switch-loc-live{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:3px 10px;border-radius:999px;background:#ecfdf3;color:#067647;font-size:12px;font-weight:700}
:root body #modalBody .switch-loc-live svg,:root body #modalBody .switch-loc-live i{width:13px;height:13px}

/* ---- Settings > Email Config > Email Recipients (awm-email-config.js) ---- */
:root body .ec-type{display:flex;flex-direction:column;gap:12px}
:root body .ec-type .ua-sec-head{margin-bottom:0}
:root body .ec-opts{display:flex;flex-wrap:wrap;gap:12px;padding:12px;border-radius:var(--t-r);background:var(--t-surface-2)}
:root body .ec-opt{display:flex;flex-direction:column;gap:4px;min-width:200px;flex:0 1 280px}
:root body .ec-rows{display:flex;flex-direction:column;border:1px solid var(--t-line);border-radius:var(--t-r-lg);overflow:visible}
:root body .ec-row{display:grid;grid-template-columns:minmax(150px,200px) minmax(0,1fr);gap:14px;padding:14px;border-top:1px solid var(--t-line)}
:root body .ec-row:first-child{border-top:0}
:root body .ec-row-all{background:var(--t-surface-2);border-radius:var(--t-r-lg) var(--t-r-lg) 0 0}
:root body .ec-org{display:flex;align-items:flex-start;gap:10px;min-width:0;padding-top:4px}
:root body .ec-org .org-dot{flex:0 0 auto;width:10px;height:10px;border-radius:50%;margin-top:5px}
:root body .ec-org .ec-dot-all{background:var(--t-faint)}
:root body .ec-org b{display:block;font-size:13.5px}
:root body .ec-org small{display:block;font-size:11.5px;color:var(--t-muted);overflow-wrap:anywhere}
:root body .ec-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
:root body .ec-field{position:relative;min-width:0}
:root body .ec-field-label{display:flex;align-items:center;gap:6px;margin-bottom:6px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--t-muted)}
:root body .ec-chips{display:flex;flex-wrap:wrap;gap:6px;min-height:40px;padding:6px;border:1px solid var(--t-line);border-radius:var(--t-r);background:#fff}
:root body .ec-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:4px 4px 4px 4px;border:1px solid var(--t-brand-100);border-radius:999px;background:var(--t-brand-50);color:var(--t-text)}
:root body .ec-chip.bad{border-color:#fecdca;background:#fef3f2}
:root body .ua-avatar.ec-av{width:26px;height:26px;font-size:10.5px}
:root body .ec-chip .ua-avatar.ec-av{background:var(--t-org);color:#fff}
:root body .ec-chip-text{min-width:0;display:flex;flex-direction:column;line-height:1.2}
:root body .ec-chip-text b{font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body .ec-chip-text small{font-size:11px;color:var(--t-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body .ec-x{flex:0 0 auto;display:grid;place-items:center;width:24px;height:24px;border:0;border-radius:50%;background:transparent;color:var(--t-muted);font-size:16px;line-height:1;cursor:pointer}
:root body .ec-x:hover{background:#fff;color:#b42318}
:root body .ec-x:focus-visible,:root body .ec-add:focus-visible,:root body .ec-opt-user:focus-visible{outline:0;box-shadow:var(--t-ring)}
:root body .ec-add{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:4px 12px;border:1px dashed var(--t-line-2);border-radius:999px;background:transparent;font-size:12.5px;font-weight:600;color:var(--t-brand-700);cursor:pointer}
:root body .ec-add:hover,:root body .ec-add[aria-expanded="true"]{border-color:var(--t-brand);background:var(--t-brand-50)}
:root body .ec-add svg,:root body .ec-add i{width:13px;height:13px}
:root body .ec-picker{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 6px);min-width:280px;display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--t-line);border-radius:var(--t-r-lg);background:#fff;box-shadow:var(--t-sh-lg)}
:root body .ec-search{width:100%}
:root body .ec-list{display:flex;flex-direction:column;gap:4px;max-height:280px;overflow:auto;padding:2px}
:root body .ec-opt-user{display:flex;align-items:center;gap:10px;width:100%;padding:7px 9px;border:1px solid transparent;border-radius:var(--t-r);background:#fff;text-align:left;cursor:pointer;color:var(--t-text)}
:root body .ec-opt-user:hover{background:var(--t-surface-2);border-color:var(--t-line)}
:root body .ec-opt-user.on{border-color:#16a34a;background:#f0fdf4}
:root body .ec-opt-user.on .ua-chip-box{background:#16a34a;border-color:#16a34a}
:root body .ec-opt-user.on .ua-chip-box::after{content:"";width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
:root body .ec-opt-user .ec-chip-text{flex:1 1 auto}
:root body .ec-more{padding:6px 9px;font-size:12px}
:root body .ec-picker-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:6px;border-top:1px solid var(--t-line);font-size:12px}
:root body .ec-note{grid-column:1 / -1;display:flex;align-items:flex-start;gap:6px;font-size:12px;color:var(--t-muted);overflow-wrap:anywhere}
:root body .ec-note svg,:root body .ec-note i{flex:0 0 auto;width:13px;height:13px;margin-top:2px}
:root body .ec-savebar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding-top:4px}
@media (max-width:900px){
  :root body .ec-row{grid-template-columns:1fr;gap:10px}
  :root body .ec-fields{grid-template-columns:1fr}
  :root body .ec-picker{min-width:0}
  :root body .ec-savebar .btn{flex:1 1 auto;justify-content:center}
}
:root body .ua-empty-note.ua-warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a}
.shopify-col .order-number-copy{margin-right:4px}.shopify-col .shopify-btn{vertical-align:middle;display:inline-grid;place-items:center}
/* Shopify packing slip: off-screen A4 layout (matches Shopify's default packing slip) + PDF viewer */
.ps-render-host{position:fixed;left:-12000px;top:0;z-index:-1;background:#fff}
.ps-page{width:794px;min-height:1123px;box-sizing:border-box;padding:76px 92px 60px;background:#fff;color:#111;font-family:"Noto Sans","Segoe UI",Roboto,Arial,sans-serif;font-size:12.5px;line-height:1.55}
.ps-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:34px}
.ps-shop{font-size:24px;letter-spacing:.2px;font-weight:400;padding-top:4px}
.ps-order{text-align:right;font-size:12.5px;line-height:1.35}
.ps-addr{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding-bottom:22px;border-bottom:1.5px solid #111}
.ps-addr h4,.ps-note h4{margin:0 0 10px;font-size:9.5px;font-weight:700;letter-spacing:.3px}
.ps-items{width:100%;border-collapse:collapse;border-bottom:1.5px solid #111}
.ps-items th{font-size:9.5px;font-weight:700;text-align:left;padding:18px 8px 12px;letter-spacing:.3px;background:none;color:#111;border:0}
.ps-items td{padding:6px 8px 12px;vertical-align:middle;border:0;font-size:12.5px;line-height:1.55;color:#111}
.ps-items .ps-qty{text-align:right;white-space:nowrap;width:110px}
.ps-items .ps-img{width:54px}
.ps-items .ps-img img{width:46px;height:46px;object-fit:contain;border:1px solid #e3e3e3;border-radius:3px;padding:2px;background:#fff}
.ps-note{padding:16px 0;border-bottom:1.5px solid #111}
.ps-foot{text-align:center;padding-top:22px;line-height:1.55}
.ps-gap{height:14px}
#modal .modal-card.ps-modal{width:min(1000px,calc(100vw - 24px));max-width:none}
.ps-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 10px}
.ps-viewer{display:block;width:100%;height:min(78vh,1000px);border:1px solid #dbe3ee;border-radius:10px;background:#f1f5f9}
.ps-viewer-img{height:auto;max-height:78vh;overflow:auto;padding:8px;box-sizing:border-box}
.ps-viewer-img img{display:block;width:100%;height:auto;box-shadow:0 2px 10px #0f172a1f}
.shopify-conn{margin-top:12px;border:1px solid var(--t-line,#e2e8f0);border-radius:12px;padding:10px 12px;background:var(--t-surface-2,#f8fafc)}
.shopify-conn summary{cursor:pointer;font-weight:700;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.shopify-conn .settings-field-grid{margin-top:10px}

/* Organizations settings: a long Shopify status ("Connected to … .myshopify.com") made the card content wider
   than its grid column, so fields spilled over the next organization card. Keep every card inside its column. */
.org-grid-settings{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
.org-grid-settings>*{min-width:0;max-width:100%;overflow:hidden}
.org-card-pro *{min-width:0}
.org-card-pro .input,.org-card-pro input,.org-card-pro select,.org-card-pro textarea{max-width:100%;box-sizing:border-box}
.org-card-pro .org-headline{min-width:0}
.org-card-pro .org-headline p,.org-card-pro label{overflow-wrap:anywhere}
.shopify-conn,.shopify-conn summary{min-width:0;max-width:100%}
.shopify-conn summary .badge,.shopify-conn summary span{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.shopify-conn summary .badge{white-space:normal!important;overflow-wrap:anywhere!important;height:auto!important;line-height:1.35!important;text-align:left;display:inline-flex;max-width:100%!important}

/* Mobile bottom bar – module chooser (Jobs / Pick / Pack / Delivery exist in TO, SO, PO, Pick Flow) */
.t-tab-chooser-wrap{position:fixed;inset:0;z-index:100001;background:rgba(15,23,42,.38)}
.t-tab-chooser{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:8px;padding:14px 14px calc(14px + env(safe-area-inset-bottom));background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px rgba(15,23,42,.25);animation:tChooserIn .16s ease-out}
.t-tab-chooser-title{font-weight:800;font-size:14px;color:#334155;padding:2px 4px 4px}
.t-tab-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:10px 14px;border:1px solid var(--t-line,#e2e8f0);border-radius:14px;background:var(--t-surface-2,#f8fafc);font:600 15px/1.2 inherit;color:#0f172a;text-align:left;cursor:pointer}
.t-tab-choice b{display:grid;place-items:center;min-width:40px;height:30px;border-radius:9px;background:var(--t-brand,#b91c1c);color:#fff;font-size:13px}
.t-tab-choice.active{border-color:var(--t-brand,#b91c1c);background:var(--t-brand-50,#fef2f2)}
@keyframes tChooserIn{from{transform:translateY(30px);opacity:.3}to{transform:none;opacity:1}}

/* Scanner lock */
#awmScanLockBtn{position:fixed;right:14px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:1100;display:flex;align-items:center;gap:6px;padding:10px 14px;border:0;border-radius:999px;background:#0f172a;color:#fff;font:700 14px/1 system-ui,sans-serif;box-shadow:0 8px 22px rgba(0,0,0,.28);cursor:pointer}
#awmScanLockBtn svg{width:18px;height:18px}
html.awm-scan-locked #awmScanLockBtn{background:#b91c1c;padding:12px 16px;touch-action:none;user-select:none;-webkit-user-select:none}
#awmScanLockBtn .hold{position:absolute;left:0;bottom:0;height:4px;width:0;background:#fff;border-radius:999px;opacity:.9}
#awmScanLockBtn.holding .hold{width:100%;transition:width .8s linear}
#awmScanLockBar{position:fixed;left:0;right:0;top:0;z-index:1100;display:none;padding:8px 12px calc(8px);background:#b91c1c;color:#fff;font:700 13px/1.3 system-ui,sans-serif;text-align:center;box-shadow:0 4px 14px rgba(0,0,0,.2)}
html.awm-scan-locked #awmScanLockBar{display:block}
html.awm-scan-locked,html.awm-scan-locked body{overscroll-behavior-y:contain}
html.awm-scan-locked .t-tabbar{display:none!important}
html.awm-scan-locked #awmScanOk{top:52px}
#awmScanLockBar{font-size:12px}

/* Advanced filter (filter icon next to table search) */
.pro-table-tools .adv-filter{position:relative;flex:0 0 auto}
.adv-filter-btn{display:inline-flex;align-items:center;gap:7px;height:38px;white-space:nowrap}
.adv-filter-btn.active{border-color:var(--t-brand,#b91c1c);color:var(--t-brand,#b91c1c);background:var(--t-brand-50,#fef2f2)}
.adv-filter-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--t-brand,#b91c1c);color:#fff;font-size:11px}
.adv-filter-panel{position:fixed;top:120px;left:16px;z-index:1300;width:min(420px,calc(100vw - 32px));max-height:min(70vh,560px);overflow:auto;padding:14px;background:#fff;border:1px solid var(--t-line,#e2e8f0);border-radius:14px;box-shadow:0 18px 44px rgba(15,23,42,.18);display:flex;flex-direction:column;gap:12px}
.adv-filter-panel[hidden]{display:none}
.af-group>label{display:block;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin-bottom:6px}
.af-range{display:flex;align-items:center;gap:8px}.af-range>*{flex:1;min-width:0}.af-range span{flex:0 0 auto;color:#94a3b8}
.af-checks{display:flex;flex-wrap:wrap;gap:6px}
.af-check{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--t-line,#e2e8f0);border-radius:999px;font-size:13px;cursor:pointer;background:var(--t-surface-2,#f8fafc)}
.af-actions{display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:-14px;background:#fff;padding-top:6px}
@media (max-width:760px){.adv-filter-panel{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto}.adv-filter-label{display:none}}

/* Less empty space above the tables (Release Approvals, Orders / Assign, Worker Jobs …) */
.page>.page-title-row{margin-bottom:4px}
.page>.toolbar.pro-toolbar{margin:8px 0 10px!important;padding-top:0!important;padding-bottom:0!important;min-height:0}
.page>.toolbar.pro-toolbar .tabs{margin-top:0!important;margin-bottom:0!important}
.release-approval-page>.pro-toolbar+.pager{padding:0 0 6px!important;margin:0!important;min-height:0}
.page>.table-wrap{margin-top:0!important}

/* Search box clear (×) button */
.searchbox.ux-has-clear,.po-search.ux-has-clear{position:relative}
.searchbox.ux-has-clear input,.po-search.ux-has-clear input{padding-right:38px!important}
.ux-search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:none;width:24px;height:24px;border:0;border-radius:999px;background:#e2e8f0;color:#334155;font:700 16px/24px system-ui,sans-serif;text-align:center;cursor:pointer;padding:0;z-index:2}
.ux-search-clear:hover{background:#cbd5e1}
.ux-has-value>.ux-search-clear{display:block}

/* Orders / Assign summary cards (top right of the page title) */
.page-title-row:has(.order-kpis){align-items:flex-start;gap:16px}
.order-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;flex:1 1 560px;max-width:760px;margin-left:auto}
.order-kpi{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--t-line,#e2e8f0);border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);min-width:0}
.order-kpi>i{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px;font-size:16px}
.order-kpi>div{display:flex;flex-direction:column;min-width:0}
.order-kpi b{font-size:22px;line-height:1.1;font-weight:800;color:#0f172a}
.order-kpi span{font-size:12px;line-height:1.25;color:#64748b;white-space:normal}
.kpi-pick>i{background:#fef3c7;color:#b45309}.kpi-pack>i{background:#dbeafe;color:#1d4ed8}.kpi-delivery>i{background:#ede9fe;color:#6d28d9}.kpi-d365>i{background:#fee2e2;color:#b91c1c}
.order-kpi.is-zero b{color:#94a3b8}
@media (max-width:1100px){.order-kpis{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%;max-width:none}}
.page-title-row:has(.order-kpis)>div:first-child{flex:1 1 300px;min-width:0}
.page-title-row .order-kpis{flex:0 1 700px}

/* KPI cards: change vs yesterday + animation */
.order-kpi .kpi-num{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.kpi-delta{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;font-style:normal;font-size:11.5px;font-weight:800;line-height:1.3;white-space:nowrap}
.kpi-delta i{font-size:10px}
.kpi-delta.up{background:#fee2e2;color:#b91c1c}        /* more pending than yesterday = worse */
.kpi-delta.down{background:#dcfce7;color:#15803d}      /* fewer pending than yesterday = better */
.kpi-delta.same{background:#f1f5f9;color:#64748b}
.order-kpi{transition:box-shadow .3s,transform .3s}
.order-kpi.kpi-changed{animation:kpiPulse 1.2s ease-out}
.order-kpi.kpi-changed.kpi-rise b{color:#b91c1c}
.order-kpi.kpi-changed.kpi-fall b{color:#15803d}
.order-kpi.kpi-changed .kpi-delta{animation:kpiDeltaPop .5s ease-out}
@keyframes kpiPulse{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(185,28,28,.0)}25%{transform:scale(1.04);box-shadow:0 0 0 4px rgba(59,130,246,.25)}100%{transform:scale(1);box-shadow:0 1px 2px rgba(15,23,42,.04)}}
@keyframes kpiDeltaPop{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.order-kpi.kpi-changed,.order-kpi.kpi-changed .kpi-delta{animation:none}}

/* Bulk box dimensions */
.bbd-scope{display:flex;flex-direction:column;gap:6px;margin:4px 0 8px}
.bbd-scope label{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--t-line,#e2e8f0);border-radius:12px;cursor:pointer;font-weight:600;text-transform:none;letter-spacing:0;font-size:14px;color:#0f172a}
.bbd-scope label:has(input:checked){border-color:var(--t-brand,#b91c1c);background:var(--t-brand-50,#fef2f2)}
.bbd-list{max-height:min(40vh,320px);overflow:auto;border:1px solid var(--t-line,#e2e8f0);border-radius:12px;padding:6px}
.bbd-tools{display:flex;gap:6px;padding:4px 4px 8px;position:sticky;top:-6px;background:#fff}
.bbd-row{display:grid;grid-template-columns:auto minmax(80px,1fr) auto auto;gap:10px;align-items:center;padding:8px 6px;border-bottom:1px solid #f1f5f9;font-size:13px;cursor:pointer;text-transform:none;letter-spacing:0;font-weight:500;color:#0f172a}
.bbd-row span{color:#475569}.bbd-row small{color:#94a3b8}
.bbd-row.locked{opacity:.55;cursor:not-allowed}
.bbd-bar{display:flex;justify-content:flex-end;margin:0 0 10px}
.completed-job-details h3 .btn{margin-left:8px;vertical-align:middle}
@media (max-width:640px){.bbd-row{grid-template-columns:auto 1fr;}.bbd-row span,.bbd-row small{grid-column:2}}
/* 20261112-m1: on phones the title row stacks vertically, so a flex-basis (700px / 300px) became HEIGHT and
   stretched the KPI cards to ~700px tall. Reset the basis and keep cards compact. */
@media (max-width:760px){
  :root body .page-title-row:has(.order-kpis){flex-direction:column;align-items:stretch}
  :root body .page-title-row:has(.order-kpis)>div:first-child,
  :root body .page-title-row .order-kpis{flex:0 0 auto;width:100%;max-width:none;margin-left:0}
  :root body .order-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch}
  :root body .order-kpi{height:auto;min-height:0;padding:9px 10px;gap:8px}
  :root body .order-kpi>i{flex-basis:32px;width:32px;height:32px;font-size:14px}
  :root body .order-kpi b{font-size:20px}
  :root body .order-kpi span{font-size:11.5px}
}
/* Settings > Log Archive */
.la-include{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;white-space:nowrap;padding:0 6px;color:var(--muted,#64748b)}
.la-form{gap:12px}
.la-switch{display:flex;align-items:center;gap:8px;font-weight:600}
.la-days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.la-days label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.la-days label span{font-weight:400;color:var(--muted,#64748b);font-size:12px}
.la-last{margin:12px 0;padding:10px 12px;border-radius:10px;background:#f0fdf4;border:1px solid #bbf7d0;font-size:13px}
.la-last.bad{background:#fef2f2;border-color:#fecaca}
.la-table td{vertical-align:top}
@media (max-width:760px){.la-days{grid-template-columns:1fr}}
/* Email Config: warehouse-specific recipient lists under an organization */
.ec-row-wh{margin-left:28px;border-left:3px solid #c7d2fe;padding-left:12px;background:#f8faff}
.ec-org-wh .ec-wh-ico{color:#4f46e5;font-size:15px;margin-top:3px}
.ec-wh-remove{display:inline-flex;align-items:center;gap:5px;margin-top:6px;border:0;background:none;color:#b91c1c;font-size:12px;font-weight:600;cursor:pointer;padding:0}
.ec-wh-add{display:flex;align-items:center;gap:8px;margin:6px 0 14px 28px;color:#4f46e5}
.ec-wh-add select{max-width:420px}
@media (max-width:760px){.ec-row-wh,.ec-wh-add{margin-left:8px}}
.ec-row-route{border-left-color:#fbbf24;background:#fffdf5}
.ec-org-route .ec-wh-ico{color:#b45309}
.ec-route-add{flex-wrap:wrap;color:#b45309}
.ec-route-add select{max-width:220px}
.ec-route-add span{font-weight:600;font-size:13px}
/* Email Config quick setup (several warehouses / routes + same users at once) */
.ec-bulk{margin:8px 0 14px 28px;padding:14px;border:1px solid #c7d2fe;border-radius:12px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.06);display:flex;flex-direction:column;gap:10px}
.ec-bulk-head{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.ec-bulk-mode{display:flex;gap:14px;font-size:13px;font-weight:600}
.ec-bulk-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ec-bulk-grid{display:flex;flex-wrap:wrap;gap:6px}
.ec-bulk-wh{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #e2e8f0;border-radius:999px;font-size:13px;cursor:pointer;background:#f8fafc}
.ec-bulk-wh.on{border-color:#4f46e5;background:#eef2ff;color:#3730a3;font-weight:600}
.ec-bulk-tools{display:flex;gap:6px;margin-top:6px}
.ec-bulk-users{max-height:220px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px}
.ec-bulk-foot{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.ec-bulk-foot .muted{margin-right:auto;font-size:13px}
@media (max-width:760px){.ec-bulk{margin-left:0}.ec-bulk-cols{grid-template-columns:1fr}}
/* PO lines changed by D365 updates */
tr.po-line-added td{background:#ecfdf3!important}
tr.po-line-added td:first-child{box-shadow:inset 4px 0 0 #16a34a}
tr.po-line-changed td{background:#fffbeb!important}
tr.po-line-changed td:first-child{box-shadow:inset 4px 0 0 #d97706}
tr.po-line-removed td{background:#fef2f2!important;color:#991b1b}
tr.po-line-removed td:first-child{box-shadow:inset 4px 0 0 #dc2626}
tr.po-line-removed td:not(:first-child){text-decoration:line-through;text-decoration-color:rgba(153,27,27,.45)}
.po-line-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap;vertical-align:middle}
.po-line-tag.added{background:#dcfce7;color:#166534}.po-line-tag.changed{background:#fef3c7;color:#92400e}.po-line-tag.removed{background:#fee2e2;color:#991b1b}
.po-line-note{display:block;font-size:11px;color:#64748b;margin-top:3px;max-width:240px;white-space:normal}

/* Global Delivery */
.gd-page .gd-trip-card,.gd-page .gd-scan-card{padding:16px;margin-bottom:14px}
.gd-trip-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.gd-trip-head b{font-size:16px}
.gd-counts{margin:12px 0}
.gd-trip-actions,.gd-start{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gd-start .input{max-width:260px}
.gd-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.gd-tabs .btn[disabled]{opacity:.45;cursor:not-allowed}
.gd-scan-card .scan-search{margin:6px 0 10px}
.gd-scan-card #gdResult{font-size:15px;padding:8px 0}
.gd-page tr.gd-partial td{background:#fffbeb}
.gd-bad td{background:#fef2f2}
@media (max-width:640px){.gd-page .gd-trip-card,.gd-page .gd-scan-card{padding:12px}.gd-start .input{max-width:none;flex:1 1 100%}}
.gd-page .gd-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.gd-page .gd-counts .card.mini{padding:10px 12px;min-height:0}
.gd-page .gd-tabs .btn{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
@media (max-width:640px){.gd-page .gd-counts{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.gd-page .gd-counts .card.mini b{font-size:11px}.gd-page .gd-tabs .btn{flex:1 1 0;justify-content:center;font-size:13px;padding:10px 8px}}
/* Global Delivery mode tabs keep their words on phones (Load / Deliver / Return must be readable while scanning). */
:root body .gd-page .gd-tabs .ux-has-text > ux-t{display:inline!important}
:root body .gd-page .gd-tabs .ux-has-text{gap:6px!important}
.gd-jobs .gd-orgtabs{display:flex;gap:8px;flex-wrap:wrap;padding:12px 16px 0}
.gd-jobs .gd-orgtabs .stage-pill{padding:7px 14px;cursor:pointer}
.gd-jobs .gd-orgtabs .stage-pill b{margin-left:4px;opacity:.8}
.gd-jobs .gd-tools{padding:12px 16px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.gd-jobs .gd-tools select.input{width:auto;min-width:150px}
.gd-check{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--t-text-2,#334155);white-space:nowrap}
.gd-jobs-table tr.gd-group td{background:#f1f5f9;cursor:pointer;font-size:13px;padding:10px 16px}
.gd-jobs-table tr.gd-group:hover td{background:#e2e8f0}
.gd-jobs-table tr.gd-active td:first-child{box-shadow:inset 3px 0 0 #7c3aed}
.gd-kv{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}
.gd-kv>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px}
.gd-kv span{display:block;margin-bottom:4px}
.gd-view-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:6px}
@media (max-width:820px){.gd-kv{grid-template-columns:repeat(2,minmax(0,1fr))}.gd-jobs .gd-tools select.input{flex:1 1 45%;min-width:0}.gd-jobs .gd-tools .searchbox{flex:1 1 100%}}

/* Suggestion Report > User changes */
.sc-switch{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.sc-switch .stage-pill{cursor:pointer;padding:8px 16px}
.sc-report .sc-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.sc-report .sc-cards .card.mini small{display:block;margin-top:2px}
.sc-split{display:grid;grid-template-columns:2fr 1fr;gap:14px;margin-top:14px}
.sc-compare{display:grid;grid-template-columns:1fr 40px 1fr;gap:10px;align-items:stretch;margin:6px 0 12px}
.sc-side{border-radius:14px;padding:12px 14px;border:1px solid #e5e7eb}
.sc-side h3{margin:0 0 6px;font-size:14px}
.sc-side p{margin:2px 0}
.sc-side.sys{background:#f8fafc}
.sc-side.usr{background:#fff7ed;border-color:#fed7aa}
.sc-arrow{display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:18px}
@media (max-width:820px){.sc-report .sc-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sc-split{grid-template-columns:1fr}.sc-compare{grid-template-columns:1fr}.sc-arrow{transform:rotate(90deg);height:24px}}
.gd-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #eef2f7}
.gd-pager .gd-page-no{font-size:13px}
.gd-pager select.input{width:auto;min-width:110px}
.gd-pager .btn[disabled]{opacity:.45;cursor:not-allowed}
.awm-slip-fallback{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:9999;display:flex;align-items:center;gap:10px;background:#111827;color:#fff;padding:10px 12px 10px 16px;border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.25);max-width:calc(100vw - 32px);flex-wrap:wrap}
.awm-slip-fallback .icon-action{color:#fff;background:transparent;border:0;font-size:18px}
.awm-table-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #eef2f7}
.awm-table-pager .awm-page-no{font-size:13px}
.awm-table-pager select.input{width:auto;min-width:110px}
.awm-table-pager .btn[disabled]{opacity:.45;cursor:not-allowed}
/* Completed orders: "showing latest N of M" + Load more */
.awm-completed-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:10px 14px;border-top:1px solid #e5e7eb;font-size:13px}
.awm-completed-more .btn{min-height:34px}
/* Table pager: keep clear of the floating action button; compact on phones */
@media (min-width:761px){ .awm-table-pager{padding-right:84px!important} }
@media (max-width:760px){
  html:root body .awm-table-pager{justify-content:space-between!important;padding:10px 12px 14px!important}
  html:root body .awm-table-pager > .muted{flex:1 1 100%!important;text-align:center}
  html:root body .awm-table-pager button[title="First page"],html:root body .awm-table-pager button[title="Last page"]{display:none!important}
  html:root body .awm-table-pager select{min-width:110px!important}
}
/* PICKFLOW order popup */
.pf-popup-table .pf-who{white-space:nowrap;line-height:1.35}
.pf-popup-table .pf-who + .pf-who{margin-top:3px}
.pf-popup-table .danger-text b{color:#b42318}
.pf-popup-table code{font-size:11px;color:#475569}
/* Box reopened after Packing Done */
.reopen-pill{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:4px 0 2px;padding:4px 10px;border-radius:999px;background:#fff4e5;border:1px solid #f5b971;color:#9a4b00;font-size:12px;font-weight:700;line-height:1.3}
.reopen-pill span{font-weight:500;color:#7a5a32}
.reopen-notice{display:flex;gap:12px;align-items:flex-start}
.reopen-notice > i{font-size:22px;color:#c2410c;margin-top:2px}
/* Dashboard: Needs attention */
.needs-attention{margin:0 0 16px;padding:14px 16px;border-left:4px solid #f59e0b}
.needs-attention.na-clear{border-left-color:#16a34a}
.needs-attention .na-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.needs-attention .na-head h3{margin:0;display:flex;align-items:center;gap:8px;font-size:16px}
.needs-attention.na-clear .na-head h3 i{color:#16a34a}
.needs-attention .na-head h3 > i{color:#d97706}
.needs-attention .na-total{background:#d97706;color:#fff;border-radius:999px;padding:1px 9px;font-size:12px}
.needs-attention .na-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:10px;margin-top:12px}
.needs-attention .na-group{border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:8px 12px}
.needs-attention .na-group summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;font-size:14px}
.needs-attention .na-group summary::-webkit-details-marker{display:none}
.needs-attention .na-count{min-width:26px;text-align:center;border-radius:999px;padding:1px 8px;font-size:12px;font-weight:700;background:#eef2ff;color:#3730a3}
.needs-attention .na-danger{border-color:#fecaca}.needs-attention .na-danger .na-count{background:#fee2e2;color:#b91c1c}
.needs-attention .na-warning{border-color:#fde68a}.needs-attention .na-warning .na-count{background:#fef3c7;color:#92400e}
.needs-attention .na-hint{margin:6px 0}
.needs-attention .na-rows{display:flex;flex-direction:column;max-height:260px;overflow:auto}
.needs-attention .na-row{display:grid;grid-template-columns:auto auto 1fr auto;gap:8px;align-items:center;padding:7px 4px;border-top:1px solid #f1f5f9;text-decoration:none;color:inherit;font-size:13px}
.needs-attention .na-row:hover{background:#f8fafc}
.needs-attention .na-mod{font-size:11px;font-weight:700;padding:1px 6px;border-radius:6px;background:#f1f5f9;color:#475569}
.needs-attention .na-row .muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.needs-attention .na-since{font-size:12px;color:#64748b;white-space:nowrap}
@media (max-width:760px){ .needs-attention .na-groups{grid-template-columns:1fr} .needs-attention .na-row{grid-template-columns:auto 1fr;}.needs-attention .na-row .muted,.needs-attention .na-since{grid-column:1/-1} }
html body .notice.reopen-notice{background:#fff7ed!important;border:1px solid #fdba74!important;color:#7c2d12!important}
html body .notice.reopen-notice b{color:#9a3412}
.pf-d365-error{display:flex;gap:10px;align-items:flex-start;text-align:left;margin:10px 0}
.pf-d365-error > i{font-size:20px;margin-top:2px}
.pf-completed-details .pf-popup-table td{vertical-align:middle}
html body .notice.pf-d365-error{background:#fef2f2!important;border:1px solid #fca5a5!important;color:#7f1d1d!important}
html body .notice.pf-d365-error b{color:#b91c1c}
html body .notice.pf-d365-error > i{color:#dc2626}
@media (max-width:760px){ html body .pf-popup-table .pf-who{white-space:normal!important;word-break:break-word} }
.cp-section-head .cp-section-match{font-style:normal;font-weight:600;color:#64748b;margin-left:4px}
.cp-filter-empty{margin:8px 12px!important}
