:root {
  color-scheme: light;
  --canvas: #f4f6f2;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --ink: #18231d;
  --muted: #66746c;
  --line: #dfe6df;
  --green: #176b4d;
  --green-dark: #0f5139;
  --green-soft: #e3f2eb;
  --blue: #2864dc;
  --blue-soft: #eaf0ff;
  --violet: #7656c7;
  --violet-soft: #f1edff;
  --amber: #9b6208;
  --amber-soft: #fff3d9;
  --red: #b23434;
  --red-soft: #fdeaea;
  --shadow: 0 10px 32px rgba(30, 50, 39, 0.07);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(40, 100, 220, 0.26); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: 248px; flex-direction: column;
  padding: 24px 18px; color: #eaf4ef; background: #14251d; border-right: 1px solid rgba(255,255,255,.06);
}
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; color: #163c2c; background: #b8e6d1; border-radius: 12px; font-weight: 850; letter-spacing: -.04em; }
.brand-name { font-size: 17px; font-weight: 760; letter-spacing: -.02em; }
.brand-caption { margin-top: 2px; color: #8fa99b; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.context-card { display: flex; flex-direction: column; gap: 5px; padding: 15px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; }
.context-card .eyebrow { color: #8fa99b; }
.context-card strong { font-size: 13px; line-height: 1.35; }
.context-card span:last-child { overflow: hidden; color: #a9bdb2; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.nav-list { display: flex; flex-direction: column; gap: 5px; margin-top: 24px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; color: #a9bdb2; background: transparent; border: 0; border-radius: 11px; cursor: pointer; text-align: left; transition: 150ms ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: rgba(179, 230, 207, .13); }
.nav-dot { width: 7px; height: 7px; background: #688176; border-radius: 50%; }
.nav-item.active .nav-dot { background: #84d8b2; box-shadow: 0 0 0 4px rgba(132,216,178,.12); }
.nav-count { min-width: 23px; margin-left: auto; padding: 2px 7px; color: #cbe3d6; background: rgba(255,255,255,.08); border-radius: 99px; font-size: 11px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 12px 8px 0; }
.sidebar-footer p { margin: 9px 0 0; color: #6f887b; font-size: 10px; line-height: 1.45; }
.mode-pill { display: flex; align-items: center; gap: 8px; color: #b7c8bf; font-size: 12px; }
.mode-indicator { width: 8px; height: 8px; background: #738a7e; border-radius: 50%; }
.mode-addressed .mode-indicator { background: #75d1a7; box-shadow: 0 0 0 4px rgba(117,209,167,.12); }

.workspace { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 34px; background: rgba(244,246,242,.92); border-bottom: 1px solid rgba(211,220,213,.85); backdrop-filter: blur(14px); }
.warehouse-context { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 11px; row-gap: 2px; }
.warehouse-context .eyebrow { grid-column: 1 / -1; }
.warehouse-context strong { font-size: 14px; }
.sync-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.sync-state i { width: 7px; height: 7px; background: #2aa975; border-radius: 50%; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.role-switcher { display: flex; flex-direction: column; gap: 3px; margin-left: 4px; }
.role-switcher span { color: var(--muted); font-size: 10px; }
.role-switcher select { min-width: 138px; padding: 7px 30px 7px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 650; }
.menu-button { display: none; width: 42px; height: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.main-content { max-width: 1420px; margin: 0 auto; padding: 28px 34px 70px; }

.demo-notice { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 24px; padding: 12px 15px; color: #554716; background: #fff9dd; border: 1px solid #efe2a5; border-radius: 12px; }
.demo-notice strong { font-size: 12px; }
.demo-notice p { margin: 2px 0 0; color: #796c38; font-size: 11px; line-height: 1.45; }
.demo-badge { flex: none; padding: 3px 7px; color: #fff; background: #816e1a; border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 5px 0 6px; font-size: clamp(27px, 3vw, 38px); line-height: 1.06; letter-spacing: -.04em; }
.page-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.heading-actions { display: flex; flex: none; gap: 8px; }
.button { min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 700; transition: 150ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 4px 12px rgba(23,107,77,.16); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { color: #314139; background: var(--surface); border-color: var(--line); }
.button-secondary:hover:not(:disabled) { border-color: #bdc9c0; }
.button-danger { color: var(--red); background: var(--red-soft); border-color: #f2c8c8; }
.button.compact { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.full-width { width: 100%; }
.text-button { padding: 0; color: var(--green); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { min-height: 132px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-card strong { display: block; margin: 9px 0 5px; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.metric-card p { margin: 0; color: var(--muted); font-size: 11px; }
.metric-danger strong { color: var(--red); }
.metric-blue strong { color: var(--blue); }
.metric-violet strong { color: var(--violet); }
.metric-amber strong { color: var(--amber); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .7fr); gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2, .warehouse-panel h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.action-panel { padding: 20px; }
.attention-list { display: flex; flex-direction: column; margin-top: 13px; }
.attention-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.order-symbol { display: grid; width: 38px; height: 38px; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 10px; font-size: 12px; font-weight: 800; }
.order-symbol.blocked, .order-symbol.overdue { color: var(--red); background: var(--red-soft); }
.order-symbol.critical, .order-symbol.attention { color: var(--amber); background: var(--amber-soft); }
.attention-main { min-width: 0; }
.attention-main > div { display: flex; align-items: baseline; gap: 8px; }
.attention-main strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.attention-main span { color: var(--muted); font-size: 10px; }
.attention-main p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attention-status { display: flex; min-width: 148px; flex-direction: column; align-items: flex-end; gap: 5px; }
.attention-status strong { font-size: 10px; }
.warehouse-panel { padding: 20px; }
.warehouse-panel > p { margin: 9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.storage-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 12px; font-weight: 700; }
.storage-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; background: #cbd4ce; border-radius: 99px; transition: .2s; }
.toggle-track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.17); transition: .2s; }
.storage-toggle input:checked + .toggle-track { background: var(--green); }
.storage-toggle input:checked + .toggle-track i { transform: translateX(16px); }
.warehouse-panel small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.readonly-note { padding: 11px; color: var(--muted); background: var(--surface-soft); border-radius: 10px; font-size: 11px; }
.process-panel { padding: 20px; }
.process-track { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.process-step { position: relative; min-height: 98px; padding: 14px; background: var(--surface-soft); border-radius: 12px; }
.process-step:not(:last-child)::after { content: "→"; position: absolute; top: 40%; right: -8px; z-index: 2; color: #9baa9f; }
.process-step > span { color: var(--green); font-size: 10px; font-weight: 850; }
.process-step strong, .process-step small { display: block; }
.process-step strong { margin-top: 12px; font-size: 12px; }
.process-step small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.filter-chip { padding: 8px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 11px; }
.filter-chip.active { color: var(--green-dark); background: var(--green-soft); border-color: #b8d9ca; }
.filter-chip strong { margin-left: 4px; }
.search-field { display: flex; min-width: 260px; align-items: center; gap: 7px; margin-left: auto; padding: 0 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search-field span { color: var(--muted); }
.search-field input { width: 100%; padding: 8px 0; background: transparent; border: 0; outline: 0; font-size: 11px; }
.table-panel { overflow: hidden; }
.table-panel > .panel-heading { padding: 18px 20px 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 10px 14px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.number-cell { text-align: right; white-space: nowrap; }
.row-action { display: grid; width: 30px; height: 30px; place-items: center; color: var(--green); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 800; }
.row-action:hover { background: var(--green-soft); border-color: #b8d9ca; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-neutral { color: #57625c; background: #edf0ee; }
.status-warning, .status-ready_to_pick, .status-waiting_stock { color: var(--amber); background: var(--amber-soft); }
.status-danger, .status-discrepancy { color: var(--red); background: var(--red-soft); }
.status-success, .status-packed, .status-ready_for_supply, .status-in_supply { color: var(--green); background: var(--green-soft); }
.status-picking { color: var(--blue); background: var(--blue-soft); }
.status-picked, .status-marking { color: var(--violet); background: var(--violet-soft); }
.deadline-blocked, .deadline-overdue, .deadline-critical { color: var(--red); }
.deadline-attention { color: var(--amber); }

.pick-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin-bottom: 13px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 13px; }
.pick-summary div { padding: 13px 16px; background: var(--surface); }
.pick-summary span, .pick-summary strong { display: block; }
.pick-summary span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.pick-summary strong { margin-top: 5px; font-size: 13px; }
.paper-sheet { overflow: hidden; }
.paper-header { display: flex; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.paper-header h2 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.03em; }
.paper-header p { margin: 0; color: var(--muted); font-size: 10px; }
.paper-identity { min-width: 140px; padding: 12px; background: var(--surface-soft); border-radius: 11px; }
.paper-identity span, .paper-identity strong { display: block; }
.paper-identity span { color: var(--muted); font-size: 9px; }
.paper-identity strong { margin-top: 5px; font-size: 12px; }
.pick-table td { padding-top: 15px; padding-bottom: 15px; }
.check-cell { width: 42px; text-align: center; }
.paper-checkbox { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #9dab9f; border-radius: 3px; }
.location-code { color: var(--green-dark); font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; white-space: nowrap; }
.quantity-cell { font-size: 15px; font-weight: 800; }
.paper-section-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 10px; border-top: 8px solid var(--canvas); }
.paper-section-heading h2 { margin: 0; font-size: 16px; }
.paper-section-heading span { color: var(--muted); font-size: 10px; }
.paper-line { display: inline-block; width: 70px; border-bottom: 1px solid #8c9990; }
.paper-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 24px; color: #58645c; background: var(--surface-soft); font-size: 10px; }

.scan-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 16px; padding: 20px; color: #eff8f3; background: #18382a; border: 0; }
.scan-panel .eyebrow { color: #8dc8a9; }
.scan-panel h2 { margin: 6px 0 5px; font-size: 19px; }
.scan-panel p { margin: 0; color: #b8cbbf; font-size: 11px; }
.scan-field { min-width: 330px; }
.scan-field span { display: block; margin-bottom: 5px; color: #b8cbbf; font-size: 9px; }
.scan-field input { width: 100%; padding: 12px 14px; color: #13271e; background: #fff; border: 0; border-radius: 10px; font-size: 12px; }
.fbs-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.queue-column { display: flex; flex-direction: column; gap: 9px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 6px; }
.section-title h2 { margin: 0; font-size: 15px; }
.section-title span { color: var(--muted); font-size: 10px; }
.fbs-card { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px; }
.product-avatar { display: grid; width: 44px; height: 44px; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 12px; font-size: 11px; font-weight: 850; }
.fbs-card-main { min-width: 0; }
.fbs-card-title { display: flex; align-items: baseline; gap: 8px; }
.fbs-card-title h3 { margin: 0; font-size: 13px; }
.fbs-card-title span { color: var(--muted); font-size: 9px; }
.fbs-card-main > p { margin: 4px 0 8px; color: var(--muted); font-size: 10px; }
.fbs-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.supply-card { padding: 20px; }
.supply-card h2 { margin: 6px 0 14px; font-size: 18px; }
.supply-progress { height: 7px; overflow: hidden; background: #e4e9e5; border-radius: 99px; }
.supply-progress i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.supply-card dl { margin: 16px 0; }
.supply-card dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.supply-card dt { color: var(--muted); }
.supply-card dd { margin: 0; font-weight: 700; }
.safety-caption { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }

.storage-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 13px; }
.storage-metric { padding: 15px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.storage-metric span, .storage-metric strong, .storage-metric small { display: block; }
.storage-metric span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.storage-metric strong { margin-top: 6px; font-size: 17px; }
.storage-metric small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.storage-table { overflow: hidden; }
.storage-table > .panel-heading { padding: 18px 20px 13px; }
.role-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 13px; }
.role-card { display: flex; gap: 11px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.role-card.selected { border-color: #9ec9b5; box-shadow: 0 0 0 3px rgba(23,107,77,.08); }
.role-monogram { display: grid; width: 34px; height: 34px; flex: none; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 9px; font-weight: 850; }
.role-card h3 { margin: 1px 0 4px; font-size: 12px; }
.role-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 360px; padding: 12px 16px; color: #fff; background: #18382a; border-radius: 11px; box-shadow: 0 12px 34px rgba(13,37,26,.25); font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12,28,20,.55); backdrop-filter: blur(5px); }
.modal { position: relative; width: min(570px, 100%); max-height: 90vh; overflow-y: auto; padding: 28px; background: var(--surface); border-radius: 20px; box-shadow: 0 28px 80px rgba(0,0,0,.25); }
.modal h2 { margin: 7px 0 8px; font-size: 25px; letter-spacing: -.03em; }
.modal > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; background: var(--surface-soft); border: 0; border-radius: 9px; cursor: pointer; font-size: 19px; }
.onboarding-steps { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; padding: 0; list-style: none; }
.onboarding-steps li { display: flex; gap: 11px; padding: 12px; background: var(--surface-soft); border-radius: 11px; }
.onboarding-steps li > span { display: grid; width: 26px; height: 26px; flex: none; place-items: center; color: #fff; background: var(--green); border-radius: 8px; font-size: 10px; font-weight: 800; }
.onboarding-steps strong { font-size: 11px; }
.onboarding-steps p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.order-modal { width: min(760px, 100%); }
.order-modal-statuses { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 20px 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.order-modal-statuses > div { padding: 12px; background: var(--surface-soft); }
.order-modal-statuses span, .order-modal-statuses strong { display: block; }
.order-modal-statuses span { color: var(--muted); font-size: 9px; }
.order-modal-statuses strong { margin-top: 4px; font-size: 11px; }
.issue-callout { margin-bottom: 17px; padding: 13px 14px; color: #7d2626; background: var(--red-soft); border: 1px solid #f1cccc; border-radius: 11px; }
.issue-callout strong { font-size: 11px; }
.issue-callout p { margin: 4px 0 0; font-size: 10px; }
.modal-section { margin-top: 18px; }
.modal-section .section-title { padding: 0 0 8px; }
.modal-section .section-title h3 { margin: 0; font-size: 12px; }
.order-items { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.order-item { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 14px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 10px; }
.order-item:last-child { border-bottom: 0; }
.order-item > div strong, .order-item > div span { display: block; }
.order-item > div span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.order-timeline { margin: 0; padding: 0; list-style: none; }
.order-timeline li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.order-timeline li > i { width: 8px; height: 8px; margin-top: 3px; background: var(--green); border: 2px solid var(--green-soft); border-radius: 50%; }
.order-timeline li strong { font-size: 10px; }
.order-timeline li p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.order-timeline li > span { color: var(--muted); font-size: 9px; text-align: right; }
.order-timeline li > span small { display: block; margin-top: 3px; font-size: 8px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.readonly-actions { justify-content: flex-start; color: var(--muted); font-size: 10px; }
.sidebar-scrim { display: none; }

@media (max-width: 1080px) {
  .desktop-only { display: none; }
  .metric-grid, .storage-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .process-track { overflow-x: auto; grid-template-columns: repeat(5, 180px); padding-bottom: 6px; }
  .fbs-layout { grid-template-columns: 1fr; }
  .supply-card { order: -1; }
}

@media (max-width: 780px) {
  .sidebar { transform: translateX(-105%); transition: 180ms ease; }
  .sidebar-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(9,24,16,.45); border: 0; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 67px; padding: 10px 16px; }
  .menu-button { display: block; flex: none; }
  .warehouse-context { margin-right: auto; }
  .warehouse-context .sync-state { display: none; }
  .topbar-actions .button { display: none; }
  .role-switcher span { display: none; }
  .role-switcher select { min-width: 120px; }
  .main-content { padding: 20px 16px 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .pick-summary { grid-template-columns: repeat(2,1fr); }
  .scan-panel { align-items: stretch; flex-direction: column; }
  .scan-field { min-width: 0; }
  .fbs-card { grid-template-columns: 40px minmax(0,1fr); }
  .fbs-card > .button { grid-column: 1 / -1; width: 100%; }
  .filter-bar { align-items: stretch; flex-wrap: wrap; }
  .search-field { order: 2; width: 100%; min-width: 0; }
  .attention-row { grid-template-columns: 38px minmax(0,1fr); }
  .attention-status { grid-column: 2; align-items: flex-start; }
  .paper-footer { flex-direction: column; }
  .order-modal-statuses { grid-template-columns: repeat(2,1fr); }
  .order-item { grid-template-columns: minmax(0,1fr) auto; }
  .order-item .mono { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .metric-grid, .storage-metrics, .role-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 110px; }
  .demo-notice p { display: none; }
  .warehouse-context strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-heading h1 { font-size: 29px; }
  .paper-header { flex-direction: column; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .sidebar, .topbar, .demo-notice, .page-heading, .pick-summary, .toast, .modal-backdrop, .screen-only { display: none !important; }
  .workspace { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .paper-sheet { border: 0; border-radius: 0; box-shadow: none; }
  .paper-header { padding: 0 0 12px; }
  th { background: #f1f1f1 !important; print-color-adjust: exact; }
  td { padding: 9px 10px; }
  .paper-footer { padding: 14px 0 0; }
}
