/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[3].use[1]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[3].use[2]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/local/target.css?{"path":"app/layout.tsx","import":"","arguments":[{"src":"./fonts/Inter.ttf","weight":"100 900","style":"normal","variable":"--font-ui-offline-fallback","display":"swap"}],"variableName":"inter"} ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: '__inter_a2c6e0';
src: url(/_next/static/media/4c0a38defdf31450-s.p.ttf) format('truetype');
font-display: swap;
font-weight: 100 900;
font-style: normal;
}@font-face {font-family: '__inter_Fallback_a2c6e0';src: local("Arial");ascent-override: 89.79%;descent-override: 22.36%;line-gap-override: 0.00%;size-adjust: 107.89%
}.__className_a2c6e0 {font-family: '__inter_a2c6e0', '__inter_Fallback_a2c6e0';font-style: normal
}.__variable_a2c6e0 {--font-ui-offline-fallback: '__inter_a2c6e0', '__inter_Fallback_a2c6e0'
}

/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[3].use[1]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[3].use[2]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/local/target.css?{"path":"app/layout.tsx","import":"","arguments":[{"src":"./fonts/JetBrainsMono.ttf","weight":"100 800","style":"normal","variable":"--font-mono-offline-fallback","display":"swap"}],"variableName":"jetbrains"} ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: '__jetbrains_3ed963';
src: url(/_next/static/media/3b1be6633988325f-s.p.ttf) format('truetype');
font-display: swap;
font-weight: 100 800;
font-style: normal;
}@font-face {font-family: '__jetbrains_Fallback_3ed963';src: local("Arial");ascent-override: 77.57%;descent-override: 22.82%;line-gap-override: 0.00%;size-adjust: 131.49%
}.__className_3ed963 {font-family: '__jetbrains_3ed963', '__jetbrains_Fallback_3ed963';font-style: normal
}.__variable_3ed963 {--font-mono-offline-fallback: '__jetbrains_3ed963', '__jetbrains_Fallback_3ed963'
}

/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* Deep-tech ops console — light is default */
:root,
html[data-theme="light"] {
  --bg: #eef2f6;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-muted: #f1f5f9;
  --border: #d0d8e4;
  --border-strong: #94a3b8;
  --text: #0b1220;
  --muted: #5b6b7f;
  --accent: #0e7490;
  --accent-hover: #0f766e;
  --accent-soft: #cffafe;
  --accent-text: #ffffff;
  --ok: #047857;
  --ok-bg: #d1fae5;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --err: #b91c1c;
  --err-bg: #fee2e2;
  --info: #0369a1;
  --info-bg: #e0f2fe;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 28px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --glow: 0 0 0 1px rgba(14, 116, 144, 0.08);
  --input-bg: #f8fafc;
  --row-selected: #ecfeff;
  --hot-3: #b45309;
  --hot-3-bg: #fef3c7;
  --hot-3-sticky: #fde68a;
  --hot-2-bg: #fffbeb;
  --hot-2-sticky: #fef3c7;
  --hot-1-bg: #fffdf5;
  --hot-1-sticky: #fffbeb;
  --grid-line: rgba(14, 116, 144, 0.06);
  --touch: 48px;
  --radius: 8px;
  --radius-sm: 6px;
  --font: var(--font-ui), "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: var(--font-mono-family), "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bottom-nav-h: 0px;
}

html[data-theme="dark"] {
  --bg: #070b12;
  --bg-elevated: #0c121c;
  --panel: #0e1522;
  --panel-muted: #0a1019;
  --border: #1c2a3d;
  --border-strong: #334155;
  --text: #e8eef7;
  --muted: #8b9bb0;
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-text: #041016;
  --ok: #34d399;
  --ok-bg: rgba(6, 78, 59, 0.55);
  --warn: #fbbf24;
  --warn-bg: rgba(120, 53, 15, 0.5);
  --err: #f87171;
  --err-bg: rgba(127, 29, 29, 0.45);
  --info: #38bdf8;
  --info-bg: rgba(12, 74, 110, 0.45);
  --nav-bg: rgba(8, 12, 20, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --glow: 0 0 24px rgba(34, 211, 238, 0.1);
  --input-bg: #0a1019;
  --row-selected: rgba(34, 211, 238, 0.1);
  --hot-3: #fbbf24;
  --hot-3-bg: rgba(180, 83, 9, 0.38);
  --hot-3-sticky: rgba(180, 83, 9, 0.55);
  --hot-2-bg: rgba(180, 83, 9, 0.22);
  --hot-2-sticky: rgba(180, 83, 9, 0.38);
  --hot-1-bg: rgba(180, 83, 9, 0.12);
  --hot-1-sticky: rgba(180, 83, 9, 0.22);
  --grid-line: rgba(34, 211, 238, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -25%, var(--accent-soft), transparent 55%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h1 {
  font-size: 1.65rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 16px; /* avoid iOS focus zoom */
  touch-action: manipulation;
}

button {
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: var(--glow);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  filter: none;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

label {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

input,
select,
textarea {
  min-height: var(--touch);
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card-elevated {
  box-shadow: var(--shadow), var(--glow);
  border-color: var(--border-strong);
}

.card-elevated::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0.85;
}

/* Deep-tech utilities */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.label-caps {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--panel-muted);
  color: var(--muted);
  text-transform: uppercase;
}

.chip-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: transparent;
}

.chip-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}

.chip-err {
  background: var(--err-bg);
  color: var(--err);
  border-color: transparent;
}

.test-order-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0.35rem 0.15rem 0;
  padding: 0.28rem 0.62rem;
  border-radius: 6px;
  background: #c2410c;
  color: #fff;
  border: 2px solid #7f1d1d;
  box-shadow: 0 0 0 2px #fdba74;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  vertical-align: middle;
}

.entity-tag-badge.entity-tag-canada {
  background: #b91c1c;
  border-color: #7f1d1d;
  box-shadow: 0 0 0 2px #fca5a5;
}

.entity-tag-badge.entity-tag-usa {
  background: #1d4ed8;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 2px #93c5fd;
}

.ic-end-customer-line {
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--muted, #64748b);
}

.chip-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: transparent;
}

