/* Logistics (Vantage Track in the portal): Max's look, on the Logistics
   and floor pages only (BUILD-SPEC, Look; plan decision 13). Values from
   Max's globals.css and "Design rules" (15 Nov 2026): white panels on a
   tinted page, darker text, 44px touch controls, 16px inputs, nothing
   under 14px. Light only. No chips, pills, uppercase micro labels,
   gradients, accent rails, decorative icons or middle dots: status is a
   small dot and sentence-case words.

   Everything is scoped under .lx and its classes carry the lx- prefix,
   so the rest of the portal is untouched. The tokens are on :root with
   the --lx- prefix so the page tint can reach the portal's own column. */

:root {
  --lx-ink: #1c2d35;
  --lx-ink-2: #3a4a53;
  --lx-forest: #2c584f;
  --lx-sage: #75c69e;
  --lx-sage-2: #5faf88;
  --lx-sage-3: #4fa07a;
  --lx-mint: #d9ede0;
  --lx-mint-2: #eaf5ee;
  --lx-line: #d6e1e5;
  --lx-line-2: #c3d2d8;
  --lx-edge: #7f918c;
  --lx-grey: #4a5b57;
  --lx-page: #edf2f4;
  --lx-paper: #f4f7f9;
  --lx-surface: #ffffff;
  --lx-column: #dbeae1;
  --lx-ok: #2f8f63;
  --lx-amber: #8a5a0f;
  --lx-amber-dot: #b7791f;
  --lx-amber-tint: #fff5dc;
  --lx-amber-line: #e2c88a;
  --lx-red: #a63a27;
  --lx-red-tint: #fdeeea;
  --lx-red-line: #dba89b;
  --lx-green-line: #a8d3ba;
  --lx-radius-control: 6px;
  --lx-radius-button: 8px;
  --lx-radius-panel: 10px;
  --lx-elev-1: 0 1px 2px rgba(28, 45, 53, 0.07);
  --lx-elev-2: 0 4px 14px rgba(28, 45, 53, 0.1);
  --lx-elev-3: 0 12px 32px rgba(28, 45, 53, 0.2);
  --lx-panel-w: clamp(440px, 38vw, 640px);
  --lx-font: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --lx-display: "Syne", -apple-system, "Segoe UI", sans-serif;
}

/* The tinted page behind a Logistics page, whatever the portal's theme. */
body:has(.lx-page) .main { background: var(--lx-page); }
body:has(.lx-page) .view-root { background: var(--lx-page); }

.lx {
  color: var(--lx-ink);
  font-family: var(--lx-font);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.5;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
.lx *, .lx *::before, .lx *::after { box-sizing: border-box; }
.lx :focus-visible { outline: 2px solid var(--lx-forest); outline-offset: 2px; }
.lx button:not(:disabled), .lx select:not(:disabled), .lx summary { cursor: pointer; }
/* :where keeps the reset as weak as one class, so the margins the .lx-
   classes below set are not wiped by it (30 Nov 2026). */
.lx :where(p, h1, h2, h3, dl, dd, ol, ul) { margin: 0; }
.lx ol, .lx ul { padding: 0; list-style: none; }

.lx-page { min-width: 0; max-width: 100%; }

/* ----- type and small utilities ----------------------------------- */
.lx-h1 { font: 700 28px/1.1 var(--lx-display); letter-spacing: -0.02em; text-wrap: balance; color: var(--lx-ink); }
.lx-h2 { font: 600 19px/1.3 var(--lx-font); color: var(--lx-ink); margin-bottom: 10px; }
.lx-h3 { font: 600 15px/1.4 var(--lx-font); color: var(--lx-grey); margin-top: 16px; }
.lx-lead { max-width: 70ch; margin-top: 8px; font-size: 16px; color: var(--lx-ink-2); }
.lx-quiet { color: var(--lx-grey); }
.lx-hint { font-size: 15px; color: var(--lx-grey); }
.lx-strong { font-weight: 600; }
.lx-nowrap { white-space: nowrap; }
.lx-min0 { min-width: 0; }
.lx-break { overflow-wrap: anywhere; }
.lx-prose { max-width: 70ch; margin-top: 4px; white-space: pre-line; }
.lx-mt { margin-top: 12px; }
.lx-mt-s { margin-top: 4px; }
.lx-mb { margin-bottom: 12px; }
.lx-text-bad { color: var(--lx-red); }
.lx-text-warn { color: var(--lx-amber); }
.lx-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.lx-scope, .lx-summary-line { margin-top: 10px; font-size: 15px; color: var(--lx-ink-2); }

/* ----- links and buttons ------------------------------------------- */
.lx a.lx-link, .lx .lx-link, .lx .lx-link-button {
  color: var(--lx-forest); font-weight: 600; text-decoration: none; text-underline-offset: 3px;
  background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit;
}
.lx .lx-link:hover, .lx .lx-link-button:hover { text-decoration: underline; }
.lx-back { display: inline-block; margin-bottom: 10px; font-size: 14px; }

.lx .lx-btn, .lx .lx-btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--lx-radius-button); border: 1px solid transparent;
  font: 600 15px/20px var(--lx-font); color: var(--lx-ink); cursor: pointer; white-space: nowrap; text-decoration: none;
  touch-action: manipulation; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.lx .lx-btn { background: var(--lx-sage); border-color: var(--lx-sage-2); }
