:root {
  color-scheme: light;
  --navy-950: #082642;
  --navy-900: #0c355b;
  --navy-800: #104574;
  --blue-700: #1561aa;
  --blue-600: #1976c7;
  --aqua-600: #009da9;
  --aqua-500: #13b8bd;
  --aqua-100: #dcf7f7;
  --ink: #102f4a;
  --muted: #687f91;
  --muted-2: #8a9ba8;
  --line: #d9e5ec;
  --line-strong: #c7d8e2;
  --surface: #fff;
  --surface-2: #f6f9fb;
  --page: #edf3f7;
  --green: #16835f;
  --green-soft: #e6f6ef;
  --amber: #a9690f;
  --amber-soft: #fff3dc;
  --red: #bd493e;
  --red-soft: #fff0ed;
  --shadow-sm: 0 5px 18px rgb(8 38 66 / 5%);
  --shadow-md: 0 18px 48px rgb(8 38 66 / 14%);
  --radius: 14px;
  --font-body: 'Poppins', Arial, sans-serif;
  --font-display: 'Manrope', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font: 14px/1.5 var(--font-body); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, input, select, textarea { color: inherit; }
button { border: 0; }
a { color: var(--blue-700); text-decoration: none; }
img { display: block; max-width: 100%; }
svg { vertical-align: middle; }
h1, h2, h3, h4, p, dl, figure { margin-top: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); }
h1 { margin-bottom: 0; font-size: 25px; font-weight: 800; line-height: 1.25; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -.035em; }
h3 { margin-bottom: 5px; font-size: 16px; font-weight: 800; line-height: 1.4; }
h4 { margin-bottom: 10px; font-size: 14px; font-weight: 800; }
p { margin-bottom: 14px; }
strong, b { font-weight: 600; }
small, .small { font-size: 11px; line-height: 1.55; }
code, pre { font-family: Consolas, 'Courier New', monospace; }
code { font-size: 12px; overflow-wrap: anywhere; }
pre { padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
hr, .divider { height: 1px; margin: 20px 0; border: 0; background: var(--line); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--aqua-600); outline-offset: 3px; }
::selection { background: #c9eff1; color: var(--navy-950); }
.icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 7px; color: var(--aqua-600); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.button, .icon-button, .text-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.button .icon { width: 18px; height: 18px; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-strong); }
.button.primary, button.primary { border-color: var(--blue-700); background: var(--blue-700); color: #fff; box-shadow: 0 3px 8px rgb(21 97 170 / 12%); }
.button.primary:hover:not(:disabled), button.primary:hover:not(:disabled) { border-color: var(--navy-800); background: var(--navy-800); }
.button.soft, button.soft { border-color: #cfe1f2; background: #edf5fd; color: var(--blue-700); }
.button.soft:hover:not(:disabled), button.soft:hover:not(:disabled) { border-color: #adcee9; background: #e3effb; }
.button.ghost, button.ghost { border-color: var(--line); background: #fff; }
.button.danger, button.danger { border-color: #edc2bb; background: var(--red-soft); color: var(--red); }
.button.danger:hover:not(:disabled), button.danger:hover:not(:disabled) { border-color: #dea49c; background: #ffe4df; }
.button.success, button.success { border-color: #bee4d3; background: var(--green-soft); color: var(--green); }
.icon-button, .button.icon-button { width: 44px; min-width: 44px; padding: 10px; background: transparent; color: var(--muted); }
.text-button, .button.text-button { padding-inline: 3px; background: transparent; color: var(--blue-700); }
.text-button:hover:not(:disabled), .button.text-button:hover:not(:disabled) { border-color: transparent; background: transparent; color: var(--navy-900); }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 25px; padding: 4px 9px; border-radius: 6px; background: #edf2f6; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.35; vertical-align: middle; }
.status-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.success { background: var(--green-soft); color: var(--green); }
.badge.warning { background: var(--amber-soft); color: var(--amber); }
.badge.danger, .badge.error { background: var(--red-soft); color: var(--red); }
.badge.info { background: #eaf3fc; color: var(--blue-700); }
.dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.red { background: var(--red); }

/* Application frame and navigation. */
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 24px 16px 16px; background: linear-gradient(180deg, var(--navy-950), #0a3457); color: #fff; }
.brand { display: grid; align-content: center; justify-items: center; flex: 0 0 auto; width: 100%; min-height: 79px; padding: 12px 11px 10px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 13px; background: #fff; }
.brand img { width: 162px; max-height: 43px; object-fit: contain; }
.brand span { margin-top: 5px; color: var(--navy-800); font: 800 9px/1.4 var(--font-display); letter-spacing: .22em; }
.sidebar nav { display: flex; flex: 1; flex-direction: column; min-height: 0; margin-top: 27px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #366080 transparent; }
.sidebar nav > p { margin: 0 12px 10px; color: #8eb0c8; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.sidebar nav > button { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; flex: 0 0 auto; gap: 10px; width: 100%; min-height: 49px; margin-bottom: 4px; padding: 0 12px; border-radius: 10px; background: transparent; color: #c8d9e5; text-align: left; }
.sidebar nav > button .icon { width: 19px; height: 19px; color: #92b5cd; }
.sidebar nav > button span { font-size: 12px; font-weight: 500; }
.sidebar nav > button em { display: grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 6px; background: #e8a444; color: var(--navy-950); font-size: 10px; font-style: normal; font-weight: 700; }
.sidebar nav > button:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.sidebar nav > button.active { background: linear-gradient(100deg, rgb(25 187 194 / 27%), rgb(255 255 255 / 9%)); color: #fff; box-shadow: inset 3px 0 var(--aqua-500); }
.sidebar nav > button.active .icon { color: #61e4df; }
.sidebar nav > button:focus-visible, .sidebar-bottom button:focus-visible { outline-color: #67dfdf; }
.sidebar-bottom { flex: 0 0 auto; margin-top: 18px; }
.test-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 59px; margin-bottom: 11px; padding: 10px; border: 1px solid rgb(255 200 105 / 23%); border-radius: 10px; background: rgb(248 168 39 / 8%); text-align: left; }
.test-toggle b, .test-toggle small, .profile-button b, .profile-button small { display: block; }
.test-toggle b { color: #ffe0aa; font-size: 11px; }
.test-toggle small { margin-top: 2px; color: #aebfcc; font-size: 9px; }
.toggle-indicator { position: relative; flex: 0 0 auto; width: 27px; height: 16px; border: 1px solid #6d7f8c; border-radius: 10px; background: #42566a; }
.toggle-indicator::before { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #d5e1e8; content: ''; transition: transform .15s; }
.toggle-indicator.on { border-color: #e8a444; background: #e8a444; }
.toggle-indicator.on::before { transform: translateX(11px); background: #fff; }
.profile-button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 61px; padding: 10px 8px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 10px; background: rgb(255 255 255 / 5%); color: #fff; text-align: left; }
.profile-button > i { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 35px; border-radius: 9px; background: #185079; color: #bdebf2; }
.profile-button > i .icon { width: 18px; height: 18px; }
.profile-button > span { flex: 1; min-width: 0; }
.profile-button b { font-size: 10px; }
.profile-button small { margin-top: 2px; color: #a8c1d2; font-size: 8px; }
.profile-button > .icon { width: 13px; height: 13px; color: #8eacbf; }
.connection { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 16px 0 0; color: #94b2c7; font-size: 9px; white-space: nowrap; }
.connection .icon { width: 12px; height: 12px; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 20px; min-height: 92px; padding: 18px 30px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar > div:first-child { min-width: 0; }
.topbar > div > p { margin: 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .13em; }
.top-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; }
.date-label { margin-right: 9px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.content { flex: 1; min-width: 0; padding: 27px 30px 30px; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 30px; color: var(--muted); font-size: 9px; }
.workspace-footer > span { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.workspace-footer .icon { width: 12px; height: 12px; }
.workspace-footer b { color: var(--blue-700); }
.test-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px 16px; min-height: 36px; padding: 8px 16px; border-bottom: 1px solid #ead3a4; background: #fff1d1; color: #855209; font-size: 10px; }
.test-banner b { font-size: 9px; letter-spacing: .08em; }
.section-intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.section-intro > div:first-child { min-width: 0; }
.section-intro > div > span { display: block; color: var(--muted); font-size: 12px; }
.header-actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.header-actions { justify-content: flex-end; }
.header-actions select { min-width: 160px; width: auto; }

/* Dashboard and four preparation stations. */
.equipment-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: center; gap: 14px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.equipment-strip > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.equipment-strip > div > .icon { color: var(--muted); }
.equipment-strip > div > span { display: flex; align-items: flex-start; flex-direction: column; gap: 3px; min-width: 0; }
.equipment-strip b { color: var(--ink); font-size: 10px; }
.equipment-strip .badge { min-height: 20px; padding: 2px 6px; font-size: 9px; }
.equipment-strip > .icon-button { margin-right: -5px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metrics > article { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 103px; padding: 19px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.metrics > article > i { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 12px; }
.metrics > article > i .icon { width: 22px; height: 22px; }
.metrics > article > div { min-width: 0; }
.metrics article div > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.metrics strong { display: block; color: var(--navy-900); font: 800 28px/1.15 var(--font-display); letter-spacing: -.04em; }
.metrics strong small { color: var(--muted); font: 500 11px/1.5 var(--font-body); letter-spacing: 0; }
.tint-blue { background: #e9f2fc; color: var(--blue-700); }
.tint-aqua { background: #e3f6f4; color: #078a89; }
.tint-amber { background: var(--amber-soft); color: var(--amber); }
.tint-navy { background: #eaf0f7; color: var(--navy-800); }
.scan-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 13px 16px; border: 1px solid #c6dce8; border-radius: 12px; background: #f8fcff; }
.scan-bar > label { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 9px; margin: 0; color: var(--navy-800); }
.scan-bar > label .icon { color: var(--blue-700); }
.scan-bar > label b { font-size: 11px; }
.scan-bar > select { flex: 0 1 210px; width: 210px; min-width: 140px; }
.scan-bar form { display: flex; flex: 1; gap: 8px; min-width: 0; }
.scan-bar input { flex: 1; min-width: 0; background: #fff; font-size: 12px; }
.station-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.tabs { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #e6eef4; }
.tabs > button { flex: 1 0 auto; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; }
.tabs > button.active { border-color: #d8e3eb; background: #fff; color: var(--blue-700); box-shadow: 0 2px 5px rgb(8 38 66 / 4%); }
.tabs > button:hover:not(.active) { background: rgb(255 255 255 / 45%); color: var(--ink); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 9px; }
.legend .dot:not(:first-child) { margin-left: 9px; }
.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 18px; margin-bottom: 22px; }
.station-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.station-card.selected { border-color: #9fc9e8; box-shadow: 0 0 0 1px #cce2f2, var(--shadow-sm); }
.station-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 71px; padding: 14px 19px; border-bottom: 1px solid #e7eef3; }
.station-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.station-number { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 37px; border: 1px solid #d7e5f0; border-radius: 10px; background: #edf4fa; color: var(--blue-700); font: 800 16px var(--font-display); }
.station-card.selected .station-number { border-color: var(--blue-700); background: var(--blue-700); color: #fff; }
.station-title h3 { margin: 0 0 2px; font-size: 15px; }
.station-title span { color: var(--muted); font-size: 9px; }
.station-card > header > .badge { flex-shrink: 0; }
.station-worker { display: flex; align-items: center; gap: 10px; min-height: 71px; margin: 0 19px; padding: 12px 0; border-bottom: 1px solid #edf2f6; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: #e2f2f2; color: #087b80; font: 800 11px var(--font-display); }
.avatar.empty-avatar { background: #f0f4f7; color: #8396a6; }
.avatar.empty-avatar .icon { width: 17px; height: 17px; }
.avatar.big { width: 51px; height: 51px; border-radius: 14px; font-size: 16px; }
.station-worker > span:nth-child(2) { flex: 1; min-width: 0; }
.station-worker b, .station-worker small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-worker b { font-size: 11px; }
.station-worker small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.station-worker > .icon-button { width: 38px; min-width: 38px; margin-right: -8px; }
.station-empty { display: flex; align-items: center; justify-content: center; flex: 1; flex-direction: column; min-height: 193px; padding: 22px 25px; text-align: center; }
.scan-illustration { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border: 1px solid #e2ebf2; border-radius: 13px; background: #f5f9fc; color: #5e87a6; }
.scan-illustration .icon { width: 25px; height: 25px; }
.station-empty > b { margin-bottom: 5px; color: var(--navy-900); font: 800 14px var(--font-display); }
.station-empty p { max-width: 285px; margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.station-empty > .button { min-height: 44px; font-size: 10px; }
.station-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 16px; border-top: 1px solid #e7eef3; background: #fbfcfd; }
.camera-state { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; }
.camera-state .icon { width: 14px; height: 14px; }
.station-card > footer > div { display: flex; flex: 0 0 auto; gap: 3px; }
.station-card > footer .icon-button { width: 36px; min-width: 36px; padding-inline: 7px; }
.station-card > footer .icon-button .icon { width: 17px; height: 17px; }
.session-body { display: flex; flex: 1; flex-direction: column; min-height: 193px; padding: 15px 19px 16px; }
.session-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.session-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.session-meta .icon { width: 14px; height: 14px; }
.session-meta b { color: var(--navy-800); font-size: 10px; font-variant-numeric: tabular-nums; }
.line-list { display: grid; gap: 6px; max-height: 259px; margin-bottom: 13px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.product-line { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 61px; padding: 10px 11px; border: 1px solid #e4ecf2; border-radius: 9px; background: #fbfcfe; text-align: left; }
.product-line:hover { border-color: #adcde4; background: #f3f8fc; }
.line-state { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 30px; border-radius: 7px; background: #edf2f6; color: var(--muted); }
.line-state .icon { width: 16px; height: 16px; }
.line-state.valid { background: var(--green-soft); color: var(--green); }
.line-state.error { background: var(--red-soft); color: var(--red); }
.line-state.pending, .line-state.uncertain { background: var(--amber-soft); color: var(--amber); }
.product-line > span { flex: 1; min-width: 0; }
.product-line b { display: block; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.product-line small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.product-line > strong { flex: 0 0 auto; color: var(--navy-800); font: 800 18px var(--font-display); font-variant-numeric: tabular-nums; }
.product-line > strong em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.progress-track { height: 5px; margin-top: auto; overflow: hidden; border-radius: 99px; background: #e9eff4; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--aqua-600); transition: width .25s; }
.station-warning, .station-ready { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; padding: 9px 10px; border-radius: 7px; background: var(--amber-soft); color: #95600e; font-size: 9px; line-height: 1.55; }
.station-warning .icon, .station-ready .icon { width: 14px; height: 14px; margin-top: 1px; }
.station-ready { background: var(--green-soft); color: var(--green); }
.visual-observation { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0 0; padding: 10px 11px; border: 1px solid #d1e5ec; border-radius: 8px; background: #eff8fa; color: #477385; font-size: 10px; line-height: 1.65; }
.visual-observation .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--aqua-600); }
.visual-observation > span { min-width: 0; overflow-wrap: anywhere; }
.visual-observation b { color: var(--navy-800); }
.setup-note { display: flex; align-items: center; gap: 15px; margin: 0 0 22px; padding: 18px 20px; border: 1px solid #cce0e9; border-radius: 12px; background: #eaf5f9; }
.setup-note > .icon { width: 24px; height: 24px; color: var(--aqua-600); }
.setup-note > div { flex: 1; min-width: 0; }
.setup-note b { display: block; margin-bottom: 3px; color: var(--navy-800); font-size: 12px; }
.setup-note p { margin: 0; color: #54758a; font-size: 10px; line-height: 1.65; }
.setup-note > .button { background: rgb(255 255 255 / 72%); font-size: 10px; }

/* Reusable panels, tables, records and charts. */
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 72px; padding: 19px 22px; border-bottom: 1px solid #e9eff4; }
.panel-head h3 { margin-bottom: 0; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-head > .icon { color: var(--aqua-600); }
.panel-body { padding: 20px 22px; }
.panel-body > p { color: var(--muted); font-size: 11px; line-height: 1.75; }
.panel-body > p strong { color: var(--ink); }
.panel-body > .button { margin: 0 5px 9px 0; }
.panel-body > .badge { margin-bottom: 12px; }
.panel-body > label { margin-bottom: 15px; }
.empty { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 245px; padding: 35px 24px; text-align: center; }
.empty > .icon { width: 42px; height: 42px; margin-bottom: 15px; padding: 8px; border-radius: 12px; background: #eef5f9; color: #6e91ac; }
.empty h3 { margin-bottom: 6px; font-size: 15px; }
.empty p { max-width: 470px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.empty > .button { margin-top: 19px; }
.empty.compact { min-height: 125px; padding: 23px 18px; }
.empty.compact > .icon { width: 34px; height: 34px; margin-bottom: 10px; padding: 6px; }
.activity-panel .empty { min-height: 144px; padding: 24px; }
.activity-panel .empty > .icon { width: 34px; height: 34px; margin-bottom: 9px; padding: 6px; }
.activity-panel .empty h3 { font-size: 12px; }
.activity-panel .empty p { font-size: 10px; }
.activity-list { padding: 0 22px; }
.activity-list > div { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 11px 0; border-bottom: 1px solid #ecf1f5; }
.activity-list > div:last-child { border-bottom: 0; }
.activity-list > div > .icon { width: 16px; height: 16px; color: #7b98ae; }
.activity-list > div > span { flex: 1; min-width: 0; }
.activity-list b, .activity-list small { display: block; }
.activity-list b { font-size: 11px; }
.activity-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.activity-list time { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.search-bar { display: flex; align-items: center; gap: 11px; width: min(430px, 100%); min-height: 46px; margin-bottom: 19px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; }
.search-bar > .icon { width: 18px; height: 18px; color: #7b94a7; }
.search-bar input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 11px; }
.search-bar:focus-within { border-color: var(--aqua-600); box-shadow: 0 0 0 3px rgb(0 157 169 / 9%); }
.search-bar input:focus { outline: 0; box-shadow: none; }
.filters-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 19px; }
.filters-row .search-bar { flex: 1; margin-bottom: 0; }
.filters-row > select { width: 240px; min-height: 46px; margin-left: auto; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) var(--surface-2); }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f7fafc; }
th { padding: 14px 19px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .035em; white-space: nowrap; }
td { padding: 16px 19px; border-bottom: 1px solid #e9eff4; color: #456078; font-size: 11px; line-height: 1.6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfe; }
td > strong { display: block; color: var(--ink); font-size: 11px; }
td > small { display: block; max-width: 300px; margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
td .badge { white-space: nowrap; }
td .row-actions { flex-wrap: nowrap; justify-content: flex-end; }
td .button { min-height: 44px; padding: 9px 12px; font-size: 10px; white-space: nowrap; }
td .icon-button { width: 38px; min-width: 38px; padding-inline: 8px; }
.product-name { display: flex; align-items: center; gap: 10px; min-width: 175px; }
.product-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 37px; border: 1px solid #e0eaf1; border-radius: 9px; background: #f5f9fc; color: #678ba6; }
.product-icon .icon { width: 19px; height: 19px; }
.product-name strong, .product-name small { display: block; }
.product-name strong { color: var(--ink); font-size: 11px; }
.product-name small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.info-grid, .help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.help-grid { margin-top: 0; margin-bottom: 22px; }
.info-card { padding: 23px; }
.info-card > .icon { width: 26px; height: 26px; margin-bottom: 12px; color: var(--aqua-600); }
.info-card h3 { margin-bottom: 9px; font-size: 15px; }
.info-card p { margin-bottom: 11px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.info-card p:last-child { margin-bottom: 0; }
.info-card p strong { color: var(--ink); font-size: 11px; }
.info-card .row-actions { margin-top: 12px; }
.info-card .row-actions + p { margin-top: 15px; }
.info-card .button { font-size: 10px; }
.step-number { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 14px; border-radius: 9px; background: #e9f4f7; color: var(--aqua-600); font: 800 14px var(--font-display); }
.worker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.worker-card { padding: 21px; }
.worker-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.worker-card > h3 { margin-bottom: 4px; font-size: 16px; overflow-wrap: anywhere; }
.worker-card > p { color: var(--muted); font-size: 10px; }
.worker-card dl { margin: 20px 0; }
.worker-card dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf2f6; }
.worker-card dt { color: var(--muted); font-size: 9px; }
.worker-card dd { margin: 0; color: var(--navy-800); font-size: 10px; font-weight: 600; text-align: right; }
.worker-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.worker-actions > .button { flex: 1; padding-inline: 10px; font-size: 10px; }
.stats-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 22px; }
.bar-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 15px; min-height: 255px; padding: 32px 30px 24px; }
.bar-chart > div { display: flex; align-items: center; justify-content: flex-end; flex: 1; flex-direction: column; gap: 8px; }
.bar-chart strong { color: var(--navy-800); font-size: 11px; font-variant-numeric: tabular-nums; }
.bar-chart i { display: block; width: min(45px, 100%); min-height: 3px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #1aafbb, #1988b6); }
.bar-chart span { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.breakdown { padding: 9px 22px; }
.breakdown > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 51px; padding: 10px 0; border-bottom: 1px solid #ecf1f5; font-size: 11px; }
.breakdown > div:last-child { border-bottom: 0; }
.breakdown > div b { display: grid; place-items: center; min-width: 27px; height: 25px; padding-inline: 6px; border-radius: 6px; background: #edf4f9; color: var(--blue-700); font-size: 11px; }

/* Hardware settings and accessible forms. */
label, .field { display: flex; flex-direction: column; gap: 7px; color: #49647a; font-size: 11px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 400; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
select { padding-right: 25px; }
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8297a8; opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--aqua-600); box-shadow: 0 0 0 3px rgb(0 157 169 / 10%); }
input:disabled, select:disabled, textarea:disabled { background: #f1f5f8; color: var(--muted); cursor: not-allowed; }
input[type='file'] { padding: 7px; background: #f8fbfd; font-size: 11px; }
input[type='file']::file-selector-button { min-height: 32px; margin-right: 10px; padding: 6px 11px; border: 0; border-radius: 6px; background: #e7f0f8; color: var(--blue-700); font: 500 10px var(--font-body); cursor: pointer; }
input[type='checkbox'], input[type='radio'] { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--blue-700); }
input[type='range'] { padding-inline: 0; accent-color: var(--aqua-600); }
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] { border-color: var(--red); }
form > label, form > .field { margin-bottom: 16px; }
form > p { color: var(--muted); font-size: 11px; }
fieldset { min-width: 0; margin: 0 0 18px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 6px; color: var(--navy-800); font-size: 11px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-bottom: 18px; }
.form-grid > .wide, .form-grid > .full, .form-grid > .span-2, .form-grid > .full-width { grid-column: 1 / -1; }
.form-grid small, label > small, .field > small { color: var(--muted); font-size: 10px; font-weight: 400; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-actions > .danger { margin-right: auto; }
.check-label { display: flex; align-items: flex-start; flex-direction: row; gap: 9px; min-height: 44px; padding: 11px 0; color: var(--ink); font-size: 11px; line-height: 1.6; cursor: pointer; }
.check-label input { margin-top: 1px; }
.check-label > span { flex: 1; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); align-items: start; gap: 20px; }
.settings-stack { display: grid; gap: 18px; }
.camera-config { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 16px; padding-bottom: 20px; }
.camera-config + .camera-config { padding-top: 20px; border-top: 1px solid var(--line); }
.camera-preview { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; align-self: start; min-width: 0; min-height: 150px; overflow: hidden; border: 1px solid #d4e1eb; border-radius: 10px; aspect-ratio: 4 / 3; background: #e8eff5; color: #7993a7; }
.camera-preview > .icon { width: 29px; height: 29px; }
.camera-preview > span { font-size: 9px; }
.camera-preview video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0d2234; }
.roi-overlay { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; pointer-events: none; }
.roi-overlay > span { display: flex; align-items: flex-end; padding: 10px; color: #4f7693; font: 800 10px var(--font-display); }
.roi-overlay > span + span { border-left: 1px dashed #91acbf; }
.camera-preview:has(video) .roi-overlay > span { color: #fff; text-shadow: 0 1px 3px #000; }
.camera-preview:has(video) .roi-overlay > span + span { border-left-color: rgb(255 255 255 / 65%); }
.camera-fields { min-width: 0; }
.camera-fields h4 { font-size: 12px; }
.camera-fields > label { margin-bottom: 11px; font-size: 10px; }
.camera-fields select { font-size: 10px; }
.camera-fields .row-actions { gap: 7px; }
.camera-fields .button { flex: 1; padding: 9px 11px; font-size: 9px; }
.camera-fields > small { display: block; margin-top: 10px; font-size: 9px; }
.roi-rows { display: grid; gap: 9px; margin: 15px 0; }
.roi-rows > div { display: grid; grid-template-columns: 26px repeat(4, minmax(0, 1fr)); align-items: center; gap: 8px; }
.roi-rows > div > b { padding-top: 22px; color: var(--blue-700); font-size: 11px; }
.roi-rows label { gap: 5px; font-size: 9px; }
.roi-rows input { min-height: 44px; padding: 9px 7px; font-size: 11px; }
.observation-list { display: grid; gap: 6px; max-height: 200px; overflow-y: auto; }
.observation-list:empty { display: none; }
.observation-list p { margin: 0; padding: 9px 10px; border: 1px solid #dbe9f0; border-radius: 7px; background: #f7fafc; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }

/* Dialogs, detail views, import editors and feedback. */
dialog { width: min(720px, calc(100vw - 40px)); max-width: 920px; max-height: calc(100vh - 52px); max-height: calc(100dvh - 52px); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #d9e4eb; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 90px rgb(4 27 47 / 25%); }
dialog::backdrop { background: rgb(5 28 48 / 56%); backdrop-filter: blur(3px); }
dialog > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 26px 21px; border-bottom: 1px solid var(--line); background: #fff; }
dialog > header > div { min-width: 0; }
dialog > header .eyebrow { margin-bottom: 7px; font-size: 9px; }
dialog > header h2 { margin-bottom: 0; font-size: 22px; }
dialog > header .muted { margin: 8px 0 0; font-size: 11px; line-height: 1.7; }
dialog > header > .icon-button { margin: -7px -10px 0 0; }
.modal-body { padding: 24px 26px 26px; }
.modal-body > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.modal-body > h3:not(:first-child) { margin-top: 23px; }
.modal-body .table-wrap { margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
.modal-body td, .modal-body th { padding-inline: 13px; }
.modal-body .empty { min-height: 180px; padding-inline: 16px; }
.line-editor { display: grid; grid-template-columns: minmax(0, 1fr) 92px 44px; align-items: end; gap: 10px; margin-bottom: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfd; }
.line-editor > label { margin: 0; font-size: 10px; }
.line-editor > .button, .line-editor > .icon-button { padding-inline: 10px; }
.line-editor > span, .line-editor > div:first-child { min-width: 0; }
.line-editor > span strong { display: block; font-size: 11px; }
.line-editor > span small { display: block; color: var(--muted); font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; margin: 0 0 21px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfd; }
.detail-grid > div, .detail-grid > dl { min-width: 0; margin: 0; }
.detail-grid dt, .detail-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-grid dd { margin: 0; color: var(--navy-800); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.detail-grid > div > b, .detail-grid > div > strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.detail-grid > .wide { grid-column: 1 / -1; }
.instructions { margin: 0 0 18px; padding: 15px 17px; border: 1px solid #d0e4eb; border-radius: 10px; background: #eef8fa; color: #476f83; font-size: 11px; line-height: 1.8; }
.instructions strong { color: var(--navy-800); }
.instructions p:last-child { margin-bottom: 0; }
.instructions ul, .instructions ol { margin: 8px 0 0; padding-left: 19px; }
.instructions li + li { margin-top: 5px; }
.error-box { margin: 13px 0; padding: 13px 15px; border: 1px solid #ecc5bf; border-radius: 9px; background: var(--red-soft); color: #a83f35; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.error-box:empty { display: none; }
.error-box > p:last-child { margin-bottom: 0; }
.form-error:not(:empty) { margin: 13px 0 0; padding: 12px 14px; border: 1px solid #ecc5bf; border-radius: 9px; background: var(--red-soft); color: #a83f35; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.info-box { margin: 14px 0; padding: 13px 15px; border: 1px solid #d2e2ed; border-radius: 9px; background: #f1f7fc; color: #4e718a; font-size: 11px; line-height: 1.75; }
.info-box b { color: var(--navy-800); }
.incident-detail > .badge { margin-bottom: 14px; }
.incident-detail > h3 { margin-bottom: 8px; }
.incident-detail > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.import-preview { max-height: 310px; margin: 17px 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfd; }
.import-preview > p { margin: 0; padding: 10px 14px; border-bottom: 1px solid #e7eef3; color: var(--muted); font-size: 11px; }
.import-preview > p:last-child { border-bottom: 0; }
.import-preview b { color: var(--navy-800); }
.code-preview { display: grid; gap: 15px; margin-top: 20px; }
.code-preview input { background: #f7fafc; font-family: Consolas, 'Courier New', monospace; font-size: 11px; }
.monitor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 20px 0; }
.monitor-options > .button { align-items: flex-start; flex-direction: column; gap: 13px; min-height: 113px; padding: 20px; text-align: left; }
.monitor-options .icon { width: 28px; height: 28px; }
.evidence-video { display: block; width: 100%; max-height: 420px; margin: 16px 0; border: 1px solid #d5e1e9; border-radius: 11px; background: #10283d; }
.modal-body img { max-height: 350px; margin: 12px auto; border-radius: 9px; object-fit: contain; }
#toasts { position: fixed; right: 24px; bottom: 23px; z-index: 1000; display: flex; align-items: flex-end; flex-direction: column; gap: 9px; width: min(450px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: 100%; padding: 15px 18px; border: 1px solid #b9ddcd; border-radius: 12px; background: #f5fffa; color: #236449; box-shadow: 0 8px 28px rgb(8 38 66 / 16%); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; pointer-events: auto; animation: toast-enter .18s ease-out; }
.toast > .icon { width: 18px; height: 18px; margin-top: 1px; }
.toast.error, .toast.danger { border-color: #e6bbb4; background: #fff8f6; color: #a24236; }
.toast.warning { border-color: #e9d1a0; background: #fffaf0; color: #8c5c14; }
.toast.info { border-color: #bad4e8; background: #f5faff; color: var(--blue-700); }
@keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.boot, .app-loading { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 32px; background: linear-gradient(145deg, #f7fbfe, #eaf2f7); text-align: center; }
.boot > img, .app-loading > img { width: 210px; margin: 0 auto 23px; }
.boot h1, .app-loading h1 { font-size: 23px; letter-spacing: .05em; }
.boot p, .app-loading p { max-width: 540px; margin: 12px auto 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.app-loading .button, .boot .button { margin-top: 20px; }
noscript { display: block; padding: 20px; color: var(--red); text-align: center; }

/* Linked delivery-note and closing-label print previews. */
.print-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 100%; padding: 4px 0; background: #fff; }
.print-sheet > header, .print-sheet > h2, .print-sheet > h3, .print-sheet > p, .print-sheet > table, .print-sheet > .table-wrap { grid-column: 1 / -1; }
.print-brand { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.print-brand img { width: 142px; max-height: 48px; margin: 0; border-radius: 0; }
.print-brand b { color: var(--navy-800); font: 800 10px var(--font-display); letter-spacing: .09em; }
.code-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; gap: 17px; }
.print-sheet > header { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.print-sheet > header img { width: 150px; margin: 0 0 16px; }
.print-sheet h2 { font-size: 21px; }
.print-sheet > p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.code-card { display: flex; align-items: center; flex-direction: column; min-width: 0; padding: 19px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; text-align: center; break-inside: avoid; }
.code-card h3 { margin-bottom: 5px; color: var(--navy-900); font-size: 15px; }
.code-card > span { margin-bottom: 12px; color: var(--navy-800); font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.code-card p { max-width: 100%; margin: 0 0 11px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.code-card > b, .code-card > strong { margin-bottom: 10px; font-size: 12px; }
.code-card > small { margin-top: 12px; color: var(--muted); font-size: 9px; }
.code-card code { display: block; max-width: 100%; margin-top: 10px; padding: 7px 9px; border: 1px solid #e3ebf1; border-radius: 6px; background: #f7fafc; font-size: 8px; line-height: 1.7; word-break: break-all; }
.qr-code { display: flex; align-items: center; justify-content: center; width: min(100%, 220px); margin: 4px auto 0; padding: 10px; background: #fff; }
.qr-code > svg, .qr-code > canvas, .qr-code > img, svg.qr-code { display: block; width: 100%; height: auto; max-width: 220px; max-height: none; margin: 0; border-radius: 0; image-rendering: pixelated; }
.print-body { margin: 0; background: #fff; }
.print-body > .print-sheet { max-width: 900px; margin: 30px auto; padding: 24px; }

/* A secondary monitor is dedicated to its two stations. */
.display-shell { grid-template-columns: minmax(0, 1fr); }
.display-shell .sidebar { display: none; }
.display-shell .topbar { padding-inline: 32px; }
.display-shell .content { padding: 22px 32px; }
.display-shell .section-intro, .display-shell .metrics, .display-shell .activity-panel, .display-shell .setup-note { display: none; }
.display-shell .equipment-strip { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
.display-shell .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 0; }
.display-shell .station-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.display-shell .station-card { min-height: max(390px, calc(100dvh - 348px)); }
.display-shell .station-card > header { min-height: 82px; padding: 18px 23px; }
.display-shell .station-title h3 { font-size: 20px; }
.display-shell .station-title span { font-size: 11px; }
.display-shell .station-number { width: 42px; height: 45px; font-size: 20px; }
.display-shell .station-worker { min-height: 82px; margin-inline: 23px; }
.display-shell .station-worker b { font-size: 13px; }
.display-shell .station-worker small { font-size: 10px; }
.display-shell .station-empty { min-height: 220px; }
.display-shell .station-empty > b { font-size: 20px; }
.display-shell .station-empty p { max-width: 330px; font-size: 12px; }
.display-shell .scan-illustration { width: 64px; height: 64px; margin-bottom: 17px; border-radius: 17px; }
.display-shell .scan-illustration .icon { width: 34px; height: 34px; }
.display-shell .session-body { padding: 19px 23px 23px; }
.display-shell .line-list { max-height: max(270px, calc(100dvh - 620px)); }
.display-shell .product-line { min-height: 74px; padding: 13px; }
.display-shell .product-line b { font-size: 13px; }
.display-shell .product-line small { font-size: 10px; }
.display-shell .product-line > strong { font-size: 24px; }
.display-shell .station-warning, .display-shell .station-ready { font-size: 11px; }
.display-shell .camera-state { font-size: 10px; }

@media (min-width: 1700px) {
  .content { padding: 32px 40px; }
  .topbar, .workspace-footer { padding-inline: 40px; }
  .station-grid { gap: 22px; }
  .station-empty { min-height: 220px; }
  .worker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  .topbar { padding-inline: 23px; }
  .content { padding-inline: 23px; }
  .date-label { display: none; }
  .metrics { gap: 11px; }
  .metrics > article { gap: 10px; padding: 16px 13px; }
  .metrics > article > i { width: 37px; height: 39px; border-radius: 10px; }
  .metrics article div > span { font-size: 9px; }
  .metrics strong { font-size: 25px; }
  .equipment-strip { gap: 11px; padding-inline: 13px; }
  .equipment-strip > div { gap: 7px; }
  .equipment-strip > div > .icon { width: 17px; height: 17px; }
  .equipment-strip b { font-size: 9px; }
  .equipment-strip .badge { font-size: 8px; }
  .scan-bar { gap: 9px; padding-inline: 12px; }
  .scan-bar > label b { display: none; }
  .scan-bar > select { flex-basis: 177px; width: 177px; font-size: 11px; }
  .settings-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 16px; }
  .camera-config { grid-template-columns: 1fr; gap: 14px; }
  .camera-preview { min-height: 145px; max-height: 230px; aspect-ratio: 16 / 9; }
  .camera-fields .button { flex: 0 1 auto; font-size: 10px; }
  .worker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 17px 10px 12px; }
  .brand { min-height: 57px; padding: 8px 5px; border-radius: 10px; }
  .brand img { width: 45px; }
  .brand span, .sidebar nav > p, .profile-button > .icon, .connection { display: none; }
  .sidebar nav > button > span, .test-toggle > span:not(.toggle-indicator), .profile-button > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip-path: inset(50%); white-space: nowrap; }
  .sidebar nav { margin-top: 24px; }
  .sidebar nav > button { display: flex; align-items: center; justify-content: center; gap: 0; width: 56px; min-height: 50px; margin-bottom: 6px; padding: 10px; }
  .sidebar nav > button .icon { width: 22px; height: 22px; }
  .sidebar nav > button em { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 3px; font-size: 8px; }
  .sidebar-bottom { margin-top: 15px; }
  .test-toggle { justify-content: center; min-height: 48px; padding: 10px 5px; }
  .profile-button { justify-content: center; min-height: 52px; padding: 5px; }
  .profile-button > i { width: 36px; height: 37px; }
  .display-shell { grid-template-columns: minmax(0, 1fr); }
  .topbar h1 { font-size: 23px; }
  .section-intro h2 { font-size: 24px; }
  .station-card > header { padding-inline: 15px; }
  .station-worker { margin-inline: 15px; }
  .session-body { padding-inline: 15px; }
  .setup-note { flex-wrap: wrap; }
  .setup-note > .button { margin-left: 39px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-chart { gap: 12px; padding-inline: 20px; }
}

@media (max-width: 820px) {
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { position: relative; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 13px; width: 100%; height: auto; min-height: 74px; padding: 10px 15px; }
  .brand { flex: 0 0 auto; width: 66px; min-height: 49px; padding: 8px; }
  .brand img { width: 50px; }
  .sidebar nav { flex: 1; flex-direction: row; align-items: center; gap: 5px; width: 100%; min-width: 0; margin: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav > button { width: 48px; min-width: 48px; min-height: 48px; margin: 0; padding: 11px; }
  .sidebar nav > button.active { box-shadow: inset 0 -3px var(--aqua-500); }
  .sidebar nav > button .icon { width: 21px; height: 21px; }
  .sidebar-bottom { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin: 0; padding-left: 8px; border-left: 1px solid rgb(255 255 255 / 12%); }
  .test-toggle { width: 40px; min-height: 44px; margin: 0; padding: 7px 5px; }
  .profile-button { width: 43px; min-height: 44px; padding: 4px; }
  .profile-button > i { width: 31px; height: 32px; }
  .workspace { min-height: calc(100dvh - 74px); }
  .topbar { min-height: 89px; padding: 17px 20px; }
  .topbar h1 { font-size: 21px; }
  .topbar > div > p { font-size: 8px; }
  .top-actions { gap: 5px; }
  .top-actions > .button { padding-inline: 10px; font-size: 10px; }
  .content { padding: 22px 20px; }
  .section-intro { align-items: flex-start; gap: 14px; margin-bottom: 18px; }
  .section-intro h2 { font-size: 23px; }
  .section-intro > div > span { font-size: 11px; }
  .header-actions { justify-content: flex-start; }
  .equipment-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) 44px; gap: 13px 15px; }
  .equipment-strip > div:nth-child(3) { grid-column: 1; grid-row: 2; }
  .equipment-strip > div:nth-child(4) { grid-column: 2; grid-row: 2; }
  .equipment-strip > .icon-button { grid-column: 3; grid-row: 1 / 3; }
  .equipment-strip > div > .icon { width: 19px; height: 19px; }
  .equipment-strip b { font-size: 10px; }
  .equipment-strip .badge { font-size: 9px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metrics > article { min-height: 92px; padding: 16px; }
  .metrics article div > span { font-size: 10px; }
  .metrics strong { font-size: 28px; }
  .scan-bar { flex-wrap: wrap; padding: 13px; }
  .scan-bar > label { flex: 1; }
  .scan-bar > label b { display: inline; }
  .scan-bar > select { flex: 0 1 230px; width: 230px; }
  .scan-bar > form { flex-basis: 100%; }
  .station-grid { gap: 14px; }
  .station-card > header { flex-wrap: wrap; gap: 10px; padding: 13px 15px; }
  .station-card > header > .badge { margin-left: 45px; }
  .station-worker { min-height: 69px; gap: 8px; }
  .station-worker > .icon-button { width: 31px; min-width: 31px; padding-inline: 5px; }
  .station-worker b { font-size: 10px; }
  .station-worker small { font-size: 8px; }
  .station-empty { min-height: 192px; padding-inline: 18px; }
  .station-empty > b { font-size: 13px; }
  .station-empty p { font-size: 10px; }
  .camera-state { font-size: 8px; }
  .station-card > footer { padding-inline: 12px; }
  .product-line { gap: 7px; padding: 9px 8px; }
  .product-line > strong { font-size: 16px; }
  .product-line small { font-size: 8px; }
  .line-state { width: 25px; height: 27px; }
  .setup-note { align-items: flex-start; padding: 17px; }
  .setup-note > .button { margin-left: 0; }
  .info-grid, .help-grid { gap: 14px; }
  .info-card { padding: 20px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .camera-config { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .camera-preview { aspect-ratio: 4 / 3; }
  .settings-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .settings-stack > .panel:last-child { grid-column: 1 / -1; }
  .workspace-footer { padding-inline: 20px; font-size: 8px; }
  .display-shell .topbar { padding-inline: 20px; }
  .display-shell .content { padding: 20px; }
  .display-shell .equipment-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) 44px; }
  .display-shell .station-grid { gap: 15px; }
  .display-shell .station-card > header { padding-inline: 17px; }
  .display-shell .station-title h3 { font-size: 18px; }
  .display-shell .station-card > header > .badge { margin-left: 52px; }
  .display-shell .station-worker { margin-inline: 17px; }
  .display-shell .station-worker b { font-size: 11px; }
  .display-shell .station-worker small { font-size: 9px; }
  .display-shell .session-body { padding-inline: 17px; }
  .display-shell .product-line b { font-size: 11px; }
  .display-shell .product-line small { font-size: 9px; }
  .display-shell .product-line > strong { font-size: 20px; }
  .display-shell .camera-state { font-size: 9px; }
}

@media (max-width: 590px) {
  .sidebar { flex-wrap: wrap; gap: 9px; min-height: 124px; padding: 10px 14px; }
  .brand { width: 115px; min-height: 44px; padding: 7px 9px; }
  .brand img { width: 95px; max-height: 28px; }
  .sidebar nav { order: 3; flex: 1 0 100%; gap: 4px; justify-content: space-between; }
  .sidebar nav > button { flex: 1; width: 39px; min-width: 39px; min-height: 44px; padding: 10px; }
  .sidebar nav > button .icon { width: 20px; height: 20px; }
  .sidebar-bottom { margin-left: auto; padding-left: 0; border-left: 0; }
  .test-toggle { width: 47px; }
  .profile-button { width: 47px; }
  .workspace { min-height: calc(100dvh - 124px); }
  .topbar { align-items: center; gap: 10px; min-height: 91px; padding: 16px; }
  .topbar h1 { font-size: 20px; line-height: 1.3; }
  .topbar > div > p { max-width: 230px; font-size: 7px; line-height: 1.7; letter-spacing: .1em; }
  .top-actions { flex-shrink: 1; }
  .top-actions > .icon-button { display: none; }
  .top-actions > .button { flex-direction: column; gap: 3px; min-width: 58px; padding: 8px 7px; font-size: 8px; line-height: 1.4; }
  .top-actions > .button .icon { width: 18px; height: 18px; }
  .content { padding: 20px 15px 24px; }
  .section-intro { gap: 15px; margin-bottom: 19px; }
  .section-intro .eyebrow { font-size: 9px; }
  .section-intro h2 { font-size: 24px; }
  .section-intro > div > span { max-width: 360px; font-size: 11px; line-height: 1.7; }
  .header-actions { width: 100%; gap: 8px; }
  .header-actions > .button { flex: 1; padding-inline: 11px; font-size: 11px; }
  .header-actions > select { flex: 1; min-width: 130px; }
  .equipment-strip { gap: 12px 8px; padding: 13px 10px; }
  .equipment-strip > div { gap: 6px; }
  .equipment-strip > div > .icon { width: 16px; height: 16px; }
  .equipment-strip b { font-size: 9px; }
  .equipment-strip .badge { gap: 4px; font-size: 8px; }
  .equipment-strip > .icon-button { width: 36px; min-width: 36px; padding-inline: 8px; }
  .equipment-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) 33px; }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 9px; margin-bottom: 17px; }
  .metrics > article { min-height: 80px; padding: 13px 17px; }
  .metrics > article > i { width: 41px; height: 41px; }
  .metrics > article > div { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 12px; }
  .metrics article div > span { max-width: 165px; margin: 0; font-size: 11px; }
  .metrics strong { flex: 0 0 auto; font-size: 26px; }
  .metrics strong small { font-size: 10px; }
  .scan-bar { gap: 10px; margin-bottom: 16px; }
  .scan-bar > label { flex-basis: 100%; }
  .scan-bar > label b { font-size: 11px; }
  .scan-bar > select { flex-basis: 100%; width: 100%; }
  .scan-bar input { font-size: 11px; }
  .scan-bar .button { padding-inline: 11px; font-size: 11px; }
  .station-toolbar { align-items: flex-start; flex-direction: column; gap: 13px; }
  .tabs { display: flex; width: 100%; }
  .tabs > button { min-height: 44px; padding-inline: 11px; font-size: 10px; }
  .legend { margin-left: 3px; }
  .station-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .station-card > header { flex-wrap: nowrap; padding: 15px 17px; }
  .station-card > header > .badge { margin-left: 0; font-size: 9px; }
  .station-title h3 { font-size: 15px; }
  .station-title span { font-size: 9px; }
  .station-worker { min-height: 72px; margin-inline: 17px; }
  .station-worker b { font-size: 11px; }
  .station-worker small { font-size: 9px; }
  .station-worker > .icon-button { width: 44px; min-width: 44px; }
  .station-empty { min-height: 210px; }
  .station-empty > b { font-size: 15px; }
  .station-empty p { font-size: 11px; }
  .station-empty > .button { font-size: 11px; }
  .camera-state { font-size: 9px; }
  .station-card > footer { padding-inline: 16px; }
  .session-body { padding-inline: 17px; }
  .session-meta { font-size: 10px; }
  .product-line { gap: 10px; padding: 11px 10px; }
  .product-line b { font-size: 11px; }
  .product-line small { font-size: 9px; }
  .product-line > strong { font-size: 19px; }
  .line-state { width: 28px; height: 30px; }
  .station-warning, .station-ready { font-size: 10px; }
  .setup-note { gap: 11px; padding: 16px; }
  .setup-note > .icon { width: 21px; height: 21px; }
  .setup-note b { font-size: 11px; }
  .setup-note p { font-size: 10px; }
  .setup-note > .button { width: 100%; margin-top: 3px; }
  .panel-head { min-height: 69px; gap: 8px; padding: 17px; }
  .panel-head h3 { font-size: 14px; }
  .panel-head .text-button { min-height: 34px; font-size: 10px; }
  .panel-body { padding: 18px; }
  .activity-list { padding-inline: 17px; }
  .activity-list > div { flex-wrap: wrap; gap: 7px 10px; }
  .activity-list > div > span { flex-basis: calc(100% - 26px); }
  .activity-list time { margin-left: 26px; }
  .activity-panel .empty { padding: 25px 18px; }
  .search-bar { width: 100%; }
  .filters-row > select { width: 100%; }
  .filters-row .search-bar { flex-basis: 100%; }
  .table-wrap { border-radius: inherit; }
  table { min-width: 640px; }
  th { padding: 13px 15px; }
  td { padding: 14px 15px; }
  .info-grid, .help-grid, .worker-grid, .stats-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .info-card { padding: 20px; }
  .worker-card { padding: 21px; }
  .worker-actions > .button { font-size: 11px; }
  .settings-stack { grid-template-columns: minmax(0, 1fr); }
  .settings-stack > .panel:last-child { grid-column: auto; }
  .camera-config { grid-template-columns: minmax(0, 1fr); }
  .camera-preview { aspect-ratio: 16 / 9; }
  .camera-fields h4 { font-size: 13px; }
  .camera-fields select { font-size: 11px; }
  .camera-fields .button { flex: 1; font-size: 11px; }
  .roi-rows > div { grid-template-columns: 21px repeat(4, minmax(0, 1fr)); gap: 5px; }
  .roi-rows input { padding-inline: 4px; font-size: 10px; }
  .workspace-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding: 15px 17px; font-size: 8px; }
  .form-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .monitor-options { grid-template-columns: minmax(0, 1fr); }
  .monitor-options > .button { align-items: center; flex-direction: row; min-height: 70px; padding: 17px; }
  .form-grid > .wide, .form-grid > .full, .form-grid > .span-2, .form-grid > .full-width { grid-column: auto; }
  .form-actions { gap: 8px; }
  .form-actions > .button { flex: 1; min-width: 100px; padding-inline: 11px; font-size: 11px; }
  .form-actions > .danger { margin-right: 0; }
  .line-editor { grid-template-columns: minmax(0, 1fr) 75px 44px; gap: 7px; padding: 10px; }
  .line-editor select { padding-left: 8px; font-size: 10px; }
  .line-editor input { padding-inline: 8px; font-size: 11px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 28px); border-radius: 14px; }
  dialog > header { gap: 10px; padding: 20px 19px 17px; }
  dialog > header h2 { font-size: 20px; }
  dialog > header .muted { font-size: 10px; }
  .modal-body { padding: 20px 19px; }
  .modal-body table { min-width: 500px; }
  #toasts { right: 16px; bottom: 16px; }
  .toast { padding: 13px 15px; font-size: 10px; }
  .print-sheet { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .code-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .print-brand { align-items: flex-start; flex-direction: column; }
  .print-sheet > header, .print-sheet > h2, .print-sheet > h3, .print-sheet > p, .print-sheet > table, .print-sheet > .table-wrap { grid-column: auto; }
  .code-card { padding-block: 22px; }
  .display-shell .workspace { min-height: 100dvh; }
  .display-shell .topbar { padding-inline: 16px; }
  .display-shell .content { padding: 17px 15px; }
  .display-shell .equipment-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) 33px; }
  .display-shell .station-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .display-shell .station-card { min-height: 410px; }
  .display-shell .station-card > header { min-height: 80px; }
  .display-shell .station-card > header > .badge { margin-left: 0; }
  .display-shell .station-empty { min-height: 225px; }
  .display-shell .station-worker b { font-size: 12px; }
  .display-shell .product-line b { font-size: 12px; }
}

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

@media print {
  @page { size: A4; margin: 14mm; }
  html, body { min-width: 0; width: auto; height: auto; margin: 0; background: #fff !important; color: #000; font-size: 10pt; }
  body > #app, .sidebar, .topbar, .workspace-footer, #toasts, noscript, dialog > header, .form-actions, .no-print, .print-body > .button { display: none !important; }
  body:has(.print-sheet) > #app { display: none !important; }
  dialog[open]:has(.print-sheet) { position: static; display: block; width: 100%; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  dialog::backdrop { background: transparent; backdrop-filter: none; }
  dialog:not(:has(.print-sheet)) { display: none !important; }
  .modal-body:has(.print-sheet) { padding: 0; }
  .modal-body:has(.print-sheet) > :not(.print-sheet) { display: none !important; }
  .print-body > :not(.print-sheet):not(dialog) { display: none !important; }
  .print-sheet, .print-body > .print-sheet { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8mm; width: 100%; max-width: none; margin: 0; padding: 0; overflow: visible; color: #000; background: #fff; }
  .print-sheet > header, .print-sheet > h2, .print-sheet > h3, .print-sheet > p, .print-sheet > table, .print-sheet > .table-wrap { grid-column: 1 / -1; }
  .print-brand { align-items: center; flex-direction: row; }
  .code-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8mm; }
  .print-sheet table { min-width: 0; }
  .print-sheet .table-wrap { overflow: visible; }
  .print-sheet .button { display: none !important; }
  .code-card { padding: 7mm 5mm; border: 1px solid #aaa; border-radius: 0; box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .code-card h3, .code-card p, .code-card small, .print-sheet h2, .print-sheet h3, .print-sheet p { color: #000; }
  .code-card h3 { font-size: 13pt; }
  .code-card p { font-size: 9pt; }
  .code-card code { background: #fff; color: #000; font-size: 7pt; }
  .qr-code { width: 48mm; max-width: 100%; padding: 2mm; background: #fff; }
  .qr-code > svg, .qr-code > canvas, .qr-code > img, svg.qr-code { width: 100%; max-width: none; image-rendering: pixelated; print-color-adjust: exact; }
  tr, img, svg { break-inside: avoid; }
}
.product-icon img{width:100%;height:100%;object-fit:contain;border-radius:8px;}

/* Dedicated monitor layout: readable across a preparation table. */
.monitor-shell { --monitor-accent: #1265ca; display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #edf2f7; font-family: var(--font-display); }
body:has(.monitor-shell) { overflow: hidden; }
.monitor-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 24px; background: #fff; border-bottom: 1px solid #d8e1eb; }
.monitor-identity { display: flex; align-items: center; gap: 22px; }
.monitor-header-logo { display: block; flex: 0 0 auto; width: 100px; height: 34px; object-fit: contain; }
.monitor-identity > strong { color: #092e50; font-size: 27px; font-weight: 900; letter-spacing: -.04em; }
.monitor-identity > span { color: #526477; font-size: 15px; font-weight: 800; letter-spacing: .12em; }
.monitor-demo { margin-left: 12px; padding: 5px 9px; border-radius: 6px; background: #fff0ca; color: #754600; font-size: 12px; letter-spacing: .06em; }
.monitor-fullscreen { font-size: 13px; }
.monitor-screen-controls { display: flex; align-items: center; gap: 12px; }
.monitor-screen-message { max-width: 300px; color: #627284; font-size: 12px; }
:fullscreen .monitor-fullscreen { opacity: .2; }
:fullscreen .monitor-fullscreen:hover, :fullscreen .monitor-fullscreen:focus-visible { opacity: 1; }
.monitor-content { min-width: 0; min-height: 0; padding: 16px 20px; }
.monitor-idle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(50px,8vh,100px); height: 100%; padding: 36px; border: 1px solid #e0e8ef; border-radius: 22px; background: #fff; }
.monitor-idle-logo { width: min(76%,1050px); max-height: 42vh; object-fit: contain; }
.monitor-idle-message { display: flex; align-items: center; justify-content: center; gap: 22px; text-align: left; }
.monitor-idle-message > .icon { width: 62px; height: 62px; padding: 12px; border-radius: 16px; background: #e8f1ff; color: #1265ca; }
.monitor-idle-message h1 { font-size: clamp(26px,2.3vw,44px); font-weight: 800; }
.monitor-idle-message p { margin: 8px 0 0; color: #51667b; font-size: clamp(20px,1.5vw,28px); }
.monitor-scanner { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 20px; border-top: 1px solid #d8e1eb; background: #fff; }
.monitor-scanner > label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 800; }
.monitor-scanner > label .icon { width: 25px; height: 25px; color: #1265ca; }
.monitor-scanner > select { flex: 0 1 240px; width: 240px; min-width: 160px; }
.monitor-scanner select, .monitor-scanner input { min-height: 44px; font-size: 15px; }
.monitor-scanner form { display: flex; flex: 1; min-width: 0; gap: 10px; }
.monitor-scanner input { flex: 1; min-width: 0; }
.monitor-scanner .button { min-height: 44px; padding-inline: 16px; font-size: 14px; }
.monitor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); gap: 16px; height: 100%; min-height: 0; }
.monitor-grid.monitor-single { grid-template-columns: minmax(0,1fr); }
.monitor-order { --monitor-accent: #a86400; --monitor-band: #ffd454; --monitor-soft: #fff7db; min-width: 0; min-height: 0; border: 2px solid var(--monitor-band); border-radius: 14px; overflow: hidden; background: #fff; }
.monitor-order-fit { display: flex; flex-direction: column; min-width: 0; }
.monitor-order-fit > * { flex-shrink: 0; }
.monitor-order.monitor-ready { --monitor-accent: #08753f; --monitor-band: #0b8750; --monitor-soft: #e3f7ec; }
.monitor-order.monitor-blocked { --monitor-accent: #b22129; --monitor-band: #cf2632; --monitor-soft: #fff0f1; }
.monitor-order-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 12px 20px; background: var(--monitor-band); }
.monitor-worker { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: #4b3400; }
.monitor-worker small { font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.monitor-worker strong { font-size: clamp(30px,2.1vw,40px); line-height: 1.05; font-weight: 900; overflow-wrap: anywhere; }
.monitor-order .monitor-status { display: inline-flex; align-items: center; flex-shrink: 0; gap: 7px; color: #4b3400; font-size: clamp(14px,1vw,19px); line-height: 1.25; font-weight: 900; }
.monitor-order .monitor-status .icon { width: 24px; height: 24px; }
.monitor-ready .monitor-worker, .monitor-ready .monitor-status, .monitor-blocked .monitor-worker, .monitor-blocked .monitor-status { color: #fff; }
.monitor-reader-target { display: flex; align-items: center; min-height: 38px; padding: 4px 20px; border-bottom: 1px solid #d9e3ee; background: #f2f6fb; }
.monitor-reader-target .button { min-height: 30px; padding: 4px 12px; font-size: 14px; }
.monitor-reader-target .monitor-selected { color: #07539e; font-size: 16px; font-weight: 900; }
.monitor-reader-target .monitor-selected .icon { width: 23px; height: 23px; }
.reader-selected .monitor-reader-target { background: #dfeeff; border-bottom-color: #abcceb; }
.monitor-order-summary { display: grid; gap: 10px; padding: 14px 20px; }
.monitor-order-summary span { display: block; margin-bottom: 5px; color: #5a6c7b; font-size: 13px; line-height: 1.4; font-weight: 800; letter-spacing: .12em; }
.monitor-order-number h2 { margin: 0; color: #092e50; font-size: clamp(27px,1.9vw,36px); line-height: 1.08; font-weight: 900; letter-spacing: -.035em; overflow-wrap: anywhere; }
.monitor-customer h3 { margin: 0; color: #29465e; font-size: clamp(21px,1.4vw,27px); line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.monitor-progress { margin: 0 20px 12px; }
.monitor-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.monitor-progress > div > span { color: #53687a; font-size: 15px; font-weight: 700; }
.monitor-progress strong { color: var(--monitor-accent); font-size: 27px; line-height: 1.2; font-weight: 900; font-variant-numeric: tabular-nums; }
.monitor-progress strong span { color: #586d7f; font-size: 19px; }
.monitor-progress-track { height: 9px; overflow: hidden; border-radius: 10px; background: #e7edf2; }
.monitor-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--monitor-accent); }
.monitor-incidents { margin: 0 20px 10px; padding: 9px 12px; border: 2px solid #cf2632; border-radius: 10px; color: #a31824; background: #fff0f1; }
.monitor-incidents p { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.monitor-incidents p + p { margin-top: 8px; }
.monitor-incidents .icon { flex-shrink: 0; width: 21px; height: 21px; }
.monitor-incidents b { display: block; font-size: 16px; }
.monitor-products { display: grid; align-content: start; grid-auto-rows: max-content; gap: 8px; margin: 0 20px; padding: 0 0 12px; }
.monitor-product { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #e0e6ed; border-radius: 10px; background: #f6f8fb; text-align: left; }
.monitor-product > i { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; color: #915a00; background: #ffe5a2; }
.monitor-product .icon { width: 25px; height: 25px; }
.monitor-product > span { flex: 1; min-width: 0; }
.monitor-product b { display: block; color: #17384e; font-size: clamp(18px,1.2vw,23px); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.monitor-product small { display: block; margin-top: 4px; color: #5c6c7a; font-size: 13px; }
.monitor-product small em { display: block; margin-top: 2px; font-size: 15px; line-height: 1.2; font-style: normal; font-weight: 900; }
.monitor-product > strong { flex: 0 0 auto; color: #17384e; font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.monitor-product > strong > span { color: #627284; font-size: 19px; }
.monitor-product.pending { border-color: #e8bd4a; background: #fff7db; }
.monitor-product.pending > strong, .monitor-product.pending small em { color: #915a00; }
.monitor-product.complete { border-color: #a7d9bd; background: #f0faf4; }
.monitor-product.complete > i { color: #fff; background: #0b8750; }
.monitor-product.complete small em { color: #08753f; }
.monitor-product.error { border-color: #ecadb2; background: #fff0f1; }
.monitor-product.error > i { color: #fff; background: #cf2632; }
.monitor-product.error > strong, .monitor-product.error small em { color: #b22129; }
.monitor-product:hover, .monitor-product:focus-visible { border-color: #487dab; box-shadow: 0 0 0 1px #487dab; }
.monitor-order-footer { margin-top: auto; padding: 10px 20px; background: var(--monitor-soft); border-top: 1px solid var(--monitor-band); }
.monitor-instruction { display: flex; align-items: center; gap: 12px; color: var(--monitor-accent); }
.monitor-instruction > .icon { width: 24px; height: 24px; }
.monitor-instruction strong { font-size: clamp(16px,1.05vw,20px); line-height: 1.3; font-weight: 800; }
.monitor-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.monitor-tools .button { min-height: 32px; padding-block: 5px; font-size: 12px; }
.monitor-tools .small { overflow-wrap: anywhere; }
.monitor-selected { display: inline-flex; align-items: center; gap: 7px; margin-left: 2px; color: #496174; font-size: 13px; font-weight: 700; }
.monitor-selected .icon, .monitor-timer .icon { width: 17px; height: 17px; }
.monitor-timer { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: #5c6c7a; font-size: 13px; white-space: nowrap; }
.monitor-single .monitor-order-summary { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 24px; padding-block: 16px; }
.monitor-single .monitor-order-number h2 { font-size: clamp(32px,2.6vw,50px); }
.monitor-single .monitor-customer h3 { font-size: clamp(26px,1.8vw,35px); }
.monitor-single .monitor-products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.monitor-single .monitor-products > :only-child { grid-column: 1 / -1; }
.monitor-single .monitor-product { min-height: 88px; }
.monitor-single .monitor-product b { font-size: clamp(20px,1.45vw,28px); }
.monitor-single .monitor-product > strong { font-size: 34px; }
.monitor-single .monitor-product > strong > span { font-size: 23px; }

@media (max-height: 850px) and (min-width: 1001px) {
  .monitor-content { padding-block: 10px; }
  .monitor-order-header { padding-block: 10px; }
  .monitor-order-summary, .monitor-single .monitor-order-summary { gap: 8px; padding-block: 10px; }
  .monitor-progress { margin-bottom: 10px; }
  .monitor-product { padding-block: 9px; }
}
@media (max-width: 1000px) {
  .monitor-header { padding: 8px 16px; gap: 12px; }
  .monitor-identity { gap: 14px; }
  .monitor-identity > strong { font-size: 26px; }
  .monitor-identity > span { font-size: 11px; }
  .monitor-content { padding: 10px 12px; }
  .monitor-grid { gap: 10px; }
  .monitor-single .monitor-products { grid-template-columns: minmax(0,1fr); }
  .monitor-scanner { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  .monitor-scanner > select { flex: 1; }
  .monitor-scanner form { flex-basis: 100%; }
}
@media (max-width: 590px) {
  .monitor-header { padding-inline: 15px; }
  .monitor-identity { align-items: flex-start; flex-direction: column; gap: 3px; }
  .monitor-identity:has(.monitor-header-logo) { display: grid; grid-template-columns: 72px auto; align-items: center; column-gap: 10px; }
  .monitor-header-logo { width: 72px; height: 28px; grid-row: span 2; }
  .monitor-identity > span { font-size: 9px; }
  .monitor-fullscreen { max-width: 155px; font-size: 11px; }
  .monitor-content { padding-inline: 12px; }
  .monitor-idle { padding: 20px 16px; gap: 24px; }
  .monitor-idle-logo { width: 100%; }
  .monitor-idle-message { flex-direction: column; gap: 16px; text-align: center; }
  .monitor-idle-message h1 { font-size: 27px; }
  .monitor-idle-message p { font-size: 20px; }
  .monitor-order-header { padding-inline: 12px; }
  .monitor-order .monitor-status { font-size: 14px; }
  .monitor-order-summary, .monitor-single .monitor-order-summary { grid-template-columns: minmax(0,1fr); padding: 10px 12px; gap: 10px; }
  .monitor-order-number h2, .monitor-single .monitor-order-number h2 { font-size: 28px; }
  .monitor-customer h3, .monitor-single .monitor-customer h3 { font-size: 22px; }
  .monitor-progress { margin-inline: 12px; }
  .monitor-products { margin-inline: 10px; }
  .monitor-product { padding: 9px; gap: 8px; }
  .monitor-product > i { width: 30px; height: 30px; }
  .monitor-product b, .monitor-single .monitor-product b { font-size: 18px; }
  .monitor-product small { font-size: 11px; }
  .monitor-product > strong, .monitor-single .monitor-product > strong { font-size: 26px; }
  .monitor-product > strong > span, .monitor-single .monitor-product > strong > span { font-size: 18px; }
  .monitor-order-footer { padding-inline: 12px; }
  .monitor-scanner { padding-inline: 15px; }
  .monitor-scanner input { font-size: 14px; }
  .monitor-scanner .button { padding-inline: 16px; }
}
/* Physical monitor configuration in the main control window. */
#monitor-setup .monitor-options{align-items:stretch;gap:20px;margin-top:22px;}
#monitor-setup .monitor-setup-card{min-width:0;padding:22px;border:1px solid #d7e2e9;border-radius:14px;background:#f7fafc;}
#monitor-setup .monitor-setup-card h3{margin:0 0 8px;font-size:18px;}
#monitor-setup .monitor-setup-card>p{margin:0 0 18px;}
#monitor-setup .monitor-setup-card .button{margin-top:16px;}
#monitor-setup .monitor-status{margin-bottom:16px;}
.monitor-settings{margin-bottom:24px;scroll-margin-top:20px;}
.monitor-assignment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.monitor-assignment-card{padding:18px;background:#f5f9fc;border:1px solid #d7e2e9;border-radius:12px;min-width:0;}
.monitor-role{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.monitor-role h4{font-size:19px;margin:0;}
.monitor-role .badge{margin-left:auto;}
.monitor-role-symbol{display:grid;place-items:center;background:#e0edf7;color:#155783;width:34px;height:34px;border-radius:8px;font-size:18px;font-weight:800;}
.monitor-assignment-card label{margin:16px 0 12px;}
.monitor-assignment-card select{width:100%;min-width:0;}
.monitor-assignment-card>.small{margin-bottom:0;}
.monitor-assignment-footer{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:20px;}
.monitor-settings-status{margin-top:18px;}
@media(max-width:1100px){.monitor-assignment-grid{grid-template-columns:1fr;}.monitor-assignment-card{padding:16px;}.monitor-assignment-card label{margin-block:12px;}}