/* Outbound destination entity scream (BTW feeder → USA TNW / CANADA MAW) */
.chip-entity-usa {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1e3a8a;
  text-transform: uppercase;
}

.chip-entity-canada {
  background: #b91c1c;
  color: #ffffff;
  border-color: #7f1d1d;
  text-transform: uppercase;
}

/* Veeqo dashboard warehouse badges (TNW: Milltex / RZ / Lotus) */
.chip-veeqo-milltex {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1e3a8a;
}
.chip-veeqo-rz {
  background: #0f766e;
  color: #ffffff;
  border-color: #115e59;
}
.chip-veeqo-lotus {
  background: #6d28d9;
  color: #ffffff;
  border-color: #5b21b6;
}
.chip-veeqo-canada {
  background: #b91c1c;
  color: #ffffff;
  border-color: #7f1d1d;
}

.muted {
  color: var(--muted);
}

.err {
  color: var(--err);
  background: var(--err-bg);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* —— App shell / top bar —— */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  padding: calc(0.65rem + var(--safe-top)) max(1rem, var(--safe-right)) 0.65rem
    max(1rem, var(--safe-left));
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

/* Brand + utilities — one clear row */
.topbar-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
}

.topbar-utils {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
}

.topbar-menu-btn {
  flex-shrink: 0;
  min-width: var(--touch);
  padding: 0.55rem 0.9rem;
}

.topbar-scan-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  cursor: pointer;
  touch-action: manipulation;
}

.topbar-scan-btn.active {
  color: var(--accent-text);
  background: var(--accent);
  border-color: var(--accent);
}

/* —— Right-side warehouse switcher —— */
.wh-switcher {
  position: relative;
  flex-shrink: 0;
  z-index: 40;
}

.wh-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--accent, #0e7490);
  background: color-mix(in srgb, var(--accent, #0e7490) 14%, transparent);
  color: var(--text);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  font-size: 0.9rem;
}

.wh-switcher-btn.open {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #0e7490) 35%, transparent);
}

.wh-switcher-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.wh-switcher-caret {
  font-size: 0.7rem;
  opacity: 0.8;
}

.wh-switcher-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(18rem, calc(100vw - 1.5rem));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  box-shadow: var(--shadow);
  z-index: 50;
  overflow: hidden;
}

.wh-switcher-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.wh-switcher-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
}

.wh-switcher-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  grid-gap: 0.5rem;
  gap: 0.5rem;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  font: inherit;
}

.wh-switcher-item:hover {
  background: var(--panel-muted, #f1f5f9);
}

.wh-switcher-item.active {
  background: color-mix(in srgb, var(--accent, #0e7490) 16%, transparent);
}

.wh-switcher-item-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 2.5rem;
}

.wh-switcher-item-name {
  font-size: 0.85rem;
  color: var(--muted);
}

.wh-switcher-item-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent, #0e7490);
}

.wh-switcher-panel-foot {
  padding: 0.5rem 0.9rem 0.75rem;
  border-top: 1px solid var(--border);
}

.wh-switcher-backdrop {
  display: none;
}

.wh-drawer-switch {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--accent, #0e7490);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .wh-switcher-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 45;
  }

  .wh-switcher-panel {
    position: fixed;
    /* Compact dropdown under header — not a full half-screen sheet */
    top: calc(3.25rem + var(--safe-top));
    right: max(0.5rem, var(--safe-right));
    bottom: auto;
    left: auto;
    width: min(15rem, calc(100vw - 1rem));
    max-height: min(70vh, 22rem);
    border-radius: var(--radius, 8px);
    border: 1px solid var(--border);
    z-index: 50;
    display: flex;
    flex-direction: column;
  }

  .wh-switcher-list {
    flex: 1 1;
    overflow-y: auto;
  }
}

.topbar-spacer {
  flex: 1 1;
  min-width: 0.25rem;
}

.topbar-logout {
  flex-shrink: 0;
  min-height: 2.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-right: 0.25rem;
  padding: 0.15rem 0.25rem;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.nav-brand span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.nav-sub {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

/* Desktop full menu strip — all links, comfortable size */
.nav-desktop {
  display: none;
  gap: 0.35rem 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.nav-desktop a {
  padding: 0.5rem 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  touch-action: manipulation;
  white-space: nowrap;
}

.nav-desktop a:hover {
  color: var(--text);
  background: var(--panel-muted);
  text-decoration: none;
}

.nav-error-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
}
.nav-desktop a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-user {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.est-clock {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* Drawer */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 50;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  /* Compact side sheet — avoid half-screen on tablets / phones */
  width: min(15.5rem, 70vw);
  max-width: 280px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  z-index: 60;
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: var(--safe-top) 0 var(--safe-bottom);
  box-shadow: var(--shadow);
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.nav-drawer-head strong {
  font-size: 0.9rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  flex: 1 1;
  -webkit-overflow-scrolling: touch;
}

.nav-drawer-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  touch-action: manipulation;
}

.nav-drawer-list a:hover {
  background: var(--panel-muted);
  text-decoration: none;
}

.nav-drawer-list a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

/* Bottom primary tabs (tablet / phone) */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.35rem max(0.35rem, var(--safe-right)) calc(0.35rem + var(--safe-bottom))
    max(0.35rem, var(--safe-left));
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  gap: 0.15rem;
  justify-content: space-around;
  align-items: stretch;
}

.bottom-nav a,
.bottom-nav-more {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.35rem 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1.15;
}

.bottom-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 2px 0 var(--accent);
}

.bottom-nav-more {
  color: var(--muted);
}

.bottom-nav-label {
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-topbar {
  position: absolute;
  top: max(1rem, var(--safe-top));
  right: max(1rem, var(--safe-right));
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.brand-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-sub {
  margin: 0.5rem 0 0 !important;
  font-size: 0.8rem;
}

/* legacy .nav (unused by AppShell but keep safe) */
.nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
}

/* —— Theme toggle —— */
.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  background: var(--panel-muted);
  gap: 2px;
}

.theme-btn {
  min-height: 38px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}

.theme-btn:hover:not(:disabled) {
  filter: none;
  color: var(--text);
}

.theme-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* —— Layout —— */
main {
  padding: 1.25rem 1rem calc(2.5rem + var(--bottom-nav-h) + var(--safe-bottom));
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  flex: 1 1;
  overscroll-behavior-y: contain;
}

.app-shell.has-bottom-nav {
  --bottom-nav-h: 3.75rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.25rem 0;
}

.table-scroll table {
  min-width: 32rem;
}

/* —— Super-admin access control matrix —— */
.access-matrix-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.access-filter {
  min-width: 12rem;
  flex: 1 1;
  max-width: 20rem;
}

.access-matrix-scroll table.access-matrix {
  min-width: 48rem;
}

.access-matrix thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--border);
}