.lx .lx-btn:hover:not(:disabled) { background: var(--lx-sage-2); }
.lx .lx-btn:active:not(:disabled) { background: var(--lx-sage-3); border-color: var(--lx-sage-3); }
.lx .lx-btn-outline { background: var(--lx-surface); border-color: var(--lx-edge); font-weight: 550; }
.lx .lx-btn-outline:hover:not(:disabled) { background: var(--lx-mint-2); border-color: var(--lx-forest); }
.lx .lx-btn-outline:active:not(:disabled) { background: var(--lx-mint); }
.lx .lx-btn:disabled, .lx .lx-btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.lx .lx-btn-small { min-height: 36px; padding: 7px 12px; font-size: 14px; line-height: 18px; }
@media (pointer: coarse) { .lx .lx-btn-small { min-height: 44px; } }
/* Shown so people see what is coming; pressing it does nothing yet. */
.lx .is-placeholder { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.lx-inline-form { display: inline; margin: 0; }
.lx-move-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ----- forms ------------------------------------------------------- */
.lx-form { display: grid; gap: 14px; margin-top: 10px; }
.lx-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@container (min-width: 460px) { .lx-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lx-span-2 { grid-column: span 2; } }
.lx-form, .lx-dialog-body { container-type: inline-size; }
.lx-field { min-width: 0; }
.lx-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.lx-fieldset legend { width: 100%; }
.lx .lx-label { display: block; margin-bottom: 5px; font-size: 14px; line-height: 20px; font-weight: 550; color: var(--lx-ink-2); }
.lx .lx-input {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--lx-edge);
  border-radius: var(--lx-radius-control); background: var(--lx-surface); color: var(--lx-ink);
  font: 450 16px/22px var(--lx-font); transition: border-color 0.15s ease; margin: 0;
}
.lx .lx-input:hover { border-color: var(--lx-grey); }
.lx .lx-input:focus { border-color: var(--lx-forest); }
.lx .lx-input::placeholder { color: #667772; opacity: 1; }
.lx textarea.lx-input { min-height: 88px; resize: vertical; }
.lx select.lx-input { height: 44px; padding-top: 0; padding-bottom: 0; }
.lx .lx-input-short { max-width: 160px; }
.lx-field-error { margin-top: 5px; font-size: 14px; font-weight: 550; color: var(--lx-red); }
.lx-form-error { padding: 12px 14px; border: 1px solid var(--lx-red-line); border-radius: var(--lx-radius-control); background: var(--lx-red-tint); font-size: 15px; }
.lx .lx-check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.lx .lx-check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--lx-forest); cursor: pointer; }

/* ----- status: a small dot and words -------------------------------- */
.lx-status { display: inline-flex; align-items: baseline; gap: 8px; }
.lx-status:not(:has(.lx-dot))::before, .lx-dot {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--lx-edge); flex: none; transform: translateY(-1px);
}
.lx-status-ok:not(:has(.lx-dot))::before, .lx-status-ok .lx-dot { background: var(--lx-ok); }
.lx-status-warn:not(:has(.lx-dot))::before, .lx-status-warn .lx-dot { background: var(--lx-amber-dot); }
.lx-status-bad:not(:has(.lx-dot))::before, .lx-status-bad .lx-dot { background: var(--lx-red); }

.lx-notice { padding: 12px 14px; border: 1px solid var(--lx-amber-line); border-radius: var(--lx-radius-control); background: var(--lx-amber-tint); font-size: 15px; }
.lx-notice.is-red { border-color: var(--lx-red-line); background: var(--lx-red-tint); }
.lx-notice.is-green { border-color: var(--lx-green-line); background: var(--lx-mint); }
.lx-panel-box { padding: 12px 14px; border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); background: var(--lx-surface); }
.lx-panel-box.is-amber { border-color: var(--lx-amber-line); }

