:root {
  color-scheme: light; font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --ink: #16213a; --muted: #64708a; --line: #e6eaf1; --surface: #fff;
  --bg: #f4f6fa; --soft: #f8fafc; --selected: #ecf2ff;
  --accent: #2f6df6; --accent-ink: #2154c9; --red: #a52837;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 25px 15px 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 24px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, var(--accent), #673ff0); color: #fff; font-weight: 800; }
.brand small { display: block; margin-top: 5px; color: var(--muted); }
nav { margin-top: 15px; }
.nav-label { display: block; color: var(--muted); margin: 16px 10px 6px; font-size: 12px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px 12px; }
button:hover { border-color: #b5c5e3; background: var(--soft); }
button:disabled { opacity: .55; cursor: default; }
.recipe-edit:disabled { color: var(--muted); background: var(--soft); border-color: var(--line); opacity: 1; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
nav button { display: flex; gap: 10px; align-items: center; width: 100%; margin: 2px 0; text-align: left; color: var(--muted); border-color: transparent; background: transparent; white-space: nowrap; }
nav button:hover, nav button[aria-current] { background: var(--selected); color: var(--accent-ink); border-color: transparent; }
nav button span { width: 17px; text-align: center; }
.environment { margin: auto 6px 0; color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.environment span { background: #16a56a; width: 7px; height: 7px; border-radius: 50%; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); }
#fleet-controls { flex: 1; }
#fleet-device { max-width: min(270px, 52vw); }
.controls.template-row { align-items: end; }
.inline-check { display: flex; align-items: center; gap: 8px; }
#status-controls { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 10px; }
#main-body { padding: 24px 28px 40px; max-width: 1600px; margin: auto; }
h1 { margin: 0; font-size: 27px; letter-spacing: -.6px; }
h2 { margin: 0 0 12px; font-size: 17px; }
p { margin: 8px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-ink); color: white; }
#status:empty { display: none; }
#status, .form-error { color: var(--red); }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.kpi { min-height: 99px; border-top: 3px solid #c4d6ff; }
.kpi small, .muted, .card small { color: var(--muted); }
.kpi strong { display: block; margin-top: 7px; font-size: 27px; font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.card-title { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.card h2 { margin: 0 0 4px; }
.card p { overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 13px; padding: 12px 0; border-block: 1px solid var(--line); }
.metrics strong { display: block; margin-top: 5px; }
.pill { display: inline-block; border-radius: 999px; padding: 4px 9px; background: #edf1f2; color: #364a54; white-space: nowrap; font-size: 12px; }
.pill[data-tone="green"] { background: #e0f4e9; color: #075f40; }
.pill[data-tone="amber"] { background: #fff0d7; color: #794700; }
.pill[data-tone="red"] { background: #fce6e8; color: #8c1e2b; }
.trend { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; }
canvas { max-width: 60%; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; margin-bottom: 14px; }
label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; color: var(--ink); background: white; min-width: 0; }
textarea { min-height: 64px; }
.scroller { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); white-space: nowrap; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 13px; color: var(--muted); background: var(--soft); }
td button { padding: 5px 8px; }
.fixed-actions :is(th,td):last-child { position: sticky; right: 0; background: white; border-left: 1px solid var(--line); }
.fixed-actions th:last-child { background: var(--soft); }
.empty { padding: 24px 18px; color: var(--muted); }
.pager { display: flex; justify-content: end; align-items: center; gap: 8px; margin: 11px 0 16px; }
.subsection { margin-top: 20px; }
dialog { width: min(840px, calc(100vw - 30px)); max-height: calc(100vh - 36px); border: 1px solid var(--line); border-radius: 13px; padding: 22px; color: var(--ink); }
dialog::backdrop { background: #16213a70; }
dialog form[method="dialog"] { margin-top: 16px; }
.editor { display: grid; gap: 11px; margin-top: 14px; }
.editor .primary { justify-self: start; }
.editor .form-error:empty { display: none; }
code { font-family: "IBM Plex Mono", Consolas, monospace; }
@media (max-width: 880px) { body { grid-template-columns: 170px minmax(0,1fr); } header, #main-body { padding-inline: 14px; } .kpis { grid-template-columns: repeat(2,1fr); } .cards { grid-template-columns: 1fr; } }
@media (max-width: 570px) { body { display: block; } .sidebar { height: auto; position: relative; padding: 10px; } .brand { padding-bottom: 8px; } nav { display: flex; flex-wrap: wrap; margin-top: 4px; } nav button { width: auto; } .nav-label,.environment { display: none; } .pagehead h1 { font-size: 21px; } }

.brand strong span { color: var(--accent); }
.brand-mark { flex: 0 0 37px; }
.brand small { white-space: nowrap; font-size: 10px; }
nav button { min-height: 41px; }
nav button .nav-icon { width: 17px; flex: 0 0 17px; font-size: 16px; }
.nav-icon svg,.queue-icon svg,.alarm-symbol svg { display: block; width: 17px; height: 17px; }
nav button .nav-text { width: auto; text-align: left; flex: 1; }
nav button[aria-current] { font-weight: 650; }
.nav-count { color: #fff; background: #d6352d; border-radius: 999px; padding: 1px 6px; min-width: 20px; text-align: center; }
.environment { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin: auto 0 0; background: var(--soft); }
.environment div { display: flex; justify-content: space-between; gap: 8px; }
.environment dd { margin: 0; color: var(--ink); }
#breadcrumb strong { color: var(--ink); }
#clock { padding: 6px 9px; font-family: Consolas, monospace; background: #eef2f8; border-radius: 7px; font-size: 12px; }
#main-body { padding: 27px 32px 40px; }
h1 { font-size: 25px; }
h3 { margin: 0; font-size: 14px; }
.pagehead { align-items: center; flex-wrap: wrap; margin-bottom: 19px; }
.pagehead h1 { margin: 0; }
.pagehead > .controls:empty { display: none; }
.pagehead > .controls { margin-left: auto; }
.segments { display: flex; gap: 3px; flex-wrap: wrap; padding: 3px; border-radius: 9px; background: #eef2f7; }
.segments button { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 10px; font-weight: 650; font-size: 12px; }
.segments [aria-pressed="true"] { background: white; color: var(--accent-ink); box-shadow: 0 2px 5px #1b325719; }
.section-label { font-size: 14px; color: var(--muted); margin: 20px 0 13px; padding-left: 8px; border-left: 3px solid var(--accent); line-height: 1.1; }
.kpis { grid-template-columns: repeat(auto-fit,minmax(min(100%,181px),1fr)); gap: 15px; }
.kpi { min-height: 108px; border-top-width: 1px; position: relative; overflow: hidden; isolation: isolate; padding: 18px 19px; }
.kpi::before { content: ''; position: absolute; z-index: -1; top: -24px; right: -18px; width: 72px; height: 72px; border-radius: 50%; background: var(--decoration,#edf3ff); }
.kpi[data-accent="violet"] { --metric: #7350e8; --decoration: #f4f0ff; }
.kpi[data-accent="cyan"] { --metric: #087e8b; --decoration: #eef9fa; }
.kpi[data-accent="red"] { --metric: #d63737; --decoration: #fff2f2; }
.kpi[data-accent="amber"] { --metric: #956000; --decoration: #fff4df; }
.kpi-value { display: flex; align-items: baseline; gap: 2px; }
.kpi strong { margin-top: 4px; font-size: 29px; }
.kpi-note { display: block; min-height: 1em; margin-top: 3px; }
.kpi-icon { position: absolute; right: 18px; bottom: 17px; font-size: 22px; color: var(--metric,var(--accent)); }
.kpi,.device-card,.bin-card,.pane,.list-pane { border-radius: 15px; box-shadow: 0 2px 4px #16295109,0 10px 24px #24385806; }
.cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; }
.device-card { padding: 0 17px 12px; overflow: hidden; }
.device-card .card-title { padding: 16px 0 13px; }
.device-card h2 { font-size: 15px; }
.device-location { display: inline-flex; align-items: center; gap: 3px; }
.device-location svg { width: 13px; height: 13px; }
.device-card p { margin: 4px 0 0; font-size: 12px; }
.device-card .metrics { gap: 0; margin: 0 -17px; padding: 0; }
.device-card .metrics > div { padding: 11px 12px; border-right: 1px solid var(--line); }
.device-card .metrics > div:last-child { border-right: 0; }
.device-card .metrics small { font-size: 11px; }
.device-card .metrics strong > small { font-size: 10px; padding-left: 2px; font-weight: 400; }
.device-card .metrics [data-low="true"] strong { color: #bc242b; }
.device-card .last-report { display: inline-block; margin-top: 7px; }
.text-button { border: 0; background: transparent; color: var(--accent-ink); padding: 2px 3px; font-size: inherit; text-align: left; }
.pill[data-tone="blue"] { background: var(--selected); color: var(--accent-ink); }
.device-card .pill[data-tone]::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: currentColor; }
.device-card .pill[data-tone="blue"]::before,.device-card .pill[data-tone="amber"]::before { background: #e99a17; }
.split { display: grid; grid-template-columns: minmax(207px,1fr) minmax(0,2.6fr); gap: 17px; align-items: start; }
.orders-split { grid-template-columns: minmax(238px,1fr) minmax(0,2.15fr); }
.order-id { overflow-wrap: anywhere; }
.order-products { min-width: 110px; max-width: 250px; white-space: normal; }
.order-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; }
.order-pagination .pager { margin-block: 8px; }
.order-sync-error { margin-bottom: 12px; color: var(--red); }
.order-updated { margin: 0 0 8px; font-size: 12px; text-align: end; }
.order-list table { white-space: normal; overflow-wrap: anywhere; }
.order-list :is(th,td) { padding-inline: clamp(5px, 0.8vw, 12px); }
.order-list td:last-child button { white-space: nowrap; }
.order-compact-meta,.order-compact-payment { display: none; }
@media (max-width: 1320px) {
  .order-list :is(th,td):is(:nth-child(6),:nth-child(7),:nth-child(8)) { display: none; }
  .order-compact-meta { display: block; }
}
@media (max-width: 780px) {
  .order-list :is(th,td):is(:nth-child(4),:nth-child(5)) { display: none; }
  .order-compact-payment { display: block; }
  .order-list .order-products { min-width: 0; }
  .order-list .scroller { padding-inline: 8px; }
}
.order-summary { display: grid; gap: 9px; }
.order-summary .pill,.table-name .pill { justify-self: start; }
.order-exception { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--red); }
.order-step-failure { display: grid; justify-items: start; gap: 4px; padding: 10px 12px; border-inline-start: 3px solid var(--red);
  border-radius: 6px; color: var(--red); background: #fff1f0; overflow-wrap: anywhere; }
.order-step-failure a { color: inherit; font-size: 12px; }
.orders-split [aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); }
.pill[data-tone="blue"] { background: var(--selected); color: var(--accent-ink); }
.stack { display: grid; gap: 15px; min-width: 0; }
.pane,.list-pane { padding: 0; overflow: hidden; }
.pane-heading { padding: 14px 17px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pane-heading h2 { margin: 0; font-size: 15px; }
.pane-heading > small { color: var(--muted); }
.list-stack { display: grid; max-height: 560px; overflow: auto; }
.list-stack > button { display: flex; align-items: center; gap: 9px; justify-content: space-between; padding: 14px 15px; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.list-stack > button[aria-pressed="true"] { background: var(--selected); }
.list-stack > button:focus-visible { outline-offset: -3px; }
.list-stack button > div { flex: 1; min-width: 0; }
.list-stack button small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.queue-icon { display: grid; place-items: center; background: var(--soft); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px; }
.flow,.step-list { list-style: none; padding: 20px 15px; margin: 0; display: grid; gap: 6px; }
.flow { grid-template-columns: repeat(5,minmax(69px,1fr)); overflow: auto; }
.flow li,.step-list li { position: relative; text-align: center; display: grid; align-content: start; gap: 6px; justify-items: center; }
.flow li b,.step-list li b { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #eef2f7; color: var(--muted); }
.flow li:not(:last-child)::after { content: ''; position: absolute; height: 2px; background: var(--line); top: 15px; width: calc(100% - 24px); left: calc(50% + 15px); }
.flow li[data-stage="done"]::after { background: #18a365; }
.flow li[data-stage="done"] b,.step-list li[data-step="succeeded"] b { background: #139657; color: #fff; }
.flow li[data-stage="current"] b,.step-list li[data-step="running"] b { background: var(--accent); color: #fff; }
.flow li[data-stage="failed"] b,.step-list li[data-step="failed"] b { background: #b42318; color: #fff; }
.flow li[data-stage="failed"] small,.step-list li[data-step="failed"] .step-evidence { color: var(--red); }
.flow li[data-stage="attention"] b { background: #ffefd2; color: #765212; }
.flow li[data-stage="stopped"] b { outline: 2px solid var(--muted); outline-offset: -2px; }
.flow li small,.step-list li small { color: var(--muted); }
.step-list { grid-template-columns: repeat(auto-fit,minmax(105px,1fr)); }
.step-list li { overflow-wrap: anywhere; }
.step-list li b { min-width: 31px; width: auto; padding-inline: 4px; }
.step-list li[data-step="inferred"] b { background: #e6f4ee; color: #116c47; }
.step-list li[data-step="missing"] b { border: 1px dashed #8290a4; background: transparent; }
.step-list li:is(:focus,:target) { outline: 2px solid var(--red); border-radius: 6px; scroll-margin-block-start: 16px; }
.flow li span,.step-list li strong { font-size: 12px; }
.catalog-tabs button[aria-pressed="true"],.device-tabs button[aria-pressed="true"],.pane-heading button[aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); border-color: #cfdcff; }
.catalog-heading { margin-bottom: 8px; }
.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 14px 17px; gap: 12px 16px; }
.fact-grid div { display: grid; gap: 4px; min-width: 0; }
.fact-grid dt,.fact-grid dd { margin: 0; overflow-wrap: anywhere; }
.fact-grid dt { color: var(--muted); font-size: 12px; }
.pane-body,.assignment { padding: 13px 17px; border-top: 1px solid var(--line); }
.pane-body h3,.assignment h3 { margin-bottom: 10px; }
.pane-body .scroller { padding: 0; margin-bottom: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(148px,1fr)); gap: 7px; margin: 0 0 10px; }
.check-grid label { display: flex; align-items: center; gap: 6px; padding: 7px; background: var(--soft); border-radius: 7px; }
input[type="checkbox"] { accent-color: var(--accent); }
.step-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.assignment .device-tabs { margin: 0 0 9px; }
.release-log { list-style: none; margin: 10px 0 0; padding: 10px; background: var(--soft); border-radius: 8px; color: var(--muted); font-family: Consolas, "Microsoft YaHei", monospace; max-height: 150px; overflow: auto; }
.release-log li { margin: 3px 0; overflow-wrap: anywhere; }
.device-tabs { margin-bottom: 13px; }
.device-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-summary > div:first-child { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.device-summary small,.bin-card small { color: var(--muted); }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,224px),1fr)); gap: 13px; }
.bin-card { padding: 14px; }
.bin-reading { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; margin: 17px 0 6px; }
.bin-reading strong { font-size: 23px; }
.bin-meta { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 12px; }
meter { display: block; width: 100%; height: 11px; }
meter::-webkit-meter-bar { background: #eef2f7; border: 0; }
meter::-webkit-meter-optimum-value { background: #18a365; }
meter[data-low="true"]::-webkit-meter-optimum-value { background: #e79a24; }
.alarm-row { padding: 14px 17px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; align-items: start; }
.alarm-symbol { display: grid; place-items: center; height: 34px; border-radius: 9px; background: var(--selected); color: var(--accent-ink); font-size: 18px; }
.alarm-row[data-tone="red"] .alarm-symbol { background: #fce6e8; color: #942133; }
.alarm-row[data-tone="amber"] .alarm-symbol { background: #fff0d7; color: #784500; }
.alarm-main p,.alarm-main small { color: var(--muted); overflow-wrap: anywhere; }
.modal-close { position: absolute; top: 10px; right: 13px; }
.modal-close button { font-size: 19px; line-height: 18px; }
#dialog-title { padding-right: 35px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.form-grid .wide { grid-column: 1 / -1; }
.controller-facts h3 { margin: 0 0 8px; }
#toast { position: fixed; bottom: 18px; right: 22px; max-width: min(380px,calc(100vw - 44px)); z-index: 5; padding: 10px 14px; border-radius: 9px; color: white; background: var(--ink); box-shadow: 0 4px 13px #16213a45; }
@media (max-width: 1020px) { #main-body { padding-inline: 20px; } .alarm-row { grid-template-columns: 34px minmax(0,1fr); } .alarm-row > .controls { grid-column: 2; } .split { grid-template-columns: minmax(170px,1fr) minmax(0,2fr); } }
@media (max-width: 730px) { .split { grid-template-columns: 1fr; } .list-stack { max-height: 250px; } #clock { display: none; } }
@media (max-width: 570px) { #main-body { padding: 16px 12px; } .sidebar .environment { display: none; } .sidebar .brand { min-height: 0; } nav button .nav-text { flex: none; } nav button { min-height: 35px; } header { flex-wrap: wrap; } .pagehead > .controls { margin-left: 0; } }

.config-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
.config-facts div { border: 1px solid var(--line); background: var(--soft); border-radius: 9px; padding: 10px; }
.config-facts dd { font-weight: 650; }
.bin-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bom-list { list-style: none; margin: 0 0 15px; padding: 0; }
.bom-list li { display: flex; gap: 9px; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bom-list small { margin-inline-start: 8px; }
.step-chips { list-style: none; padding: 0; margin: 0; }
.step-chips li { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); padding: 4px 8px; border-radius: 7px; }
.step-chips b { color: var(--accent-ink); }
.table-name { display: grid; gap: 4px; }
.product-name-cell { display: flex; align-items: center; gap: 10px; }
.product-thumbnail { display: block; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.product-image-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.product-image-preview,.product-image-empty { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 8px; background: var(--soft); }
.product-image-preview { object-fit: cover; }
.product-image-empty:not([hidden]) { display: grid; place-items: center; color: var(--muted); }
.product-image-picker { position: relative; margin-inline-start: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.product-image-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.product-image-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.catalog-tabs { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.catalog-tabs button { flex-shrink: 0; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); }
.catalog-tabs button[aria-pressed="true"] { background: transparent; border-color: var(--accent); font-weight: 650; }
.catalog-tabs small { display: inline-block; padding: 1px 6px; margin-left: 4px; border-radius: 99px; background: #eef2f8; }
.catalog-tabs small:empty { display: none; }
.catalog-sources { flex-wrap: wrap; margin-bottom: 12px; }
.catalog-sources button[aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); border-color: #cfdcff; font-weight: 650; }
.catalog-sources small { margin-left: 4px; }
.catalog-source-filters { padding: 12px 17px; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.material-inventory .filters { padding: 12px 17px; margin: 0; border: 0; border-radius: 0; }
.material-inventory td:nth-child(2), .material-inventory td:nth-child(3) { font-variant-numeric: tabular-nums; }
.material-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 17px; }
.material-footer .pager { margin: 0; }
.catalog-recipe-results td:last-child > button { min-inline-size: 54px; }
.recipe-shelf-switch {
  display: inline-flex; align-items: center; position: relative; justify-content: flex-end;
  min-inline-size: 62px; min-block-size: 27px; padding: 2px 8px 2px 25px;
  border: 1px solid #d5dce7; border-radius: 999px; background: #e8edf4;
  color: #455571; font-size: 12px; font-weight: 650;
}
.recipe-shelf-switch::before {
  content: ''; position: absolute; inset-inline-start: 4px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #16213a35; pointer-events: none;
}
.recipe-shelf-switch[aria-checked="true"] {
  justify-content: flex-start; padding: 2px 25px 2px 8px;
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.recipe-shelf-switch[aria-checked="true"]::before { inset-inline-start: auto; inset-inline-end: 4px; }
.recipe-shelf-switch[aria-checked="true"]:hover:not(:disabled) { background: var(--accent-ink); }
.catalog-recipe-results td:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 650; }
@media (max-width: 570px) {
  .catalog-recipe-results .scroller { padding: 0; border: 0; }
  .catalog-recipe-results :is(table,tbody) { display: block; }
  .catalog-recipe-results thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .catalog-recipe-results tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px 12px; padding: 14px; border-bottom: 1px solid var(--line); }
  .catalog-recipe-results td,.catalog-recipe-results .fixed-actions td:last-child { position: static; border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  .catalog-recipe-results td:is(:nth-child(3),:nth-child(4),:nth-child(5)) { display: none; }
  .catalog-recipe-results td:nth-child(2) { justify-self: end; }
  .catalog-recipe-results td:nth-child(6) { align-self: center; }
  .catalog-recipe-results td:last-child { justify-self: end; }
}
.recipe-drawer {
  --drawer-padding: clamp(14px, 3vw, 24px);
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(760px, 100%); max-width: 100%;
  height: 100dvh; max-height: none; border-width: 0 0 0 1px; border-radius: 14px 0 0 14px;
  overflow: hidden; background: var(--surface); box-shadow: -14px 0 50px #16213a24;
}
.recipe-drawer #dialog-body {
  height: 100%; overflow: auto; overscroll-behavior: contain;
  padding: 0 var(--drawer-padding) var(--drawer-padding); scroll-padding-block: 72px 64px;
}
.recipe-drawer #dialog-title {
  position: sticky; top: 0; z-index: 2; min-height: 58px;
  margin: 0 calc(-1 * var(--drawer-padding)) 16px; padding: 17px 58px 16px var(--drawer-padding);
  background: var(--surface); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; outline: none;
}
.recipe-drawer .modal-close { z-index: 3; top: 12px; right: var(--drawer-padding); margin-top: 0; }
.recipe-drawer .segments { margin-top: 16px; }
.recipe-drawer-section { margin-top: 16px; }
.recipe-drawer-section .scroller { padding: 0; }
.recipe-drawer-section > .dialog-actions { margin: 0; }
.recipe-drawer .editor > .dialog-actions {
  position: sticky; bottom: 0; z-index: 1; margin: 0 calc(-1 * var(--drawer-padding));
  border-top: 1px solid var(--line); padding: 10px var(--drawer-padding); background: var(--surface);
}
@media (max-width: 550px) {
  .recipe-drawer { border: 0; border-radius: 0; }
  .recipe-drawer .form-grid { grid-template-columns: minmax(0, 1fr); }
  .recipe-drawer-section :is(th, td) { padding-inline: 8px; white-space: normal; }
}
.recipe-pumps { min-width: 0; }
.recipe-pumps h3 { margin-bottom: 8px; }
.recipe-pumps .scroller { padding: 0; }
.recipe-pumps table { min-width: 480px; }
.recipe-customization > div { min-width: 0; }
.recipe-customization input[type="number"] { width: 76px; }
.recipe-pumps input { width: 95px; }
.recipe-reference { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.recipe-reference summary { cursor: pointer; font-weight: 650; }
.recipe-reference > label { margin: 12px 0 0; }
@media (max-width: 550px) { .recipe-customization { grid-template-columns: minmax(0,1fr); } }
.catalog-heading label { display: flex; align-items: center; gap: 6px; }
.stock-pane { min-width: 0; }
.device-summary { min-height: 38px; margin: 0 0 12px; }
.bin-card h3 { display: flex; align-items: center; gap: 7px; }
.equipment-icon { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 7px; background: var(--selected); color: var(--accent-ink); }
.equipment-icon svg { width: 15px; height: 15px; }
.bin-reading { justify-content: start; }
.bin-meta+.controls { border-top: 1px solid var(--line); padding-top: 8px; }
.bin-card .controls button { flex: 1 1 auto; font-size: 12px; padding: 5px 8px; }
.bin-card meter::-webkit-meter-optimum-value { background: var(--accent); }
.bin-card meter[data-low="true"]::-webkit-meter-optimum-value { background: #e79a24; }
.alert-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 20px; }
.alert-total { display: flex; align-items: center; gap: 12px; min-width: 0; }
.alert-total .alarm-symbol { width: 36px; flex-shrink: 0; }
.alert-total[data-tone="red"] .alarm-symbol { background: #fce6e8; color: #942133; }
.alert-total[data-tone="amber"] .alarm-symbol { background: #fff0d7; color: #784500; }
.alert-total strong,.alert-total small { display: block; }
.alert-total strong { font-size: 23px; line-height: 1.25; }
.alert-total small { color: var(--muted); }
@media (max-width: 850px) {
  .alert-summary { gap: 8px; }
  .alert-total { padding: 11px; gap: 7px; flex-wrap: wrap; }
}
@media (max-width: 480px) { .config-facts { grid-template-columns: minmax(0,1fr); } }
.machine-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 8px;
  min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.machine-fields legend { color: var(--ink); font-weight: 700; padding-inline: 6px; }
.machine-fields p { grid-column: 1 / -1; }
.machine-fields :disabled { background: var(--soft); }
.bin-pipe-editor summary { cursor: pointer; font-weight: 650; margin-bottom: 8px; }
.pipe-bindings { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.pipe-bindings li { display: grid; gap: 1px; }
.machine-process h4,.recipe-parameters h4 { margin: 0; font-size: 13px; }
.pipe-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pipe-durations { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pipe-durations .fact-grid { padding: 0; }
.machine-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 12px; }
.machine-layout section { min-width: 0; }
.machine-layout .fact-grid { padding: 8px 0 0; }
.assignment > button+button { margin-inline-start: 8px; }
@media (max-width: 800px) {
  .editor .form-grid:has(.machine-fields),.machine-layout { grid-template-columns: minmax(0,1fr); }
}
.kelly-detail-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; }
.kelly-detail-card { min-width: 0; padding: 14px; background: var(--soft); }
.kelly-detail-card h4 { margin: 0 0 8px; font-size: 15px; }
.kelly-detail-card .fact-grid { padding: 12px 0 0; gap: 8px 12px; }
.kelly-detail-card details { margin-top: 12px; }
.kelly-detail-card summary { cursor: pointer; font-weight: 600; }
.kelly-detail-card details .scroller { margin-top: 8px; }
.kelly-snapshot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; min-width: 0; }
.kelly-detail-reason { margin: 0; padding: 9px 11px; border-inline-start: 3px solid #dcaa58; background: #fff6e6; overflow-wrap: anywhere; }
.kelly-detail-card .kelly-detail-reason { margin-top: 12px; }