.access-matrix th.access-col-site,
.access-matrix td.access-col-site {
  text-align: center;
  width: 4.5rem;
  min-width: 4.5rem;
}

.access-matrix th.access-col-active,
.access-matrix td.access-col-active {
  text-align: center;
  width: 5rem;
}

.access-matrix th.access-col-role,
.access-matrix td.access-col-role {
  min-width: 11rem;
}

.access-matrix th.access-col-user,
.access-matrix td.access-col-user {
  min-width: 12rem;
}

.access-matrix th.access-col-actions,
.access-matrix td.access-col-actions {
  min-width: 8rem;
}

.access-check {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted, #6b7280);
}

.access-check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent, #0e7490);
}

.access-check-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.access-row-saving {
  opacity: 0.65;
  pointer-events: none;
}

.access-active-btn {
  min-width: 3.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.access-active-btn.on {
  background: color-mix(in srgb, var(--accent, #0e7490) 18%, transparent);
  border-color: var(--accent, #0e7490);
}

.access-active-btn.off {
  opacity: 0.85;
}

.access-site-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.access-site-pill {
  min-width: 4.5rem;
  min-height: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius, 8px);
  cursor: pointer;
}

.access-site-pill.on {
  background: color-mix(in srgb, var(--accent, #0e7490) 22%, transparent);
  border-color: var(--accent, #0e7490);
  color: var(--text);
}

.access-site-pill:disabled {
  opacity: 0.75;
  cursor: default;
}

.access-create h3 {
  margin-top: 0;
}

/* Sticky floor action (receive bulk, etc.) */
.sticky-action-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
  z-index: 15;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sticky-action-bar button {
  flex: 1 1;
  min-width: 10rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header .muted {
  margin: 0;
}

/* —— Tables —— */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

th {
  background: var(--panel-muted);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

td:first-child,
th:first-child {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* —— Selectable rows —— */
.selectable-row {
  padding: 0.85rem 1rem;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.selectable-row.selected {
  background: var(--row-selected);
  border-color: var(--accent);
}

.selectable-row input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  min-height: 1.35rem;
  min-width: 1.35rem;
  accent-color: var(--accent);
}

/* —— Mode tabs —— */
.mode-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  width: 100%;
  max-width: 28rem;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.mode-tabs button {
  flex: 1 1;
  min-height: 48px;
  box-shadow: none;
  font-size: 0.95rem;
}

.mode-tabs button:not(.active) {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.mode-tabs button.active {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* —— Login —— */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1.5rem, var(--safe-top)) max(1.5rem, var(--safe-right))
    max(1.5rem, var(--safe-bottom)) max(1.5rem, var(--safe-left));
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-soft), transparent),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card .brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-card .brand h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-card .brand h1 .accent {
  color: var(--accent);
  font-family: var(--font-mono);
}

.login-card .brand .badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.stat-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  bottom: 0;
  background: var(--accent);
  opacity: 0.7;
}

.stat-tile .label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-tile .value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 0.35rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

code {
  font-size: 0.85em;
  font-family: var(--font-mono);
  background: var(--panel-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

details summary {
  cursor: pointer;
  color: var(--muted);
}

/* Phone */
@media (max-width: 640px) {
  .topbar {
    padding: calc(0.45rem + var(--safe-top)) 0.5rem 0.45rem;
    gap: 0.3rem;
  }

  .nav-user {
    display: none;
  }

  .est-clock {
    font-size: 0.68rem;
    padding: 0.25rem 0.4rem;
  }

  main {
    padding: 1rem 0.75rem calc(1.5rem + var(--bottom-nav-h) + var(--safe-bottom));
  }

  .login-card {
    max-width: 100%;
  }
}

/* Tablet portrait / small landscape: bottom nav + drawer */
@media (max-width: 1199px) {
  .bottom-nav {
    display: flex;
  }

  :root {
    --touch: 52px;
  }

  main {
    max-width: 1100px;
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, var(--safe-right));
  }

  table {
    font-size: 1rem;
  }

  th,
  td {
    padding: 0.65rem 0.75rem;
  }

  .mode-tabs button {
    min-height: 52px;
  }
}

/* iPad landscape / large tablet content width */
@media (min-width: 1024px) and (max-width: 1199px) {
  main {
    max-width: 1280px;
  }

  .receive-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
    gap: 1rem;
    align-items: start;
  }
}

/* Desktop: slim meta + full compact menu strip, no bottom bar */
@media (min-width: 1200px) {
  .topbar-menu-btn {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .bottom-nav {
    display: none !important;
  }

  .app-shell.has-bottom-nav {
    --bottom-nav-h: 0px;
  }

  .nav-drawer,
  .nav-drawer-backdrop {
    display: none !important;
  }

  main {
    max-width: 1100px;
    padding: 1.35rem 1.5rem 2.5rem;
  }

  :root {
    --touch: 48px;
  }
}

/* Wide desktop: keep all links on one roomy row when space allows */
@media (min-width: 1440px) {
  .nav-desktop {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 0.4rem 0.5rem;
  }

  .nav-desktop a {
    flex-shrink: 0;
    padding: 0.55rem 0.95rem;
    min-height: 42px;
    font-size: 0.95rem;
  }
}

/* —— TNW skid / Plex stock cards (inventory) —— */
.skid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-gap: 0.85rem;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

button.skid-card,
.skid-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  min-height: 9.5rem;
  min-width: 0;
  height: auto;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  letter-spacing: normal;
}

button.skid-card:hover:not(:disabled),
.skid-card:hover {
  background: var(--panel);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}

button.skid-card:active:not(:disabled) {
  transform: none;
}

button.skid-card.skid-card-mixed,
.skid-card-mixed {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, rgba(237, 233, 254, 0.45) 0%, var(--panel) 42%);
}

button.skid-card.skid-card-mono,
.skid-card-mono {
  border-color: #7dd3fc;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.5) 0%, var(--panel) 42%);
}

button.skid-card.skid-card-mixed:hover:not(:disabled),
button.skid-card.skid-card-mono:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(237, 233, 254, 0.55) 0%, var(--panel) 50%);
}

button.skid-card.skid-card-mono:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.6) 0%, var(--panel) 50%);
}

html[data-theme="dark"] button.skid-card.skid-card-mixed,
html[data-theme="dark"] .skid-card-mixed {
  border-color: #7c3aed;
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.22) 0%, var(--panel) 50%);
}