/* ----- tables -------------------------------------------------------- */
.lx-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lx-table th { padding: 10px 12px; text-align: left; font-size: 14px; font-weight: 600; color: var(--lx-ink-2); border-bottom: 1px solid var(--lx-line-2); white-space: nowrap; text-transform: none; letter-spacing: 0; }
.lx-table td { padding: 12px; border-bottom: 1px solid var(--lx-line); vertical-align: top; }
.lx-table th:first-child, .lx-table td:first-child { padding-left: 0; }
.lx-table th:last-child, .lx-table td:last-child { padding-right: 0; }
.lx-table tr:last-child td { border-bottom: 0; }
.lx-table .lx-r, .lx-table .right { text-align: right; font-variant-numeric: tabular-nums; }
.lx-why { display: block; margin-top: 2px; color: var(--lx-grey); font-size: 14px; }
.lx-table-scroll { overflow-x: auto; max-width: 100%; }
.lx .lx-table-card { background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); overflow-x: auto; padding: 0; }
.lx .lx-table-card .lx-table th { background: var(--lx-paper); }
.lx .lx-table-card .lx-table th:first-child, .lx .lx-table-card .lx-table td:first-child { padding-left: 16px; }
.lx .lx-table-card .lx-table th:last-child, .lx .lx-table-card .lx-table td:last-child { padding-right: 16px; }
/* On a phone a table in .stack-cards becomes one block per row, each
   cell with its column name, so the page never scrolls sideways (Max's
   known issue: the follow-ups tables scrolled inside their boxes). */
@media (max-width: 640px) {
  .lx .stack-cards { overflow: visible; }
  .lx .stack-cards .lx-table, .lx .stack-cards .lx-table tbody, .lx .stack-cards .lx-table tr, .lx .stack-cards .lx-table td { display: block; width: 100%; white-space: normal; }
  .lx .stack-cards .lx-table thead { display: none; }
  .lx .stack-cards .lx-table tr { padding: 12px 16px; border-bottom: 1px solid var(--lx-line); }
  .lx .stack-cards .lx-table tr:last-child { border-bottom: 0; }
  .lx .stack-cards .lx-table td { padding: 2px 0 !important; border: 0; text-align: left; }
  .lx .stack-cards .lx-table td[data-label]::before { content: attr(data-label); display: block; font-size: 14px; color: var(--lx-grey); }
  .lx .stack-cards .lx-table td:empty { display: none; }
}

/* ----- summary, key and value, tabs, tiles ---------------------------- */
.lx-summary { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 18px; padding: 16px 20px; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); }
.lx-summary dt { font-size: 14px; color: var(--lx-grey); }
.lx-summary dd { margin-top: 2px; font-size: 16px; font-weight: 600; }
.lx-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; font-size: 15px; }
.lx-kv dt { color: var(--lx-grey); }
.lx-kv dd { min-width: 0; overflow-wrap: anywhere; }

.lx-tabs { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; border-bottom: 1px solid var(--lx-line-2); }
.lx-tabs a { display: inline-flex; gap: 8px; align-items: baseline; padding: 10px 0; margin-bottom: -1px; color: var(--lx-ink-2); font-size: 15px; font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent; }
.lx-tabs a:hover { color: var(--lx-ink); border-bottom-color: var(--lx-line-2); }
.lx-tabs a[aria-current], .lx-tabs a.lx-tab-current { color: var(--lx-ink); font-weight: 600; border-bottom-color: var(--lx-forest); }
.lx-tab-count { font-size: 14px; color: var(--lx-grey); font-variant-numeric: tabular-nums; }

.lx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-top: 18px; }
.lx .lx-tile { display: block; padding: 14px 16px 15px; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); color: var(--lx-ink); text-decoration: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.lx .lx-tile:hover { border-color: var(--lx-edge); box-shadow: var(--lx-elev-2); }
.lx-tile-value { display: block; font: 700 30px/1.15 var(--lx-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.lx-tile-label { display: block; margin-top: 4px; font-size: 15px; line-height: 1.35; color: var(--lx-ink-2); }
.lx .lx-tile-warn { background: var(--lx-amber-tint); border-color: var(--lx-amber-line); }
.lx .lx-tile-warn .lx-tile-value { color: var(--lx-amber); }
.lx .lx-tile-bad { background: var(--lx-red-tint); border-color: var(--lx-red-line); }
.lx .lx-tile-bad .lx-tile-value { color: var(--lx-red); }
.lx-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 1px; margin-top: 18px; background: var(--lx-line-2); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); overflow: hidden; }
.lx .lx-strip-cell { display: block; padding: 12px 14px; background: var(--lx-surface); color: var(--lx-ink); text-decoration: none; }
.lx .lx-strip-cell:hover { background: var(--lx-mint-2); }
.lx-strip-value { display: block; font: 700 22px/1.2 var(--lx-display); font-variant-numeric: tabular-nums; }
.lx-strip-label { display: block; font-size: 14px; color: var(--lx-ink-2); }

/* ----- the board ------------------------------------------------------ */
.lx-board-page .lx-head { margin-bottom: 4px; }

/* The filters are laid out by the width they have (a container query),
   not the screen's: beside the open panel they stay on one row. */
