:root {
  --ink: #171a1d;
  --muted: #6d747b;
  --line: #e2e5e7;
  --panel: #fbfcfc;
  --canvas: #f5f6f6;
  --sidebar: #171a1d;
  --sidebar-soft: #24282c;
  --accent: #e75827;
  --accent-dark: #c84217;
  --green: #2d7c59;
  --green-soft: #e8f4ed;
  --amber: #a66213;
  --amber-soft: #fbf0dd;
  --red: #bd3a35;
  --red-soft: #fbe9e8;
  --blue: #2d6387;
  --blue-soft: #e8f1f7;
  --radius: 6px;
  --shadow: 0 18px 50px rgba(20, 25, 28, .15);
}

/* Mobile operations console: the desktop information architecture stays intact. */
.mobile-nav-scrim,
.mobile-dock { display: none; }

@media (max-width: 680px) {
  body { min-width: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.mobile-navigation-open { overflow: hidden; }

  .topbar {
    z-index: 45;
    height: 56px;
    padding: 0 10px;
    background: rgba(251, 252, 252, .97);
  }
  .title-group { min-width: 0; gap: 9px; }
  .title-group h1 { overflow: hidden; max-width: 47vw; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-menu { min-width: 44px; height: 44px; padding: 0 10px; border-color: #c8cfd3; background: #f7f9f9; color: #303940; font-size: 11px; }
  .top-actions { gap: 6px; }
  .assistant-trigger { width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; }
  .assistant-trigger .button-icon { width: 27px; height: 27px; }

  .sidebar {
    z-index: 70;
    width: min(320px, 88vw);
    max-width: none;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: none;
  }
  .sidebar.open { box-shadow: 20px 0 55px rgba(15, 22, 26, .28); }
  .brand { height: 62px; }
  .site-switcher { margin-top: 10px; }
  .nav-list { overscroll-behavior: contain; padding-bottom: 16px; }
  .nav-item { min-height: 46px; }
  .mobile-nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    border: 0;
    background: rgba(24, 32, 38, .46);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease-out);
  }
  .mobile-nav-scrim.open { opacity: 1; pointer-events: auto; }

  .main-area { min-height: 100dvh; }
  .workspace { padding: 12px 10px calc(22px + env(safe-area-inset-bottom)); }
  .page-stack { gap: 10px; }
  .page-stack > * { animation-delay: 0s !important; }
  .panel, .metric-grid, .mini-stats, .capacity-stats, .headrest-capacity-stats, .operation-command { border-radius: 6px; }
  .panel-header { min-height: 54px; padding: 10px 12px; }
  .panel-header > div { min-width: 0; }
  .panel-header h2 { font-size: 13px; }
  .panel-header p { overflow-wrap: anywhere; line-height: 1.4; }

  .mobile-dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    height: calc(62px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 4px 4px env(safe-area-inset-bottom);
    border-top: 1px solid #cfd6d9;
    background: rgba(251, 252, 252, .98);
    box-shadow: 0 -10px 28px rgba(29, 39, 45, .1);
  }
  .mobile-dock.is-hidden { display: none; }
  .mobile-dock-page,
  .mobile-dock-menu {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    height: 54px;
    grid-template-columns: 1fr;
    grid-template-rows: 28px 14px;
    place-items: center;
    gap: 1px;
    margin: 0;
    padding: 3px 1px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #69747b;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
  }
  .mobile-dock-page:hover,
  .mobile-dock-menu:hover { background: #f1f4f4; transform: none; }
  .mobile-dock-page.active { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 2px var(--accent); }
  .mobile-dock img { width: 25px; height: 25px; border-radius: 5px; object-fit: cover; opacity: .72; filter: grayscale(.35); }
  .mobile-dock .active img { opacity: 1; filter: none; }

  .page-toolbar { gap: 8px; }
  .page-toolbar .summary { display: flex; width: 100%; align-items: baseline; padding: 0 2px; }
  .page-toolbar .summary strong { font-size: 24px; }
  .page-toolbar .summary span { min-width: 0; overflow-wrap: anywhere; font-size: 9px; line-height: 1.4; }
  .toolbar-actions,
  .location-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .toolbar-actions .filter-input,
  .location-actions .filter-input { grid-column: 1 / -1; width: 100%; min-width: 0; height: 44px; }
  .toolbar-actions .secondary-btn,
  .toolbar-actions .primary-btn,
  .toolbar-actions .select-input,
  .location-actions .secondary-btn,
  .location-actions .primary-btn,
  .location-actions .select-input { width: 100%; min-width: 0; height: 44px; padding: 0 7px; white-space: nowrap; }
  .toolbar-actions .button-icon,
  .location-actions .button-icon { width: 22px; height: 22px; }

  .metric-grid,
  .mini-stats,
  .capacity-stats,
  .headrest-capacity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric,
  .mini-stat { min-height: 104px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(odd),
  .mini-stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric-value strong { font-size: 24px; }
  .metric-head { margin-bottom: 9px; }
  .metric-foot { line-height: 1.35; }

  .operation-command { gap: 10px; padding: 11px; }
  .operation-title { min-width: 0; padding-bottom: 8px; }
  .capture-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .capture-module { min-height: 66px; padding: 8px; }
  .capture-module > img { width: 32px; height: 32px; }
  .capture-module strong { font-size: 11px; }
  .capture-module small { margin-top: 3px; font-size: 8px; line-height: 1.3; }
  .workflow-source { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-source > div { min-width: 0; padding: 10px; }
  .workflow-origin { grid-column: 1 / -1; }
  .unsourced-entry { min-height: 58px; }

  .table-tools { align-items: stretch; flex-direction: column; gap: 8px; padding: 9px 10px; }
  .segmented { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { min-width: max-content; min-height: 40px; padding: 0 12px; }
  .result-count { align-self: flex-start; }
  .mobile-record-scroll { overflow: visible; }
  .mobile-record-table { display: block; width: 100%; min-width: 0; }
  .mobile-record-table thead { display: none; }
  .mobile-record-table tbody { display: grid; gap: 8px; padding: 8px; }
  .mobile-record-table tr {
    display: grid;
    width: 100%;
    padding: 5px 10px;
    border: 1px solid #dce2e5;
    border-left: 3px solid #aab4ba;
    border-radius: 6px;
    background: #fbfcfc;
    box-shadow: 0 2px 7px rgba(29, 39, 45, .04);
  }
  .mobile-record-table tr:active { border-left-color: var(--accent); background: #f7f9f9; }
  .mobile-record-table td {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 35px;
    height: auto;
    grid-template-columns: minmax(72px, 30%) minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    border-bottom: 1px solid #edf0f1;
    color: #3d474d;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .mobile-record-table td:last-child { border-bottom: 0; }
  .mobile-record-table td::before { content: attr(data-label); color: #7a858c; font-size: 9px; font-weight: 700; }
  .mobile-record-table td > * { min-width: 0; }
  .mobile-record-table .sku-cell { grid-template-columns: 30px minmax(0, 1fr); }
  .mobile-record-table .part-thumb { width: 28px; height: 28px; }
  .mobile-record-table .row-action,
  .mobile-record-table .inspection-actions button { min-height: 40px; }
  .mobile-record-table .inspection-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mobile-record-table .empty-row { padding: 20px 12px; text-align: center; }
  .mobile-record-table .empty-row td { display: block; border: 0; }
  .mobile-record-table .empty-row td::before { display: none; }
  .location-record-table td:nth-child(2),
  .location-record-table td:nth-child(3) { display: none; }
  .location-material-summary-table td:last-child { align-items: flex-start; }
  .location-material-summary-table td:last-child small { line-height: 1.55; }

  .pagination { padding: 10px; }
  .location-pager button,
  .pager button { min-width: 44px; min-height: 44px; }
  .location-plan .zone-capacity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone-capacity > div { min-width: 0; padding: 11px; border-right: 0; }
  .zone-capacity > div:nth-child(odd) { border-right: 1px solid var(--line); }

  .location-occupancy-panel .location-map { max-height: 56dvh; overflow-y: auto; overscroll-behavior: contain; padding: 10px; }
  .location-map-group { padding: 9px; }
  .location-map-racks { grid-auto-columns: 106px; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-width: none; max-height: calc(100dvh - 10px); border-radius: 8px 8px 0 0; }
  .modal-header { position: sticky; top: 0; z-index: 2; min-height: 58px; background: #fbfcfc; }
  .modal-footer { position: sticky; bottom: 0; z-index: 2; padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: #fbfcfc; }
  .modal-footer > div { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-footer button { min-height: 44px; }
  .assistant-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .assistant-form input,
  .assistant-form button { min-height: 44px; }
  .toast-region { right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); left: 10px; }
  .toast { width: 100%; min-width: 0; }
}

@media (max-width: 340px) {
  .workspace { padding-right: 7px; padding-left: 7px; }
  .mobile-dock-page,
  .mobile-dock-menu { font-size: 8px; }
  .mobile-dock img { width: 23px; height: 23px; }
  .toolbar-actions,
  .location-actions { grid-template-columns: 1fr; }
  .toolbar-actions .filter-input,
  .location-actions .filter-input { grid-column: 1; }
  .capture-modules { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[data-admin-only][hidden] { display: none !important; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 248px; background: var(--sidebar); color: #f7f8f8; border-right: 1px solid #292d31; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 11px; height: 74px; padding: 0 20px; border-bottom: 1px solid #2a2e32; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--accent); color: #fbfcfc; font-size: 18px; font-weight: 900; transform: skew(-7deg); border-radius: 4px; }
.brand-mark span { transform: skew(7deg); }
.brand strong { display: block; font-size: 15px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 2px; color: #8e959b; font-size: 10px; letter-spacing: .04em; }
.site-switcher { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; margin: 16px 12px 8px; padding: 11px 10px; background: #202428; border: 1px solid #30353a; border-radius: var(--radius); }
.site-switcher small, .site-switcher strong { display: block; }
.site-switcher small { margin-bottom: 3px; color: #888f95; font-size: 10px; }
.site-switcher strong { font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; background: #45a874; border-radius: 50%; box-shadow: 0 0 0 3px rgba(69,168,116,.13); }
.nav-list { flex: 1; padding: 4px 10px; overflow: auto; }
.nav-label { margin: 19px 11px 7px; color: #70777e; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.nav-item { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; width: 100%; min-height: 40px; margin: 2px 0; padding: 0 11px; border: 0; border-radius: 5px; color: #abb1b6; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { color: #fbfcfc; background: #212529; }
.nav-item.active { color: #fbfcfc; background: #2a2e32; box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; opacity: .72; filter: grayscale(.35); }
.nav-item.active .nav-icon { opacity: 1; filter: none; }
.nav-item b { min-width: 20px; padding: 2px 5px; border-radius: 9px; background: #353a3f; color: #b8bec3; font-size: 10px; text-align: center; }
.nav-item .alert-count { background: #5d3028; color: #ffb59c; }
.sidebar-footer { padding: 10px 12px 14px; border-top: 1px solid #292d31; }
.support-link, .user-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; width: 100%; color: #d7dadd; }
.support-link { display: block; margin-bottom: 12px; padding: 8px; border: 0; background: transparent; text-align: left; }
.support-link strong, .support-link small, .user-card strong, .user-card small { display: block; }
.support-link strong, .user-card strong { font-size: 12px; }
.support-link small, .user-card small { margin-top: 2px; color: #747c83; font-size: 10px; }
.user-card { padding: 10px 8px 0; border-top: 1px solid #2a2e32; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #3c444a; color: #fbfcfc; font-size: 11px; font-weight: 800; }

.main-area { width: calc(100% - 248px); min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 74px; padding: 0 28px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.title-group { display: flex; align-items: center; gap: 10px; }
.title-group p, .eyebrow { margin: 0 0 3px; color: #8a9095; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.title-group h1 { margin: 0; font-size: 20px; letter-spacing: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.global-search { display: flex; align-items: center; width: 306px; height: 36px; padding: 0 10px; background: #f3f4f4; border: 1px solid transparent; border-radius: 5px; color: #7a8186; }
.global-search:focus-within { background: #fbfcfc; border-color: #c9cdcf; }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.global-search kbd { padding: 2px 5px; border: 1px solid #d7dadc; border-bottom-width: 2px; border-radius: 3px; background: #fbfcfc; color: #91969a; font-size: 9px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfc; color: #596066; font-size: 18px; }
.icon-btn:hover { border-color: #b9bec2; color: var(--ink); }
.icon-btn.compact { width: 24px; height: 24px; border: 0; background: transparent; color: #8e959a; }
.notify { position: relative; }
.notify span { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1px solid #fbfcfc; border-radius: 50%; background: var(--accent); }
.mobile-menu { display: none; }
.plain-action { min-width: 40px; height: 30px; padding: 0 8px; border: 1px solid #d7dbdd; border-radius: 4px; background: #fbfcfc; color: #596066; font-size: 10px; font-weight: 700; }
.sidebar .plain-action { border-color: #3b4146; background: transparent; color: #9ea5aa; }
.primary-btn, .secondary-btn, .text-btn, .danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.primary-btn { border: 1px solid var(--accent); background: var(--accent); color: #fbfcfc; box-shadow: 0 2px 3px rgba(164,54,16,.18); }
.primary-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.primary-btn:disabled { border-color: #c8ccce; background: #c8ccce; box-shadow: none; cursor: not-allowed; }
.secondary-btn { border: 1px solid #cfd3d5; background: #fbfcfc; color: #34393d; }
.secondary-btn:hover { background: #f6f7f7; }
.text-btn { border: 1px solid transparent; background: transparent; color: #62686d; }
.danger-btn { border: 1px solid var(--red); background: var(--red); color: #fbfcfc; }
.button-icon { width: 22px; height: 22px; border-radius: 3px; object-fit: cover; }

.workspace { padding: 22px 28px 40px; }
.page-stack { display: grid; gap: 18px; animation: pageIn .24s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.shift-strip { display: flex; align-items: center; gap: 20px; min-height: 36px; padding: 7px 11px; background: #202428; color: #c9cdd0; border-radius: var(--radius); font-size: 11px; }
.shift-strip strong { color: #fbfcfc; }
.shift-strip .line-status { margin-left: auto; color: #8ec6a8; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.metric { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.metric-head span:first-child { color: #697075; font-size: 12px; }
.metric-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 4px; background: #f0f2f2; color: #555e64; font-size: 15px; }
.metric-image { width: 28px; height: 28px; border: 1px solid #e0e3e4; border-radius: 4px; object-fit: cover; }
.metric-value { display: flex; align-items: baseline; gap: 6px; }
.metric-value strong { font-size: 27px; letter-spacing: 0; }
.metric-value span { color: #70777c; font-size: 11px; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #8a9094; font-size: 10px; }
.trend-up { color: var(--green); font-weight: 700; }
.trend-warn { color: var(--amber); font-weight: 700; }
.progress { height: 4px; margin-top: 12px; overflow: hidden; border-radius: 4px; background: #eceeee; }
.progress i { display: block; height: 100%; background: var(--green); }

.master-data-page { max-width: 1500px; }
.master-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 54px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.master-toolbar > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.master-toolbar > div:first-child strong { font-size: 30px; }
.master-toolbar > div:first-child span { color: var(--muted); font-size: 12px; }
.master-entry, .master-table, .bom-editor { overflow: hidden; }
.master-entry .panel-header, .bom-editor .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.master-entry .panel-header span, .master-entry .panel-header strong, .bom-editor .panel-header span, .bom-editor .panel-header strong { display: block; }
.master-entry .panel-header span, .bom-editor .panel-header span { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.master-entry .panel-header strong, .bom-editor .panel-header strong { font-size: 14px; }
.master-entry .panel-header small { color: var(--muted); font-size: 10px; }
.master-inline-form { display: grid; grid-template-columns: 1.1fr 1.4fr 1.6fr .65fr auto; align-items: end; gap: 12px; padding: 16px 18px; }
.master-inline-form label, .bom-head-fields label { display: grid; gap: 6px; color: #5f666b; font-size: 10px; font-weight: 700; }
.master-inline-form input, .bom-head-fields input, .bom-head-fields select, .master-search input, .bom-line input { width: 100%; height: 38px; border: 1px solid #cfd3d5; border-radius: 4px; background: #fff; padding: 0 10px; outline: 0; font-size: 12px; }
.master-inline-form input:focus, .bom-head-fields input:focus, .bom-line input:focus, .master-search input:focus { border-color: #8f999f; box-shadow: 0 0 0 2px rgba(45,99,135,.08); }
.master-inline-form button { height: 38px; }
.master-status { min-height: 32px; padding: 8px 18px; border-top: 1px solid var(--line); background: #f7f8f8; color: var(--muted); font-size: 10px; }
.master-table .table-tools { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.master-search { width: min(390px, 55%); }
.master-loading, .master-error { display: grid; gap: 8px; place-content: center; min-height: 360px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-align: center; }
.master-error strong { color: var(--red); }
.bom-editor form { padding: 16px 18px; }
.bom-maintenance-notice { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #efd59c; background: #fff8e8; color: #785d22; }
.bom-maintenance-notice strong { flex: 0 0 auto; font-size: 11px; }
.bom-maintenance-notice span { font-size: 10px; line-height: 1.5; }
.bom-head-fields { display: grid; grid-template-columns: 1fr 1.5fr .55fr .55fr; gap: 12px; }
.bom-head-fields .wide { grid-column: 1 / -1; }
.bom-lines-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.bom-lines { display: grid; gap: 6px; }
.bom-line { display: grid; grid-template-columns: 28px 1fr 1.4fr .55fr .45fr auto; align-items: center; gap: 8px; padding: 7px 8px; background: #f5f6f6; border: 1px solid #e1e4e5; border-radius: 4px; }
.bom-line > span { color: var(--muted); font-size: 10px; text-align: center; }
.master-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.master-form-footer span { color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .master-toolbar { align-items: flex-start; flex-direction: column; }
  .master-toolbar .toolbar-actions { width: 100%; flex-wrap: wrap; }
  .master-inline-form { grid-template-columns: 1fr 1fr; }
  .master-inline-form button { grid-column: 1 / -1; }
  .bom-head-fields { grid-template-columns: 1fr 1fr; }
  .bom-line { grid-template-columns: 24px 1fr 1fr; }
  .bom-line input:nth-of-type(3), .bom-line input:nth-of-type(4) { grid-column: span 1; }
  .bom-line button { grid-column: 3; }
}

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, .75fr); gap: 18px; }
.queue-overview-panel { overflow: hidden; }
.queue-actions { display: flex; align-items: center; gap: 10px; }
.queue-admin-link { min-height: 34px; text-decoration: none; }
.queue-connection { display: inline-flex; align-items: center; gap: 6px; color: #72797e; font-size: 10px; font-weight: 700; white-space: nowrap; }
.queue-connection i { width: 8px; height: 8px; border-radius: 50%; background: #a3a8ab; }
.queue-connection.online { color: var(--green); }
.queue-connection.online i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.queue-connection.offline { color: var(--red); }
.queue-connection.offline i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.queue-overview-body { display: grid; grid-template-columns: minmax(420px, .85fr) minmax(0, 1.15fr); border-top: 1px solid var(--line); }
.queue-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-right: 1px solid var(--line); }
.queue-metrics > div { min-width: 0; padding: 18px 16px; border-right: 1px solid var(--line); }
.queue-metrics > div:last-child { border-right: 0; }
.queue-metrics span, .queue-metrics small, .queue-metrics strong { display: block; }
.queue-metrics span { color: #71787d; font-size: 10px; }
.queue-metrics strong { display: inline-block; margin-top: 8px; font-size: 25px; }
.queue-metrics small { display: inline; margin-left: 4px; color: #858b90; font-size: 9px; }
.queue-gates { padding: 8px 16px; }
.queue-gate-row { display: grid; grid-template-columns: 100px minmax(80px, 1fr) 80px; align-items: center; gap: 14px; min-height: 42px; border-bottom: 1px solid var(--line); }
.queue-gate-row:last-child { border-bottom: 0; }
.queue-gate-row span strong, .queue-gate-row span small { display: block; }
.queue-gate-row span strong { font-size: 10px; }
.queue-gate-row span small { margin-top: 3px; color: #8a9094; font-size: 8px; }
.queue-gate-progress { height: 5px; overflow: hidden; border-radius: 4px; background: #e8ebea; }
.queue-gate-progress i { display: block; height: 100%; background: var(--green); }
.queue-gate-count { text-align: right; }
.queue-gates-empty { display: grid; place-items: center; min-height: 126px; color: #858b90; font-size: 10px; }
.queue-unavailable { min-height: 96px; padding: 24px 20px; border-top: 1px solid var(--line); text-align: center; }
.queue-unavailable strong, .queue-unavailable span { display: block; }
.queue-unavailable strong { font-size: 11px; }
.queue-unavailable span { margin-top: 6px; color: #848a8e; font-size: 9px; }
.location-occupancy-panel { overflow: hidden; }
.location-map-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: #737a7f; font-size: 9px; }
.location-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.location-map-legend i { width: 9px; height: 9px; border: 1px solid #c7cccf; border-radius: 2px; background: #f2f4f4; }
.location-map-legend i.full { border-color: #357354; background: #418962; }
.location-map { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 15px 16px 18px; }
.location-map-group { min-width: 0; }
.location-map-group header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.location-map-group header strong { font-size: 11px; }
.location-map-group header span { color: #83898e; font-size: 9px; }
.location-map-racks { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.location-rack { min-width: 0; overflow: hidden; border: 1px solid #d9dfe1; border-radius: 4px; background: #fff; }
.location-rack-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; margin: 0; padding: 6px 7px; border-bottom: 1px solid #e2e6e8; background: #f4f6f7; }
.location-rack-header span, .location-rack-header strong, .location-rack-header small { display: block; }
.location-rack-header strong { color: #26353d; font-size: 11px; }
.location-rack-header small { margin-top: 2px; color: #81898e; font-size: 7px; font-weight: 500; white-space: nowrap; }
.location-rack-header em { color: #5c676d; font-size: 8px; font-style: normal; font-weight: 700; white-space: nowrap; }
.location-rack-shelves { display: grid; gap: 3px; padding: 6px; }
.location-rack-level { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 4px; min-height: 21px; }
.location-rack-level.flow-start { margin-top: 2px; padding-top: 5px; border-top: 2px solid #7b8f9a; }
.location-rack-level.flow { border-radius: 2px; background: #eef3f5; }
.location-rack-level-name { color: #68747b; font-size: 8px; font-weight: 700; text-align: center; white-space: nowrap; }
.location-rack-level.flow .location-rack-level-name { color: #496879; }
.location-level-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.location-map-cell { display: grid; place-items: center; width: 100%; height: 20px; border: 1px solid #c8cdcf; border-radius: 2px; background: #f2f4f4; color: #7b8489; }
.location-map-cell b { font-size: 7px; font-weight: 700; }
.location-map-cell.full { border-color: #357354; background: #418962; }
.location-map-cell.full b { color: #fff; }
.today-pending-panel { overflow: hidden; }
.today-pending-panel > .panel-header > strong { color: var(--amber); font-size: 14px; }
.today-pending-list { max-height: 290px; overflow: auto; }
.today-pending-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fbfcfc; color: var(--ink); text-align: left; }
.today-pending-row:last-child { border-bottom: 0; }
.today-pending-row:hover { background: #f8f9f9; }
.today-pending-row > span strong, .today-pending-row > span small { display: block; }
.today-pending-row > span strong { font-size: 10px; }
.today-pending-row > span small { margin-top: 4px; color: #858b90; font-size: 8px; }
.pending-stage { padding: 5px 6px; border-left: 3px solid var(--amber); border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-size: 9px; font-weight: 700; text-align: center; }
.pending-stage.ready { border-left-color: var(--green); background: var(--green-soft); color: var(--green); }
.pending-stage.danger { border-left-color: var(--red); background: var(--red-soft); color: var(--red); }
.pending-meta { text-align: right; white-space: nowrap; }
.overview-empty { min-height: 150px; padding: 48px 20px; color: #777e83; text-align: center; }
.overview-empty strong, .overview-empty span { display: block; }
.overview-empty strong { font-size: 11px; }
.overview-empty span { margin-top: 6px; font-size: 9px; }
.overview-products { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.read-only-banner { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 12px 16px; background: #f4f6f7; }
.read-only-banner img { width: 38px; height: 38px; border: 1px solid #d9dfe2; border-radius: 4px; object-fit: cover; }
.read-only-banner strong, .read-only-banner span { display: block; }
.read-only-banner strong { font-size: 12px; }
.read-only-banner span { margin-top: 4px; color: #747c82; font-size: 10px; }
.read-only-label { color: #737b81; font-size: 10px; font-weight: 700; white-space: nowrap; }

.display-screen { display: grid; gap: 18px; min-height: calc(100vh - 136px); font-variant-numeric: tabular-nums; }
.display-overview-row { display: grid; gap: 18px; min-width: 0; }
.display-screen.is-fullscreen { position: fixed; inset: 0; z-index: 1000; }
.display-screen:is(:fullscreen, .is-fullscreen) { width: 100%; height: 100%; min-height: 100vh; grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 16px; overflow: auto; background: var(--canvas); }
.display-screen:is(:fullscreen, .is-fullscreen) .display-head { min-height: 72px; padding: 12px 18px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-brand-logo { width: 132px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy strong { font-size: 24px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-kpis article { padding: 12px 16px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-kpis strong { margin-top: 5px; font-size: 32px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-kpis small { margin-top: 3px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-queue-panel > .panel-header { min-height: 50px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis > div { padding: 10px 14px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis strong { margin-top: 4px; font-size: 26px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gates { padding: 4px 14px; }
.display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate { min-height: 34px; }
.display-head { display: flex; align-items: center; justify-content: space-between; min-height: 96px; padding: 18px 24px; border-radius: var(--radius); background: #20272c; color: #fbfcfc; }
.display-brand { display: flex; align-items: center; min-width: 0; gap: 22px; }
.display-brand-logo { width: 168px; height: auto; flex: none; }
.display-brand-copy { min-width: 0; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.2); }
.display-brand-copy span, .display-brand-copy strong { display: block; }
.display-brand-copy span { color: #b7c0c5; font-size: 13px; font-weight: 700; }
.display-brand-copy strong { margin-top: 5px; font-size: 30px; }
.display-head-actions { display: flex; align-items: center; gap: 16px; }
.display-head-actions > span { text-align: right; }
.display-head-actions b, .display-head-actions small { display: block; }
.display-head-actions b { font-size: 17px; }
.display-head-actions small { margin-top: 4px; color: #aeb8bd; font-size: 11px; }
.display-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fbfcfc; }
.display-kpis article { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); border-top: 3px solid #397456; }
.display-kpis article:nth-child(2) { border-top-color: #386b8d; }
.display-kpis article:nth-child(3) { border-top-color: var(--accent); }
.display-kpis article:last-child { border-right: 0; border-top-color: #7b858b; }
.display-kpis article.warning { border-top-color: var(--red); }
.display-kpis span, .display-kpis strong, .display-kpis small { display: block; }
.display-kpis span { color: #626b70; font-size: 14px; }
.display-kpis strong { margin-top: 8px; font-size: 38px; }
.display-kpis small { margin-top: 6px; color: #7f888d; font-size: 12px; }
.display-queue-panel { overflow: hidden; }
.display-queue-panel > .panel-header { min-height: 64px; padding: 0 20px; }
.display-queue-panel > .panel-header h2 { font-size: 18px; }
.display-queue-panel > .panel-header p { font-size: 12px; }
.display-queue-content { display: grid; grid-template-columns: minmax(480px, .9fr) minmax(480px, 1.1fr); }
.display-queue-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-right: 1px solid var(--line); }
.display-queue-kpis > div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.display-queue-kpis > div:last-child { border-right: 0; }
.display-queue-kpis span, .display-queue-kpis strong, .display-queue-kpis small { display: block; }
.display-queue-kpis span { color: #626b70; font-size: 13px; }
.display-queue-kpis strong { display: inline-block; margin-top: 7px; font-size: 32px; }
.display-queue-kpis small { display: inline; margin-left: 5px; color: #7f888d; font-size: 11px; }
.display-queue-gates { padding: 7px 18px; }
.display-queue-gate { display: grid; grid-template-columns: 170px minmax(100px, 1fr) 70px; align-items: center; gap: 14px; min-height: 43px; border-bottom: 1px solid var(--line); }
.display-queue-gate:last-child { border-bottom: 0; }
.display-queue-gate span strong, .display-queue-gate span small { display: block; }
.display-queue-gate span strong { font-size: 12px; }
.display-queue-gate span small { margin-top: 3px; color: #7f888d; font-size: 10px; }
.display-queue-gate em { color: #397456; font-size: 14px; font-style: normal; font-weight: 800; text-align: right; }
.display-queue-empty, .display-queue-unavailable { display: grid; place-items: center; align-content: center; min-height: 126px; color: #7f888d; font-size: 12px; }
.display-queue-unavailable { min-height: 118px; }
.display-queue-unavailable strong, .display-queue-unavailable span { display: block; }
.display-queue-unavailable strong { color: var(--ink); font-size: 15px; }
.display-queue-unavailable span { margin-top: 7px; }
.display-grid { display: grid; gap: 18px; }
.display-focus-grid { display: grid; gap: 18px; min-width: 0; }
.display-focus-grid .panel { overflow: hidden; }
.display-focus-grid .panel-header { min-height: 64px; padding: 0 18px; }
.display-focus-grid .panel-header h2 { font-size: 18px; }
.display-focus-grid .panel-header p { font-size: 12px; }
.display-focus-grid .panel-header > strong { font-size: 17px; }
.display-grid.primary { grid-template-columns: minmax(340px, .8fr) minmax(520px, 1.2fr); }
.display-grid.secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.display-grid .panel { overflow: hidden; }
.display-grid .panel-header { min-height: 64px; padding: 0 18px; }
.display-grid .panel-header h2 { font-size: 18px; }
.display-grid .panel-header p { font-size: 12px; }
.display-grid .panel-header > strong { font-size: 17px; }
.display-occupancy { display: grid; gap: 17px; padding: 20px 18px; }
.display-occupancy-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.display-occupancy-summary > div { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); }
.display-occupancy-summary > div:last-child { border-right: 0; }
.display-occupancy-summary span, .display-occupancy-summary strong, .display-occupancy-summary small { display: block; }
.display-occupancy-summary span { color: #626b70; font-size: 11px; }
.display-occupancy-summary strong { margin-top: 5px; font-size: 27px; }
.display-occupancy-summary small { margin-top: 3px; color: #7f888d; font-size: 9px; }
.display-occupancy-row { display: grid; grid-template-columns: 48px minmax(80px, 1fr) 90px 56px; align-items: center; gap: 8px; }
.display-occupancy-row > span { font-size: 15px; font-weight: 700; }
.display-occupancy-row > strong { font-size: 13px; text-align: right; }
.display-occupancy-row > em { color: #397456; font-size: 15px; font-style: normal; font-weight: 800; text-align: right; }
.display-meter, .display-rank-bar { height: 9px; overflow: hidden; border-radius: 2px; background: #e7eaeb; }
.display-meter i, .display-rank-bar i { display: block; height: 100%; background: #397456; }
.display-ranking { max-height: 360px; overflow: auto; }
.display-rank-row { display: grid; grid-template-columns: 30px minmax(180px, 1.3fr) minmax(100px, .7fr) 144px; align-items: center; gap: 14px; min-height: 66px; padding: 10px 17px; border-bottom: 1px solid var(--line); }
.display-rank-row:last-child { border-bottom: 0; }
.display-rank-row > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 3px; background: #edf0f1; color: #626b70; font-size: 13px; }
.display-rank-row > span { min-width: 0; }
.display-rank-row strong, .display-rank-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display-rank-row strong { font-size: 14px; }
.display-rank-row small { margin-top: 5px; color: #737d82; font-size: 11px; }
.display-rank-row > em { color: #4b555b; font-size: 12px; font-style: normal; font-weight: 700; text-align: right; }
.display-rank-bar i { background: #386b8d; }
.display-list { max-height: 360px; overflow: auto; }
.display-list-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(130px, .7fr) 82px; align-items: center; gap: 14px; min-height: 68px; padding: 11px 17px; border-bottom: 1px solid var(--line); }
.display-list-row:last-child { border-bottom: 0; }
.display-list-row > span { min-width: 0; }
.display-list-row > span:nth-child(2) { text-align: right; }
.display-list-row strong, .display-list-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display-list-row strong { font-size: 14px; }
.display-list-row small { margin-top: 5px; color: #737d82; font-size: 11px; }
.display-list-row > em { justify-self: end; color: var(--red); font-size: 12px; font-style: normal; font-weight: 800; }
.display-list-row.age > em { padding: 5px 7px; border-radius: 3px; background: var(--red-soft); }
.display-empty { display: grid; place-items: center; align-content: center; min-height: 190px; padding: 30px; text-align: center; }
.display-empty strong { font-size: 15px; }
.display-empty span { margin-top: 7px; color: #737d82; font-size: 12px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 14px; }
.panel-header p { margin: 4px 0 0; color: #858b90; font-size: 10px; }
.panel-actions { display: flex; align-items: center; gap: 7px; }
.workstream { display: grid; grid-template-columns: repeat(3, 1fr); }
.work-lane { min-width: 0; padding: 15px; border-right: 1px solid var(--line); }
.work-lane:last-child { border-right: 0; }
.lane-title { display: flex; justify-content: space-between; margin-bottom: 13px; color: #777e83; font-size: 11px; }
.lane-title strong { color: var(--ink); font-size: 12px; }
.task-card { margin-bottom: 9px; padding: 11px; border: 1px solid #e1e4e5; border-left: 3px solid #aab0b4; border-radius: 4px; background: #fafbfb; cursor: pointer; }
.task-card:hover { border-color: #c7cccf; background: #fbfcfc; box-shadow: 0 4px 12px rgba(28,33,36,.06); }
.task-card.urgent { border-left-color: var(--accent); }
.task-card.done { border-left-color: var(--green); }
.task-card .task-top { display: flex; justify-content: space-between; gap: 5px; }
.task-card strong { font-size: 11px; }
.task-card small { color: #8b9195; font-size: 9px; }
.task-card p { margin: 7px 0 9px; overflow: hidden; color: #555c61; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; justify-content: space-between; color: #8a9094; font-size: 9px; }
.priority { color: var(--accent); font-weight: 700; }
.alert-list { padding: 5px 16px 12px; }
.alert-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eceeee; }
.alert-row:last-child { border-bottom: 0; }
.alert-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 14px; }
.alert-icon.red { background: var(--red-soft); color: var(--red); }
.alert-row strong, .alert-row small { display: block; }
.alert-row strong { margin-bottom: 3px; font-size: 11px; }
.alert-row small { color: #858b90; font-size: 9px; }
.alert-row time { color: #999ea2; font-size: 9px; }
.throughput { display: grid; grid-template-columns: 1fr 150px; gap: 16px; padding: 16px; }
.chart-wrap { position: relative; height: 146px; padding: 9px 0 20px 26px; }
.bar-chart { display: flex; align-items: end; gap: 14px; height: 100%; border-bottom: 1px solid #d8dcde; }
.bar-pair { display: flex; align-items: end; justify-content: center; gap: 3px; flex: 1; height: 100%; position: relative; }
.bar-pair i { display: block; width: 7px; min-height: 5px; background: #3f484e; border-radius: 2px 2px 0 0; }
.bar-pair i:last-child { background: var(--accent); }
.bar-pair span { position: absolute; bottom: -18px; color: #969b9f; font-size: 8px; }
.chart-legend { display: flex; gap: 12px; color: #777e83; font-size: 9px; }
.chart-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; background: #3f484e; }
.chart-legend i.out { background: var(--accent); }
.capacity { display: flex; flex-direction: column; justify-content: center; gap: 12px; border-left: 1px solid var(--line); padding-left: 17px; }
.capacity strong { font-size: 23px; }
.capacity small { color: #7e858a; font-size: 9px; }
.capacity-line { display: grid; grid-template-columns: 1fr auto; gap: 6px; color: #6e757a; font-size: 9px; }

.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operation-command { display: flex; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfc; }
.operation-title { min-width: 112px; padding-right: 16px; border-right: 1px solid var(--line); }
.operation-title span, .operation-title small { display: block; color: var(--muted); font-size: 9px; }
.operation-title strong { display: inline-block; margin: 3px 5px 0 0; font-size: 24px; }
.operation-title small { display: inline; }
.capture-modules { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); flex: 1; gap: 8px; }
.capture-module { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; min-height: 62px; padding: 8px 10px; border: 1px solid #d8dcde; border-radius: 5px; background: #fafbfb; color: var(--ink); text-align: left; }
.capture-module:hover { border-color: #9fa6aa; background: #fbfcfc; box-shadow: 0 3px 9px rgba(24,29,32,.06); }
.capture-module > img { width: 38px; height: 38px; border: 1px solid #e1e4e5; border-radius: 4px; object-fit: cover; }
.capture-module:disabled { cursor: not-allowed; opacity: .5; background: #f0f2f2; }
.capture-module strong, .capture-module small { display: block; }
.capture-module strong { margin-bottom: 3px; font-size: 11px; }
.capture-module small { color: #858b90; font-size: 8px; }
.operation-table .table-tools { min-height: 52px; }
.empty-row { cursor: default !important; }
.empty-row:hover { background: #fbfcfc !important; }
.empty-row td { height: 230px !important; text-align: center; }
.empty-row strong, .empty-row span { display: block; }
.empty-row strong { margin-bottom: 7px; color: #596066; font-size: 12px; }
.empty-row span { color: #959a9e; font-size: 9px; }
.operation-empty { display: grid; place-items: center; min-height: 230px; padding: 24px; text-align: center; }
.operation-empty strong, .operation-empty span { display: block; }
.operation-empty strong { margin-bottom: 7px; color: #596066; font-size: 12px; }
.operation-empty span { color: #959a9e; font-size: 9px; }
.inspection-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.inspection-actions button { min-height: 30px; padding: 0 10px; border: 1px solid #8fb69f; border-radius: 4px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 700; }
.inspection-actions button.danger { border-color: #d9a5a1; background: var(--red-soft); color: var(--red); }
.inspection-actions button:disabled { cursor: wait; opacity: .55; }
.inspection-result { color: #72797e; font-size: 9px; white-space: nowrap; }
.inspection-result.passed { color: var(--green); }
.inspection-result.rejected { color: var(--red); }
.workflow-source { display: grid; grid-template-columns: 120px 120px minmax(220px, 1fr); flex: 1; min-height: 62px; border: 1px solid #d8dcde; border-radius: 5px; background: #fafbfb; }
.workflow-source > div { display: grid; align-content: center; padding: 8px 14px; border-right: 1px solid var(--line); }
.workflow-source > div:last-child { border-right: 0; }
.workflow-source span, .workflow-source small { color: #858b90; font-size: 8px; }
.workflow-source strong { margin: 2px 0; font-size: 15px; }
.putaway-command { display: flex; flex: 1; gap: 8px; min-width: 0; }
.putaway-command .workflow-source { min-width: 0; }
.unsourced-entry { display: grid; grid-template-columns: 38px minmax(100px, 1fr); align-items: center; gap: 10px; width: 178px; min-height: 62px; padding: 8px 10px; border: 1px solid #d8dcde; border-radius: 5px; background: #fafbfb; color: var(--ink); text-align: left; flex: 0 0 178px; }
.unsourced-entry:hover { border-color: #9fa6aa; background: #fbfcfc; }
.unsourced-entry > img { width: 38px; height: 38px; border: 1px solid #e1e4e5; border-radius: 4px; object-fit: cover; }
.unsourced-entry strong, .unsourced-entry small { display: block; }
.unsourced-entry strong { margin-bottom: 3px; font-size: 11px; }
.unsourced-entry small { color: #858b90; font-size: 8px; }
.workflow-origin strong { font-size: 11px; }
.row-action.putaway-confirm { min-width: 62px; color: var(--green); }
.putaway-verify-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9f9; }
.putaway-verify-task .sku-cell { grid-row: 1 / 4; }
.putaway-verify-task > span, .putaway-verify-task > small { color: #858b90; font-size: 8px; text-align: right; }
.putaway-verify-task > strong { text-align: right; }
.putaway-steps { display: grid; gap: 10px; }
.putaway-step { display: grid; gap: 6px; padding: 11px 12px; border: 1px solid var(--line); border-left: 3px solid #69737a; border-radius: 4px; background: #fbfcfc; }
.putaway-step > strong { font-size: 10px; }
.putaway-step > small { color: #7b8287; font-size: 9px; }
.putaway-verify-status { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.putaway-verify-status span { padding: 9px; border-left: 3px solid var(--amber); border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-size: 9px; }
.putaway-verify-status span.ok { border-left-color: var(--green); background: var(--green-soft); color: var(--green); }
.verification-input { display: flex; width: 100%; }
.verification-input input { flex: 1; min-width: 0; border-radius: 5px 0 0 5px; }
.verification-input button { display: inline-flex; flex: 0 0 72px; align-items: center; justify-content: center; gap: 5px; height: 38px; border: 1px solid #30363a; border-radius: 0 5px 5px 0; background: #30363a; color: #fbfcfc; font-size: 10px; font-weight: 700; }
.verification-input button img { width: 22px; height: 22px; border-radius: 3px; object-fit: cover; }
.operation-overview { display: grid; grid-template-columns: repeat(2, 1fr); padding: 8px; }
.operation-overview button { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfc; text-align: left; }
.operation-overview button:nth-child(2n) { border-right: 0; }
.operation-overview button:nth-last-child(-n+2) { border-bottom: 0; }
.operation-overview span { color: #5f666b; font-size: 10px; }
.operation-overview strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 20px; }
.operation-overview small { color: #94999d; font-size: 8px; }
.product-breakdown { display: grid; gap: 13px; padding: 18px; }
.product-breakdown > div { display: grid; grid-template-columns: 68px 1fr 28px; align-items: center; gap: 10px; }
.product-breakdown span, .product-breakdown strong { font-size: 9px; }
.product-breakdown strong { text-align: right; }
.page-toolbar .summary { display: flex; align-items: baseline; gap: 9px; }
.summary strong { font-size: 23px; }
.summary span { color: var(--muted); font-size: 11px; }
.toolbar-actions, .filter-group { display: flex; align-items: center; gap: 8px; }
.filter-input, .select-input { height: 34px; border: 1px solid #d5d9db; border-radius: 5px; background: #fbfcfc; color: #4d5459; outline: 0; font-size: 11px; }
.filter-input { width: 220px; padding: 0 10px; }
.select-input { padding: 0 28px 0 9px; }
.filter-input:focus, .select-input:focus { border-color: #92999e; }
.mini-stats, .capacity-stats, .headrest-capacity-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfc; }
.headrest-capacity-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-stat { padding: 14px 16px; border-right: 1px solid var(--line); }
.mini-stat:last-child { border: 0; }
.mini-stat span { display: block; margin-bottom: 6px; color: #777e83; font-size: 10px; }
.mini-stat strong { font-size: 18px; }
.mini-stat em { margin-left: 6px; color: #8b9195; font-size: 9px; font-style: normal; }
.data-panel { overflow: hidden; }
.inventory-live-panel { overflow: hidden; }
.inventory-summary-panel { overflow: hidden; }
.inventory-summary-panel[hidden], .location-material-summary-panel[hidden] { display: none; }
.inventory-summary-actions { display: flex; align-items: center; gap: 10px; }
.inventory-summary-table { min-width: 1120px; }
.location-material-summary-panel { overflow: hidden; }
.location-material-summary-table { min-width: 820px; }
.inventory-summary-empty { display: grid; place-items: center; min-height: 120px; padding: 24px; text-align: center; }
.inventory-summary-empty strong { font-size: 13px; }
.inventory-summary-empty span { margin-top: 7px; color: var(--muted); font-size: 10px; }
.long-aging-panel { border-top: 3px solid var(--amber); }
.long-aging-table { min-width: 860px; }
.age-risk { display: inline-block; padding: 3px 7px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.assistant-trigger { white-space: nowrap; }
.assistant-modal { width: min(720px, 100%); }
.assistant-notice { padding: 10px 20px; border-bottom: 1px solid var(--line); background: #f6f8f8; color: var(--muted); font-size: 11px; }
.assistant-messages { display: grid; gap: 12px; min-height: 310px; max-height: 52vh; overflow: auto; padding: 18px 20px; background: #fafbfb; }
.assistant-empty { display: grid; place-items: center; min-height: 260px; color: var(--muted); font-size: 12px; text-align: center; }
.assistant-message { max-width: 88%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.assistant-message.user { justify-self: end; border-color: #f0cdbf; background: #fff7f3; }
.assistant-message-role { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.assistant-message p { margin: 0; font-size: 12px; line-height: 1.6; }
.assistant-cards { display: grid; gap: 6px; margin-top: 9px; }
.assistant-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px; border: 1px solid #e7eaeb; border-radius: 4px; background: #f8f9f9; font-size: 10px; }
.assistant-card strong { color: var(--ink); }
.assistant-card span { color: var(--muted); text-align: right; }
.assistant-card small { grid-column: 1 / -1; color: #727a7f; line-height: 1.5; }
.assistant-form { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; }
.assistant-form input { flex: 1; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid #cfd3d5; border-radius: 4px; outline: 0; font-size: 12px; }
.assistant-form input:focus { border-color: #8f999f; box-shadow: 0 0 0 2px rgba(45,99,135,.08); }
.inventory-live-panel .panel-header { min-height: 58px; }
.inventory-live-panel .panel-header h2 { font-size: 13px; }
.inventory-live-panel .panel-header p { margin-top: 4px; color: var(--muted); font-size: 9px; }
.inventory-live-empty { display: grid; place-items: center; min-height: 118px; padding: 22px; text-align: center; }
.inventory-live-empty strong { font-size: 12px; }
.inventory-live-empty span { margin-top: 7px; color: var(--muted); font-size: 9px; }
.inventory-live-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.inventory-live-head .sku-cell { min-width: 0; }
.inventory-live-total { display: grid; grid-template-columns: auto auto auto; align-items: baseline; gap: 0 6px; flex: none; text-align: right; }
.inventory-live-total span { grid-column: 1 / -1; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.inventory-live-total strong { font-size: 27px; }
.inventory-live-total em { color: var(--muted); font-size: 10px; font-style: normal; }
.inventory-live-total small { grid-column: 1 / -1; margin-top: 3px; color: #8b9195; font-size: 8px; }
.inventory-status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fafbfb; }
.inventory-status-strip span { padding: 10px 14px; border-right: 1px solid var(--line); color: #747b80; font-size: 9px; }
.inventory-status-strip span:last-child { border-right: 0; }
.inventory-status-strip strong { margin-left: 5px; color: var(--ink); font-size: 11px; }
.inventory-location-list { max-height: 260px; overflow: auto; }
.inventory-location-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(90px, .6fr) minmax(180px, 1.3fr) minmax(160px, 1fr); align-items: center; gap: 14px; min-height: 43px; padding: 0 18px; border-bottom: 1px solid #eceeee; }
.inventory-location-row:last-child { border-bottom: 0; }
.inventory-location-row b { font-size: 11px; }
.inventory-location-row span, .inventory-location-row small { color: #71787d; font-size: 9px; }
.inventory-location-header { position: sticky; top: 0; z-index: 1; min-height: 32px; background: #f7f8f8; }
.inventory-location-header span { color: #858b8f; font-size: 8px; font-weight: 700; }
.inventory-location-empty { display: grid; place-items: center; min-height: 72px; color: var(--muted); font-size: 9px; }
.table-tools { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.segmented { display: inline-flex; padding: 2px; border: 1px solid #d6dadd; border-radius: 5px; background: #f4f5f5; }
.segmented button { min-height: 28px; padding: 0 11px; border: 0; border-radius: 3px; background: transparent; color: #71787d; font-size: 10px; font-weight: 600; }
.segmented button.active { background: #fbfcfc; color: var(--ink); box-shadow: 0 1px 3px rgba(26,31,34,.12); }
.result-count { color: #858b8f; font-size: 10px; }
.table-scroll { width: 100%; overflow: auto; }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.data-table th { height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fafbfb; color: #80878c; font-size: 9px; font-weight: 700; text-align: left; white-space: nowrap; }
.data-table td { height: 50px; padding: 0 14px; border-bottom: 1px solid #eceeee; color: #4b5257; font-size: 10px; white-space: nowrap; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #fafbfb; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong { color: var(--ink); font-size: 10px; }
.checkbox { width: 14px; height: 14px; accent-color: var(--accent); }
.sku-cell { display: flex; align-items: center; gap: 9px; }
.part-thumb { display: block; width: 30px; height: 30px; border: 1px solid #e0e3e5; border-radius: 4px; background: #f2f4f4; object-fit: cover; }
.sku-cell strong, .sku-cell small { display: block; }
.sku-cell small { margin-top: 3px; color: #92979b; font-size: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 10px; background: #eef0f1; color: #666e73; font-size: 9px; font-weight: 600; }
.tag::before { width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.location-code { display: inline-block; padding: 4px 7px; border: 1px solid #dfe2e4; border-radius: 3px; background: #fafbfb; color: #42494e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.zone-capacity { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.zone-capacity > div { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-right: 1px solid var(--line); }
.zone-capacity > div:last-child { border-right: 0; }
.zone-capacity span { color: #666e73; font-size: 10px; }
.zone-capacity strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 20px; }
.zone-capacity .progress { margin: 0; }
.zone-capacity small { grid-column: 1 / -1; color: #969b9f; font-size: 8px; }
.abc-badge { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 4px; background: #eef0f1; color: #5f666b; font-size: 10px; font-weight: 800; }
.abc-A { background: var(--red-soft); color: var(--red); }
.abc-B { background: var(--amber-soft); color: var(--amber); }
.abc-C { background: var(--green-soft); color: var(--green); }
.location-recommendation { grid-column: 1 / -1; padding: 10px 12px; border-left: 3px solid var(--green); border-radius: 4px; background: var(--green-soft); }
.location-recommendation strong, .location-recommendation span { display: block; }
.location-recommendation strong { color: var(--green); font-size: 10px; }
.location-recommendation span { margin-top: 4px; color: #668071; font-size: 8px; }
.location-recommendation.waiting { border-left-color: #aeb4b7; background: #f1f3f3; }
.location-recommendation.waiting strong, .location-recommendation.waiting span { color: #767d82; }
.location-recommendation.warning { border-left-color: var(--amber); background: var(--amber-soft); }
.location-recommendation.warning strong, .location-recommendation.warning span { color: var(--amber); }
.fifo-plan strong, .fifo-plan span, .fifo-plan small { display: block; }
.fifo-plan span { margin-top: 5px; overflow-wrap: anywhere; }
.fifo-plan small { margin-top: 7px; color: inherit; font-size: 9px; font-weight: 700; }
.row-action { border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 700; }
.row-action:disabled { color: #a9afb3; cursor: not-allowed; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid var(--line); color: #8a9094; font-size: 9px; }
.pager { display: flex; gap: 4px; }
.pager button { width: 27px; height: 27px; border: 1px solid #dfe2e3; border-radius: 4px; background: #fbfcfc; color: #6e7579; font-size: 9px; }
.pager button.active { border-color: #33393d; background: #33393d; color: #fbfcfc; }
.location-pager { display: flex; align-items: center; gap: 7px; }
.location-pager button { min-width: 62px; height: 28px; padding: 0 9px; border: 1px solid #d7dbdd; border-radius: 4px; background: #fbfcfc; color: #555d62; font-size: 9px; font-weight: 700; }
.location-pager button:hover:not(:disabled) { border-color: #9fa5a9; }
.location-pager button:disabled { cursor: not-allowed; opacity: .45; }
.location-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 520px; }
.zone-list { padding: 12px; border-right: 1px solid var(--line); }
.zone-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 11px 8px; border-radius: 4px; cursor: pointer; }
.zone-row:hover, .zone-row.active { background: #f1f3f3; }
.zone-row strong, .zone-row small { display: block; }
.zone-row strong { font-size: 10px; }
.zone-row small { margin-top: 3px; color: #8d9397; font-size: 8px; }
.zone-row > span:last-child { color: #6f767b; font-size: 9px; }
.zone-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 4px; background: #e6e9ea; color: #535b60; font-size: 13px; }
.location-map { padding: 16px; }
.map-head { display: flex; justify-content: space-between; margin-bottom: 14px; }
.map-head h3 { margin: 0; font-size: 13px; }
.map-head span { color: #858b90; font-size: 9px; }
.rack-grid { display: grid; grid-template-columns: repeat(8, minmax(42px, 1fr)); gap: 7px; }
.rack-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1.25; border: 1px solid #d9dddf; border-radius: 3px; background: #f8f9f9; color: #62696e; font-family: ui-monospace, monospace; font-size: 8px; cursor: pointer; }
.rack-cell::after { position: absolute; inset: auto 0 0; height: 4px; background: #b5babd; content: ""; }
.rack-cell.low::after { background: var(--green); }
.rack-cell.mid::after { background: var(--amber); }
.rack-cell.full::after { background: var(--red); }
.rack-cell.locked { background: #eceeee; color: #a1a6a9; text-decoration: line-through; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(13,16,18,.56); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal-backdrop.open, .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { display: grid; place-items: center; padding: 16px; }
.modal { width: min(610px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 7px; background: #fbfcfc; box-shadow: var(--shadow); transform: translateY(10px); transition: transform .2s ease; }
.modal-backdrop.open .modal { transform: none; }
.modal-header, .drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2, .drawer-header h2 { margin: 0; font-size: 17px; }
.capture-content { min-height: 310px; padding: 18px 20px; }
.capture-workbench { display: grid; gap: 12px; }
.scan-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #858b90; font-size: 9px; }
.scan-actions .secondary-btn { flex: 0 0 auto; }
.match-list { display: grid; gap: 6px; max-height: 210px; overflow: auto; }
.match-empty { display: grid; place-items: center; min-height: 76px; padding: 16px; border: 1px dashed #d5d9db; border-radius: 5px; color: #92979b; font-size: 10px; text-align: center; }
.material-match { display: grid; grid-template-columns: 32px minmax(0,1fr) 72px; align-items: center; gap: 9px; min-height: 54px; padding: 7px 9px; border: 1px solid #dfe2e4; border-radius: 5px; background: #fbfcfc; color: var(--ink); text-align: left; }
.material-match:hover { border-color: #adb3b7; background: #fafbfb; }
.material-match.selected { border-color: var(--green); box-shadow: inset 3px 0 var(--green); background: #f7fbf8; }
.material-match > div { min-width: 0; }
.material-match strong, .material-match small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-match strong { font-size: 10px; }
.material-match small { margin-top: 3px; color: #878d91; font-size: 8px; }
.material-match > span:last-child { text-align: right; }
.material-match > span:last-child b { display: block; color: var(--green); font-size: 10px; }
.capture-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.recognition-status { padding: 10px 12px; border-radius: 4px; background: #f1f3f3; color: #646b70; font-size: 9px; line-height: 1.5; }
.recognition-status strong, .recognition-status span { display: block; }
.recognition-status span { margin-top: 4px; white-space: pre-wrap; }
.recognition-status.loading { color: var(--blue); background: var(--blue-soft); }
.recognition-status.success { color: var(--green); background: var(--green-soft); }
.recognition-status.error { color: var(--red); background: var(--red-soft); }
.manual-search { height: 42px !important; font-size: 12px !important; }
.scan-label-preview { width: 100%; max-height: 140px; border: 1px solid var(--line); border-radius: 5px; object-fit: contain; background: #f5f6f6; }
.scan-stage { display: grid; place-items: center; min-height: 205px; border: 1px dashed #cbd0d2; border-radius: 6px; background: #f8f9f9; text-align: center; }
.scan-frame { position: relative; width: 152px; height: 105px; margin: 0 auto 14px; border: 2px solid #4e565b; border-radius: 5px; }
.scan-frame::before, .scan-frame::after { position: absolute; width: 24px; height: 24px; border-color: var(--accent); border-style: solid; content: ""; }
.scan-frame::before { top: -3px; left: -3px; border-width: 3px 0 0 3px; }
.scan-frame::after { right: -3px; bottom: -3px; border-width: 0 3px 3px 0; }
.laser { position: absolute; left: 8px; right: 8px; top: 15px; height: 2px; background: var(--accent); box-shadow: 0 0 7px rgba(231,88,39,.6); animation: scan 2s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(71px); } }
.scan-stage strong { display: block; margin-bottom: 5px; font-size: 12px; }
.scan-stage small { color: #858c90; font-size: 9px; }
.code-input { display: flex; gap: 8px; margin-top: 12px; }
.code-input input { flex: 1; height: 38px; padding: 0 11px; border: 1px solid #d4d8da; border-radius: 5px; outline: 0; font-family: ui-monospace, monospace; font-size: 11px; }
.camera-stage { position: relative; display: grid; place-items: center; min-height: 220px; overflow: hidden; border: 1px dashed #cbd0d2; border-radius: 6px; background: #22272b; color: #fbfcfc; text-align: center; }
.camera-stage input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.camera-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-stage img:not([hidden]) + .camera-hint { border-radius: 5px; background: rgba(20,24,27,.78); }
.camera-hint { position: relative; z-index: 2; padding: 14px; }
.camera-hint > img { display: block; width: 48px; height: 48px; margin: 0 auto 9px; border-radius: 5px; object-fit: cover; }
.camera-hint strong { display: block; font-size: 12px; }
.camera-hint small { display: block; margin-top: 5px; color: #b9bfc3; font-size: 9px; }
.ai-result { display: none; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid #cfe4d8; border-radius: 4px; background: var(--green-soft); }
.ai-result.show { display: grid; }
.ai-result strong, .ai-result small { display: block; }
.ai-result strong { font-size: 10px; }
.ai-result small { margin-top: 3px; color: #668071; font-size: 8px; }
.confidence { color: var(--green); font-size: 10px; font-weight: 700; }
.manual-form, .drawer-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.location-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 18px 20px; }
.location-form [hidden] { display: none; }
.location-modal { width: min(570px, 100%); }
.location-assignment-modal { width: min(620px, 100%); }
.location-assignment-body { display: grid; gap: 14px; padding: 18px 20px; }
.location-assignment-summary { display: grid; grid-template-columns: 76px minmax(120px, .7fr) 76px minmax(180px, 1.3fr); align-items: center; gap: 8px 12px; padding: 13px 14px; border: 1px solid var(--line); background: #f7f8f8; }
.location-assignment-summary span { color: var(--muted); font-size: 9px; }
.location-assignment-summary strong, .location-assignment-summary b { font-size: 11px; }
.location-assignment-results { max-height: 220px; overflow: auto; }
.location-assignment-modes { width: 100%; overflow-x: auto; }
.location-assignment-modes button { flex: 1 0 auto; min-width: 118px; }
.location-assignment-panel { display: grid; gap: 12px; }
.location-assignment-panel[hidden], .location-assignment-modes button[hidden] { display: none; }
.location-material-form { grid-template-columns: 1fr 1fr; }
.location-material-form .field.full { grid-column: 1 / -1; }
.location-material-form input[readonly] { background: #eef0f1; color: #4f575b; font-family: ui-monospace, monospace; cursor: not-allowed; }
.location-assignment-option { display: grid; gap: 4px; width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line); background: #fbfcfc; text-align: left; }
.location-assignment-option:hover, .location-assignment-option:focus-visible { background: #f4f7f7; }
.location-assignment-option strong { font-size: 11px; }
.location-assignment-option span { color: var(--muted); font-size: 9px; }
.location-assignment-selection { min-height: 36px; padding: 10px 12px; border-left: 3px solid var(--accent); background: #f3f7f5; color: #27332e; font-size: 10px; font-weight: 700; }
.unsourced-modal { width: min(1180px, 100%); }
.unsourced-table-wrap { max-height: min(55vh, 520px); overflow: auto; padding: 18px 20px 0; }
.unsourced-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.unsourced-table th { padding: 0 7px 8px; color: #697176; font-size: 9px; text-align: left; white-space: nowrap; }
.unsourced-table td { padding: 7px; border-top: 1px solid var(--line); vertical-align: middle; }
.unsourced-table input { width: 100%; min-width: 90px; height: 36px; padding: 0 8px; border: 1px solid #d3d7d9; border-radius: 4px; font-size: 11px; }
.unsourced-table input:disabled { background: #f3f5f5; color: #697176; }
.unsourced-table .unsourced-code { min-width: 150px; font-family: ui-monospace, monospace; }
.unsourced-table .unsourced-name { min-width: 180px; }
.unsourced-table .unsourced-supplier { min-width: 190px; }
.unsourced-row-status { display: block; margin-top: 4px; color: var(--green); font-size: 8px; }
.unsourced-row-status.new { color: var(--amber); }
.unsourced-remove { width: 34px; height: 34px; border: 1px solid #d8dcde; border-radius: 4px; background: #fbfcfc; color: var(--red); font-size: 0; }
.unsourced-remove::before { font-size: 18px; content: "×"; }
.unsourced-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; }
.unsourced-form-actions span { color: #71797e; font-size: 9px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #60676c; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid #d3d7d9; border-radius: 4px; background: #fbfcfc; outline: 0; font-size: 11px; }
.field input, .field select { height: 37px; padding: 0 9px; }
.field textarea { min-height: 70px; padding: 9px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #858d92; box-shadow: 0 0 0 2px rgba(133,141,146,.1); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.capture-context { color: #888e92; font-size: 9px; }

.drawer { position: fixed; top: 0; right: 0; z-index: 70; display: flex; flex-direction: column; width: min(430px, 100%); height: 100vh; background: #fbfcfc; box-shadow: -16px 0 45px rgba(15,19,21,.14); transform: translateX(102%); transition: transform .25s ease; }
.drawer.open { transform: none; }
.drawer-body { flex: 1; padding: 20px; overflow: auto; }
.drawer-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.detail-status { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 12px; border-radius: 5px; background: #f5f6f6; }
.detail-status strong { font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 5px; }
.detail-item { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-item:nth-child(2n) { border-right: 0; }
.detail-item:nth-last-child(-n+2) { border-bottom: 0; }
.detail-item small, .detail-item strong { display: block; }
.detail-item small { margin-bottom: 5px; color: #888e92; font-size: 9px; }
.detail-item strong { font-size: 11px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 24px; color: #5c6469; font-size: 10px; }
.timeline li::before { position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border: 2px solid #fbfcfc; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); content: ""; }
.timeline li::after { position: absolute; top: 13px; bottom: 0; left: 6px; width: 1px; background: #d7dbdd; content: ""; }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; margin-top: 4px; color: #969b9f; font-size: 8px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { min-width: 270px; padding: 12px 14px; border-left: 3px solid var(--green); border-radius: 5px; background: #22272b; color: #fbfcfc; box-shadow: var(--shadow); animation: toastIn .2s ease; }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 11px; }
.toast small { margin-top: 4px; color: #b7bdc1; font-size: 9px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(10px); } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .overview-grid { grid-template-columns: 1fr; }
  .queue-overview-body { grid-template-columns: 1fr; }
  .queue-metrics { border-right: 0; border-bottom: 1px solid var(--line); }
  .display-grid.primary, .display-grid.secondary { grid-template-columns: 1fr; }
  .display-queue-content { grid-template-columns: 1fr; }
  .display-queue-kpis { border-right: 0; border-bottom: 1px solid var(--line); }
  .mini-stats, .capacity-stats, .headrest-capacity-stats { grid-template-columns: 1fr 1fr; }
  .mini-stat:nth-child(2) { border-right: 0; }
  .mini-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (min-width: 760px) {
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-content { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis { border-right: 1px solid var(--line); border-bottom: 0; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 20px 0 50px rgba(15,22,26,.25); }
  .main-area { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 64px; padding: 0 15px; }
  .title-group p { display: none; }
  .title-group h1 { font-size: 17px; }
  .global-search { width: 36px; padding: 0; justify-content: center; background: #fbfcfc; border-color: var(--line); }
  .global-search input, .global-search kbd { display: none; }
  .workspace { padding: 15px; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; flex-wrap: wrap; }
  .location-actions .filter-input { flex: 1 1 220px; }
  .filter-input { flex: 1; min-width: 160px; }
  .location-layout { grid-template-columns: 1fr; }
  .zone-list { display: flex; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .zone-row { min-width: 180px; }
  .rack-grid { grid-template-columns: repeat(6, minmax(38px, 1fr)); }
  .operation-command { align-items: stretch; flex-direction: column; }
  .putaway-command { align-items: stretch; flex-direction: column; }
  .unsourced-entry { width: 100%; flex-basis: auto; }
  .operation-title { display: flex; align-items: baseline; gap: 5px; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .capture-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capture-module { grid-template-columns: 28px 1fr; min-width: 0; }
  .capture-module > img { width: 30px; height: 30px; }
}

@media (max-width: 560px) {
  .workflow-source { grid-template-columns: 1fr 1fr; width: 100%; }
  .workflow-source .workflow-origin { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .global-search { display: none; }
  .top-actions .notify { display: none; }
  .top-actions .primary-btn { width: 36px; padding: 0; font-size: 0; }
  .top-actions .primary-btn img { width: 24px; height: 24px; }
  .shift-strip { flex-wrap: wrap; gap: 5px 14px; }
  .shift-strip .line-status { width: 100%; margin-left: 0; }
  .queue-overview-panel .panel-header { align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 12px; }
  .queue-actions { justify-content: space-between; width: 100%; }
  .queue-admin-link { flex: none; }
  .queue-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-metrics > div { border-bottom: 1px solid var(--line); }
  .queue-metrics > div:nth-child(2n) { border-right: 0; }
  .queue-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
  .queue-gate-row { grid-template-columns: 82px minmax(56px, 1fr) 72px; gap: 9px; }
  .metric-grid, .mini-stats, .capacity-stats, .headrest-capacity-stats { grid-template-columns: 1fr; }
  .metric, .mini-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child, .mini-stat:last-child { border-bottom: 0; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 15px 14px; }
  .metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .location-map { grid-template-columns: 1fr; }
  .location-map-group { overflow: hidden; }
  .location-map-group > header { align-items: flex-start; flex-direction: column; }
  .location-map-racks { grid-auto-columns: 112px; grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x proximity; }
  .location-rack { scroll-snap-align: start; }
  .location-map-legend { justify-content: flex-start; margin-top: 7px; }
  .location-occupancy-panel .panel-header { align-items: flex-start; flex-direction: column; padding-top: 11px; padding-bottom: 11px; }
  .today-pending-row { grid-template-columns: 54px minmax(0, 1fr); }
  .pending-meta { grid-column: 2; text-align: left; }
  .overview-products { grid-template-columns: 1fr; }
  .display-head { align-items: flex-start; flex-direction: column; min-height: 0; gap: 12px; padding: 14px 16px; }
  .display-brand { gap: 12px; }
  .display-brand-logo { width: 108px; }
  .display-brand-copy { padding-left: 12px; }
  .display-brand-copy span { font-size: 8px; }
  .display-brand-copy strong { margin-top: 4px; font-size: 18px; }
  .display-head-actions { width: 100%; justify-content: space-between; }
  .display-head-actions > span { text-align: left; }
  .display-head-actions b { font-size: 13px; }
  .display-head-actions small { font-size: 9px; }
  .display-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .display-kpis article { padding: 16px 14px; }
  .display-kpis span { font-size: 10px; }
  .display-kpis strong { margin-top: 7px; font-size: 26px; }
  .display-kpis small { margin-top: 5px; font-size: 9px; }
  .display-kpis article:nth-child(2) { border-right: 0; }
  .display-kpis article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .display-queue-panel > .panel-header { min-height: 56px; padding: 0 16px; }
  .display-queue-panel > .panel-header h2 { font-size: 14px; }
  .display-queue-panel > .panel-header p { font-size: 9px; }
  .display-queue-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .display-queue-kpis > div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .display-queue-kpis > div:nth-child(2n) { border-right: 0; }
  .display-queue-kpis > div:nth-last-child(-n+2) { border-bottom: 0; }
  .display-queue-kpis span { font-size: 10px; }
  .display-queue-kpis strong { font-size: 25px; }
  .display-queue-kpis small { font-size: 9px; }
  .display-queue-gates { padding: 6px 14px; }
  .display-queue-gate { grid-template-columns: 118px minmax(48px, 1fr) 50px; gap: 8px; }
  .display-queue-gate span strong { font-size: 9px; }
  .display-queue-gate span small { font-size: 8px; }
  .display-queue-gate em { font-size: 10px; }
  .display-grid .panel-header { min-height: 54px; padding: 0 16px; }
  .display-grid .panel-header h2 { font-size: 14px; }
  .display-grid .panel-header p { font-size: 10px; }
  .display-grid .panel-header > strong { font-size: 14px; }
  .display-occupancy-row { grid-template-columns: 36px minmax(80px, 1fr) 68px; }
  .display-occupancy-row > span { font-size: 11px; }
  .display-occupancy-row > strong { font-size: 10px; }
  .display-occupancy-row > em { font-size: 11px; }
  .display-occupancy-row > em { grid-column: 3; }
  .display-rank-row { grid-template-columns: 24px minmax(0, 1fr) 86px; min-height: 54px; padding: 8px 15px; gap: 12px; }
  .display-rank-row > b { width: 24px; height: 24px; font-size: 10px; }
  .display-rank-row strong { font-size: 10px; }
  .display-rank-row small { margin-top: 4px; font-size: 8px; }
  .display-rank-row > em { font-size: 9px; }
  .display-rank-bar { display: none; }
  .display-list-row { grid-template-columns: minmax(0, 1fr) 82px; min-height: 58px; padding: 9px 15px; gap: 12px; }
  .display-list-row strong { font-size: 10px; }
  .display-list-row small { margin-top: 4px; font-size: 8px; }
  .display-list-row > em { font-size: 10px; }
  .display-list-row > em { grid-column: 2; }
  .display-empty strong { font-size: 11px; }
  .display-empty span { margin-top: 6px; font-size: 9px; }
  .workstream { display: block; }
  .work-lane { border-right: 0; border-bottom: 1px solid var(--line); }
  .throughput { grid-template-columns: 1fr; }
  .capacity { border-top: 1px solid var(--line); border-left: 0; padding: 14px 0 0; }
  .page-toolbar .summary { display: none; }
  .toolbar-actions .filter-input { flex: 1 0 100%; width: 100%; }
  .toolbar-actions .secondary-btn, .toolbar-actions .primary-btn, .toolbar-actions .select-input { flex: 1 1 0; min-width: 0; padding-right: 8px; padding-left: 8px; white-space: nowrap; }
  .capture-content { padding: 14px 12px; }
  .manual-form, .drawer-form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .location-form { grid-template-columns: 1fr; padding: 14px 12px; }
  .location-form .field.full { grid-column: auto; }
  .location-assignment-body { padding: 14px 12px; }
  .location-assignment-summary { grid-template-columns: 64px 1fr; }
  .location-assignment-modes { overflow: visible; padding-bottom: 0; }
  .location-assignment-modes button { flex: 1 1 0; min-width: 0; padding-right: 4px; padding-left: 4px; font-size: 8px; white-space: nowrap; }
  .location-material-form { grid-template-columns: 1fr; }
  .location-material-form .field.full { grid-column: auto; }
  .location-actions .secondary-btn, .location-actions .primary-btn, .location-actions .select-input { flex: 1 1 auto; }
  .pagination { align-items: flex-start; flex-direction: column; gap: 9px; }
  .location-pager { width: 100%; justify-content: space-between; }
  .capture-context { order: 2; }
  .rack-grid { grid-template-columns: repeat(4, minmax(38px, 1fr)); }
  .capture-modules { grid-template-columns: 1fr; }
  .capture-module { min-height: 48px; }
  .operation-table .table-tools { align-items: stretch; flex-direction: column; }
  .inventory-live-panel .panel-header { align-items: center; flex-direction: row; }
  .inventory-live-panel .panel-header p { display: none; }
  .inventory-live-head { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px; }
  .inventory-live-total { width: 100%; text-align: left; }
  .inventory-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-status-strip span:nth-child(2) { border-right: 0; }
  .inventory-status-strip span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .inventory-location-row { grid-template-columns: minmax(112px, 1fr) 78px; gap: 4px 12px; padding: 9px 14px; }
  .inventory-location-row > span, .inventory-location-row > small { grid-column: 1 / -1; }
  .inventory-location-header { display: none; }
  .operation-table .filter-input { width: 100%; }
  .scan-actions { align-items: stretch; flex-direction: column; }
  .capture-fields { grid-template-columns: 1fr; }
  .material-match { grid-template-columns: 32px minmax(0, 1fr) 62px; }
  .zone-capacity { grid-template-columns: 1fr; }
  .zone-capacity > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .zone-capacity > div:last-child { border-bottom: 0; }
}
.login-gate{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;background:#f3f4f5;padding:20px}.login-gate[hidden]{display:none}.login-panel{width:min(360px,100%);display:grid;gap:15px;background:#fbfcfc;border:1px solid #d9dddf;border-radius:6px;padding:26px;box-shadow:0 14px 40px rgba(15,22,26,.15)}.login-panel>strong{font-size:20px}.login-panel label{display:grid;gap:7px;font-size:13px;color:#454b50}.login-panel input{height:44px;border:1px solid #b9c0c4;border-radius:4px;padding:0 11px;font-size:16px}.login-panel button{height:44px;border:0;border-radius:4px;background:#bd1e2d;color:#fbfcfc;font-weight:700}.login-panel small{color:#697177}.login-panel .account-name{padding:9px 11px;background:#f1f3f3;border-radius:4px;color:#4f575c;font-size:12px}

/* 2026 enterprise visual refresh: preserve the existing operational DOM and behavior. */
:root {
  --ink: #182026;
  --ink-soft: #364149;
  --muted: #66727a;
  --muted-light: #8b959b;
  --line: #dce1e4;
  --line-strong: #c8cfd3;
  --panel: #fbfcfc;
  --canvas: #f2f4f5;
  --canvas-strong: #e9edef;
  --sidebar: #161b1f;
  --sidebar-soft: #22292e;
  --accent: #df4f22;
  --accent-dark: #bd3b15;
  --accent-soft: #fff0e9;
  --green: #247052;
  --green-soft: #e7f3ed;
  --amber: #936016;
  --amber-soft: #faf0dd;
  --red: #b53c37;
  --red-soft: #faeae8;
  --blue: #315f7d;
  --blue-soft: #e7f0f5;
  --radius: 8px;
  --control-radius: 6px;
  --shadow: 0 20px 50px rgba(29, 39, 45, .14);
  --shadow-soft: 0 8px 24px rgba(29, 39, 45, .07);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html, body {
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

body { min-height: 100dvh; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { transition: color .2s var(--ease-out), background-color .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .2s var(--ease-out), opacity .2s var(--ease-out); }
button:active, .secondary-btn:active, .primary-btn:active { transform: translateY(1px) scale(.985); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(223, 79, 34, .2); outline-offset: 2px; }

.app-shell { min-height: 100dvh; }
.sidebar {
  width: 236px;
  border-right-color: #2a3238;
  background: linear-gradient(180deg, #161b1f 0%, #14191d 100%);
  box-shadow: 10px 0 30px rgba(20, 27, 31, .06);
}
.brand { height: 72px; padding: 0 18px; border-bottom-color: #2a3238; }
.brand-mark { width: 36px; height: 36px; border-radius: var(--control-radius); background: var(--accent); box-shadow: inset 0 1px rgba(255,255,255,.22), 0 8px 18px rgba(223,79,34,.18); }
.brand strong { font-size: 14px; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: #8e999f; font-size: 9px; letter-spacing: 0; }
.site-switcher { grid-template-columns: 8px 1fr; margin: 16px 12px 10px; padding: 12px; border-color: #333c42; background: #20272c; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.site-switcher small { color: #8f999f; font-size: 9px; }
.site-switcher strong { font-size: 12px; }
.status-dot { box-shadow: 0 0 0 4px rgba(69,168,116,.12); }
.nav-list { padding: 2px 10px 12px; scrollbar-width: thin; scrollbar-color: #394148 transparent; }
.nav-label { margin: 18px 11px 7px; color: #737e85; font-size: 9px; letter-spacing: .08em; }
.nav-item { grid-template-columns: 30px 1fr auto; min-height: 42px; margin: 2px 0; padding: 0 10px; border-radius: var(--control-radius); color: #aeb7bc; font-size: 13px; font-weight: 600; }
.nav-item:hover { background: #232a2f; transform: translateX(2px); }
.nav-item.active { background: #2a3238; box-shadow: inset 3px 0 var(--accent), 0 5px 14px rgba(15,22,26,.12); }
.nav-icon { width: 24px; height: 24px; border-radius: 5px; opacity: .75; filter: grayscale(.25) contrast(.95); }
.nav-item.active .nav-icon { opacity: 1; }
.sidebar-footer { padding: 10px 12px 14px; border-top-color: #2a3238; }
.user-card { padding: 11px 8px 0; border-top-color: #2a3238; }
.avatar { border: 1px solid #4c575e; background: #333c42; }

.main-area { width: calc(100% - 236px); min-height: 100dvh; margin-left: 236px; }
.topbar { height: 72px; padding: 0 30px; border-bottom-color: rgba(207,214,218,.9); background: rgba(250,251,251,.92); box-shadow: 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%); }
.title-group { gap: 12px; }
.title-group p, .eyebrow { margin-bottom: 4px; color: #7d888f; font-size: 10px; letter-spacing: 0; }
.title-group h1 { font-size: 21px; line-height: 1.1; }
.global-search { width: 320px; height: 38px; padding: 0 11px; border-color: #e1e5e7; border-radius: var(--control-radius); background: #eef1f2; }
.global-search:focus-within { border-color: #aeb7bc; background: #fbfcfc; box-shadow: 0 0 0 3px rgba(49,95,125,.08); }
.global-search input { font-size: 12px; }
.global-search kbd { border-color: #ced4d7; color: #7d888f; }

.workspace { width: 100%; max-width: 1680px; margin: 0 auto; padding: 24px 30px 48px; }
.page-stack { gap: 20px; animation: pageIn .42s var(--ease-out); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.page-stack > * { animation: sectionIn .48s var(--ease-out) both; }
.page-stack > *:nth-child(2) { animation-delay: .035s; }
.page-stack > *:nth-child(3) { animation-delay: .07s; }
.page-stack > *:nth-child(4) { animation-delay: .105s; }
.page-stack > *:nth-child(5) { animation-delay: .14s; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.shift-strip { min-height: 40px; padding: 8px 14px; border: 1px solid #30383e; background: #20272c; color: #c8d0d4; font-size: 11px; box-shadow: var(--shadow-soft); }
.shift-strip .line-status { color: #9bd0b5; }
.panel, .metric-grid, .mini-stats, .capacity-stats, .headrest-capacity-stats, .operation-command { border-color: var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 1px 2px rgba(27,36,41,.025); }
.panel-header { min-height: 60px; padding: 0 18px; border-bottom-color: var(--line); }
.panel-header h2 { font-size: 14px; line-height: 1.25; }
.panel-header p { margin-top: 5px; color: #7c878e; font-size: 10px; }
.panel:hover { border-color: #d1d7da; }

.metric-grid { overflow: hidden; }
.metric { position: relative; padding: 20px 22px; border-right-color: var(--line); background: #fbfcfc; }
.metric::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: transparent; content: ""; transition: background-color .2s var(--ease-out); }
.metric:hover::after { background: var(--accent); }
.metric-head { margin-bottom: 14px; }
.metric-head span:first-child { color: #5e6970; font-size: 12px; font-weight: 650; }
.metric-image { width: 32px; height: 32px; border-color: #dfe4e6; border-radius: 6px; }
.metric-value strong { font-size: 30px; line-height: 1; }
.metric-value span { font-size: 11px; }
.metric-foot { margin-top: 11px; color: #818b91; font-size: 10px; }

.overview-grid { gap: 20px; }
.queue-overview-body { border-top-color: var(--line); }
.queue-metrics > div { padding: 19px 17px; }
.queue-metrics strong { font-size: 27px; }
.queue-connection.loading i { animation: statusPulse 1.4s var(--ease-out) infinite; }
@keyframes statusPulse { 50% { opacity: .4; transform: scale(.7); } }
.queue-admin-link { text-decoration: none; }
.location-map { gap: 18px; padding: 18px; }
.location-map-group { padding: 11px 12px 12px; border: 1px solid #e3e7e9; border-radius: var(--control-radius); background: #fafbfb; }
.location-map-group header strong { font-size: 12px; }
.location-map-group header span { font-size: 9px; }
.location-map-racks { gap: 11px; }
.location-rack { transition: border-color .16s var(--ease-out), box-shadow .16s var(--ease-out), transform .16s var(--ease-out); }
.location-rack:hover { border-color: #b8c2c7; box-shadow: 0 7px 18px rgba(33,47,54,.08); transform: translateY(-1px); }
.location-map-cell { transition: border-color .16s var(--ease-out), box-shadow .16s var(--ease-out); }
.location-map-cell:hover { z-index: 1; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(49,95,125,.12); }
.today-pending-row { min-height: 64px; padding: 10px 16px; border-bottom-color: var(--line); }
.today-pending-row:hover { background: #f6f8f8; transform: translateX(2px); }
.today-pending-row > span strong { font-size: 11px; }
.today-pending-row > span small { font-size: 9px; }
.operation-overview button { min-height: 70px; padding: 15px 16px; }
.operation-overview button:hover { background: #f7f9f9; }
.operation-overview strong { font-size: 23px; }
.product-breakdown { gap: 15px; padding: 20px; }
.product-breakdown span, .product-breakdown strong { font-size: 10px; }

.page-toolbar { gap: 16px; }
.summary strong { font-size: 27px; }
.summary span { font-size: 11px; }
.toolbar-actions, .filter-group { gap: 9px; }
.filter-input, .select-input { height: 38px; border-color: var(--line-strong); border-radius: var(--control-radius); font-size: 11px; }
.filter-input { width: 230px; padding: 0 12px; }
.filter-input:focus, .select-input:focus { border-color: #7c8a92; box-shadow: 0 0 0 3px rgba(49,95,125,.08); }
.primary-btn, .secondary-btn, .text-btn, .danger-btn { height: 38px; border-radius: var(--control-radius); font-size: 11px; white-space: nowrap; }
.primary-btn { box-shadow: 0 7px 15px rgba(189,59,21,.17); }
.primary-btn:hover { box-shadow: 0 9px 20px rgba(189,59,21,.23); transform: translateY(-1px); }
.secondary-btn:hover { border-color: #aeb8bd; background: #f7f9f9; }
.plain-action { border-radius: var(--control-radius); }

.operation-command { min-height: 94px; padding: 16px 18px; }
.operation-title { min-width: 118px; }
.operation-title strong { font-size: 28px; }
.capture-modules { gap: 10px; }
.capture-module, .unsourced-entry { min-height: 66px; border-color: #d7dde0; border-radius: var(--control-radius); background: #f8f9f9; }
.capture-module:hover, .unsourced-entry:hover { border-color: #aeb8bd; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.capture-module > img, .unsourced-entry > img { width: 40px; height: 40px; border-radius: 6px; }
.capture-module strong, .unsourced-entry strong { font-size: 12px; }
.capture-module small, .unsourced-entry small { font-size: 9px; }
.workflow-source { min-height: 66px; border-color: #d7dde0; border-radius: var(--control-radius); background: #f8f9f9; }

.mini-stat { padding: 16px 18px; }
.mini-stat span { font-size: 10px; }
.mini-stat strong { font-size: 20px; }
.table-tools { min-height: 56px; padding: 10px 16px; }
.segmented { padding: 3px; border-color: #d4dade; border-radius: var(--control-radius); background: #edf0f1; }
.segmented button { min-height: 30px; border-radius: 4px; font-size: 10px; }
.segmented button.active { color: #20282d; box-shadow: 0 2px 6px rgba(27,36,41,.12); }
.data-table th { height: 42px; padding: 0 15px; background: #f5f7f7; color: #667179; font-size: 9px; }
.data-table td { height: 54px; padding: 0 15px; color: #465159; font-size: 10px; }
.data-table tbody tr { transition: background-color .16s var(--ease-out), box-shadow .16s var(--ease-out); }
.data-table tbody tr:hover { background: #f7f9f9; box-shadow: inset 3px 0 var(--accent); }
.location-code { border-color: #d8dee1; border-radius: 4px; background: #f6f8f8; color: #344047; font-size: 10px; }
.part-thumb { width: 34px; height: 34px; border-radius: 6px; }
.tag { border-radius: 4px; font-weight: 700; }
.row-action { min-height: 30px; padding: 0 8px; border-radius: 4px; }
.row-action:hover { background: var(--accent-soft); }
.pagination { min-height: 54px; padding: 10px 16px; }

.inventory-live-head { padding: 18px 20px; }
.inventory-live-total strong { font-size: 30px; }
.inventory-status-strip span { padding: 12px 16px; font-size: 10px; }
.inventory-location-row { min-height: 48px; padding: 0 20px; }
.inventory-location-row b { font-size: 12px; }

.modal-backdrop, .drawer-backdrop { background: rgba(16,22,26,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); box-shadow: 0 26px 80px rgba(15,22,26,.24); transform: translateY(14px) scale(.985); transition: transform .28s var(--ease-out); }
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-header { min-height: 68px; padding: 0 20px; }
.modal-header h2, .drawer-header h2 { font-size: 17px; }
.modal-footer { min-height: 66px; padding: 12px 18px; }
.field label { color: #536069; font-size: 10px; }
.field input, .field select, .field textarea, .manual-search, .code-input input { border-color: var(--line-strong); border-radius: var(--control-radius); background: #fbfcfc; }
.field input:focus, .field select:focus, .field textarea:focus, .manual-search:focus, .code-input input:focus { border-color: #7d8b93; box-shadow: 0 0 0 3px rgba(49,95,125,.09); }
.drawer { height: 100dvh; box-shadow: -20px 0 60px rgba(15,22,26,.18); transition: transform .3s var(--ease-out); }
.toast { border-radius: var(--control-radius); box-shadow: 0 18px 50px rgba(14,20,24,.24); animation: toastIn .32s var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translate3d(14px,-4px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }

.login-gate { background: #eef1f2; }
.login-panel { border-color: #d8dee1; border-radius: var(--radius); padding: 28px; box-shadow: 0 24px 70px rgba(26,35,40,.16); }
.login-panel::before { width: 40px; height: 4px; border-radius: 3px; background: var(--accent); content: ""; }
.login-panel input { border-color: #b7c0c5; border-radius: var(--control-radius); }
.login-panel input:focus { border-color: #75848d; box-shadow: 0 0 0 3px rgba(49,95,125,.1); outline: 0; }
.login-panel button { border-radius: var(--control-radius); background: var(--accent); }
.login-panel button:hover { background: var(--accent-dark); }

/* Production kitting */
.kitting-page { gap: 14px; }
.kitting-toolbar .toolbar-actions { flex-wrap: wrap; }
.kitting-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.kitting-plan-list { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow: auto; }
.kitting-plan-list > header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.kitting-plan-item { display: grid; gap: 4px; width: 100%; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fbfcfc; color: var(--ink); text-align: left; }
.kitting-plan-item:hover, .kitting-plan-item.active { background: #f1f5f4; box-shadow: inset 3px 0 var(--accent); }
.kitting-plan-item span, .kitting-plan-item small { color: #768087; font-size: 9px; }
.kitting-main { display: grid; gap: 14px; min-width: 0; }
.kitting-lines-panel .panel-header, .kitting-result .panel-header { align-items: center; }
.kitting-summary-flags, .kitting-line-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kitting-summary-flags span { padding: 5px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.kitting-summary-flags .danger { background: var(--red-soft); color: var(--red); }
.kitting-summary-flags .warning { background: var(--amber-soft); color: var(--amber); }
.kitting-summary-flags .good { background: var(--green-soft); color: var(--green); }
.kitting-lines-table { min-width: 920px; }
.kitting-lines-table tr.selected { background: #eef5f2; box-shadow: inset 3px 0 var(--accent); }
.kitting-lines-table td strong, .kitting-material-table td strong { display: block; }
.kitting-lines-table td small, .kitting-material-table td small { display: block; margin-top: 3px; color: #7a8389; }
.kitting-status { display: inline-flex; min-height: 23px; align-items: center; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.kitting-status.good { background: var(--green-soft); color: var(--green); }
.kitting-status.warning { background: var(--amber-soft); color: var(--amber); }
.kitting-status.danger { background: var(--red-soft); color: var(--red); }
.kitting-status.neutral { background: #edf0f1; color: #657078; }
.inline-command { min-height: 28px; padding: 0 9px; border: 1px solid #a8b6ae; border-radius: 4px; background: #f7faf8; color: var(--green); font-size: 9px; font-weight: 700; }
.danger-btn { min-height: 36px; padding: 0 13px; border: 1px solid #d9a5a1; border-radius: 4px; background: var(--red-soft); color: var(--red); font-weight: 700; }
.kitting-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.kitting-kpis > div { display: grid; gap: 4px; padding: 13px 16px; border-right: 1px solid var(--line); }
.kitting-kpis > div:last-child { border-right: 0; }
.kitting-kpis span { color: #737e85; font-size: 9px; }
.kitting-kpis strong { font-size: 20px; }
.kitting-kpis .danger strong { color: var(--red); }
.kitting-kpis .warning strong { color: var(--amber); }
.kitting-kpis .good strong { color: var(--green); }
.kitting-result-tabs { margin: 12px 14px; width: max-content; max-width: calc(100% - 28px); overflow-x: auto; }
.kitting-material-table { min-width: 1050px; }
.kitting-empty { padding: 28px 18px; color: #7b858b; text-align: center; }
.kitting-blocker { display: grid; gap: 7px; margin: 14px; padding: 16px; border-left: 4px solid var(--amber); background: var(--amber-soft); color: var(--amber); }
.kitting-blocker span { color: #6b6250; font-size: 10px; }
.kitting-warning-banner { margin: 12px 14px 0; padding: 10px 12px; border-left: 3px solid var(--amber); background: var(--amber-soft); color: var(--amber); font-size: 10px; }
.kitting-draft-modal { width: min(1450px, calc(100vw - 28px)); }
.kitting-draft-head { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.kitting-draft-head label { display: grid; gap: 5px; color: #677178; font-size: 9px; }
.kitting-draft-head input { height: 36px; min-width: 190px; padding: 0 9px; border: 1px solid #d3d7d9; border-radius: 4px; }
.kitting-draft-table-wrap { max-height: 60vh; }
.kitting-draft-table { width: 100%; min-width: 1350px; border-collapse: collapse; }
.kitting-draft-table th { padding: 9px 7px; background: #f3f5f5; color: #657078; font-size: 9px; text-align: left; white-space: nowrap; }
.kitting-draft-table td { padding: 6px 7px; border-top: 1px solid var(--line); vertical-align: top; }
.kitting-draft-table input, .kitting-draft-table select { width: 100%; min-width: 68px; height: 34px; padding: 0 7px; border: 1px solid #d1d6d8; border-radius: 3px; font-size: 9px; }
.kitting-draft-table td:nth-child(6) { min-width: 310px; }
.kitting-draft-table td:nth-child(6) input { margin-top: 4px; }
.kitting-row-review { display: block; margin-top: 5px; color: var(--green); font-size: 8px; font-weight: 700; }
.kitting-draft-table tr.needs-review td { background: #fff9ed; }
.kitting-draft-table tr.needs-review td:first-child { box-shadow: inset 3px 0 var(--amber); }
.kitting-draft-table tr.needs-review .kitting-row-review { color: var(--amber); }
.kitting-draft-review { display: grid; min-width: 190px; align-content: center; gap: 3px; margin-left: auto; padding-left: 16px; border-left: 1px solid var(--line); }
.kitting-draft-review strong { color: #344149; font-size: 11px; }
.kitting-draft-review span { color: var(--muted); font-size: 9px; }
.kitting-draft-modal .modal-footer > div { display: flex; align-items: center; gap: 8px; }
.kitting-plan-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.kitting-plan-summary { overflow: hidden; }
.kitting-plan-summary .kitting-kpis { border-top: 0; }
.kitting-summary-wrap { max-height: 520px; }
.kitting-summary-table { min-width: 1080px; }
.kitting-summary-table td { vertical-align: top; }
.kitting-summary-table td:first-child { min-width: 220px; }
.kitting-summary-table td:nth-child(2) { min-width: 220px; }
.kitting-summary-table small { display: block; margin-top: 3px; color: var(--muted); }
.danger-text { color: #b13a32; }
.icon-command { width: 30px; height: 30px; border: 1px solid #d3d7d9; border-radius: 4px; background: #fff; color: var(--red); font-size: 18px; }

/* Kitting workbench refinement */
.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; }
.kitting-page { --kitting-border: #d9dfe2; gap: 12px; }
.kitting-page .panel { border-color: var(--kitting-border); border-radius: 5px; box-shadow: none; }
.kitting-page .panel:hover { border-color: var(--kitting-border); }
.kitting-command-bar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px 9px 16px; border: 1px solid var(--kitting-border); border-left: 4px solid var(--accent); border-radius: 5px; background: #fbfcfc; }
.kitting-command-title { display: grid; gap: 3px; min-width: 210px; }
.kitting-command-title strong { font-size: 13px; }
.kitting-command-title span { color: #68747b; font-size: 10px; }
.kitting-command-bar .button-icon { width: 20px; height: 20px; filter: saturate(.7); }
.kitting-layout { grid-template-columns: 214px minmax(0, 1fr); gap: 12px; }
.kitting-plan-list { top: 84px; max-height: calc(100dvh - 108px); border-radius: 5px; scrollbar-width: thin; }
.kitting-plan-list > header { min-height: 48px; padding: 0 12px; background: #f4f6f6; }
.kitting-plan-list > header > div { display: grid; gap: 2px; }
.kitting-plan-list > header small { color: var(--muted); font-size: 9px; }
.kitting-plan-row { position: relative; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.kitting-plan-item { position: relative; gap: 5px; min-height: 68px; padding: 11px 58px 11px 12px; border-bottom: 0; background: transparent; }
.kitting-plan-item::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; content: ""; }
.kitting-plan-item:hover { background: #f6f8f8; box-shadow: none; }
.kitting-plan-item.active { background: #fff4ef; box-shadow: none; }
.kitting-plan-item.active::before { background: var(--accent); }
.kitting-plan-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.kitting-plan-item span, .kitting-plan-item small { color: #6a757c; font-size: 9px; }
.kitting-plan-delete { position: absolute; top: 50%; right: 8px; min-width: 42px; min-height: 28px; padding: 0 7px; transform: translateY(-50%); border: 1px solid #dfbbb7; border-radius: 4px; background: #fff8f7; color: #a43b34; font-size: 9px; font-weight: 700; }
.kitting-plan-delete:hover:not(:disabled) { border-color: var(--red); background: var(--red-soft); }
.kitting-plan-delete:active:not(:disabled) { transform: translateY(calc(-50% + 1px)); }
.kitting-main { gap: 12px; }
.kitting-plan-header, .kitting-result-header { min-height: 58px; gap: 14px; }
.kitting-plan-header > div:first-child, .kitting-result-header > div:first-child { min-width: 0; }
.kitting-plan-header h2, .kitting-result-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitting-summary-flags { flex-wrap: nowrap; }
.kitting-summary-flags span { min-height: 25px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 3px; }
.kitting-lines-scroll { max-height: 340px; scrollbar-gutter: stable; }
.kitting-table-scroll { max-height: 520px; scrollbar-gutter: stable; }
.kitting-lines-table, .kitting-material-table, .kitting-summary-table { font-variant-numeric: tabular-nums; }
.kitting-lines-table thead, .kitting-material-table thead, .kitting-summary-table thead { position: sticky; top: 0; z-index: 3; }
.kitting-lines-table th, .kitting-material-table th, .kitting-summary-table th { background: #f0f3f4; color: #53616a; letter-spacing: 0; }
.kitting-lines-table th:first-child, .kitting-lines-table td:first-child, .kitting-summary-table th:first-child, .kitting-summary-table td:first-child { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); background: #fbfcfc; }
.kitting-lines-table thead th:first-child, .kitting-summary-table thead th:first-child { z-index: 4; background: #f0f3f4; }
.kitting-lines-table tr.selected td:first-child { background: #fff4ef; }
.kitting-lines-table tbody tr:hover { box-shadow: none; }
.kitting-lines-table tbody tr:focus-visible { outline: 3px solid rgba(223,79,34,.2); outline-offset: -3px; }
.kitting-lines-table td, .kitting-material-table td, .kitting-summary-table td { height: 48px; }
.kitting-lines-table td:nth-child(5) { min-width: 250px; }
.kitting-material-table td:nth-child(2) { min-width: 220px; }
.kitting-material-table td:nth-child(3) { min-width: 150px; }
.number-cell { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: right !important; font-variant-numeric: tabular-nums; }
.kitting-status { min-height: 24px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px; }
.kitting-status.good { border-color: #c9e2d5; }
.kitting-status.warning { border-color: #ebd2a7; }
.kitting-status.danger { border-color: #e9c4c1; }
.kitting-status.neutral { border-color: #d9dfe2; }
.inline-command { min-height: 30px; border-color: #cbd4cf; border-radius: 4px; background: #fbfcfc; }
.inline-command:hover { border-color: var(--green); background: var(--green-soft); }
.inline-command.danger { border-color: #dfbbb7; color: var(--red); }
.inline-command.danger:hover { border-color: var(--red); background: var(--red-soft); }
.kitting-row-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.kitting-row-actions .inline-command { padding: 0 7px; }
.kitting-mode-switch { justify-self: start; margin: 0; }
.kitting-mode-switch button { min-width: 112px; }
.kitting-heading-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kitting-context-note { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 16px; border-bottom: 1px solid var(--line); background: #f6f8f8; color: #5f6b72; font-size: 10px; }
.kitting-context-note strong { color: #344149; white-space: nowrap; }
.kitting-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #fbfcfc; }
.kitting-metrics > div { display: flex; min-height: 54px; align-items: baseline; gap: 8px; padding: 10px 14px; border-right: 1px solid var(--line); }
.kitting-metrics > div:last-child { border-right: 0; }
.kitting-metrics span { color: #68747b; font-size: 9px; }
.kitting-metrics strong { margin-left: auto; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 18px; font-variant-numeric: tabular-nums; }
.kitting-metrics small { align-self: center; color: #747f85; font-size: 8px; }
.kitting-metrics .danger strong { color: var(--red); }
.kitting-metrics .warning strong { color: var(--amber); }
.kitting-result-tabs { margin: 10px 14px; }
.kitting-summary-tools { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.kitting-summary-tools .kitting-result-tabs { flex: 0 0 auto; margin: 0; }
.kitting-summary-search { display: flex; width: min(360px, 42%); height: 34px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #cfd6d9; border-radius: 4px; background: #fbfcfc; }
.kitting-summary-search:focus-within { border-color: #87949b; box-shadow: 0 0 0 3px rgba(49,95,125,.08); }
.kitting-summary-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.kitting-summary-search small { color: #788289; font-size: 9px; white-space: nowrap; }
.kitting-summary-wrap { max-height: min(58dvh, 640px); scrollbar-gutter: stable; }
.kitting-summary-table td { white-space: normal; line-height: 1.45; }
.kitting-summary-table td:first-child { min-width: 230px; }
.kitting-summary-table td:nth-child(2) { min-width: 210px; }
.kitting-table-footer { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.kitting-warning-banner { display: grid; gap: 4px; margin: 10px 14px 0; border-left-width: 3px; border-radius: 0 4px 4px 0; line-height: 1.5; }
.kitting-warning-banner strong { font-size: 10px; }
.kitting-warning-banner span { color: #695d47; }
.kitting-empty-action { display: grid; gap: 6px; min-height: 130px; place-content: center; }
.kitting-empty-action strong { color: #465159; font-size: 12px; }
.kitting-empty-action span { max-width: 460px; font-size: 10px; line-height: 1.6; }
.kitting-page button:disabled { cursor: not-allowed; opacity: .52; transform: none; box-shadow: none; }
.kitting-page .kitting-plan-delete:disabled { transform: translateY(-50%); }

.kitting-import-modal { width: min(520px, calc(100vw - 28px)); }
.kitting-import-options { display: grid; padding: 8px 18px 18px; }
.kitting-import-options > button { display: flex; min-height: 68px; align-items: center; gap: 14px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.kitting-import-options > button:last-child { border-bottom: 0; }
.kitting-import-options > button:hover { background: #f4f7f6; }
.kitting-import-options > button:active { transform: scale(.985); }
.kitting-import-options img { width: 38px; height: 38px; border-radius: 5px; object-fit: cover; }
.kitting-import-options span { display: grid; gap: 4px; }
.kitting-import-options strong { font-size: 12px; }
.kitting-import-options small { color: var(--muted); font-size: 9px; }
.kitting-more-actions { position: relative; }
.kitting-more-actions summary { display: inline-flex; height: 38px; align-items: center; padding: 0 13px; border: 1px solid #cfd3d5; border-radius: var(--control-radius); background: #fbfcfc; color: #34393d; cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; }
.kitting-more-actions summary::-webkit-details-marker { display: none; }
.kitting-more-actions[open] summary { border-color: #aeb8bd; background: #f4f6f6; }
.kitting-more-actions > div { position: absolute; z-index: 8; top: calc(100% + 6px); right: 0; display: grid; width: 180px; gap: 7px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fbfcfc; box-shadow: 0 14px 36px rgba(27,36,41,.16); }
.kitting-more-actions > div button { width: 100%; }

@media (max-width: 980px) {
  .kitting-layout { grid-template-columns: 1fr; }
  .kitting-command-bar { align-items: flex-start; flex-direction: column; }
  .kitting-command-bar .toolbar-actions { width: 100%; }
  .kitting-plan-list { position: static; display: flex; max-height: none; overflow-x: auto; }
  .kitting-plan-list > header { min-width: 130px; }
  .kitting-plan-row { min-width: 210px; border-right: 1px solid var(--line); border-bottom: 0; }
  .kitting-plan-item { min-width: 0; height: 100%; }
  .kitting-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kitting-draft-head { flex-direction: column; }
  .kitting-draft-review { width: 100%; margin-left: 0; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 820px) {
  .sidebar { width: min(268px, 84vw); }
  .main-area { width: 100%; margin-left: 0; }
  .topbar { height: 64px; padding: 0 16px; }
  .workspace { padding: 18px 16px 34px; }
  .title-group h1 { font-size: 19px; }
  .page-stack { gap: 16px; }
  .global-search { width: min(42vw, 240px); }
  .metric { padding: 17px 16px; }
  .metric-value strong { font-size: 27px; }
  .operation-command { min-height: auto; padding: 14px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .workspace { padding: 16px 14px 30px; }
  .global-search { display: none; }
  .mobile-menu { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 36px; }
  .page-stack { gap: 14px; }
  .shift-strip { align-items: flex-start; gap: 5px; flex-direction: column; padding: 11px 13px; }
  .shift-strip .line-status { margin-left: 0; }
  .metric { min-height: 118px; padding: 16px; }
  .metric-head { margin-bottom: 11px; }
  .metric-value strong { font-size: 26px; }
  .panel-header { min-height: 58px; padding: 0 14px; }
  .panel-header h2 { font-size: 13px; }
  .location-map { grid-template-columns: 1fr; padding: 14px; }
  .page-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .operation-table .table-tools { gap: 8px; }
  .filter-input { min-width: 0; }
  .operation-title { min-width: 88px; }
  .capture-module { min-height: 58px; }
  .data-table td { height: 52px; }
  .modal { max-height: calc(100dvh - 18px); }
  .modal-header { min-height: 62px; padding: 0 15px; }
  .kitting-plan-actions { justify-content: flex-start; width: 100%; padding: 0 14px 12px; }
  .kitting-plan-actions > button { flex: 1 1 145px; }
  .kitting-plan-summary .panel-header { align-items: flex-start; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .kitting-plan-summary .kitting-line-actions { width: 100%; }
  .kitting-plan-summary .kitting-line-actions button { flex: 1; }
}

@media (max-width: 680px) {
  .kitting-command-bar { padding: 12px; }
  .kitting-command-title span { line-height: 1.45; }
  .kitting-command-bar .toolbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kitting-command-bar .toolbar-actions button { min-width: 0; padding: 0 8px; }
  .kitting-command-bar .button-icon { display: none; }
  .kitting-plan-list > header { min-width: 106px; }
  .kitting-plan-row { min-width: 194px; }
  .kitting-plan-item { min-height: 64px; }
  .kitting-plan-header, .kitting-result-header { min-height: auto; align-items: flex-start !important; flex-direction: column; padding-top: 12px; padding-bottom: 12px; }
  .kitting-summary-flags { width: 100%; }
  .kitting-summary-flags span { flex: 1; justify-content: center; }
  .kitting-lines-scroll { max-height: 460px; overflow-x: hidden; }
  .kitting-lines-table { min-width: 0; }
  .kitting-lines-table thead { display: none; }
  .kitting-lines-table, .kitting-lines-table tbody, .kitting-lines-table tr, .kitting-lines-table td { display: block; width: 100%; }
  .kitting-lines-table tr { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 90px; min-height: 84px; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); background: #fbfcfc; }
  .kitting-lines-table tr.selected { background: #fff4ef; box-shadow: inset 3px 0 var(--accent); }
  .kitting-lines-table td { position: static !important; height: auto; min-width: 0 !important; padding: 2px 8px; border: 0 !important; background: transparent !important; white-space: normal; }
  .kitting-lines-table td:nth-child(1) { grid-row: 1 / 4; display: grid; place-items: start center; padding-top: 4px; color: #6d777e; font-family: ui-monospace, monospace; font-weight: 700; }
  .kitting-lines-table td:nth-child(2), .kitting-lines-table td:nth-child(3), .kitting-lines-table td:nth-child(4) { display: none; }
  .kitting-lines-table td:nth-child(5) { grid-column: 2; grid-row: 1 / 3; }
  .kitting-lines-table td:nth-child(5) strong { overflow-wrap: anywhere; line-height: 1.35; }
  .kitting-lines-table td:nth-child(6) { grid-column: 2; grid-row: 3; text-align: left !important; }
  .kitting-lines-table td:nth-child(6)::before { color: #778188; content: "计划 "; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  .kitting-lines-table td:nth-child(7) { grid-column: 3; grid-row: 1; justify-self: end; }
  .kitting-lines-table td:nth-child(8) { grid-column: 3; grid-row: 2; align-self: center; justify-self: end; text-align: right !important; }
  .kitting-lines-table td:nth-child(8)::before { color: #778188; content: "缺料 "; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  .kitting-lines-table td:nth-child(9) { grid-column: 3; grid-row: 3; justify-self: end; }
  .kitting-mode-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .kitting-mode-switch button { min-width: 0; }
  .kitting-context-note { align-items: flex-start; flex-direction: column; gap: 3px; }
  .kitting-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kitting-metrics > div:nth-child(2) { border-right: 0; }
  .kitting-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .kitting-summary-tools { align-items: stretch; flex-direction: column; }
  .kitting-summary-tools .kitting-result-tabs { width: 100%; }
  .kitting-summary-tools .kitting-result-tabs button { flex: 1; padding: 0 7px; }
  .kitting-summary-search { width: 100%; }
  .kitting-result .kitting-line-actions { width: 100%; }
  .kitting-result .kitting-line-actions button { flex: 1; }
  .kitting-result-tabs { max-width: calc(100% - 20px); margin: 10px; }
  .kitting-summary-wrap, .kitting-table-scroll { max-height: 56dvh; }
  .kitting-plan-actions { align-items: stretch; }
  .kitting-plan-actions .kitting-summary-flags { flex: 1 1 100%; }
  .kitting-plan-actions #calculateKittingPlan { width: 100%; }
  .kitting-draft-backdrop { padding: 0; }
  .kitting-draft-modal { width: 100%; max-height: 100dvh; border-radius: 0; }
  .kitting-draft-head { display: grid; padding: 12px; }
  .kitting-draft-head label { width: 100%; }
  .kitting-draft-head input { width: 100%; min-width: 0; }
  .kitting-draft-table-wrap { max-height: calc(100dvh - 330px); overflow-x: hidden; }
  .kitting-draft-table { display: block; min-width: 0; }
  .kitting-draft-table thead { display: none; }
  .kitting-draft-table tbody { display: grid; }
  .kitting-draft-table tr { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) 72px; gap: 7px; padding: 10px 10px 42px; border-bottom: 1px solid var(--line); }
  .kitting-draft-table td { display: block; padding: 0; border: 0; background: transparent !important; }
  .kitting-draft-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .kitting-draft-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .kitting-draft-table td:nth-child(3), .kitting-draft-table td:nth-child(5), .kitting-draft-table td:nth-child(7), .kitting-draft-table td:nth-child(8), .kitting-draft-table td:nth-child(10) { display: none; }
  .kitting-draft-table td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .kitting-draft-table td:nth-child(6) { grid-column: 2 / 4; grid-row: 2 / 4; min-width: 0; }
  .kitting-draft-table td:nth-child(9) { grid-column: 3; grid-row: 1; }
  .kitting-draft-table td:nth-child(11) { position: absolute; right: 10px; bottom: 8px; }
  .kitting-draft-table input, .kitting-draft-table select { height: 40px; min-width: 0; font-size: 11px; }
  .kitting-draft-table td:nth-child(1)::before, .kitting-draft-table td:nth-child(4)::before, .kitting-draft-table td:nth-child(9)::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; }
  .kitting-draft-table td:nth-child(1)::before { content: "顺序"; }
  .kitting-draft-table td:nth-child(4)::before { content: "项目"; }
  .kitting-draft-table td:nth-child(9)::before { content: "数量"; }
  .kitting-draft-table tr.needs-review td:first-child { box-shadow: none; }
  .kitting-draft-table tr.needs-review { box-shadow: inset 3px 0 var(--amber); }
  .kitting-draft-modal .modal-footer { display: grid; grid-template-columns: 1fr; }
  .kitting-draft-modal .modal-footer > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .kitting-draft-modal .modal-footer button { width: 100%; }
  .kitting-more-actions { flex: 1; }
  .kitting-more-actions summary { justify-content: center; width: 100%; }
  .kitting-more-actions > div { right: 0; left: auto; width: min(220px, 84vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar { background: #fafbfb; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .modal-backdrop, .drawer-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (min-width: 1800px) {
  .display-overview-row { grid-template-columns: minmax(0, 1.7fr) minmax(900px, 1fr); }
  .display-overview-row > .display-kpis, .display-overview-row > .display-queue-panel { height: 100%; }
  .display-focus-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
  .display-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 3200px) and (min-height: 1800px) {
  body:has(#displayScreen), .main-area:has(#displayScreen) { height: 100dvh; min-height: 0; overflow: hidden; }
  .display-screen {
    height: calc(100dvh - 136px);
    min-height: 0;
    grid-template-rows: 124px 210px minmax(0, 1.72fr) minmax(0, 1fr);
    gap: 22px;
    overflow: hidden;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: 124px 210px minmax(0, 1.72fr) minmax(0, 1fr);
    align-content: stretch;
    gap: 22px;
    padding: 24px;
    overflow: hidden;
  }
  .display-head, .display-screen:is(:fullscreen, .is-fullscreen) .display-head { min-height: 0; padding: 22px 34px; }
  .display-brand, .display-screen:is(:fullscreen, .is-fullscreen) .display-brand { gap: 28px; }
  .display-brand-logo, .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-logo { width: 210px; }
  .display-brand-copy, .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy { padding-left: 28px; }
  .display-brand-copy span { font-size: 19px; }
  .display-brand-copy strong, .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy strong { margin-top: 7px; font-size: 38px; }
  .display-head-actions { gap: 24px; }
  .display-head-actions b { font-size: 25px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-head-actions small { margin-top: 6px; font-size: 17px; }
  .display-head-actions .secondary-btn { height: 48px; padding: 0 20px; font-size: 17px; }
  .display-head-actions .button-icon { width: 28px; height: 28px; }
  .display-overview-row { grid-template-columns: minmax(0, 1.72fr) minmax(1150px, 1fr); gap: 22px; min-height: 0; }
  .display-kpis { min-height: 0; }
  .display-kpis article, .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis article { display: grid; align-content: center; padding: 24px 30px; border-top-width: 5px; }
  .display-kpis span { font-size: 23px; }
  .display-kpis strong, .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis strong { margin-top: 10px; font-size: 58px; line-height: 1; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-kpis small, .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis small { margin-top: 10px; font-size: 18px; }
  .display-queue-panel { display: grid; min-height: 0; grid-template-rows: 82px minmax(0, 1fr); }
  .display-queue-panel > .panel-header, .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-panel > .panel-header { min-height: 0; padding: 0 24px; }
  .display-queue-panel > .panel-header h2 { font-size: 27px; }
  .display-queue-panel > .panel-header p { margin-top: 5px; font-size: 17px; }
  .display-queue-panel .queue-connection { font-size: 17px; }
  .display-queue-content { min-height: 0; grid-template-columns: minmax(520px, .94fr) minmax(520px, 1.06fr); }
  .display-queue-kpis > div, .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis > div { display: grid; align-content: center; padding: 16px 18px; }
  .display-queue-kpis span { font-size: 18px; }
  .display-queue-kpis strong, .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis strong { margin-top: 7px; font-size: 42px; line-height: 1; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-queue-kpis small { margin-left: 7px; font-size: 16px; }
  .display-queue-gates, .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gates { display: grid; grid-auto-rows: minmax(0, 1fr); min-height: 0; padding: 5px 22px; }
  .display-queue-gate, .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate { min-height: 0; grid-template-columns: 230px minmax(100px, 1fr) 82px; gap: 18px; }
  .display-queue-gate span strong { font-size: 19px; }
  .display-queue-gate span small { margin-top: 4px; font-size: 16px; }
  .display-queue-gate em { font-size: 22px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-queue-empty, .display-queue-unavailable { min-height: 0; font-size: 18px; }
  .display-queue-unavailable strong { font-size: 24px; }
  .display-queue-unavailable span { margin-top: 9px; }
  .display-grid { min-height: 0; gap: 22px; }
  .display-focus-grid { min-height: 0; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 22px; }
  .display-focus-grid > .panel { display: grid; height: 100%; min-height: 0; grid-template-rows: 90px minmax(0, 1fr); }
  .display-focus-grid .panel-header { min-height: 0; padding: 0 28px; }
  .display-focus-grid .panel-header h2 { font-size: 31px; }
  .display-focus-grid .panel-header p { margin-top: 6px; font-size: 19px; }
  .display-focus-grid .panel-header > strong { font-size: 28px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-focus-grid .display-queue-panel { grid-template-rows: 90px minmax(0, 1fr); }
  .display-focus-grid .display-queue-content,
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid .display-queue-content { align-self: stretch; width: 100%; height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 210px minmax(0, 1fr); }
  .display-focus-grid .display-queue-kpis { border-right: 0; border-bottom: 1px solid var(--line); }
  .display-focus-grid .display-queue-kpis span { font-size: 21px; }
  .display-focus-grid .display-queue-kpis strong { font-size: 52px; }
  .display-focus-grid .display-queue-kpis small { font-size: 18px; }
  .display-focus-grid .display-queue-gates { display: grid; align-self: stretch; width: 100%; height: 100%; min-height: 0; grid-auto-rows: unset; grid-template-rows: repeat(3, minmax(0, 1fr)); padding: 12px 30px; }
  .display-focus-grid .display-queue-gate { grid-template-columns: 300px minmax(160px, 1fr) 100px; gap: 24px; }
  .display-focus-grid .display-queue-gate span strong { font-size: 25px; }
  .display-focus-grid .display-queue-gate span small { margin-top: 7px; font-size: 19px; }
  .display-focus-grid .display-queue-gate em { font-size: 27px; }
  .display-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .display-grid.primary { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .display-grid.secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .display-grid.secondary.display-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .display-grid .panel { display: grid; height: 100%; min-height: 0; grid-template-rows: 84px minmax(0, 1fr); }
  .display-grid .panel-header { min-height: 0; padding: 0 26px; }
  .display-grid .panel-header h2 { font-size: 29px; }
  .display-grid .panel-header p { margin-top: 6px; font-size: 18px; }
  .display-grid .panel-header > strong { font-size: 25px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-occupancy { min-height: 0; gap: 24px; padding: 30px 28px; }
  .display-focus-grid .display-occupancy { grid-template-rows: 190px repeat(4, minmax(0, 1fr)); gap: 18px; }
  .display-occupancy-summary { min-height: 0; }
  .display-occupancy-summary > div { display: grid; align-content: center; padding: 20px 24px; }
  .display-occupancy-summary span { font-size: 21px; }
  .display-occupancy-summary strong { margin-top: 10px; font-size: 52px; line-height: 1; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-occupancy-summary small { margin-top: 9px; font-size: 17px; }
  .display-occupancy-row { grid-template-columns: 70px minmax(120px, 1fr) 150px 92px; gap: 16px; min-height: 0; }
  .display-occupancy-row > span { font-size: 27px; }
  .display-occupancy-row > strong { font-size: 22px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-occupancy-row > em { font-size: 25px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-meter, .display-rank-bar { height: 14px; }
  .display-ranking, .display-list { display: grid; min-height: 0; max-height: none; grid-auto-rows: minmax(0, 1fr); overflow: hidden; }
  .display-rank-row { min-height: 0; padding: 6px 24px; grid-template-columns: 46px minmax(280px, 1.25fr) minmax(180px, .75fr) 230px; gap: 22px; overflow: hidden; }
  .display-rank-row > b { width: 42px; height: 42px; font-size: 19px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-rank-row strong { font-size: 23px; }
  .display-rank-row small { margin-top: 5px; font-size: 17px; }
  .display-rank-row > em { font-size: 20px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-list-row { min-height: 0; padding: 7px 24px; grid-template-columns: minmax(280px, 1fr) minmax(230px, .72fr) 112px; gap: 22px; overflow: hidden; }
  .display-list-row strong { font-size: 22px; }
  .display-list-row small { margin-top: 5px; font-size: 17px; }
  .display-list-row > span:nth-child(2) strong, .display-list-row > em { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
  .display-list-row > em { font-size: 19px; }
  .display-list-row.age > em { padding: 7px 9px; }
  .display-detail-grid .display-rank-row { grid-template-columns: 46px minmax(0, 1fr) 185px; gap: 18px; }
  .display-detail-grid .display-rank-bar { display: none; }
  .display-detail-grid .display-rank-row strong, .display-detail-grid .display-list-row strong { font-size: 22px; }
  .display-detail-grid .display-rank-row small, .display-detail-grid .display-list-row small { font-size: 16px; }
  .display-detail-grid .display-rank-row > em, .display-detail-grid .display-list-row > em { font-size: 18px; }
  .display-empty { min-height: 0; height: 100%; padding: 24px; }
  .display-empty strong { font-size: 23px; }
  .display-empty span { margin-top: 9px; font-size: 18px; }
}

/* Display-only control-room theme. Keeps the operational app and PDA palette unchanged. */
.display-screen {
  --ink: #f1f5ff;
  --muted: #93a1c5;
  --line: #28375d;
  --panel: #111a36;
  --canvas: #080e20;
  --green: #43d18b;
  --green-soft: #123a31;
  --red: #ff766d;
  --red-soft: #44232d;
  --accent: #ef7548;
  position: relative;
  isolation: isolate;
  padding: 14px;
  border: 1px solid #25345d;
  border-radius: 8px;
  background: #080e20;
  color: #f1f5ff;
  box-shadow: inset 0 1px 0 rgba(151, 174, 255, .08), 0 18px 48px rgba(12, 18, 42, .18);
}
.display-screen:is(:fullscreen, .is-fullscreen) {
  border: 0;
  border-radius: 0;
  background: #080e20;
  box-shadow: none;
}
.display-screen .display-head {
  border: 1px solid #2b3a65;
  background: #141d3b;
  box-shadow: inset 0 1px 0 rgba(158, 180, 255, .08), 0 12px 28px rgba(3, 7, 20, .24);
}
.display-screen .display-brand-copy { border-left-color: #34446f; }
.display-screen .display-brand-copy span { color: #91a1ca; }
.display-screen .display-brand-copy strong { color: #f5f7ff; }
.display-live-state { display: inline-flex; align-items: center; gap: 8px; flex: none; color: #65e7a4; font-size: 12px; font-weight: 800; }
.display-live-state i { width: 8px; height: 8px; border-radius: 50%; background: #43d18b; box-shadow: 0 0 0 4px rgba(67, 209, 139, .1); }
.display-screen .display-head-actions b { color: #f5f7ff; }
.display-screen .display-head-actions small { color: #8392b8; }
.display-screen .display-head-actions .secondary-btn {
  border-color: #3a4b79;
  background: #1b264a;
  color: #e8edff;
  box-shadow: inset 0 1px 0 rgba(166, 186, 255, .08);
}
.display-screen .display-head-actions .secondary-btn:hover { border-color: #52689c; background: #22305a; }
.display-screen .display-head-actions .button-icon { border-color: #435783; filter: saturate(.7) brightness(1.15); }
.display-screen .display-kpis,
.display-screen .panel {
  border-color: #28375d;
  background: #111a36;
  box-shadow: inset 0 1px 0 rgba(155, 178, 255, .055), 0 10px 24px rgba(3, 7, 20, .16);
}
.display-screen .display-kpis article { border-right-color: #28375d; background: #111a36; }
.display-screen .display-kpis article:nth-child(1) { border-top-color: #43d18b; }
.display-screen .display-kpis article:nth-child(2) { border-top-color: #6f8fff; }
.display-screen .display-kpis article:nth-child(3) { border-top-color: #ef7548; }
.display-screen .display-kpis article:last-child { border-top-color: #ff766d; }
.display-screen .display-kpis span,
.display-screen .display-kpis small { color: #8998bf; }
.display-screen .display-kpis strong { color: #f5f7ff; text-shadow: 0 0 22px rgba(111, 143, 255, .13); }
.display-screen .panel-header { border-bottom-color: #28375d; }
.display-screen .panel-header h2 { color: #f1f5ff; }
.display-screen .panel-header p { color: #7f8db2; }
.display-screen .panel-header > strong { color: #7fe2ae; }
.display-screen .queue-connection.online { color: #65e7a4; }
.display-screen .queue-connection.online i { background: #43d18b; box-shadow: 0 0 0 4px rgba(67, 209, 139, .1); }
.display-screen .display-queue-kpis { border-right-color: #28375d; border-bottom-color: #28375d; }
.display-screen .display-queue-kpis > div { border-right-color: #28375d; }
.display-screen .display-queue-kpis span,
.display-screen .display-queue-kpis small { color: #8796bd; }
.display-screen .display-queue-kpis strong { color: #f5f7ff; }
.display-screen .display-occupancy-summary { border-bottom-color: #28375d; }
.display-screen .display-occupancy-summary > div { border-right-color: #28375d; }
.display-screen .display-occupancy-summary span,
.display-screen .display-occupancy-summary small { color: #8796bd; }
.display-screen .display-occupancy-summary strong { color: #f5f7ff; }
.display-screen .display-meter,
.display-screen .display-rank-bar { background: #253052; }
.display-screen .display-meter i { background: linear-gradient(90deg, #2ebf78, #59dfa0); }
.display-screen .display-rank-bar i { background: linear-gradient(90deg, #5677ee, #7d9aff); }
.display-screen .display-occupancy-row > span,
.display-screen .display-occupancy-row > strong { color: #dce4ff; }
.display-screen .display-occupancy-row > em,
.display-screen .display-queue-gate em { color: #65e7a4; }
.display-screen .display-queue-gate,
.display-screen .display-rank-row,
.display-screen .display-list-row { border-bottom-color: #243256; }
.display-screen .display-queue-gate span strong,
.display-screen .display-rank-row strong,
.display-screen .display-list-row strong { color: #eef3ff; }
.display-screen .display-queue-gate span small,
.display-screen .display-rank-row small,
.display-screen .display-list-row small { color: #7f8db2; }
.display-screen .display-rank-row > b { background: #202c50; color: #9cb0ed; }
.display-screen .display-rank-row > em { color: #b8c5e8; }
.display-screen .display-list-row > span:nth-child(2) strong { color: #dce6ff; }
.display-screen .display-list-row .tag.green { background: #153d33; color: #65e7a4; }
.display-screen .display-list-row.age > em { background: #44232d; color: #ff8b82; }
.display-screen .display-empty strong,
.display-screen .display-queue-unavailable strong { color: #e9efff; }
.display-screen .display-empty span,
.display-screen .display-queue-empty,
.display-screen .display-queue-unavailable { color: #7f8db2; }

@media (min-width: 3200px) and (min-height: 1800px) {
  .display-screen { padding: 22px; }
  .display-screen:is(:fullscreen, .is-fullscreen) { padding: 24px; }
  .display-live-state { gap: 12px; font-size: 20px; }
  .display-live-state i { width: 12px; height: 12px; box-shadow: 0 0 0 6px rgba(67, 209, 139, .1); }
}

/* 75-inch 4K displays commonly expose 1920x1080 or 2560x1440 CSS pixels after OS scaling. */
@media (min-width: 1600px) and (min-height: 900px) and (max-width: 3199px),
       (min-width: 3200px) and (min-height: 900px) and (max-height: 1799px) {
  body:has(#displayScreen.is-fullscreen),
  .main-area:has(#displayScreen.is-fullscreen) { height: 100dvh; min-height: 0; overflow: hidden; }
  .display-screen:is(:fullscreen, .is-fullscreen) {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: minmax(0, 7fr) minmax(0, 10fr) minmax(0, 45fr) minmax(0, 30fr);
    grid-auto-rows: unset;
    align-content: stretch;
    gap: 12px;
    padding: 14px;
    overflow: hidden;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-head { min-height: 0; padding: 10px 18px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-brand { gap: 18px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-logo { width: 122px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy { padding-left: 18px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy span { font-size: 11px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-brand-copy strong { margin-top: 4px; font-size: 23px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-live-state { font-size: 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-head-actions b { font-size: 17px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-head-actions small { font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-head-actions .secondary-btn { height: 36px; padding: 0 13px; font-size: 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis { min-height: 0; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis article { display: grid; align-content: center; padding: 10px 18px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis span { font-size: 13px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis strong { margin-top: 4px; font-size: 34px; line-height: 1; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-kpis small { margin-top: 5px; font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid {
    min-height: 0;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 12px;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid > .panel {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: 56px minmax(0, 1fr);
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid .panel-header { min-height: 0; padding: 0 18px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid .panel-header h2 { font-size: 17px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid .panel-header p { margin-top: 3px; font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-focus-grid .panel-header > strong { font-size: 16px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy {
    min-height: 0;
    grid-template-rows: 104px repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 12px 14px;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-summary { min-height: 0; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-summary > div { display: grid; align-content: center; padding: 9px 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-summary span { font-size: 11px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-summary strong { margin-top: 4px; font-size: 27px; line-height: 1; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-summary small { margin-top: 4px; font-size: 9px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-row { min-height: 0; grid-template-columns: 46px minmax(80px, 1fr) 88px 54px; gap: 8px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-row > span { font-size: 14px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-row > strong { font-size: 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-occupancy-row > em { font-size: 13px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-meter { height: 8px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-content {
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis { min-height: 0; border-right: 1px solid var(--line); border-bottom: 0; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis > div { display: grid; align-content: center; padding: 8px 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis span { font-size: 11px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis strong { margin-top: 4px; font-size: 27px; line-height: 1; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-kpis small { margin-left: 4px; font-size: 9px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gates {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-auto-rows: unset;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    padding: 4px 14px;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate { min-height: 0; grid-template-columns: 150px minmax(80px, 1fr) 62px; gap: 11px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate span strong { font-size: 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate span small { margin-top: 3px; font-size: 9px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-queue-gate em { font-size: 13px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid {
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid > .panel {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: 52px minmax(0, 1fr);
  }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .panel-header { min-height: 0; padding: 0 14px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .panel-header h2 { font-size: 15px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .panel-header p { margin-top: 2px; font-size: 9px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .panel-header > strong { font-size: 14px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-ranking,
  .display-screen:is(:fullscreen, .is-fullscreen) .display-list { display: grid; min-height: 0; max-height: none; grid-auto-rows: minmax(0, 1fr); overflow: hidden; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-row { min-height: 0; padding: 3px 12px; grid-template-columns: 28px minmax(0, 1fr) 112px; gap: 10px; overflow: hidden; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-bar { display: none; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-row > b { width: 26px; height: 26px; font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-row strong,
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-list-row strong { font-size: 12px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-row small,
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-list-row small { margin-top: 2px; font-size: 9px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-rank-row > em { font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-list-row { min-height: 0; padding: 3px 12px; grid-template-columns: minmax(0, 1fr) 104px 66px; gap: 10px; overflow: hidden; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-list-row > em { font-size: 10px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-detail-grid .display-list-row.age > em { padding: 4px 5px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-empty { min-height: 0; height: 100%; padding: 16px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-empty strong { font-size: 14px; }
  .display-screen:is(:fullscreen, .is-fullscreen) .display-empty span { margin-top: 5px; font-size: 10px; }
}

/* Keep mobile console rules last so legacy responsive declarations cannot override them. */
@media (max-width: 680px) {
  body { min-width: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar { z-index: 45; height: 56px; padding: 0 10px; }
  .mobile-menu { display: inline-flex; min-width: 44px; height: 44px; padding: 0 10px; }
  .assistant-trigger { width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; }
  .sidebar { z-index: 70; width: min(320px, 88vw); }
  .mobile-nav-scrim { z-index: 60; }
  .workspace { padding: 12px 10px calc(22px + env(safe-area-inset-bottom)); }
  .page-stack { gap: 10px; }
  .page-toolbar { align-items: stretch; gap: 8px; }
  .page-toolbar .summary { display: flex; }
  .metric-grid,
  .mini-stats,
  .capacity-stats,
  .headrest-capacity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric,
  .mini-stat { min-height: 98px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(odd),
  .mini-stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric:last-child,
  .mini-stat:last-child { border-bottom: 0; }
  .metric-value strong { font-size: 24px; }
  .toolbar-actions,
  .location-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .toolbar-actions .filter-input,
  .location-actions .filter-input { grid-column: 1 / -1; width: 100%; min-width: 0; height: 44px; }
  .toolbar-actions .secondary-btn,
  .toolbar-actions .primary-btn,
  .toolbar-actions .select-input,
  .location-actions .secondary-btn,
  .location-actions .primary-btn,
  .location-actions .select-input { width: 100%; min-width: 0; height: 44px; }
  .operation-command { min-height: 0; padding: 11px; }
  .capture-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capture-module { min-height: 66px; }
  .mobile-record-scroll { overflow: visible; }
  .mobile-record-table { display: block; min-width: 0; }
  .mobile-record-table thead { display: none; }
  .mobile-record-table tbody { display: grid; }
  .mobile-record-table tr { display: grid; }
  .mobile-record-table td { display: grid; width: 100%; min-width: 0; height: auto; min-height: 35px; white-space: normal; }
  .modal { max-height: calc(100dvh - 10px); }
  .toast-region { right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); left: 10px; }
}

@media (max-width: 340px) {
  .toolbar-actions,
  .location-actions,
  .capture-modules { grid-template-columns: 1fr; }
  .toolbar-actions .filter-input,
  .location-actions .filter-input { grid-column: 1; }
}