html[data-theme="dark"] button.skid-card.skid-card-mono,
html[data-theme="dark"] .skid-card-mono {
  border-color: #0284c7;
  background: linear-gradient(180deg, rgba(3, 105, 161, 0.22) 0%, var(--panel) 50%);
}

.skid-card-selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: var(--glow);
}

.skid-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.skid-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.skid-badge-mixed {
  background: #ede9fe;
  color: #6d28d9;
}

.skid-badge-mono {
  background: #e0f2fe;
  color: #0369a1;
}

html[data-theme="dark"] .skid-badge-mixed {
  background: rgba(124, 58, 237, 0.35);
  color: #ddd6fe;
}

html[data-theme="dark"] .skid-badge-mono {
  background: rgba(14, 165, 233, 0.3);
  color: #bae6fd;
}

.skid-card-total {
  font-size: 1.35rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.skid-card-id {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.skid-card-lines {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
}

.skid-card-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.skid-card-line-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.skid-card-line-qty {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  font-weight: 600;
}

.skid-card-more {
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.skid-card-foot {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
}

.skid-detail {
  margin-top: 1rem;
}

.skid-matrix-table {
  width: 100%;
  font-size: 0.88rem;
  border-collapse: collapse;
}

.skid-matrix-table th,
.skid-matrix-table td {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.skid-matrix-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.skid-matrix-table td.mono,
.skid-matrix-table th:not(:first-child):not(:nth-child(2)) {
  text-align: right;
}

.inventory-split {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1100px) {
  .inventory-split.has-detail {
    grid-template-columns: 1fr minmax(320px, 420px);
  }

  .inventory-split .skid-detail {
    position: -webkit-sticky;
    position: sticky;
    top: 4.5rem;
    margin-top: 0;
  }
}

.inventory-tools-toggle {
  margin-bottom: 0.75rem;
}

/* Stack form rows on narrower tablets */
@media (max-width: 900px) {
  .row.stack-tablet {
    flex-direction: column;
    align-items: stretch;
  }

  .row.stack-tablet > * {
    width: 100%;
  }
}

/* —— Command center (TV + interactive) —— */
.cc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.cc-icon svg {
  display: block;
}

.cc-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  grid-gap: 0.65rem;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cc-stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 5.25rem;
}

.cc-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  bottom: 0;
  background: var(--accent);
  opacity: 0.75;
}

.cc-stat-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.cc-stat-head .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0;
}

.cc-stat .value {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cc-stat-ok::before {
  background: var(--ok);
}
.cc-stat-warn::before {
  background: var(--warn);
}
.cc-stat-err::before {
  background: var(--err);
}
.cc-stat-info::before {
  background: var(--info);
}
.cc-stat-rush::before {
  background: var(--err);
}

.cc-stat-ok .value {
  color: var(--ok);
}
.cc-stat-warn .value {
  color: var(--warn);
}
.cc-stat-err .value {
  color: var(--err);
}

.cc-stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.cc-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.cc-stage-btn .cc-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  font-size: 0.9em;
}

.cc-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cc-size-plt {
  color: var(--info);
}

.cc-size-bx {
  color: var(--text);
}

.cc-size-na {
  color: var(--muted);
  font-weight: 500;
}

.cc-size-hint {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.cc-table-wrap {
  overflow-x: auto;
  padding: 0;
  border-radius: var(--radius);
  /* sticky cols need a scrollport; isolate so shadows paint cleanly */
  -webkit-overflow-scrolling: touch;
}

.cc-table {
  /* separate + 0 spacing so position:sticky works on th/td (collapse breaks it) */
  border-collapse: separate;
  border-spacing: 0;
}

.cc-table th {
  font-size: 0.72rem;
}

.cc-table td .cc-order-main {
  font-weight: 650;
  display: block;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cc-order-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.cc-order-ids {
  min-width: 0;
  max-width: 100%;
}

.cc-order-sub {
  font-size: 0.75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Keep Order # visible while scrolling horizontally.
   Stack stars/RUSH above the DL so the number is never painted over PO. */
.cc-table th.cc-col-order,
.cc-table td.cc-col-order {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.12);
  min-width: 10.5rem;
  max-width: 14rem;
}

.cc-table thead th.cc-col-order {
  z-index: 3;
  background: var(--panel-muted, var(--panel));
}

/* Keep Assign / Verify actions pinned on the right — no scroll-to-end */
.cc-table th.cc-col-actions,
.cc-table td.cc-col-actions {
  position: -webkit-sticky;
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: -6px 0 10px -4px rgba(15, 23, 42, 0.14);
  white-space: nowrap;
  min-width: 7.5rem;
  vertical-align: middle;
}

.cc-table thead th.cc-col-actions {
  z-index: 3;
  background: var(--panel-muted, var(--panel));
}

/* Selected / tinted rows: sticky cells still need opaque paint */
.cc-table tr.cc-row-selected td.cc-col-order,
.cc-table tr.cc-row-selected td.cc-col-actions {
  background: var(--row-selected);
}

/* Plex 3-star / rush — paint sticky Order # so floor sees it without scrolling */
.cc-table tr.cc-row-hot-3 td {
  background: var(--hot-3-bg);
}
.cc-table tr.cc-row-hot-3 td.cc-col-order,
.cc-table tr.cc-row-hot-3 td.cc-col-actions {
  background: var(--hot-3-sticky);
}
.cc-table tr.cc-row-hot-3 td.cc-col-order {
  box-shadow: inset 4px 0 0 var(--hot-3), 4px 0 8px -4px rgba(15, 23, 42, 0.12);
}

.cc-table tr.cc-row-hot-2 td {
  background: var(--hot-2-bg);
}
.cc-table tr.cc-row-hot-2 td.cc-col-order,
.cc-table tr.cc-row-hot-2 td.cc-col-actions {
  background: var(--hot-2-sticky);
}
.cc-table tr.cc-row-hot-2 td.cc-col-order {
  box-shadow: inset 4px 0 0 rgba(217, 119, 6, 0.7), 4px 0 8px -4px rgba(15, 23, 42, 0.12);
}

.cc-table tr.cc-row-hot-1 td {
  background: var(--hot-1-bg);
}
.cc-table tr.cc-row-hot-1 td.cc-col-order,
.cc-table tr.cc-row-hot-1 td.cc-col-actions {
  background: var(--hot-1-sticky);
}

.cc-table tr.cc-row-selected.cc-row-hot-3 td,
.cc-table tr.cc-row-selected.cc-row-hot-2 td,
.cc-table tr.cc-row-selected.cc-row-hot-1 td {
  background: var(--row-selected);
}
.cc-table tr.cc-row-selected.cc-row-hot-3 td.cc-col-order,
.cc-table tr.cc-row-selected.cc-row-hot-3 td.cc-col-actions,
.cc-table tr.cc-row-selected.cc-row-hot-2 td.cc-col-order,
.cc-table tr.cc-row-selected.cc-row-hot-2 td.cc-col-actions,
.cc-table tr.cc-row-selected.cc-row-hot-1 td.cc-col-order,
.cc-table tr.cc-row-selected.cc-row-hot-1 td.cc-col-actions {
  background: var(--row-selected);
}

.cc-hot-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--hot-3-bg);
  border: 1px solid var(--hot-3);
  border-radius: var(--radius-sm);
  color: var(--hot-3);
  font-weight: 700;
  font-size: 0.9rem;
}

.floor-pri-mark {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  vertical-align: middle;
}

.floor-pri-mark-compact {
  flex-shrink: 0;
}

.floor-pri-stars {
  color: var(--hot-3);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  font-size: 0.95rem;
}

.floor-pri-stars-3 {
  font-size: 1.05rem;
}

.floor-pri-rush {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
}

.pp-card-hot-3 {
  border-left: 4px solid var(--hot-3);
  background: var(--hot-3-bg);
}

.pp-card-hot-2 {
  border-left: 4px solid rgba(217, 119, 6, 0.7);
  background: var(--hot-2-bg);
}

.pp-card-hot-1 {
  border-left: 4px solid rgba(217, 119, 6, 0.45);
  background: var(--hot-1-bg);
}

.ccb-card.hot-3 {
  border-left: 4px solid var(--hot-3);
  background: var(--hot-3-bg);
}

.ccb-card.hot-2 {
  border-left: 4px solid rgba(217, 119, 6, 0.7);
  background: var(--hot-2-bg);
}

.ccb-oid .floor-pri-mark {
  margin-right: 6px;
}

html[data-theme="dark"] .cc-table th.cc-col-order,
html[data-theme="dark"] .cc-table td.cc-col-order,
html[data-theme="dark"] .cc-table th.cc-col-actions,
html[data-theme="dark"] .cc-table td.cc-col-actions {
  box-shadow: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cc-display {
  min-height: 100vh;
  padding: 1rem 1.25rem 2rem;
  background: var(--bg);
}

.cc-display .cc-stat {
  min-height: 5.75rem;
  padding: 1rem 1.05rem;
}

.cc-display .cc-stat .value {
  font-size: 2rem;
}

.cc-display .cc-stat-head .label {
  font-size: 0.72rem;
}

.cc-display .cc-stage-btn {
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
}

.cc-display .cc-table {
  font-size: 1.05rem;
}

.cc-display .cc-table th {
  font-size: 0.8rem;
  padding: 0.75rem 0.65rem;
}

.cc-display .cc-table td {
  padding: 0.85rem 0.65rem;
  vertical-align: middle;
}

.cc-display .cc-table th.cc-col-order,
.cc-display .cc-table td.cc-col-order {
  min-width: 12.5rem;
  max-width: 16rem;
}

.cc-display .cc-table td .cc-order-main {
  font-size: 1.15rem;
  font-weight: 700;
}

.cc-display .cc-order-sub {
  font-size: 0.8rem;
}

.cc-display .cc-size {
  font-size: 1.15rem;
}

.cc-display .chip {
  font-size: 0.85rem;
}

.cc-display .test-order-badge {
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
}

/* Age column — human days + since date */
.cc-age {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.2;
  min-width: 4.5rem;
}

.cc-age-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cc-age-label {
  letter-spacing: -0.02em;
}

.cc-age-since {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  padding-left: 1.15rem;
  white-space: nowrap;
}

.cc-age-ok .cc-age-primary {
  color: var(--ok);
}

.cc-age-warn .cc-age-primary {
  color: var(--warn);
}

.cc-age-err .cc-age-primary {
  color: var(--err);
  font-weight: 800;
}

.cc-display .cc-age-primary {
  font-size: 1.12rem;
}

.cc-display .cc-age-since {
  font-size: 0.8rem;
  padding-left: 1.35rem;
}

/* Assign / claim — fixed bottom sheet (always in viewport; no scroll-to-end) */
.cc-assign-sheet {
  position: fixed;
  left: max(0.75rem, var(--safe-left));
  right: max(0.75rem, var(--safe-right));
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
  z-index: 30;
  max-height: min(70vh, 36rem);
  overflow-y: auto;
  margin: 0;
  box-shadow: var(--shadow);
}

.cc-board-assign-open {
  padding-bottom: min(72vh, 38rem);
}

.cc-row-selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* —— Pick/pack iPad floor UI —— */
.pp-lines {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pp-line-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.pp-line-card.is-done {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--border));
}

.pp-line-card.is-partial {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
}

.pp-line-card.is-needs-short {
  background: color-mix(in srgb, var(--warn) 18%, var(--panel));
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
}

.pp-line-card.is-highlight {
  box-shadow: 0 0 0 2px var(--accent);
}

.pp-line-card.is-locked {
  opacity: 0.72;
}

.pp-line-remainder-hint {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--warn, #b45309);
  font-weight: 600;
}

.pp-blocking-panel ul {
  list-style: disc;
}

.pp-line-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.pp-line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.pp-line-bin {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.pp-line-tdc {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c3a00;
  background: #fde68a;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.pp-line-sku {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-word;
}

.pp-line-ordered {
  font-size: 0.95rem;
  color: var(--muted);
}

.pp-line-ordered strong {
  color: var(--text);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.pp-line-status {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pp-line-status.done {
  color: var(--ok);
}

.pp-line-status.partial {
  color: var(--warn);
}

.pp-line-status.needs-short {
  color: var(--warn, #b45309);
}

.pp-line-status.open {
  color: var(--muted);
}

.pp-line-status.locked {
  color: var(--muted);
}

.pp-line-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pp-line-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.pp-line-row-label {
  min-width: 3.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.pp-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pp-qty-stepper button {
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.pp-qty-stepper input {
  width: 4.75rem;
  min-width: 4.75rem;
  min-height: var(--touch);
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.4rem;
}

.pp-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.pp-line-actions button {
  flex: 1 1 auto;
  min-width: 6.5rem;
}

.pp-shortage-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pp-shortage-reasons button {
  flex: 1 1 10rem;
  min-height: var(--touch);
  font-weight: 700;
}

.pp-shortage-prompt {
  margin-top: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warn, #b45309) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn, #b45309) 40%, var(--border));
}

.pp-shortage-prompt-copy {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--warn, #b45309);
}

.pp-reason-bar {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--border);
}

.pp-reason-bar button {
  flex: 0 0 auto;
  min-width: 5.5rem;
}

.pp-reason-bar .pp-shortage-reasons {
  flex: 1 1 100%;
}

.pp-reason-bar .pp-shortage-reasons button {
  flex: 1 1 8rem;
  min-width: 8rem;
}

/* Order detail: sticky floor CTAs + chrome */
.pp-order-page {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 5.5rem);
}

.pp-order-identity {
  margin-top: 0.35rem;
}

.pp-order-identity-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.pp-order-identity h1 {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  word-break: break-word;
}

.pp-order-identity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pp-order-identity-so {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.pp-order-identity-meta {
  margin: 0.35rem 0 0;
}

.pp-order-card-identity {
  min-width: 0;
  flex: 1 1 auto;
}

.pp-order-card-customer {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
  word-break: break-word;
}

.pp-order-card-so {
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.pp-sticky-actions {
  /* sits above bottom nav; inherits .sticky-action-bar */
}

.pp-sticky-actions button {
  flex: 1 1 auto;
  min-width: 8rem;
}

.pp-sticky-actions .pp-reason-bar button {
  flex: 0 0 auto;
  min-width: 5.5rem;
}

.pp-sticky-actions button.pp-validate-busy-btn:disabled {
  opacity: 1;
  cursor: wait;
  background: var(--accent);
  color: var(--accent-text);
}

.pp-validate-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(11, 18, 32, 0.58);
}

.pp-validate-overlay-card {
  width: min(28rem, 100%);
  padding: 1.35rem 1.25rem 1.1rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}

.pp-validate-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pp-validate-title {
  display: block;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text);
}

.pp-validate-detail {
  margin: 0.45rem 0 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--text);
}

.pp-validate-bar {
  height: 10px;
  margin: 1rem 0 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-muted);
  border: 1px solid var(--border);
}

.pp-validate-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.pp-validate-bar.is-wait > span {
  width: 36% !important;
  animation: pp-validate-indeterminate 1.6s ease-in-out infinite;
}

.pp-validate-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  text-align: left;
}

.pp-validate-steps li {
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--muted);
}

.pp-validate-steps li.is-done {
  color: var(--ok);
  background: var(--ok-bg);
}

.pp-validate-steps li.is-done::before {
  content: "✓ ";
}

.pp-validate-steps li.is-active {
  color: var(--accent-text);
  background: var(--accent);
  font-weight: 700;
}

.pp-validate-steps li.is-active::before {
  content: "● ";
}

.pp-validate-elapsed {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.pp-validate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 1rem;
}

.pp-validate-actions button {
  min-height: 44px;
  min-width: 9.5rem;
}

.pp-validate-leave-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.pp-validate-banner {
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--accent);
  background: var(--panel-muted);
}