.lx-filters { container-type: inline-size; margin: 14px 0 16px; }
.lx-filters-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.lx-filter { min-width: 0; }
.lx-filter-search { grid-column: 1 / -1; }
.lx-search { display: flex; gap: 8px; min-width: 0; }
.lx-search .lx-input { flex: 1 1 auto; min-width: 0; }
@container (min-width: 560px) {
  .lx-filters-row { grid-template-columns: minmax(190px, 2.2fr) repeat(4, minmax(0, 1fr)); }
  .lx-filter-search { grid-column: auto; }
  .lx-filter select.lx-input { padding-left: 10px; padding-right: 24px; text-overflow: ellipsis; }
}

.lx-waiting-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 12px; font-size: 15px; }

.lx-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(262px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; max-width: 100%; }
@media (max-width: 640px) { .lx-board { grid-auto-columns: 84%; scroll-snap-type: x mandatory; } .lx-column { min-height: 40vh; } }
.lx-column { display: flex; flex-direction: column; min-width: 0; background: var(--lx-column); border-radius: var(--lx-radius-panel); padding: 10px; min-height: 60vh; scroll-snap-align: start; border: 2px solid transparent; }
.lx-column[data-over="yes"] { border-color: var(--lx-forest); border-style: dashed; }
.lx-column[data-over="near"] { border-color: var(--lx-edge); border-style: dashed; }
.lx-column[data-over="no"] { opacity: 0.6; }
.lx-column-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 4px 10px; }
.lx-column-head b { font-weight: 600; font-size: 16px; }
.lx-column-head > span { font-size: 14px; color: var(--lx-grey); }
.lx-column-head .lx-text-warn { margin-left: 6px; }
.lx-column-empty { padding: 8px 4px 0; font-size: 14px; color: var(--lx-grey); }

.lx-card-wrap { border-radius: 8px; outline: none; }
.lx-card-wrap + .lx-card-wrap { margin-top: 8px; }
.lx-card-wrap:focus-visible { outline: 2px solid var(--lx-forest); outline-offset: 2px; }
.lx-card-wrap[draggable="true"] { cursor: grab; }
.lx-card-wrap.is-picked .lx-kcard { box-shadow: var(--lx-elev-3); border-color: var(--lx-forest); }
.lx-card-wrap.is-dragging .lx-kcard { opacity: 0.35; }
.lx-kcard { cursor: pointer; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: 8px; padding: 12px 12px 13px; font-size: 14px; line-height: 1.45; touch-action: manipulation; box-shadow: var(--lx-elev-1); transition: border-color 0.15s ease, box-shadow 0.15s ease; overflow-wrap: anywhere; }
.lx-kcard:hover { border-color: var(--lx-edge); box-shadow: var(--lx-elev-2); }
.lx-kcard.is-attention { border-color: var(--lx-red-line); }
.lx-kcard.is-selected { border-color: var(--lx-forest); box-shadow: 0 0 0 1px var(--lx-forest); }
.lx-kcard-top { display: flex; justify-content: space-between; gap: 8px; }
.lx .lx-kcard-ref { font-size: 15px; font-weight: 600; color: var(--lx-ink); text-decoration: none; }
.lx .lx-kcard-ref:hover { text-decoration: underline; }
.lx-kcard-client { font-weight: 500; }
.lx-kcard-hold { margin-top: 6px; padding: 4px 8px; border-radius: var(--lx-radius-control); background: var(--lx-red-tint); color: var(--lx-red); font-weight: 600; }
.lx-kcard-line { margin-top: 6px; }
.lx .lx-face-control {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; margin-top: 10px;
  padding: 6px 10px; border: 1px solid var(--lx-edge); border-radius: var(--lx-radius-control); background: var(--lx-surface);
  color: var(--lx-ink); font: 600 14px/1.3 var(--lx-font); text-align: center; text-decoration: none; cursor: pointer;
}
.lx .lx-face-control:hover { border-color: var(--lx-forest); background: var(--lx-mint-2); }
.lx .lx-face-control.is-waiting { cursor: default; color: var(--lx-grey); border-style: dashed; background: var(--lx-paper); }
.lx-face-form { margin: 0; }
@media (pointer: coarse) { .lx .lx-face-control { min-height: 44px; } }

