:root {
  color-scheme: light;
  --ground: #f4f7f8;
  --frame: #edf2f3;
  --sheet: #ffffff;
  --raised: #f7f9fa;
  --active: #e9eef0;
  --edge: #e4e9eb;
  --rule: #edf0f1;
  --control: #c8d1d5;
  --ink: #172126;
  --muted: #5e6b70;
  --faint: #68767b;
  --accent: #167286;
  --accent-soft: #e7f2f4;
  --good: #276b4b;
  --good-bg: #e9f4ed;
  --bad: #a33832;
  --bad-bg: #faece9;
  --warning: #8a5b12;
  --warning-bg: #faf2df;
  --purple: #67527d;
  --purple-bg: #f0ecf5;
  --sidebar: 228px;
  --radius: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ground); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--ground); font: 14px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-frame { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: var(--frame); }
.sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 20px 12px 12px; overflow-y: auto; background: var(--frame); }
.brand { display: flex; flex: 0 0 68px; align-items: center; justify-content: center; width: 100%; min-height: 68px; margin: 0 0 18px; padding: 4px 8px; overflow: hidden; border-radius: 7px; background: #151b20; }
.brand-logo { display: block; width: 100%; max-width: 198px; height: auto; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; padding: 10px 8px; margin-bottom: 19px; border-radius: 7px; background: rgba(255,255,255,.58); }
.workspace-dot, .avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #dde9e8; color: #305c5d; font-size: 12px; font-weight: 600; }
.workspace-copy, .profile-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.workspace-copy strong, .profile-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small, .profile-copy small { color: var(--muted); font-size: 12px; }
.icon-button { position: relative; display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--active); color: var(--ink); }
.icon-button svg { width: 17px; height: 17px; }
.switch-button { width: 24px; height: 30px; }
.switch-button svg, .profile > svg { width: 16px; height: 16px; }
.nav-groups { display: flex; flex: 1; flex-direction: column; gap: 13px; }
.nav-group { display: grid; gap: 2px; }
.nav-label { margin: 0 8px 5px; color: var(--faint); font-size: 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 35px; padding: 0 9px; border-radius: 6px; color: #526065; font-size: 13px; transition: background-color .15s, color .15s; }
.nav-item svg { width: 16px; height: 16px; color: #657176; }
.nav-item:hover { background: rgba(255,255,255,.72); color: var(--ink); }
.nav-item.active { background: #fff; color: var(--ink); font-weight: 500; }
.nav-item.active svg { color: var(--accent); }
.nav-count { margin-left: auto; color: var(--muted); font: 12px var(--mono); }
.nav-alert { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #bd8140; }
.sidebar-bottom { margin-top: 18px; }
.help-card { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; padding: 10px 8px; border-radius: 6px; background: rgba(255,255,255,.58); }
.help-mark { display: grid; flex: none; place-items: center; width: 23px; height: 23px; border: 1px solid var(--control); border-radius: 50%; color: var(--muted); font-size: 12px; }
.help-card div { display: grid; flex: 1; gap: 1px; }
.help-card strong { font-size: 12px; font-weight: 500; }
.help-card small { color: var(--muted); font-size: 12px; }
.help-card > svg { width: 14px; height: 14px; color: var(--faint); }
.profile { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 7px; text-align: left; border: 0; border-radius: 6px; background: transparent; }
.profile:hover { background: rgba(255,255,255,.7); }
.avatar-user { background: #e7e7ef; color: #555b79; }
.profile > svg { color: var(--faint); }
.content-frame { min-width: 0; min-height: 100vh; padding: 0 8px 8px 0; background: var(--frame); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 26px; }
.breadcrumb, .topbar-actions { display: flex; align-items: center; }
.breadcrumb { gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumb svg { width: 13px; height: 13px; color: #859196; }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.topbar-actions { gap: 15px; }
.network-status { display: inline-flex; align-items: center; gap: 6px; color: #46684f; font-size: 12px; white-space: nowrap; }
.network-status i { width: 7px; height: 7px; border-radius: 50%; background: #4b8c69; }
.network-status[data-state="offline"] { color: #873e35; }.network-status[data-state="offline"] i { background: #b64d43; }
.install-app-button { min-height: 32px; padding: 0 9px; }
.install-app-button svg { width: 14px; height: 14px; }
.install-app-button.install-ready { border-color: #9bbec3; color: #205c68; }
.offline-notice { margin: 0 14px 8px; padding: 11px 14px; border: 1px solid #ead9b8; border-radius: 6px; background: #fff8ea; color: #654d1b; font-size: 12px; }
.offline-notice strong { font-weight: 600; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(330px, 28vw); height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: rgba(255,255,255,.63); color: var(--muted); }
.search-box:focus-within { border-color: var(--control); background: #fff; }
.search-box svg { width: 15px; height: 15px; flex: none; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
kbd { flex: none; padding: 1px 4px; border-radius: 3px; background: #e9edef; color: var(--muted); font: 12px var(--mono); }
.notification-button > span { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.topbar-divider { width: 1px; height: 22px; background: #d9e0e2; }
.today-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.main-sheet { min-height: calc(100vh - 64px); padding: 21px 25px 14px; border: 1px solid #e4e8e9; border-radius: 14px 14px 0 0; background: var(--sheet); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 17px; padding: 0 2px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .025em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 3px; font-size: 22px; line-height: 1.28; font-weight: 600; letter-spacing: -.025em; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; flex: none; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--control); border-radius: 6px; background: #fff; font-size: 12px; font-weight: 500; transition: background .15s, transform .12s; }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { border-color: #172126; background: #172126; color: #fff; }
.btn-primary:hover { background: #303c41; }
.btn-secondary { color: var(--ink); }
.btn-compact { min-height: 30px; padding: 0 9px; font-size: 12px; }
.signal-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 24px; border: 1px solid var(--edge); border-radius: 7px; }
.signal-cell { min-width: 0; padding: 11px 17px 10px; }
.signal-cell + .signal-cell { border-left: 1px solid var(--edge); }
.signal-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.signal-value { display: block; font-size: 25px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.signal-value small { color: var(--muted); font-size: 14px; font-weight: 400; }
.signal-warning { color: var(--warning); }
.signal-note { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.production-section { margin-bottom: 18px; }
.section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading { margin: 0 2px 11px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.section-heading p, .panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-link { display: inline-flex; flex: none; align-items: center; gap: 5px; color: #245d68; font-size: 12px; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 13px; height: 13px; }
.flow-track { display: grid; grid-template-columns: repeat(6,minmax(100px,1fr)); overflow: hidden; border: 1px solid var(--edge); border-radius: 7px; }
.flow-stage { display: flex; min-width: 0; flex-direction: column; gap: 9px; padding: 13px 14px 12px; text-align: left; border: 0; background: #fff; transition: background .15s; }
.flow-stage + .flow-stage { border-left: 1px solid var(--edge); }
.flow-stage:hover, .flow-stage.stage-selected { background: #f7fafb; }
.flow-stage.stage-selected { box-shadow: inset 0 -2px var(--accent); }
.flow-stage-top { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.flow-stage-top strong { margin-left: auto; color: var(--ink); font: 500 15px var(--mono); }
.stage-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #8c999e; }
.stage-blue { background: #5389ad; }.stage-purple { background: #82729a; }.stage-teal { background: #258095; }.stage-amber { background: #b18336; }.stage-green { background: #578566; }
.flow-bar { display: block; height: 4px; overflow: hidden; border-radius: 4px; background: #e9eef0; }
.flow-bar i { display: block; height: 100%; border-radius: inherit; background: #8da9af; }
.stage-selected .flow-bar i { background: var(--accent); }
.flow-stage small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.85fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.bottom-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 16px; align-items: start; }
.access-module { padding-bottom: 20px; }
.security-status { display: inline-flex; align-items: center; gap: 7px; color: #6d511e; font-size: 12px; white-space: nowrap; }
.security-status i { width: 7px; height: 7px; border-radius: 50%; background: #a87820; }
.access-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px 2px 24px; }
.access-overview > div { min-width: 0; }
.access-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 13px; border: 1px solid var(--edge); border-radius: 9px; background: var(--raised); color: var(--accent); }
.access-icon svg { width: 19px; height: 19px; }
.access-overview h3 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.access-overview p { max-width: 32ch; margin: 0; color: var(--muted); font-size: 12px; }
.access-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border: 1px solid var(--edge); border-radius: 8px; background: var(--raised); }
.access-action > div { display: grid; gap: 3px; }
.access-action strong { font-size: 13px; font-weight: 600; }
.access-action span { color: var(--muted); font-size: 12px; }
.access-action .btn { flex: none; }
.access-note { max-width: 86ch; margin: 14px 2px 0; color: var(--muted); font-size: 12px; }
.panel { min-width: 0; border: 1px solid var(--edge); border-radius: 7px; background: #fff; }
.orders-panel { overflow: hidden; }
.panel-heading { padding: 12px 16px 9px; }
.panel-menu { width: 28px; height: 28px; }
.panel-menu svg { width: 16px; height: 16px; }
.order-filters { display: flex; gap: 17px; padding: 0 16px 8px; border-bottom: 1px solid var(--edge); }
.filter-button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 35px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.filter-button span { color: var(--faint); font: 12px var(--mono); }
.filter-button.selected { color: var(--ink); font-weight: 500; }
.filter-button.selected::after { position: absolute; right: 0; bottom: -9px; left: 0; height: 2px; background: var(--accent); content: ""; }
.table-scroll { width: 100%; overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; text-align: left; }
.orders-table th { height: 30px; padding: 0 10px; color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.orders-table th:first-child, .orders-table td:first-child { padding-left: 16px; }
.orders-table td { height: 47px; padding: 5px 10px; border-top: 1px solid var(--rule); font-size: 12px; vertical-align: middle; white-space: nowrap; }
.orders-table tr { cursor: pointer; }
.orders-table tbody tr:hover { background: #fafcfc; }
.order-id { display: block; color: #285b67; font: 500 11px var(--mono); }
.order-client { display: block; max-width: 160px; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.stage-label { display: inline-flex; align-items: center; gap: 6px; color: #384449; font-size: 12px; }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #739296; }
.status-dot.warn { background: #be8531; }.status-dot.late { background: #b74f43; }.status-dot.quality { background: #7a6992; }
.progress-cell { display: flex; align-items: center; gap: 6px; min-width: 85px; }
.progress-meter { width: 45px; height: 4px; overflow: hidden; border-radius: 3px; background: #e9eef0; }
.progress-meter i { display: block; height: 100%; border-radius: inherit; background: #4e8c99; }
.progress-cell span { color: var(--muted); font: 12px var(--mono); }
.due { color: var(--muted); }
.due.late { color: var(--bad); }
.table-action { width: 26px; height: 26px; border: 0; border-radius: 4px; background: transparent; color: var(--faint); }
.table-action:hover { background: var(--active); color: var(--ink); }
.table-action svg { width: 15px; height: 15px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 39px; padding: 8px 16px; border-top: 1px solid var(--edge); color: var(--muted); font-size: 12px; }
.panel-footer .text-link { font-size: 12px; }
.machine-panel { padding-bottom: 11px; }
.machine-panel .panel-heading { padding-bottom: 9px; }
.machine-summary { display: flex; align-items: baseline; gap: 6px; margin: 0 16px; padding: 10px 0 9px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.machine-summary strong { font: 500 16px var(--mono); }
.machine-summary > span:not(.machine-live) { color: var(--muted); font-size: 12px; }
.machine-live { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.machine-live i { width: 6px; height: 6px; border-radius: 50%; background: #549073; }
.machine-list { display: grid; padding: 2px 16px 0; }
.machine-row { display: grid; grid-template-columns: 30px minmax(75px,.75fr) minmax(72px,1fr) 35px; align-items: center; gap: 8px; min-height: 34px; border-bottom: 1px solid var(--rule); }
.machine-id { color: var(--muted); font: 12px var(--mono); }
.machine-name { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.machine-state { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.machine-state i { width: 6px; height: 6px; border-radius: 50%; background: #4c9170; }
.machine-state.idle i { background: #abb7bb; }.machine-state.stopped i { background: #bc7651; }
.machine-load { color: #42555a; font: 12px var(--mono); text-align: right; }
.machine-footnote { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 16px 0; }
.machine-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.machine-legend i { width: 6px; height: 6px; border-radius: 50%; background: #4c9170; }
.machine-legend .legend-idle { background: #abb7bb; }.machine-legend .legend-stop { background: #bc7651; }
.materials-panel, .quality-panel { padding-bottom: 2px; }
.materials-panel .panel-heading, .quality-panel .panel-heading { padding-bottom: 10px; }
.materials-list { padding: 0 16px; }
.material-row { display: grid; grid-template-columns: minmax(100px,1fr) minmax(92px,.8fr) 88px 76px; align-items: center; gap: 10px; min-height: 45px; border-top: 1px solid var(--rule); }
.material-row:first-child { border-top: 0; }
.material-name { min-width: 0; }
.material-name strong, .material-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-name strong { font-size: 12px; font-weight: 500; }
.material-name small { color: var(--muted); font-size: 12px; }
.stock-track { height: 5px; overflow: hidden; border-radius: 3px; background: #edf0f1; }
.stock-track i { display: block; height: 100%; border-radius: inherit; background: #bd8740; }
.stock-value { color: #4e575b; font: 12px var(--mono); text-align: right; white-space: nowrap; }
.reorder-link { padding: 5px 0; border: 0; background: transparent; color: #285f6b; font-size: 12px; font-weight: 500; text-align: right; }
.reorder-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.next-up-list { padding: 0 14px; }
.next-up-row { display: grid; grid-template-columns: 27px minmax(0,1fr) max-content 14px; align-items: center; gap: 9px; width: 100%; min-height: 56px; padding: 7px 2px; text-align: left; border: 0; border-top: 1px solid var(--rule); background: transparent; }
.next-up-row:first-child { border-top: 0; }
.next-up-row:hover .next-copy strong { color: #285f6b; }
.next-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: #eff2f3; color: #57656a; }
.next-icon svg { width: 15px; height: 15px; }
.quality-icon { background: var(--purple-bg); color: var(--purple); }.shipment-icon { background: #e8f1f2; color: #426f77; }
.next-copy { display: grid; min-width: 0; gap: 1px; }
.next-copy strong { overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.next-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.next-time { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.row-chevron { width: 13px; height: 13px; color: #859196; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px 0; color: var(--muted); font-size: 12px; }
.page-footer .powered-by { color: #285d68; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.page-footer span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.page-footer i { width: 6px; height: 6px; border-radius: 50%; background: #bd8740; }
.mobile-menu { display: none; }
.mobile-brand { display: none; }
.mobile-nav-backdrop { display: none; }
.mobile-nav-backdrop[hidden] { display: none; }
body.menu-open { overflow: hidden; }

.overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(19,29,33,.34); }
.overlay[hidden] { display: none; }
.dialog { width: min(100%, 500px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 21px 23px 19px; border: 1px solid var(--edge); border-radius: 10px; background: #fff; box-shadow: 0 14px 42px rgba(12,24,28,.16); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading .eyebrow { margin-bottom: 3px; }
.dialog-heading h2 { margin: 0; font-size: 19px; font-weight: 600; }
.dialog form { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 12px; font-weight: 500; }
.field > span small { margin-left: 4px; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid var(--control); border-radius: 5px; background: #fff; font-size: 12px; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.form-two { display: grid; grid-template-columns: minmax(0,1fr) 140px; gap: 12px; }
.form-note { display: flex; align-items: flex-start; gap: 8px; padding: 9px; border-radius: 5px; background: #f4f7f8; color: var(--muted); font-size: 12px; }
.form-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--rule); }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 20px; max-width: calc(100vw - 40px); padding: 11px 14px; border: 1px solid #dce4e6; border-radius: 6px; background: #172126; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(7px); transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateY(0); }
.empty-row { padding: 22px !important; color: var(--muted); text-align: center; }
.module-panel { margin-bottom: 14px; }
.module-empty { display: grid; justify-items: start; gap: 7px; padding: 26px 17px 23px; border-top: 1px solid var(--rule); }
.module-empty strong { font-size: 13px; font-weight: 500; }
.module-empty p { max-width: 540px; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.module-line { display: block; width: 34px; height: 3px; margin-bottom: 3px; border-radius: 3px; background: var(--accent); }

@media (max-width: 1180px) {
  :root { --sidebar: 210px; }
  .main-sheet { padding-right: 20px; padding-left: 20px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.45fr) minmax(280px,.9fr); }
  .flow-stage { padding-right: 10px; padding-left: 10px; }
  .flow-stage-top { gap: 5px; font-size: 12px; }
  .orders-table th, .orders-table td { padding-right: 7px; padding-left: 7px; }
  .orders-table th:first-child, .orders-table td:first-child { padding-left: 12px; }
}
@media (max-width: 980px) {
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .machine-list { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; }
  .machine-row:nth-child(2) { border-bottom: 0; }
  .flow-track { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .flow-stage:nth-child(4) { border-left: 0; border-top: 1px solid var(--edge); }
  .flow-stage:nth-child(5), .flow-stage:nth-child(6) { border-top: 1px solid var(--edge); }
  .flow-stage:nth-child(6) { border-left: 1px solid var(--edge); }
}
@media (max-width: 720px) {
  .app-frame { display: block; }
  .sidebar { position: fixed; z-index: 15; top: 0; bottom: 0; left: 0; width: min(290px, 84vw); height: 100dvh; box-shadow: 12px 0 35px rgba(12,24,28,.13); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar .nav-item { min-height: 44px; }
  .mobile-nav-backdrop.is-visible { position: fixed; z-index: 14; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(19,29,33,.26); }
  .content-frame { min-height: 100vh; padding: 0; }
  .topbar { height: 52px; padding: 0 14px; }
  .mobile-menu { display: inline-grid; width: 44px; height: 44px; margin-left: -7px; }
  .mobile-brand { display: inline-grid; flex: none; width: 30px; height: 30px; place-items: center; padding: 3px; border-radius: 5px; background: #151b20; }
  .mobile-brand img { display: block; width: 24px; height: 24px; }
  .breadcrumb { margin-right: auto; margin-left: 7px; }
  .breadcrumb > span, .breadcrumb > svg { display: none; }
  .topbar-actions { gap: 5px; }
  .network-status { width: 10px; height: 40px; justify-content: center; }
  .network-status span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .install-app-button { width: 40px; min-width: 40px; height: 40px; padding: 0; }
  .install-app-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .search-box { width: 44px; height: 44px; padding: 0 12px; border: 0; background: transparent; }
  .search-box input, .search-box kbd { display: none; }
  .search-box svg { width: 18px; height: 18px; }
  .search-box.search-open { position: absolute; z-index: 3; right: 57px; left: 52px; width: auto; border: 1px solid var(--control); background: #fff; }
  .search-box.search-open input { display: block; }
  .notification-button { width: 44px; height: 44px; }
  .notification-button > span { top: 10px; right: 10px; }
  .topbar-divider, .today-label { display: none; }
  .main-sheet { min-height: calc(100vh - 52px); padding: 21px 15px 14px; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; }
  .page-heading { align-items: flex-start; margin-bottom: 17px; padding: 0; }
  h1 { font-size: 21px; }
  .page-subtitle { max-width: 410px; font-size: 12px; }
  .eyebrow { font-size: 12px; }
  .heading-actions { gap: 6px; }
  .heading-actions .btn-secondary { display: none; }
  .btn { min-height: 44px; padding: 0 9px; font-size: 12px; }
  .signal-strip { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 19px; }
  .signal-cell { padding: 11px 12px; }
  .signal-cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--edge); }
  .signal-cell:nth-child(4) { border-top: 1px solid var(--edge); }
  .signal-label { font-size: 12px; }
  .signal-value { font-size: 23px; }
  .signal-note { font-size: 12px; }
  .production-section { margin-bottom: 17px; }
  .section-heading { align-items: flex-end; margin-bottom: 9px; }
  .section-heading h2, .panel-heading h2 { font-size: 14px; }
  .section-heading p, .panel-heading p { font-size: 12px; }
  .text-link { gap: 2px; font-size: 12px; }
  .flow-track { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .flow-stage { gap: 7px; padding: 10px 8px; }
  .flow-stage-top { gap: 5px; }
  .flow-stage-top strong { font-size: 13px; }
  .flow-stage small { font-size: 12px; }
  .dashboard-grid, .bottom-grid { gap: 12px; margin-bottom: 12px; }
  .bottom-grid { grid-template-columns: minmax(0,1fr); }
  .access-overview { grid-template-columns: minmax(0,1fr); gap: 17px; padding: 16px 12px 19px; }
  .access-overview > div { display: grid; grid-template-columns: 36px minmax(0,1fr); column-gap: 11px; align-items: center; }
  .access-icon { grid-row: 1 / span 2; margin: 0; }
  .access-overview h3 { align-self: end; }
  .access-overview p { max-width: none; }
  .access-action { align-items: flex-start; flex-direction: column; padding: 15px; }
  .security-status { white-space: normal; }
  .panel-heading { padding: 13px 12px 10px; }
  .panel-heading p { max-width: 240px; }
  .order-filters { gap: 15px; padding: 0 12px 8px; }
  .filter-button { height: 44px; }
  .orders-table { min-width: 0; }
  .orders-table thead { display: none; }
  .orders-table tbody { display: grid; }
  .orders-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) max-content; grid-template-rows: auto auto; align-items: center; padding: 6px 0; border-top: 1px solid var(--rule); }
  .orders-table tbody td { height: auto; min-height: 0; padding: 2px 7px; border: 0; white-space: normal; }
  .orders-table tbody td:first-child { grid-column: 1; grid-row: 1; padding-left: 12px; }
  .orders-table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 12px; }
  .orders-table tbody td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .orders-table tbody td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  .orders-table tbody td:last-child { display: none; }
  .orders-table tbody .empty-row { grid-column: 1 / -1; padding: 16px 10px !important; }
  .panel-footer { padding: 8px 12px; }
  .panel-footer .text-link { font-size: 12px; }
  .machine-list { grid-template-columns: minmax(0,1fr); }
  .machine-row:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .machine-row { grid-template-columns: 38px minmax(85px,1fr) minmax(90px,1fr) 42px; }
  .machine-name, .machine-state, .machine-id, .machine-load { font-size: 12px; }
  .material-row { grid-template-columns: minmax(90px,1fr) 70px 70px; gap: 8px; min-height: 51px; }
  .stock-track { display: none; }
  .materials-list { padding: 0 12px; }
  .next-up-list { padding: 0 10px; }
  .next-up-row { grid-template-columns: 27px minmax(0,1fr) max-content 12px; gap: 7px; }
  .next-time { font-size: 12px; }
  .page-footer { flex-direction: column; gap: 5px; padding-top: 13px; }
}
@media (max-width: 430px) {
  .page-heading { gap: 8px; }
  .page-subtitle { max-width: 240px; }
  .heading-actions .btn-primary { width: 44px; min-width: 44px; padding: 0; }
  .heading-actions .btn-primary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .heading-actions .btn-primary svg { width: 18px; height: 18px; }
  .flow-stage-top { font-size: 12px; }
  .flow-stage { padding-right: 6px; padding-left: 6px; }
  .section-heading .text-link { max-width: 104px; line-height: 1.25; }
  .section-heading .text-link svg { flex: none; }
  .next-up-row { grid-template-columns: 27px minmax(0,1fr) 12px; }
  .next-time { grid-column: 2; grid-row: 2; margin-top: -6px; }
  .row-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .form-two { grid-template-columns: minmax(0,1fr) 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