.pp-validate-banner-title {
  display: block;
  font-size: 1.05rem;
}

.pp-validate-banner-detail {
  margin: 0.35rem 0 0;
  color: var(--text);
}

@keyframes pp-validate-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

.pp-validate-error {
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--err);
  background: var(--err-bg);
}

.pp-validate-error-title {
  display: block;
  color: var(--err);
  font-size: 1.1rem;
}

.pp-validate-error-detail {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .pp-validate-bar > span {
    transition: none;
  }
  .pp-validate-bar.is-wait > span {
    animation: none;
  }
}

.pp-view-tabs button,
.pp-pallet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pp-pallet-filters button {
  min-height: 40px;
  font-size: 0.85rem;
}
.pp-filter-tabs button {
  min-height: var(--touch);
}

.pp-print-menu summary {
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  font-weight: 600;
  touch-action: manipulation;
}

.pp-print-menu summary::-webkit-details-marker {
  display: none;
}

.pp-print-menu[open] summary {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pp-print-menu-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.pp-assign-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.35rem 0.55rem;
}

.pp-assign-chip button {
  min-height: 44px;
  min-width: 44px;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
}

/* Pack wizard tablet density */
.pp-pack-box-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pp-pack-box-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  background: var(--panel-muted);
}

.pp-pack-box-card .pp-qty-stepper {
  margin-top: 0.5rem;
}