/* ----- the card panel beside the board (over it on a phone) ------------ */
.lx-card-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(100vw, 560px);
  overflow-y: auto; overscroll-behavior: contain; background: var(--lx-surface);
  border-left: 1px solid var(--lx-line-2); box-shadow: -12px 0 32px rgba(28, 45, 53, 0.12);
  animation: lx-panel-in 0.16s ease-out;
}
.lx-card-panel:focus { outline: none; }
@keyframes lx-panel-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .lx-card-panel { animation: none; } }
@media (min-width: 1024px) {
  .lx-card-panel { width: var(--lx-panel-w); box-shadow: -6px 0 18px rgba(28, 45, 53, 0.06); }
  body:has(.lx-card-panel) .main { margin-right: var(--lx-panel-w); }
  body:has(.lx-card-panel) .lx-toast-region { left: calc((100vw - var(--lx-panel-w)) / 2); }
}
.lx-card-panel-head {
  position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 18px; background: var(--lx-surface); border-bottom: 1px solid var(--lx-line-2);
  padding: max(16px, env(safe-area-inset-top, 0px)) 20px 14px;
}
.lx-card-panel-head h2 { font: 700 22px/1.2 var(--lx-display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.lx-card-panel-head p { margin-top: 2px; font-size: 15px; color: var(--lx-grey); }
.lx-card-panel-tools { display: flex; gap: 18px; font-size: 15px; }
/* The links keep their place in the row and take a 44px press area. */
.lx-card-panel-tools > * { padding: 11px 0; margin: -5px 0; }
/* More specific than .lx a.lx-link, which zeroes link padding. */
.lx .lx-card-panel-tools > a, .lx .lx-card-panel-tools > button { padding: 11px 0; margin: -5px 0; }
.lx-card-panel-body { padding: 18px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }

.lx-brief-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; font-size: 16px; }
.lx-brief-flags { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 10px; font-size: 15px; }
.lx-brief-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--lx-line); }
.lx-brief-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--lx-line); font-size: 15px; }
.lx-brief-foot span { color: var(--lx-grey); }
.lx-blocked { margin-bottom: 10px; font-size: 15px; }
.lx-print-list { display: grid; gap: 8px; }
.lx .lx-print-list .lx-btn-outline { justify-content: space-between; flex-wrap: wrap; gap: 2px 14px; white-space: normal; text-align: left; }
.lx-print-list .lx-btn-outline span { font-size: 14px; font-weight: 450; color: var(--lx-grey); }
/* Where Accept and Send back sit: kept in view at the foot of the panel
   on a phone, so a manager does not scroll to reach them (Max's known
   issue). */
.lx-panel-actions { margin-top: 12px; padding: 12px 0; background: var(--lx-surface); }
@media (max-width: 1023px) {
  .lx-card-panel .lx-panel-actions { position: sticky; bottom: 0; z-index: 1; border-top: 1px solid var(--lx-line); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
}

.lx-fold { margin-top: 10px; }
.lx-fold > summary { padding: 10px 0; font-weight: 600; color: var(--lx-forest); list-style-position: inside; }
.lx-signoff + .lx-signoff { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--lx-line); }
.lx-signoff-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-size: 15px; }

/* ----- the move dialog and the toast ------------------------------------ */
.lx-dialog::backdrop { background: rgba(28, 45, 53, 0.45); }
dialog.lx-dialog {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 0;
  border-radius: var(--lx-radius-panel); padding: 24px 26px 26px; color: var(--lx-ink); background: var(--lx-surface);
  box-shadow: var(--lx-elev-3);
}
@media (max-width: 640px) { dialog.lx-dialog { padding: 20px 16px 20px; } }
.lx-dialog-title, .lx-dialog h2 { font: 700 20px/1.2 var(--lx-display); letter-spacing: -0.01em; }
.lx-dialog-body { display: grid; gap: 16px; margin-top: 18px; }
.lx-move-page dialog, .lx-move-page .lx-move-form { max-width: 600px; }

.lx-toast-region { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; width: max-content; max-width: calc(100vw - 32px); }
.lx-toast-region:empty { display: none; }
.lx-toast { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: var(--lx-ink); color: var(--lx-mint); border-radius: 8px; padding: 12px 16px; font-size: 15px; box-shadow: var(--lx-elev-3); }
.lx-toast.is-error { background: #5a2318; color: #fff; }
.lx .lx-toast-button { background: none; border: 0; padding: 4px 0; min-height: 32px; color: #fff; font: 600 15px/1.3 var(--lx-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lx .lx-toast-button.is-quiet { font-weight: 450; color: var(--lx-mint); }
@media (pointer: coarse) { .lx .lx-toast-button { min-height: 44px; } }

/* ----- the full record -------------------------------------------------- */
.lx-next-step { margin-top: 18px; max-width: 860px; padding: 16px; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); }
.lx-next-step.is-urgent { border-color: var(--lx-red-line); background: var(--lx-red-tint); }
.lx-next-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--lx-line-2); }
.lx-record-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }
@media (min-width: 1024px) { .lx-record-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.lx-record-main, .lx-record-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.lx-section-card { min-width: 0; padding: 16px; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); scroll-margin-top: 90px; }
@media (min-width: 640px) { .lx-section-card { padding: 20px; } }
.lx-doc-list { font-size: 15px; }
.lx-doc-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--lx-line); }
.lx-doc-list li:first-child { border-top: 0; padding-top: 4px; }
.lx-doc-list li span + span { font-size: 14px; color: var(--lx-grey); }
.lx-stack { display: grid; gap: 12px; }
.lx-stack-s { display: grid; gap: 6px; }
.lx-history > li { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--lx-line); }
.lx-history > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.lx-undone { color: var(--lx-grey); text-decoration: line-through; }
.lx-undo-form { margin-top: 6px; display: grid; gap: 4px; justify-items: start; }
.lx-undo-form .lx-input { max-width: 420px; }

/* ----- the floor pages (warehouse list and phone sign-off) ---------------
   Phone first: 375px with no sideways scroll, 44px controls, 16px inputs.
   The slim header is for warehouse logins (layouts/floor); staff opening
   a floor page keep the portal's shell around the same .lx-floor-page. */
.lx [hidden] { display: none !important; }

body.lx-floor-body { margin: 0; min-height: 100vh; background: var(--lx-page); overflow-x: hidden; }
.lx-floor-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px;
  padding: env(safe-area-inset-top, 0px) 16px 0; background: var(--lx-ink); color: var(--lx-mint); font-size: 14px;
}
.lx-floor-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-floor-where { display: none; }
@media (min-width: 640px) { .lx-floor-where { display: inline; } .lx-floor-strip { padding-left: 32px; padding-right: 32px; } }
.lx .lx-floor-signout {
  min-height: 44px; padding: 0; background: none; border: 0; color: #fff; font: 550 14px/1 var(--lx-font);
  cursor: pointer; white-space: nowrap;
}
.lx .lx-floor-signout:hover { text-decoration: underline; }
.lx-floor-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; min-height: 60px; padding: 8px 16px;
  background: var(--lx-surface); border-bottom: 1px solid var(--lx-line-2);
}
@media (min-width: 640px) { .lx-floor-header { padding: 8px 32px; } }
.lx-floor-brand { display: inline-flex; align-items: center; min-height: 44px; }
.lx-floor-brand img { display: block; height: 30px; width: auto; }
.lx-floor-nav { display: flex; align-self: stretch; }
.lx .lx-floor-nav a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--lx-ink); font-weight: 600; font-size: 16px;
  text-decoration: none; border-bottom: 3px solid transparent;
}
.lx .lx-floor-nav a[aria-current="page"] { border-bottom-color: var(--lx-forest); }
.lx-floor-main { padding: 20px 16px calc(44px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .lx-floor-main { padding-left: 32px; padding-right: 32px; } }
.lx-floor-flash { max-width: 760px; margin: 0 auto 16px; }

.lx-floor-page { max-width: 980px; overflow-wrap: anywhere; }
.lx-floor-card { max-width: 760px; margin: 0 auto; }
.lx-floor-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin-bottom: 6px; font-size: 15px; }
.lx-floor-top a { display: inline-flex; align-items: center; min-height: 44px; }
.lx-weight-normal { font-weight: 450; }

/* The segmented filter: one warehouse at a time, or all. */
.lx-seg { display: inline-flex; max-width: 100%; border: 1px solid var(--lx-edge); border-radius: var(--lx-radius-button); background: var(--lx-surface); overflow: hidden; }
.lx .lx-seg a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  color: var(--lx-ink); font-size: 15px; font-weight: 550; text-decoration: none; border-left: 1px solid var(--lx-line-2);
}
.lx .lx-seg a:first-child { border-left: 0; }
.lx .lx-seg a:hover { background: var(--lx-mint-2); }
.lx .lx-seg a[aria-current="true"] { background: var(--lx-mint); color: var(--lx-forest); font-weight: 650; }

/* The list: a white panel of rows, each row the whole link. */
.lx-floor-group { margin-top: 28px; }
.lx-floor-group .lx-h2 { margin-bottom: 2px; }
.lx-wlist { background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); overflow: hidden; }
.lx-wlist > li + li { border-top: 1px solid var(--lx-line); }
.lx .lx-wrow {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 44px 14px 16px;
  color: var(--lx-ink); text-decoration: none; min-height: 44px;
}
.lx .lx-wrow:hover { background: var(--lx-mint-2); }
.lx-wrow-ref { font-weight: 650; font-size: 17px; }
.lx-wrow-det { display: grid; font-size: 15px; color: var(--lx-grey); }
.lx-wrow-step { display: grid; gap: 2px; font-size: 15px; margin-top: 2px; }
.lx-wrow-age { padding-left: 17px; font-size: 14px; color: var(--lx-grey); }
.lx-wrow-chev { position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--lx-edge); }
@media (min-width: 760px) {
  .lx .lx-wrow { grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.3fr) minmax(0, 1.2fr); gap: 4px 20px; align-items: start; }
  .lx-wrow-det { order: 3; }
  .lx-wrow-step { order: 2; margin-top: 0; }
}

/* The step box: what happens next, and its one button. */
.lx-step-box { margin-top: 18px; padding: 16px; background: var(--lx-surface); border: 2px solid var(--lx-sage); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); }
.lx-step-box.is-stopped { border-color: var(--lx-red-line); }
@media (min-width: 640px) { .lx-step-box { padding: 20px; } }
.lx-step-now { font: 600 19px/1.35 var(--lx-font); color: var(--lx-ink); }
.lx-step-form { margin: 0; }
.lx .lx-btn-wide { width: 100%; min-height: 48px; font-size: 16px; }
@media (min-width: 640px) { .lx .lx-step-box .lx-btn-wide { width: auto; } }
.lx .lx-btn-danger { color: var(--lx-red); border-color: var(--lx-red-line); }
.lx .lx-btn-danger:hover:not(:disabled) { background: var(--lx-red-tint); border-color: var(--lx-red); }