.pp-pack-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  grid-gap: 0.65rem 0.75rem;
  gap: 0.65rem 0.75rem;
  align-items: end;
}

.pp-pack-fields label input {
  width: 100%;
  min-height: var(--touch);
}

.pp-pack-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pp-pack-mode-toggle button {
  flex: 1 1 10rem;
  min-height: var(--touch);
}

/* Two-pile box plan (mono / mixed) */
.pp-plan-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.pp-plan-banner strong {
  font-size: 1.05rem;
}
.pp-pile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.pp-pile.ok {
  border-color: var(--ok);
}
.pp-pile-hd {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem;
  background: var(--panel-muted);
  border-bottom: 1px solid var(--border);
}
.pp-pile-hd h4 {
  margin: 0;
  font-size: 1rem;
}
.pp-pile-bd {
  padding: 0.75rem 0.9rem;
}
.pp-mono-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
}
.pp-mono-list li {
  margin: 0.2rem 0;
}
.pp-box-groups {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pp-box-grp {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.pp-box-grp:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.pp-box-grow {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.pp-box-gname {
  font-weight: 700;
  font-size: 0.95rem;
}
.pp-box-gtot {
  margin-left: auto;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pp-box-gtot small {
  font-weight: 500;
  color: var(--muted);
}
.pp-box-szs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.pp-box-sz {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.4rem 0.25rem 0.55rem;
  min-height: 40px;
  font-size: 0.9rem;
}
.pp-box-sz.dim {
  opacity: 0.45;
}
.pp-box-sz b {
  font-family: var(--font-mono);
  font-weight: 650;
  font-size: 0.8rem;
  color: var(--muted);
}
.pp-box-sz .n {
  font-weight: 750;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 1.1rem;
  text-align: right;
}
.pp-box-left {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.pp-box-mini {
  display: flex;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  overflow: hidden;
}
.pp-box-mini button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  font-weight: 700;
}
.pp-box-mini button + button {
  border-left: 1px solid var(--border);
}
.pp-box-mini input[type="number"] {
  width: 4.2rem;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 0.25rem;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pp-box-all {
  font-size: 0.75rem;
  font-weight: 700;
  min-height: 44px;
  padding: 0 0.6rem;
}

/* Stage 1 — factory carton cards (iPad, minimal) */
.pp-carton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}
@media (min-width: 900px) {
  .pp-carton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.pp-carton {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 148px;
}
.pp-carton-face {
  position: relative;
  background: #f4f4f1;
  padding: 0.7rem 0.75rem 0.55rem;
  border-bottom: 1px solid var(--border);
  min-height: 88px;
}
html[data-theme="dark"] .pp-carton-face {
  background: #1c1c18;
}
.pp-carton-style {
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pp-carton-sticker {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.45rem;
  background: #facc15;
  color: #111;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  line-height: 1.15;
}
.pp-carton-sz {
  font-size: 1.15rem;
}
.pp-carton-color {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pp-carton-pack {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.pp-carton-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.5rem 0.15rem;
}
.pp-carton-step {
  width: 52px;
  height: 52px;
  min-height: 52px;
  min-width: 52px;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 10px;
}
.pp-carton-n {
  min-width: 2.4rem;
  text-align: center;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.pp-carton-sub {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 0.5rem 0.55rem;
}

/* Stage 2 — leftover pack builder */
.pp-left-builder {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pp-left-counts {
  display: flex;
  gap: 0.5rem;
}
.pp-left-counts .ct {
  flex: 1 1;
  text-align: center;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.4rem;
}
.pp-left-counts .l {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pp-left-counts .v {
  font-size: 1.25rem;
  font-weight: 750;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pp-left-counts .left .v {
  color: var(--err);
}
.pp-left-counts .left.done .v {
  color: var(--ok);
}
.pp-left-add {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.55rem;
  gap: 0.55rem;
}
.pp-left-add-btn {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-weight: 700;
}
.pp-left-add-btn small {
  font-weight: 550;
  font-size: 0.75rem;
  opacity: 0.75;
}
.pp-lib-picker {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  background: var(--panel-muted);
}
.pp-lib-picker-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pp-lib-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pp-lib-row {
  width: 100%;
  min-height: 52px;
  display: flex;
  text-align: left;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
}
.pp-left-sec {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.pp-left-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.pp-left-box.open {
  border: 2px solid var(--accent);
}
.pp-left-box-hd,
.pp-left-box-ft {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  background: var(--panel-muted);
}
.pp-left-box-ft {
  border-top: 1px solid var(--border);
  background: var(--panel);
}
.pp-left-box-ft button {
  min-height: 48px;
}
.pp-left-box-bd {
  padding: 0.7rem 0.75rem;
}
.pp-left-prev {
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  margin-top: 0.55rem;
  background: var(--accent-soft);
}
.pp-left-prev-hd {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.pp-left-prev-hd span {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 650;
}
.pp-left-rem {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.pp-left-rem-hd {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: var(--panel-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.pp-pack-sticky {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.25rem;
  background: var(--bg);
}
.pp-mix-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.55rem;
  background: var(--panel-muted);
}
.pp-mix-card:last-child {
  margin-bottom: 0;
}
.pp-mix-hd {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.pp-fillbar {
  height: 6px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 0.45rem;
}
.pp-fillbar i {
  display: block;
  height: 100%;
  background: var(--ok);
}

.pp-bulk {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pp-bulk-pick {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pp-bulk-pick-hd {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pp-bulk-picked {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pp-bulk-picked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-muted);
  min-height: 48px;
}
.pp-lib-row .chip {
  margin-left: auto;
}
.pp-bulk-scroll {
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pp-bulk-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
.pp-bulk-grid th,
.pp-bulk-grid td {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.5rem;
  vertical-align: top;
}
.pp-bulk-sku {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
  min-width: 9.5rem;
  text-align: left;
}
.pp-bulk-sku-name {
  font-weight: 650;
}
.pp-bulk-col {
  min-width: 8.5rem;
  background: var(--panel-muted);
}
.pp-bulk-col.on,
.pp-bulk-cell.on {
  background: var(--accent-soft, #e0f2fe);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.pp-bulk-col-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: calc(100% - 2rem);
  min-height: 48px;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.pp-bulk-col-name {
  font-weight: 700;
}
.pp-bulk-del {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
}
.pp-bulk-col {
  position: relative;
}
.pp-bulk-qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.pp-bulk-qty button {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}
.pp-bulk-qty input[type="number"] {
  width: 4rem;
  min-height: 36px;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pp-bulk-left {
  min-width: 3.25rem;
  text-align: right;
  font-weight: 700;
}
.pp-bulk-left.done,
.pp-bulk-grid .done {
  color: var(--ok);
}
.pp-bulk-add-col {
  min-width: 3.5rem;
  width: 3.5rem;
  background: var(--panel);
  text-align: center;
  vertical-align: middle;
}
.pp-bulk-add-col-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}
.pp-bulk-fill-picker .pp-lib-list {
  max-height: 240px;
  overflow-y: auto;
}
.pp-bulk-repeat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.pp-bulk-repeat button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 900px) {
  .pp-content-draft-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .pp-content-draft-row > * {
    width: 100%;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
}

.pick-verify-sheet table th,
.pick-verify-sheet table td {
  font-size: 0.95rem;
  padding: 0.55rem 0.5rem;
}

/* Matrix status cells (were class-only / dead) */
.pp-matrix-table th,
.pp-matrix-table td {
  text-align: center;
  min-width: 2.75rem;
  padding: 0.55rem 0.4rem;
}

.pp-matrix-table th:first-child,
.pp-matrix-table td:first-child {
  text-align: left;
  min-width: 5rem;
}

.pp-cell-open {
  background: var(--panel-muted);
}

.pp-cell-partial {
  background: var(--warn-bg);
  font-weight: 600;
}

.pp-cell-done {
  background: var(--ok-bg);
  font-weight: 600;
}

.pp-cell-locked {
  opacity: 0.45;
  background: var(--panel-muted);
}

.pp-cell-hi {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (max-width: 1199px) {
  .pp-matrix-table th,
  .pp-matrix-table td {
    padding: 0.7rem 0.45rem;
    font-size: 1rem;
  }

  .pick-verify-sheet table th,
  .pick-verify-sheet table td {
    padding: 0.7rem 0.55rem;
    font-size: 0.95rem;
  }
}

/* iPad / touch: blur + pull-to-refresh + sub-16px inputs crash or zoom Safari. */
@media (hover: none) and (pointer: coarse) {
  html,
  body {
    overscroll-behavior: none;
    text-size-adjust: 100%;
  }

  button,
  a,
  input,
  select,
  textarea,
  label {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .topbar,
  .bottom-nav,
  .nav-drawer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--panel);
  }

  .pp-order-list > .card {
    content-visibility: auto;
    contain-intrinsic-size: auto 148px;
  }
}

/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!../../node_modules/.pnpm/next@14.2.21_@playwright+test@1.58.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/font-parity.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* WMS font files copied with HTTPS GET only on 2026-11-14. See docs/wave-8-wms-fonts.json and app/fonts/*-OFL.txt. */
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/ba9851c3c22cd980-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/21350d82a1f187e9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/c5fe6dc8356a8c31-s.woff2) format("woff2");unicode-range:u+1f??}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/19cfc7226ec3afaa-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/8e9860b6e62d6359-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}
@font-face{font-family:"Milltex Inter parity";font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/parity/e4af272ccee01ff0-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/886030b0b59bc5a7-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/0aa834ed78bf6d07-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/67957d42bae0796d-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/f911b923c6adde36-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/939c4f875ee75fbb-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}
@font-face{font-family:"Milltex JetBrains Mono parity";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/parity/bb3ef058b751a6ad-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}
:root { --font-ui: "Milltex Inter parity", var(--font-ui-offline-fallback); --font-mono-family: "Milltex JetBrains Mono parity", var(--font-mono-offline-fallback); }