.lx-floor-section { margin-top: 28px; }
.lx-floor-block .lx-h3 { margin: 0 0 6px; color: var(--lx-ink); }
.lx-floor-fold { margin-top: 18px; }
.lx-floor-fold > summary { font-size: 17px; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.lx-fold-quiet > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; font-weight: 550; }
/* A flex summary loses the browser's own open triangle (Chrome and
   Android draw it only on a list-item summary), so these folds draw
   their own: pointing right while shut, down while open. */
.lx-floor-fold > summary, .lx-fold-quiet > summary { list-style: none; cursor: pointer; }
.lx-floor-fold > summary::-webkit-details-marker, .lx-fold-quiet > summary::-webkit-details-marker { display: none; }
.lx-floor-fold > summary::before, .lx-fold-quiet > summary::before {
  content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent currentColor; transition: transform 0.15s ease;
}
.lx-floor-fold[open] > summary::before, .lx-fold-quiet[open] > summary::before { transform: rotate(90deg); }
.lx .lx-jump { display: inline-flex; align-items: center; min-height: 44px; }
.lx-products-table td:last-child, .lx-products-table th:last-child { white-space: nowrap; }

/* The sign-off form: one white box per part. */
.lx-signoff-form { display: grid; gap: 16px; }
.lx-form-box { min-width: 0; margin: 0; padding: 16px; background: var(--lx-surface); border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel); box-shadow: var(--lx-elev-1); }
.lx-form-box > legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font: 600 17px/1.3 var(--lx-font); }
.lx-form-box > legend + * { clear: both; }
.lx-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.lx .lx-toggle, .lx .lx-seg-buttons button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--lx-edge);
  border-radius: var(--lx-radius-button); background: var(--lx-surface); color: var(--lx-ink); font: 500 16px/1.2 var(--lx-font);
  touch-action: manipulation;
}
.lx .lx-toggle[aria-pressed="true"], .lx .lx-seg-buttons button[aria-pressed="true"] { border-color: var(--lx-forest); background: var(--lx-mint-2); color: var(--lx-forest); font-weight: 650; }
.lx .lx-toggle[aria-pressed="true"]::before {
  content: ""; width: 6px; height: 11px; margin: -3px 2px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.lx-count-list > li { padding: 14px 0; border-top: 1px solid var(--lx-line); }
.lx-count-list > li:first-child { border-top: 0; padding-top: 6px; }
.lx-count-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lx-count-input { flex: none; width: 104px; }
.lx .lx-num { font-variant-numeric: tabular-nums; }
.lx .lx-count-input .lx-input { text-align: right; font-size: 18px; }
.lx-count-row .lx-link-button { min-height: 44px; font-size: 15px; }
.lx-problem-fields { display: grid; gap: 10px; margin-top: 8px; }
.lx-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .lx-problem-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lx-box-rows { display: grid; gap: 12px; margin-top: 10px; }
.lx-box-row { padding: 12px; border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-button); }
.lx-box-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.lx .lx-box-row-head .lx-link-button { min-height: 44px; }
.lx-seg-buttons { display: flex; gap: 6px; }
.lx-box-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.lx-box-grid > :nth-child(-n + 2) { grid-column: span 3; }
.lx-box-grid > :nth-child(n + 3) { grid-column: span 2; }
.lx-box-contents { display: grid; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--lx-line); }

.lx-photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lx-photo-grid:empty { display: none; }
.lx-photo { position: relative; width: 96px; height: 96px; overflow: hidden; border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-button); background: var(--lx-paper); }
.lx-photo-frame, .lx-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lx-photo-state { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(28, 45, 53, 0.78); color: #fff; font-size: 14px; line-height: 20px; text-align: center; }
.lx-photo.is-done .lx-photo-state { background: var(--lx-forest); }
.lx-photo.is-failed .lx-photo-state { background: var(--lx-red); }
.lx .lx-photo-remove {
  position: absolute; top: 0; right: 0; min-width: 44px; min-height: 44px; padding: 4px 6px; border: 0; border-radius: 0 0 0 8px;
  background: rgba(255, 255, 255, 0.92); color: var(--lx-ink); font: 600 14px/1 var(--lx-font);
}
.lx .lx-photo-button { width: 100%; }
@media (min-width: 640px) { .lx .lx-photo-button { width: auto; } }
.lx-photo-button:focus-within { outline: 2px solid var(--lx-forest); outline-offset: 2px; }

.lx-in-box { margin-bottom: 8px; padding: 10px 12px; border-radius: var(--lx-radius-button); background: var(--lx-mint-2); font-size: 15px; }
.lx-check-list > li { padding: 14px 0; border-top: 1px solid var(--lx-line); }
.lx-check-list > li:first-child { border-top: 0; padding-top: 4px; }
.lx-check-q { font-weight: 550; }
.lx-yesno { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.lx .lx-yesno button {
  min-height: 48px; border: 1px solid var(--lx-edge); border-radius: var(--lx-radius-button); background: var(--lx-surface);
  color: var(--lx-ink); font: 600 16px/1 var(--lx-font); touch-action: manipulation;
}
.lx .lx-yesno .lx-yes[aria-pressed="true"] { border-color: var(--lx-forest); background: var(--lx-mint-2); color: var(--lx-forest); }
.lx .lx-yesno .lx-no[aria-pressed="true"] { border-color: var(--lx-red); background: var(--lx-red-tint); color: var(--lx-red); }
.lx .lx-confirm { min-height: 44px; align-items: center; }
.lx .lx-confirm input { width: 22px; height: 22px; margin: 0; }

/* A sign-off as read back: its problems, the checks by question, photos. */
.lx-problems { margin-top: 6px; padding-left: 20px; list-style: disc; color: var(--lx-red); font-size: 15px; }
.lx .lx-problems { list-style: disc; padding-left: 20px; }
.lx-check-answers { display: grid; gap: 6px; font-size: 15px; }
.lx-check-answers li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.lx-check-answers li > span:first-child { flex: 1 1 14em; min-width: 0; }
.lx-signoff-table { font-size: 15px; }
.lx-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lx-thumb { display: block; width: 80px; height: 80px; overflow: hidden; border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-button); }
.lx-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The manager's decision: the note in the form, Accept and Send back in
   a bar that stays at the foot of the screen while the sign-off is read. */
.lx-review { display: grid; gap: 4px; }
.lx-decision-form { margin-top: 14px; }
.lx-decide-bar {
  position: sticky; bottom: 0; z-index: 3; display: flex; gap: 10px; margin-top: 12px;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom, 0px)); background: var(--lx-surface); border-top: 1px solid var(--lx-line);
}
.lx-floor-card .lx-decide-bar, .lx-record .lx-decide-bar { padding-left: 16px; padding-right: 16px; border: 1px solid var(--lx-line-2); border-radius: var(--lx-radius-panel) var(--lx-radius-panel) 0 0; box-shadow: var(--lx-elev-2); }
.lx .lx-decide-bar > button { flex: 1 1 0; min-height: 48px; }
@media (min-width: 1024px) { .lx-record .lx-decide-bar { max-width: 860px; } .lx .lx-decide-bar > button { flex: 0 0 auto; min-width: 140px; } }

/* The Agent page (23 Nov 2026): the new key box, the read list, and
   buttons side by side in a row's last cell. */
.lx-agent .lx-callout { margin: 0 0 20px; padding: 14px 16px; background: var(--lx-amber-tint); border: 1px solid var(--lx-amber-line); border-radius: var(--lx-radius-panel); display: grid; gap: 8px; }
.lx-agent .lx-callout p { margin: 0; }
.lx-agent .lx-callout .lx-btn { justify-self: start; }
.lx-agent .lx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lx-agent .lx-list li { padding: 10px 12px; background: var(--lx-surface); border: 1px solid var(--lx-line); border-radius: var(--lx-radius-control); min-width: 0; overflow-wrap: anywhere; }
.lx-agent td.right { white-space: nowrap; }
.lx-agent td.right form { display: inline-block; margin: 0 0 4px 4px; }
.lx-agent textarea.lx-input { width: 100%; min-width: 0; font-size: 0.875rem; resize: vertical; }
@media (max-width: 767px) { .lx-agent td.right { white-space: normal; } }
/* Agent page items (23 Nov 2026): one card per reply or chase, with the
   Slack message it answers quoted above it. */
.lx-agent .lx-agent-item { margin: 0 0 14px; padding: 14px 16px; background: var(--lx-surface); border: 1px solid var(--lx-line); border-radius: var(--lx-radius-panel); display: grid; gap: 8px; min-width: 0; }
.lx-agent .lx-agent-item-title { margin: 0; font-size: 1rem; font-weight: 600; }
.lx-agent .lx-agent-item p { margin: 0; }
.lx-agent .lx-quote { padding: 10px 12px; background: var(--lx-paper); border-left: 3px solid var(--lx-sage); border-radius: var(--lx-radius-control); display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.lx-agent .lx-quote blockquote { margin: 0; white-space: pre-line; color: var(--lx-ink-2); }
.lx-agent .lx-agent-covers-head { font-weight: 600; }
.lx-agent .lx-agent-covers { margin: 0; padding-left: 20px; list-style: disc; }
.lx-agent .lx-agent-covers li { display: list-item; }
.lx-agent .lx-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lx-agent .lx-actions form { margin: 0; }
