:root {
  --ink:#18332b;
  --muted:#698077;
  --paper:#f5f7f3;
  --line:#d9e3da;
  --green:#167153;
  --green-dark:#0d4e3b;
  --mint:#e8f4ec;
  --amber:#f4b64a;
  --red:#bd4e45;
}
* {
  box-sizing: border-box;
}
body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font-family:var(--font-sans);
}
.workbench-build-version {
  margin:18px 0 0;
  color:var(--muted);
  font-size:12px;
  font-variant-numeric:tabular-nums;
  text-align:right;
}
button, select, input {
  font:inherit;
}
button {
  cursor:pointer;
}
.page-header {
  padding:22px clamp(24px, 4vw, 72px);
  background:linear-gradient(112deg, #0c3c31 0%, #126345 70%, #1d7e5c 100%);
  color:#fff;
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;
}
.page-header-side {
  display:flex;
  flex:0 0 auto;
  align-items:flex-start;
  gap:16px;
}
.workbench-account-menu {
  position:relative;
}
.workbench-account {
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 8px 7px 10px;
  border:1px solid rgba(203, 239, 218, .42);
  border-radius:12px;
  background:rgba(7, 49, 37, .2);
  color:#fff;
  text-align:left;
}
.workbench-account:hover,
.workbench-account[aria-expanded="true"] {
  border-color:rgba(222, 246, 229, .75);
  background:rgba(7, 49, 37, .34);
}
.workbench-account-avatar {
  display:grid;
  width:30px;
  height:30px;
  place-items:center;
  border-radius:50%;
  color:#13513e;
  background:#d8f0df;
  font-size:13px;
  font-weight:850;
}
.workbench-account-identity {
  display:grid;
  gap:1px;
  min-width:0;
}
.workbench-account-identity b {
  max-width:245px;
  overflow:hidden;
  font-size:13px;
  line-height:1.1;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.workbench-account-identity small {
  color:#c6e8d2;
  font-size:11px;
}
.workbench-account-chevron {
  width:8px;
  height:8px;
  margin:0 4px 3px 3px;
  border-right:2px solid #d8eee1;
  border-bottom:2px solid #d8eee1;
  transform:rotate(45deg);
  transition:transform .15s ease;
}
.workbench-account[aria-expanded="true"] .workbench-account-chevron { transform:rotate(225deg) translate(-2px, -2px); }
.workbench-account-dropdown {
  position:absolute;
  z-index:20;
  top:calc(100% + 8px);
  right:0;
  display:grid;
  min-width:238px;
  padding:6px;
  border:1px solid #cfe1d4;
  border-radius:12px;
  background:#fff;
  box-shadow:0 16px 36px rgba(5, 42, 30, .24);
}
.workbench-account-dropdown[hidden] { display:none; }
.workbench-account-dropdown button,
.workbench-menu-link {
  display:flex;
  min-height:38px;
  align-items:center;
  width:100%;
  margin:0;
  padding:0 11px;
  border:0;
  border-radius:8px;
  color:#1b493a;
  background:transparent;
  font-size:13px;
  font-weight:800;
  text-align:left;
  text-decoration:none;
}
.workbench-account-dropdown button[hidden], .workbench-account-dropdown a[hidden] { display:none; }
.workbench-account-dropdown button:hover,
.workbench-menu-link:hover { background:#edf6ef; }
.workbench-logout {
  color:#974837 !important;
}
.workbench-logout:hover { background:#fcf0ed !important; }
.eyebrow {
  margin:0 0 8px;
  color:#b9e6ce;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.header-home-link {
  display:inline-flex;
  align-items:center;
  margin-inline-start:10px;
  padding-inline-start:11px;
  color:#d8eee1;
  border-inline-start:1px solid rgba(216, 238, 225, .45);
  font-size:10px;
  letter-spacing:.08em;
  text-decoration:none;
}
.header-home-link:hover { color:#fff; }
.header-home-link:focus-visible { outline:2px solid #d8eee1; outline-offset:4px; border-radius:2px; }
h1 {
  margin:0;
  font-size:clamp(26px, 4vw, 38px);
  letter-spacing:-.04em;
}
.page-header p:last-child {
  margin:8px 0 0;
  max-width:680px;
  color:#d8eee1;
}
.local-badge {
  margin:0;
  min-width:0;
  width:min(100%, 650px);
  padding:0 0 0 20px;
  color:var(--ink);
  border:0;
  border-left:1px solid var(--line);
  background:transparent;
  border-radius:0;
  font-size:13px;
  font-weight:500;
  line-height:1.45;
  text-align:left;
  transition:background .15s ease;
}
.local-badge:hover {
  background:#f7faf7;
}
.local-badge:focus-visible {
  outline:2px solid var(--green);
  outline-offset:5px;
}
.crew-badge-heading {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
}
.crew-badge-action { color:var(--green); }
.crew-badge-row {
  display:grid;
  grid-template-columns:90px minmax(0, 1fr);
  gap:12px;
  margin-top:3px;
}
.crew-badge-label { color:var(--muted); }
.crew-badge-row strong { font-weight:700; }
.crew-badge-row strong,
.crew-badge-value,
.crew-badge-error { overflow-wrap:anywhere; }
.crew-badge-error { display:block; color:var(--red); }
.local-badge:disabled { cursor:default; }
.local-badge:disabled .crew-badge-action { display:none; }
main {
  width:100%;
  max-width:none;
  padding:20px clamp(20px, 2.4vw, 48px) 48px;
  margin:0;
}
.shift-bar, .panel {
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 20px rgba(22, 59, 43, .05);
}
.shift-bar {
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:start;
}
.shift-fields {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:7px;
  flex:1;
}
.shift-date-status{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px}
.shift-status-indicators{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding-block-end:4px}
.shift-data-status{font-size:11px;color:var(--muted)}
.shift-data-status[hidden]{display:none}
.shift-data-status[data-phase=loading]::before{content:'◌ ';color:var(--green)}
.shift-data-status[data-phase=ready]::before{content:'✓ ';color:var(--green)}
.shift-data-status[data-phase=error]{color:#843b34;font-weight:700}
.shift-loading-dialog{box-sizing:border-box;width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:30px;border:1px solid #d4e3db;border-radius:20px;background:#fff;color:var(--ink,#17382f);box-shadow:0 24px 80px #153b2b26;text-align:center;overflow:auto;overscroll-behavior:contain}
.shift-loading-dialog::backdrop{background:#17382f38;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.shift-loading-dialog h2{margin:16px 0 10px;font-size:22px;line-height:1.3}
.shift-loading-dialog p{margin:0;color:var(--muted);font-size:15px;line-height:1.5}
.shift-loading-dialog :focus-visible{outline:2px solid var(--green);outline-offset:4px}
.shift-loading-mark{display:inline-block;box-sizing:border-box;width:32px;height:32px;border:3px solid #deebe4;border-top-color:var(--green);border-radius:50%}
@media(prefers-reduced-motion:no-preference){.shift-loading-mark{animation:shift-loading-spin 1s linear infinite}}
@keyframes shift-loading-spin{to{transform:rotate(360deg)}}
@media(forced-colors:active){.shift-loading-dialog :focus-visible{outline-color:Highlight}.shift-loading-mark{border-color:CanvasText;border-top-color:Highlight}}
.shift-bar{margin-block-end:12px}
.shift-date-status label{flex:0 1 240px;min-inline-size:180px}
.shift-state-banner.is-compact{display:inline-flex;align-items:center;gap:8px;margin:0;padding:3px 0;border:0;background:transparent;white-space:nowrap;order:-1}
.shift-state-banner.is-compact .shift-state-icon{margin:0;inline-size:8px;block-size:8px}
.shift-state-banner.is-compact p{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shift-state-banner.is-attention{border-color:#e8cc8a;background:#fff9e9;color:#6d5218}
.reset-saved-shift,
.reset-draft-button {
  justify-self:start;
  padding:2px 0;
  border:0;
  background:none;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:2px;
}
.reset-draft-button:hover { color:var(--green-dark); }
.reset-draft-button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.reset-draft-button:disabled { display:none; }
.reset-saved-shift:hover { color:var(--red); }
.reset-saved-shift:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.reset-saved-shift:disabled { opacity:.5; cursor:default; }
.shift-bar label {
  min-width:220px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.shift-state-banner {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:10px 0;
  padding:11px 14px;
  color:#315746;
  border:1px solid #cfe3d5;
  border-radius:12px;
  background:#f2f8f4;
}
.shift-state-banner[hidden] { display:none; }
.shift-state-banner.is-closed {
  color:#4f6259;
  border-color:#d9e1dc;
  background:#f3f5f4;
}
.shift-state-banner.is-loading {
  color:#526b60;
  border-color:#dce7df;
  background:#f7faf8;
}
.shift-state-banner.is-warning {
  color:#6d5218;
  border-color:#e8cc8a;
  background:#fff9e9;
}
.shift-state-banner > div { min-width:0; }
.shift-state-banner .quiet-button {
  flex:0 0 auto;
  align-self:center;
  margin-left:auto;
  white-space:nowrap;
}
.shift-state-icon {
  flex:0 0 auto;
  width:10px;
  height:10px;
  margin-top:4px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 3px rgba(24, 126, 91, .14);
}
.shift-state-banner.is-closed .shift-state-icon {
  background:#718078;
  box-shadow:0 0 0 3px rgba(113, 128, 120, .14);
}
.shift-state-banner.is-loading .shift-state-icon {
  background:#97a99f;
  box-shadow:none;
}
.shift-state-banner.is-warning .shift-state-icon {
  background:#c98b16;
  box-shadow:0 0 0 3px rgba(201, 139, 22, .15);
}
.shift-state-banner b {
  display:block;
  font-size:13px;
}
.shift-state-banner p {
  margin:2px 0 0;
  font-size:12px;
  line-height:1.4;
}
.workflow-grid.is-read-only .panel {
  background:#fbfcfb;
}
input, select {
  display:block;
  width:100%;
  margin-top:6px;
  padding:10px 11px;
  color:var(--ink);
  background:#fff;
  border:1px solid #c9d7cc;
  border-radius:9px;
}
select {
  font-weight:500;
}
select:has(option[value=""]:checked) {
  color:#82958a;
  font-weight:500;
}
input:focus-visible, select:focus-visible {
  outline:3px solid #c7ead8;
  border-color:var(--green);
}
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color:var(--red);
  background:#fff8f7;
}
.field-error {
  margin:6px 0 0;
  color:var(--red);
  font-size:12px;
  font-weight:650;
  line-height:1.35;
}
.quiet-button, .primary-button {
  padding:11px 15px;
  border-radius:10px;
  font-weight:800;
}
.quiet-button {
  color:var(--green-dark);
  border:1px solid #b8d7c3;
  background:#f6fbf7;
}
.primary-button {
  color:#fff;
  border:1px solid var(--green);
  background:var(--green);
}
.primary-button:hover {
  background:var(--green-dark);
}
.primary-button:disabled {
  cursor:not-allowed;
  color:#9caea3;
  border-color:#e0e6e1;
  background:#e9eeea;
}
.workflow-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  align-items:start;
}
.workflow-grid[hidden] { display:none; }
.workflow-grid.shift-tab-workspace { display:block; border:1px solid var(--line); border-radius:18px; background:#fff; }
.shift-workspace-tabs { display:flex; gap:8px; padding:12px 12px 0; border-bottom:1px solid var(--line); background:#fbfcfa; border-radius:18px 18px 0 0; }
.shift-workspace-tabs button { display:flex; align-items:center; justify-content:center; gap:12px; flex:1; min-height:76px; padding:16px; border:0; border-radius:12px 12px 0 0; color:#5e746a; background:transparent; font:inherit; font-size:20px; font-weight:750; cursor:pointer; }
.shift-workspace-tabs button:hover { background:#eff7f1; color:var(--green-dark); }
.shift-tab-number { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border-radius:50%; background:#e9efeb; font-size:14px; }
.shift-workspace-tabs button[aria-selected="true"] .shift-tab-number { color:#fff; background:var(--green); }
.shift-progress-panel h2 { margin:0 0 20px; font-size:22px; }
.shift-progress-content:empty::after { content:'Пока нет данных о работе смены.'; color:var(--muted); }
body:has(.shift-tab-workspace) #showShiftProgress { display:none; }
@media(max-width:650px) { .shift-workspace-tabs { gap:4px; padding-inline:6px; } .shift-workspace-tabs button { flex-direction:column; gap:6px; padding:12px 6px; min-height:88px; font-size:15px; } }
.shift-workspace-tabs button[aria-selected="true"] { color:#0f543f; background:#e7f4eb; box-shadow:inset 0 -3px 0 var(--green); }
.shift-workspace-tabs button:focus-visible { outline:3px solid #9bd1b5; outline-offset:2px; }
.shift-tab-workspace > .panel { border:0; box-shadow:none; background:transparent; }
.shift-tab-workspace > .panel[hidden] { display:none; }
.shift-tab-workspace .stage-title h2 { font-size:20px; }
.shift-tab-workspace .take-form-grid { grid-template-columns:160px 250px 150px; width:100%; max-width:588px; gap:14px; }
.shift-tab-workspace #shiftWorkspacePanel0 > .section-header { max-width:588px; margin-bottom:16px; }
.shift-tab-workspace .take-form-grid > label { min-width:0; }
@media(max-width:780px) { .shift-tab-workspace .take-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:560px; } }
@media(max-width:470px) { .shift-tab-workspace .take-form-grid { grid-template-columns:minmax(0,1fr); } }
.route-stock-refresh { margin-inline-start:14px; padding:5px 9px; font-size:12px; }
.route-stock-status-row { grid-column:1 / -1; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.route-stock-status-row .route-stock-hint { margin:0; }
.footer-actions button[hidden] { display:none; }
.panel {
  padding:24px;
}
.panel h2 {
  margin:0;
  font-size:22px;
  letter-spacing:-.025em;
}
.section-header {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
}
.stage-title {
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.stage-help-toggle {
  display:grid;
  width:22px;
  height:22px;
  place-items:center;
  color:#2f684f;
  border:1px solid #b8d7c3;
  border-radius:50%;
  background:#f3faf5;
  cursor:pointer;
  font-size:13px;
  font-weight:900;
  line-height:1;
}
.stage-help-toggle:hover { color:#fff; border-color:var(--green); background:var(--green); }
.stage-help-toggle:focus-visible { outline:3px solid #c7ead8; outline-offset:2px; }
.stage-help-popover {
  position:absolute;
  z-index:12;
  top:calc(100% + 8px);
  left:0;
  width:min(320px, calc(100vw - 72px));
  padding:12px 14px;
  color:#446055;
  border:1px solid #cfe1d4;
  border-radius:10px;
  background:#fff;
  box-shadow:0 12px 28px rgba(21, 57, 42, .16);
  font-size:13px;
  font-weight:600;
  line-height:1.45;
}
.stage-help-popover[hidden] { display:none; }
.stock-source {
  min-width:180px;
}
.stock-source select {
  margin-top:3px;
  padding:7px 9px;
}
.intro {
  margin:7px 0 18px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:end;
}
.result-layout { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; align-items:start; }
.result-controls { min-width:0; }
.result-form-grid { min-width:0; }
.result-layout .result-quantity-grid { grid-template-columns:minmax(0, 1fr); margin-top:16px; }
.result-quantity-grid[hidden], .source-balance[hidden], .reference-status[hidden] { display:none; }
.take-form-grid .field-action, .result-quantity-grid .field-action { grid-column:1 / -1; max-width:240px; }
.result-layout .result-quantity-grid .field-action { grid-column:1; }
.form-grid > label { min-width:0; }
.reference-status { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-bottom:12px; padding:16px 20px; border:1px solid var(--line); border-left:3px solid var(--red); border-radius:12px; background:white; font-size:14px; }
.reference-status div { flex:1 1 280px; }
.reference-status p { margin:5px 0 0; line-height:1.5; }
.reference-status a { color:var(--green-dark); }
.source-balance { display:flex; gap:12px 20px; flex-wrap:wrap; margin:12px 0; padding:12px; border-radius:10px; background:var(--mint); font-size:13px; }
.source-balance span { display:grid; gap:4px; }
.source-balance b { font-size:16px; font-variant-numeric:tabular-nums; }
.source-balance .source-balance-available { padding-left:16px; border-left:1px solid var(--line); color:var(--green-dark); }
.source-balance small { flex-basis:100%; color:var(--muted); }
#firewoodQuantityHint {
  display:block;
  margin-top:2px;
  color:#71867b;
  font-size:11px;
  font-weight:500;
  line-height:1.3;
}
label {
  color:#425c51;
  font-size:13px;
  font-weight:600;
}
.field-action {
  display:flex;
  align-items:end;
}
.field-action button {
  width:100%;
}
.type-switch {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:7px;
  margin:15px 0;
}
.result-source-picker {
  max-width:none;
  margin:16px 0 2px;
}
.cutting-preview {
  min-width:0;
  height:260px;
  box-sizing:border-box;
  overflow:auto;
  padding:10px 12px;
  border:1px solid #d7e4d9;
  border-radius:10px;
  background:#f7fbf8;
}
.cutting-preview.is-empty { display:flex; flex-direction:column; justify-content:center; }
.cutting-preview[hidden] { display:none; }
.cutting-preview-empty-text { margin:8px 0 0; color:#647c70; font-size:12px; line-height:1.45; }
.cutting-preview-title {
  margin:0 0 2px;
  color:#315a4a;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
}
.cutting-preview-svg {
  display:block;
  width:100%;
  max-height:140px;
  border-radius:3px;
}
.cutting-preview-piece { fill:#70aa83; stroke:#fff; stroke-width:1; vector-effect:non-scaling-stroke; }
.cutting-preview-remainder { fill:#e5d5ad; }
.cutting-preview-second-bar { fill:#94b8a4; }
.cutting-preview-outline { fill:none; stroke:#315a4a; stroke-width:2; vector-effect:non-scaling-stroke; }
.cutting-preview-measure { fill:none; stroke:#71867b; stroke-width:1; vector-effect:non-scaling-stroke; }
.cutting-preview-axis { fill:#425c51; font-size:9px; font-weight:700; }
.cutting-preview-label { fill:#fff; font-weight:800; text-anchor:middle; dominant-baseline:middle; pointer-events:none; }
.cutting-preview-label.remainder { fill:#5f5234; }
.cutting-preview-label.second-bar { fill:#234d39; }
.cutting-preview-legend { display:grid; gap:5px; margin-top:7px; color:#425c51; font-size:10px; line-height:1.3; }
.cutting-preview-legend span { display:flex; align-items:flex-start; gap:5px; }
.cutting-preview-swatch { display:inline-block; width:9px; height:9px; flex:none; border-radius:2px; }
.cutting-preview-swatch.piece { background:#70aa83; }
.cutting-preview-swatch.second-bar { background:#94b8a4; }
.cutting-preview-swatch.remainder { background:#e5d5ad; }
.cutting-preview-note { margin:6px 0 0; color:#647c70; font-size:10px; line-height:1.35; }
.cutting-variant {
  margin:14px 0 2px;
  padding:14px;
  border:1px solid #d7e4d9;
  border-radius:12px;
  background:#f7fbf8;
}
.cutting-variant-title {
  margin:0 0 6px;
  color:#315a4a;
  font-size:12px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.cutting-variant-note {
  margin:0;
  color:#647c70;
  font-size:11px;
  font-weight:500;
  line-height:1.4;
}
.type-switch button {
  padding:9px 5px;
  color:#547166;
  border:1px solid #cfddd2;
  background:#fbfdfb;
  border-radius:9px;
  font-size:13px;
  font-weight:600;
}
.type-switch button.active {
  color:#fff;
  border-color:var(--green);
  background:var(--green);
}
.type-switch button[hidden] { display:none; }
.type-switch:not(.is-empty) .result-type-hint { display:none; }
.type-switch.is-empty {
  display:block;
  min-height:42px;
  margin:15px 0;
}
.result-type-hint {
  margin:0;
  padding:11px 13px;
  color:#547166;
  border:1px dashed #cfddd2;
  border-radius:9px;
  background:#fbfdfb;
  font-size:13px;
  font-weight:700;
}
.section-title {
  margin:24px 0 10px;
  color:#587064;
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.line-list {
  list-style:none;
  padding:0;
  margin:0;
  border-top:1px solid #e8eee9;
}
.result-source-group {
  overflow:hidden;
  border:1px solid #d9e7dc;
  border-radius:12px;
  background:#fbfdfb;
}
.result-source-group + .result-source-group {
  margin-top:10px;
}
.result-source-group-heading {
  display:grid;
  gap:2px;
  padding:10px 12px 9px;
  color:#587064;
  background:#f3f8f4;
}
.result-source-group-heading > span {
  color:#698277;
  font-size:10px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.result-source-group-heading strong {
  color:#1c4437;
  font-size:17px;
  font-weight:800;
  line-height:1.18;
  font-variant-numeric:tabular-nums;
}
.result-source-group-heading small {
  color:#70877b;
  font-size:12px;
  font-weight:500;
}
.result-source-group-list {
  margin-inline-start:14px;
  padding:0 12px;
  border-top:1px solid #dce8df;
}
.result-source-group-list .result-line-item {
  padding:10px 0;
}
.result-source-group-list .result-line-item > div:first-child {
  padding-top:1px;
}
.result-source-group-list .result-line-item > div:first-child > strong {
  color:#315a4a;
  font-size:14px;
  font-weight:650;
  line-height:1.2;
}
.result-source-group-list .result-line-item > div:first-child > span {
  margin-top:4px;
  font-size:12px;
  font-weight:500;
}
.result-source-group-list .result-line-item .result-group-breakdown {
  margin-top:7px;
  color:var(--green-dark);
  font-weight:700;
}
.result-group-details {
  margin-top:7px;
  color:#587064;
  font-size:12px;
}
.result-group-details summary { cursor:pointer; }
.result-group-details summary:focus-visible { outline:2px solid #8cc6a0; outline-offset:2px; }
.result-group-details ul { margin:7px 0 0; padding:0; list-style:none; }
.result-group-details li { display:flex; align-items:center; gap:10px; padding:4px 0; }
.result-group-details li span { margin:0; }
.result-group-details button {
  padding:3px 7px;
  color:#8a3932;
  border:1px solid #efc9c1;
  border-radius:6px;
  background:#fff0ed;
  font-size:11px;
}
.result-group-details button:hover { background:#f8e6e3; }
.result-group-details button:focus-visible { outline:2px solid #8cc6a0; outline-offset:2px; }
.result-source-group-list .result-line-item:last-child {
  border-bottom:0;
  padding-bottom:0;
}
.result-line-item .line-metrics {
  display:grid;
  grid-template-columns:auto 28px;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:8px;
  min-width:142px;
}
.result-line-item .line-metrics > strong,
.result-line-item .line-metrics > span {
  grid-column:1;
}
.result-line-item .line-metrics > strong {
  font-size:16px;
  font-weight:800;
  line-height:1.15;
}
.result-line-item .line-metrics > span {
  margin-top:2px;
  font-size:12px;
  font-weight:500;
}
.result-line-item .line-metrics > button {
  grid-column:2;
  grid-row:1 / span 2;
  width:28px;
  height:28px;
  margin:0;
  border:1px solid transparent;
  border-radius:7px;
}
.result-line-item .line-metrics > button:hover {
  border-color:#efc9c1;
  background:#fff0ed;
}
.result-line-item .line-metrics > button:focus-visible {
  outline:2px solid #8cc6a0;
  outline-offset:2px;
}
.line-item {
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
  border-bottom:1px solid #e8eee9;
}
.line-item strong, .line-item span {
  display:block;
}
.line-item strong {
  font-size:16px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.line-item span {
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}
.line-item .batch-breakdown {
  margin-top:7px;
  color:var(--green-dark);
  font-weight:750;
}
.take-group {
  align-items:center;
}
.line-metrics {
  min-width:110px;
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.line-metrics button {
  width:23px;
  height:23px;
  margin-top:5px;
  color:#8a3932;
  border:0;
  background:#f8e6e3;
  border-radius:6px;
  line-height:1;
}
.line-metrics .edit-taken-button {
  width:auto;
  height:auto;
  margin-top:7px;
  padding:6px 9px;
  color:#236044;
  border:1px solid #b9d7c2;
  background:#f4faf5;
  border-radius:7px;
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.line-metrics .edit-taken-button:hover {
  border-color:#79ac88;
  background:#e8f5eb;
}
.empty-state {
  padding:16px 0;
  color:#82958a;
  font-size:14px;
}
.residual-item {
  background:#f8faf8;
}
.balance-error {
  padding:12px 10px;
  border:1px solid #efc9c1;
  border-radius:10px;
  background:#fff7f5;
}
.balance-error strong {
  color:#8a3932;
}
.balance-error .line-metrics strong {
  color:#a14a3f;
  font-size:12px;
}
.residual-item > div:first-child {
  padding-left:10px;
  border-left:3px solid #9fb9a8;
}
.residual-item--fractional {
  background:#fffaf1;
}
.residual-item--fractional > div:first-child {
  border-left-color:#d6a048;
}
.residual-item--waste {
  background:#fffaf1;
}
.residual-item--waste > div:first-child {
  border-left-color:#d6a048;
}
.unaccounted-board-preview {
  margin:8px 0 12px;
  padding:12px 14px;
  border:1px solid #e6c88f;
  border-left:4px solid #c68d31;
  border-radius:12px;
  background:#fffaf0;
  color:#314a3d;
}
.unaccounted-board-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:4px 16px;
}
.unaccounted-board-heading strong {font-size:15px;}
.unaccounted-board-heading span {color:#896124;font-size:12px;}
.unaccounted-board-preview p {margin:6px 0 0;line-height:1.4;}
.unaccounted-board-actions {display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0;}
.unaccounted-board-actions button {
  padding:7px 10px;
  border:1px solid #c9a969;
  border-radius:8px;
  background:#fff;
  color:#654719;
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.unaccounted-board-actions button:hover {background:#fff1d4;}
.line-metrics .technological-waste-button {
  width:auto;
  height:auto;
  margin-top:7px;
  padding:6px 9px;
  color:#795718;
  border:1px solid #e2c88b;
  background:#fff8e8;
  border-radius:7px;
  font:inherit;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
}
.line-metrics .technological-waste-button:hover {
  border-color:#c6973e;
  background:#fff0ca;
}
.line-metrics .started-board-completion-button,
.line-metrics .restore-residual-button {
  width:auto;
  height:auto;
  margin-top:7px;
  padding:6px 9px;
  color:#176f52;
  border:1px solid #a8d5bf;
  background:#f1fbf5;
  border-radius:7px;
  font:inherit;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
}
.line-metrics .started-board-completion-button:hover,
.line-metrics .restore-residual-button:hover {
  border-color:#5cae82;
  background:#e4f6ea;
}
.line-metrics .started-board-completion-button:focus-visible {
  outline:2px solid #13795b;
  outline-offset:2px;
}
.type-tag {
  display:inline-block;
  margin-right:3px;
  padding:2px 5px;
  color:#49695a;
  background:#edf2ed;
  border-radius:4px;
  font-style:normal;
  font-size:10px;
  font-weight:900;
}
.type-tag.finished {
  color:#086144;
  background:#dff2e6;
}
.type-tag.str {
  color:#70500e;
  background:#fff0c7;
}
.type-tag.bar {
  color:#4c4c89;
  background:#e9e8fc;
}
.type-tag.imitation {
  color:#694177;
  background:#f4e8f7;
}
.type-tag.firewood {
  color:#8a3932;
  background:#f8e6e3;
}
.type-tag.technological_waste {
  color:#795718;
  background:#fff0c7;
}
.residual-title { position:relative; }
.repair-compact {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #dce8df;
}
.repair-compact > div { min-width:0; }
.repair-title { display:flex; align-items:center; gap:5px; }
.repair-title > b {
  display:block;
  color:#416153;
  font-size:13px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.repair-compact .repair-help { position:relative; display:inline-flex; margin:0; }
.repair-compact > div > #repairCompactHint {
  display:block;
  margin-top:3px;
  color:#7a8e84;
  font-size:11px;
  font-weight:600;
}
.repair-compact .quiet-button { flex:0 0 auto; min-height:36px; padding:7px 11px; font-size:12px; }
.repair-inline-list { margin-top:8px; }
.repair-inline-list:empty { display:none; }
.repair-form-grid { gap:10px; }
.repair-dialog { width:min(650px, calc(100vw - 32px)); }
.repair-dialog-note { margin:12px 0 0; color:#71857b; font-size:12px; line-height:1.45; }
.repair-dialog-actions { margin-top:14px; }
.repair-list { margin-top:14px; }
.repair-line-item { border-left:3px solid #d6b15d; }
.repair-pending { color:#8a641b !important; }
.residual-help {
  position:relative;
  display:inline-flex;
  vertical-align:middle;
}
.residual-help .stage-help-popover {
  left:auto;
  right:0;
}
.footer-actions {
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:20px;
}
.footer-actions > button { min-height:46px; }
.footer-actions:has(.shift-action-help) { flex-wrap:wrap; }
.shift-action-help { flex-basis:100%; margin:0; color:var(--muted, #58756a); font-size:.9rem; }
.shift-completion-status { margin-block:16px; padding:16px; background:var(--surface, #fff); border:1px solid var(--border, #cbded3); border-radius:12px; overflow-wrap:anywhere; }
.shift-completion-status.is-blocked { background:#fff9e9; border-color:#e3c77b; }
.shift-completion-status ul { margin-block:8px 12px; padding-inline-start:20px; }
.shift-completion-status li + li { margin-block-start:8px; }
.shift-completion-status p { margin-block:8px 0; }
.shift-completion-status button { max-inline-size:100%; white-space:normal; }
.shift-workspace-design .shift-progress-panel #routeJournalNavigation { display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; padding:12px 0; margin-block:0 16px; background:transparent; border:0; border-radius:0; box-shadow:none; }
.route-stage-identity { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 12px; }
.route-stage-identity small,.route-stage-hint { color:var(--muted, #58756a); }
.route-journal-navigation label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-inline-size:0; max-inline-size:100%; }
.route-journal-navigation select { max-inline-size:100%; min-inline-size:0; inline-size:auto; }
.route-journal-navigation .route-stage-hint { flex-basis:100%; }
.route-journal-navigation button { white-space:normal; max-inline-size:100%; }
.footer-progress-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.footer-progress-button svg { width:18px; height:18px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.form-message {
  min-height:20px;
  margin:14px 0 0;
  color:var(--muted);
  font-size:13px;
}
.form-message.error {
  color:var(--red);
}
.form-message.success {
  color:#167153;
  font-weight:700;
}
.crew-dialog,
.shift-summary-dialog,
.size-rules-dialog,
.telegram-summary-dialog {
  width:min(560px, calc(100vw - 32px));
  max-height:calc(100dvh - 32px);
  padding:0;
  color:var(--ink);
  border:0;
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(7, 38, 28, .30);
  overflow:hidden;
}
.crew-dialog::backdrop,
.shift-summary-dialog::backdrop,
.size-rules-dialog::backdrop,
.telegram-summary-dialog::backdrop {
  background:rgba(8, 34, 25, .38);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.crew-dialog form,
.shift-summary-dialog form,
.size-rules-dialog form,
.telegram-summary-dialog form {
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - 32px);
  padding:26px;
}
.warehouse-login-dialog { width:min(460px, calc(100vw - 32px)); }
.warehouse-login-dialog form { gap:18px; overflow-y:auto; padding:28px; }
.warehouse-login-heading { padding-bottom:18px; border-bottom:1px solid var(--line); }
.warehouse-login-eyebrow { margin:0 0 8px; color:var(--muted); font-size:12px; font-weight:750; letter-spacing:.06em; text-transform:uppercase; }
.warehouse-login-dialog form > label { display:flex; flex-direction:column; gap:8px; color:var(--ink); font-size:14px; font-weight:650; }
.warehouse-login-dialog input:not([type="checkbox"]) { width:100%; min-height:46px; padding:11px 13px; border:1px solid #bdd0c2; border-radius:10px; background:#fff; color:var(--ink); font:inherit; }
.warehouse-login-dialog input:focus-visible { outline:3px solid #c9e8d7; outline-offset:2px; border-color:var(--green); }
.warehouse-login-dialog form > .warehouse-login-visibility { flex-direction:row; align-items:center; gap:10px; color:var(--muted); font-weight:500; cursor:pointer; }
.warehouse-login-visibility input { width:18px; height:18px; margin:0; accent-color:var(--green); }
.warehouse-login-message { margin:0; padding:12px 14px; border-radius:10px; background:var(--mint); color:var(--green-dark); font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.warehouse-login-message:empty { display:none; }
.warehouse-login-dialog .primary-button { width:100%; min-height:46px; font:inherit; font-weight:750; cursor:pointer; }
.crew-dialog-header {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}
.crew-kicker {
  display:block;
  margin-bottom:7px;
  color:var(--green);
  font-size:11px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.crew-dialog h2 {
  margin:0;
  font-size:24px;
  letter-spacing:-.035em;
}
.crew-dialog-header p:last-child {
  max-width:390px;
  margin:7px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}
.close-dialog {
  position:relative;
  flex:0 0 auto;
  width:36px;
  height:36px;
  border:1px solid #dce8df;
  background:#f8fbf8;
  border-radius:50%;
}
.close-dialog::before,.close-dialog::after {
  position:absolute;
  top:10px;
  left:17px;
  width:1.5px;
  height:14px;
  background:#547166;
  content:"";
}
.close-dialog::before {
  transform:rotate(45deg);
}
.close-dialog::after {
  transform:rotate(-45deg);
}
.close-dialog:hover {
  border-color:#a9cdb5;
  background:#edf7f0;
}
.master-selection {
  display:block;
  margin-top:22px;
  color:#587064;
  font-size:12px;
  font-weight:850;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.master-selection select {
  display:block;
  width:100%;
  margin-top:8px;
  color:var(--ink);
  font-size:15px;
  font-weight:750;
  letter-spacing:0;
  text-transform:none;
}
.crew-selection-caption {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:23px 0 10px;
  color:#587064;
  font-size:12px;
  font-weight:850;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.crew-selection-caption b {
  padding:5px 8px;
  color:var(--green-dark);
  background:var(--mint);
  border-radius:999px;
  font-size:11px;
  letter-spacing:0;
}
.crew-options {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  overflow:auto;
  padding:2px;
}
.crew-option {
  display:flex;
  min-height:54px;
  align-items:center;
  gap:12px;
  padding:11px 13px;
  border:1px solid #dbe7de;
  background:#fff;
  border-radius:14px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.crew-option:hover {
  border-color:#95c5a4;
  background:#f8fcf9;
}
.crew-option:has(input:checked) {
  border-color:var(--green);
  background:#edf8f1;
  box-shadow:0 3px 10px rgba(22, 113, 83, .08);
}
.crew-option:has(input:disabled) {
  opacity:.45;
  cursor:not-allowed;
}
.crew-option input {
  display:inline-block;
  flex:0 0 auto;
  width:20px;
  height:20px;
  margin:0;
  accent-color:var(--green);
}
.crew-option span {
  color:var(--ink);
  font-size:15px;
  font-weight:750;
  line-height:1.2;
}
.crew-dialog-actions {
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #ebf0ec;
}
.crew-dialog-actions .primary-button {
  min-width:238px;
}
.edit-taken-actions {
  justify-content:space-between;
  gap:12px;
}
.discard-taken-button {
  padding:10px 12px;
  color:#8a3932;
  border:1px solid #e9c2bd;
  border-radius:10px;
  background:#fff8f7;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.discard-taken-button:hover {
  background:#fbe9e6;
}
.shift-summary-actions {
  justify-content:space-between;
  gap:12px;
}
.shift-summary-footer {
  flex:0 0 auto;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #e2ebe4;
  background:#fff;
}
.shift-summary-footer .shift-summary-actions {
  margin-top:10px;
  padding-top:0;
  border-top:0;
}
.shift-summary-action-hint {
  margin:0;
  color:#60766d;
  font-size:12px;
  line-height:1.4;
}
.finish-shift-button {
  padding:11px 14px;
  color:#8a3932;
  border:1px solid #e9c2bd;
  border-radius:10px;
  background:#fff8f7;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.finish-shift-button:hover:not(:disabled) {
  background:#fbe9e6;
}
.finish-shift-button:disabled {
  color:#8d9c93;
  border-color:#dfe7e1;
  background:#f5f7f5;
  cursor:default;
}
.telegram-summary-trigger {
  min-height:42px;
}
.telegram-summary-trigger:disabled {
  color:#829188;
  border-color:#dfe7e1;
  background:#f3f6f4;
  cursor:not-allowed;
}
.shift-summary-dialog button:focus-visible {
  outline:3px solid #c7ead8;
  outline-offset:2px;
}
.shift-summary-dialog .close-dialog {
  width:40px;
  height:40px;
}
.shift-summary-dialog .close-dialog::before,
.shift-summary-dialog .close-dialog::after {
  top:12px;
  left:19px;
}
.crew-dialog .form-message {
  margin:10px 0 0;
}
.shift-summary-dialog {
  width:min(760px, calc(100vw - 32px));
  font-variant-numeric:tabular-nums;
}
.telegram-summary-dialog {
  width:min(680px, calc(100vw - 32px));
}
.telegram-summary-label {
  display:block;
  margin-top:22px;
  color:#587064;
  font-size:12px;
  font-weight:850;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.telegram-summary-text {
  width:100%;
  min-height:300px;
  margin-top:8px;
  padding:14px;
  resize:vertical;
  color:var(--ink);
  border:1px solid #c9ddd0;
  border-radius:12px;
  background:#f8fbf8;
  font:600 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space:pre-wrap;
}
.telegram-summary-text:focus-visible {
  outline:3px solid rgba(199, 237, 210, .8);
  outline-offset:2px;
}
.telegram-summary-actions {
  justify-content:flex-end;
}
.size-rules-dialog {
  width:min(680px, calc(100vw - 32px));
}
.cutting-guide-dialog {
  width:min(820px, calc(100vw - 32px));
  max-height:calc(100dvh - 32px);
  padding:0;
  color:var(--ink);
  border:0;
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(7, 38, 28, .30);
  overflow:hidden;
}
.cutting-guide-dialog::backdrop {
  background:rgba(8, 34, 25, .38);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.cutting-guide-header,
.cutting-guide-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:17px 20px;
  background:#f7faf7;
}
.cutting-guide-header { border-bottom:1px solid #dfe9e1; }
.cutting-guide-footer { border-top:1px solid #dfe9e1; }
.cutting-guide-eyebrow {
  margin:0;
  color:var(--green);
  font-size:11px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.cutting-guide-header h2 {
  margin:3px 0 0;
  color:var(--ink);
  font-size:22px;
  letter-spacing:-.03em;
}
.cutting-guide-body {
  max-height:min(620px, calc(100dvh - 190px));
  overflow-y:auto;
  padding:20px;
  color:var(--muted);
  font-size:14px;
  line-height:1.52;
}
.cutting-guide-body p { margin:0; }
.cutting-guide-intro { color:var(--ink); font-size:15px; }
.cutting-guide-section { margin-top:20px; }
.cutting-guide-section h3 { margin:0 0 8px; color:var(--green-dark); font-size:15px; }
.cutting-guide-section ol { margin:8px 0 0; padding-left:20px; }
.cutting-guide-section li + li { margin-top:4px; }
.cutting-guide-formulas { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.cutting-guide-formulas div { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:9px; background:#f3f8f4; }
.cutting-guide-formulas span { font-size:12px; }
.cutting-guide-body code { color:var(--green-dark); font:800 12px/1.3 var(--font-sans); white-space:nowrap; }
.cutting-guide-example { display:grid; gap:4px; margin-top:10px; padding:12px; border-left:3px solid var(--green); border-radius:0 9px 9px 0; background:var(--mint); color:#315e4a; }
.cutting-guide-example b,.cutting-guide-example strong { color:var(--ink); }
.cutting-guide-footer { justify-content:flex-end; }
.cutting-guide-footer .primary-button { min-width:160px; }
.edit-taken-dialog {
  width:min(500px, calc(100vw - 32px));
}
.edit-taken-batches {
  display:grid;
  gap:9px;
  max-height:min(360px, 45dvh);
  overflow:auto;
  margin-top:22px;
  padding-right:2px;
}
.edit-taken-batch {
  display:grid;
  grid-template-columns:minmax(0, 1fr) 132px auto auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid #dce8df;
  border-radius:12px;
  background:#f8fbf8;
}
.edit-taken-batch > span {
  color:#3d5d4b;
  font-size:14px;
  font-weight:800;
}
.edit-taken-batch input {
  min-width:0;
  padding:9px 10px;
  background:#fff;
  font-size:15px;
}
.edit-taken-batch small {
  color:var(--muted);
  font-size:13px;
  font-weight:750;
}
.delete-taken-batch-button {
  padding:7px 8px;
  color:#8a3932;
  border:1px solid #e9c2bd;
  border-radius:7px;
  background:#fff8f7;
  font:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.delete-taken-batch-button:hover {
  background:#fbe9e6;
}
.size-rules-content {
  overflow:auto;
  padding-top:20px;
}
.size-rules-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid #dce8df;
  border-radius:12px;
  font-size:14px;
}
.size-rules-table th,
.size-rules-table td {
  padding:11px 13px;
  text-align:left;
  border-bottom:1px solid #e5eee8;
}
.size-rules-table th {
  color:#587064;
  background:#f5faf6;
  font-size:11px;
  font-weight:850;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.size-rules-table tr:last-child td { border-bottom:0; }
.size-rules-help {
  display:inline-grid;
  width:18px;
  height:18px;
  place-items:center;
  margin:0 0 0 4px;
  padding:0;
  border:1px solid #a8c8b1;
  border-radius:50%;
  color:#246246;
  background:#f5fbf6;
  font-size:12px;
  font-weight:850;
  line-height:1;
  vertical-align:middle;
}
.size-rules-help:hover { background:#e4f2e7; }
.shift-summary-content {
  display:grid;
  min-height:0;
  gap:18px;
  overflow:auto;
  overscroll-behavior:contain;
  padding:18px 3px 4px 0;
}
.closed-shift-overview {
  display:grid;
  gap:16px;
  margin-top:18px;
  padding:22px;
  border:1px solid #d6e5da;
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 28px rgba(13, 78, 59, .06);
}
.closed-shift-overview[hidden] { display:none; }
.closed-shift-overview-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}
.closed-shift-kicker {
  display:block;
  color:#4b725f;
  font-size:11px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.closed-shift-overview h2,
.closed-shift-flow-heading h3 {
  margin:4px 0 0;
  color:var(--ink);
}
.closed-shift-overview h2 { font-size:26px; letter-spacing:-.025em; }
.closed-shift-overview-header p {
  margin:5px 0 0;
  color:#60766d;
  font-size:13px;
}
.closed-shift-actions {
  display:flex;
  flex:0 0 auto;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.closed-shift-actions button { min-height:40px; }
.closed-shift-meta { margin:0; }
.closed-shift-total { padding:0 16px 16px; }
.closed-shift-flow {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:0;
  border-top:1px solid #dce8df;
}
.closed-shift-flow > section {
  min-width:0;
  padding:16px 18px 0 0;
}
.closed-shift-flow > section + section {
  padding:16px 0 0 18px;
  border-inline-start:1px solid #dce8df;
}
.closed-shift-flow-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
}
.closed-shift-flow-heading h3 { font-size:15px; }
.closed-shift-flow-heading b { color:#315f4b; font-size:13px; }
.shift-summary-meta {
  display:grid;
  grid-template-columns:minmax(0, .8fr) minmax(0, 1.2fr);
  gap:10px 20px;
  margin:0;
  padding:14px 16px;
  border-radius:14px;
  background:#f4f8f5;
}
.shift-summary-meta div {
  min-width:0;
}
.shift-summary-meta div:last-child {
  grid-column:1 / -1;
  padding-top:10px;
  border-top:1px solid #dce8df;
}
.shift-summary-meta dt {
  color:#60766d;
  font-size:11px;
  font-weight:750;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.shift-summary-meta dd {
  margin:4px 0 0;
  color:var(--ink);
  font-size:14px;
  font-weight:650;
  line-height:1.35;
  overflow-wrap:break-word;
}
.shift-summary-list {
  list-style:none;
  padding:0;
  margin:0;
}
.shift-summary-list li {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px solid #e5ece7;
}
.shift-summary-list li:last-child {
  border-bottom:0;
}
.shift-summary-list strong,
.shift-summary-list span,
.shift-summary-list small {
  display:block;
}
.shift-summary-list strong {
  font-size:14px;
  font-weight:750;
}
.shift-summary-list span,
.shift-summary-list small {
  margin-top:3px;
  color:#60766d;
  font-size:12px;
  line-height:1.35;
}
.shift-summary-list > li > b {
  min-width:104px;
  text-align:right;
  font-size:14px;
  font-weight:750;
}
.shift-summary-note {
  margin:0;
  padding:11px 13px;
  color:#516a75;
  background:#eef4f5;
  border-radius:10px;
  font-size:13px;
  line-height:1.4;
}
.current-stage-card,
.shift-total-section,
.stage-summary-card {
  border-radius:14px;
}
.current-stage-card {
  padding:16px;
  border:1px solid #e5c979;
  border-inline-start:4px solid var(--amber);
  background:#fffaf0;
}
.current-stage-header,
.shift-total-heading,
.stage-summary-card-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.current-stage-title,
.shift-total-heading h3,
.recorded-stages-header h3,
.stage-summary-card-header h4 {
  margin:0;
  color:var(--ink);
}
.current-stage-title,
.shift-total-heading h3,
.recorded-stages-header h3 {
  font-size:17px;
  font-weight:750;
  letter-spacing:-.015em;
}
.stage-summary-card-header h4 {
  font-size:15px;
  font-weight:750;
}
.current-stage-status {
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:5px;
  color:#6b4a09;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.current-stage-status::before {
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--amber);
  box-shadow:0 0 0 3px rgba(244, 182, 74, .22);
  content:"";
}
.current-stage-description,
.shift-total-heading p,
.stage-summary-card-header span,
.recorded-stages-header span {
  display:block;
  margin:4px 0 0;
  color:#60766d;
  font-size:12px;
  font-weight:450;
  line-height:1.4;
}
.return-to-stage-button {
  flex:0 0 auto;
  min-height:38px;
  padding:8px 12px;
  font-size:12px;
}
.shift-total-section {
  padding:16px;
  background:#f3f8f4;
  box-shadow:inset 0 0 0 1px #dce8df;
}
.shift-total-metrics {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:14px;
}
.shift-total-metrics div {
  min-width:0;
  padding-inline-end:12px;
  border-inline-end:1px solid #d5e2d8;
}
.shift-total-metrics div:last-child {
  padding-inline-end:0;
  border-inline-end:0;
}
.shift-total-metrics span {
  display:block;
  color:#60766d;
  font-size:11px;
  font-weight:650;
  line-height:1.25;
}
.shift-total-metrics strong {
  display:block;
  margin-top:4px;
  color:var(--green-dark);
  font-size:20px;
  font-weight:800;
  letter-spacing:-.02em;
}
.recorded-stages {
  display:grid;
  gap:12px;
}
.recorded-stages-header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
}
.stage-summary-card {
  padding:16px;
  border:1px solid #dce8df;
  background:#fff;
  box-shadow:0 6px 20px rgba(13, 78, 59, .045);
}
.stage-summary-card-header {
  align-items:center;
}
.stage-card-actions {
  display:flex;
  flex:0 0 auto;
  gap:8px;
}
.stage-flow {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  margin-top:14px;
  padding-top:2px;
}
.stage-flow-column {
  min-width:0;
  padding-inline-end:16px;
}
.stage-flow-column + .stage-flow-column {
  padding-inline-end:0;
  padding-inline-start:16px;
  border-inline-start:1px solid #dce8df;
}
.stage-flow-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
}
.stage-flow-heading span {
  color:#416153;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.stage-flow-heading b {
  color:var(--green-dark);
  font-size:14px;
  font-weight:750;
}
.repair-summary {
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #dce8df;
}
.repair-summary h5 {
  margin:0 0 7px;
  color:#80611d;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.edit-stage-button,
.delete-stage-button {
  flex:0 0 auto;
  padding:8px 10px;
  border-radius:9px;
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.edit-stage-button {
  color:var(--green-dark);
  border:1px solid #b8d7c3;
  background:#f6fbf7;
}
.edit-stage-button:hover {
  border-color:#8bb89a;
  background:#fff;
}
.delete-stage-button {
  color:#8a3932;
  border:1px solid #ebcbc7;
  background:#fff8f7;
}
.edit-stage-button:focus-visible,
.delete-stage-button:focus-visible { outline:3px solid #c7ead8; outline-offset:2px; }
.delete-stage-button:hover {
  background:#fbe9e6;
}
@media (min-width: 1280px) {
  .workflow-grid {
    grid-template-columns:minmax(0, .9fr) minmax(0, 1.15fr);
    gap:10px;
  }
  .panel {
    padding:24px;
  }
  .intro {
    margin-bottom:22px;
  }
  .form-grid {
    gap:16px;
  }
  .take-form-grid {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .take-form-grid .field-action {
    grid-column:span 2;
    max-width:230px;
  }
  .result-quantity-grid {
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(220px, .68fr);
  }
  .result-quantity-grid .field-action {
    grid-column:auto;
  }
  .section-title {
    margin-top:26px;
  }
}
@media (max-width: 900px) {
  .workflow-grid {
    grid-template-columns:1fr;
  }
  .shift-fields {
    grid-template-columns:1fr 1fr;
  }
  .page-header {
    flex-direction:column;
    gap:14px;
  }
  .page-header-side {
    width:100%;
    align-items:flex-start;
    flex-direction:column;
  }
  .local-badge {
    margin:0;
  }
  .form-grid {
    grid-template-columns:1fr 1fr;
  }
  .field-action {
    grid-column:span 2;
  }
}
@media (max-width: 520px) {
  main {
    padding:18px 14px 40px;
  }
  .page-header {
    padding:22px 16px;
  }
  .workbench-account {
    width:100%;
  }
  .workbench-account-identity {
    flex:1;
  }
  .workbench-account-identity b {
    max-width:none;
  }
  .shift-bar {
    align-items:stretch;
    flex-direction:column;
  }
  .local-badge {
    width:100%;
    padding:14px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
  }
  .shift-state-banner { flex-wrap:wrap; }
  .shift-state-banner .quiet-button {
    width:calc(100% - 20px);
    margin-left:20px;
  }
  .shift-fields {
    grid-template-columns:1fr;
  }
  .shift-bar label {
    min-width:0;
  }
  .section-header {
    align-items:stretch;
    flex-direction:column;
  }
  .stock-source {
    min-width:0;
  }
  .form-grid {
    grid-template-columns:1fr;
  }
  .result-layout {
    grid-template-columns:1fr;
  }
  .field-action {
    grid-column:auto;
  }
  .type-switch {
    grid-template-columns:repeat(2, 1fr);
  }
  .type-switch button {
    font-size:12px;
  }
  .line-item {
    flex-direction:column;
  }
  .line-metrics {
    text-align:left;
  }
  .footer-actions {
    flex-direction:column;
  }
  .footer-actions button {
    width:100%;
  }
  .shift-summary-actions {
    align-items:stretch;
    flex-direction:column-reverse;
  }
  .shift-summary-actions .primary-button,
  .finish-shift-button,
  .telegram-summary-trigger {
    width:100%;
  }
  .current-stage-header,
  .recorded-stages-header {
    align-items:flex-start;
    flex-direction:column;
  }
  .return-to-stage-button {
    width:100%;
  }
  .stage-flow {
    grid-template-columns:1fr;
  }
  .stage-flow-column {
    padding-inline-end:0;
  }
  .stage-flow-column + .stage-flow-column {
    margin-top:12px;
    padding-top:12px;
    padding-inline-start:0;
    border-top:1px solid #dce8df;
    border-inline-start:0;
  }
  .stage-summary-card-header {
    align-items:flex-start;
    flex-direction:column;
  }
  .stage-card-actions {
    width:100%;
  }
  .stage-card-actions button {
    flex:1;
  }
  .closed-shift-overview {
    padding:18px;
  }
  .closed-shift-overview-header {
    align-items:stretch;
    flex-direction:column;
  }
  .closed-shift-actions {
    justify-content:stretch;
  }
  .closed-shift-actions button {
    flex:1;
  }
  .closed-shift-flow {
    grid-template-columns:1fr;
  }
  .closed-shift-flow > section {
    padding-inline-end:0;
  }
  .closed-shift-flow > section + section {
    margin-top:12px;
    padding:12px 0 0;
    border-top:1px solid #dce8df;
    border-inline-start:0;
  }
  .crew-dialog,
  .shift-summary-dialog,
  .telegram-summary-dialog,
  .cutting-guide-dialog {
    width:100%;
    max-height:min(640px, calc(100dvh - 12px));
    margin:0 0 6px;
    border-radius:24px 24px 18px 18px;
  }
  .crew-dialog form,
  .shift-summary-dialog form,
  .telegram-summary-dialog form {
    max-height:min(640px, calc(100dvh - 12px));
    padding:22px 18px 18px;
  }
  .crew-dialog h2 {
    font-size:22px;
  }
  .shift-summary-meta {
    grid-template-columns:1fr;
  }
  .shift-summary-list li {
    flex-direction:column;
    gap:4px;
  }
  .shift-summary-list > li > b {
    text-align:left;
  }
  .crew-options {
    grid-template-columns:1fr;
    gap:8px;
  }
  .crew-option {
    min-height:52px;
  }
  .crew-dialog-actions {
    margin-top:14px;
  }
  .crew-dialog-actions .primary-button {
    width:100%;
    min-width:0;
  }
  .telegram-summary-actions .primary-button {
    width:100%;
  }
  .edit-taken-actions {
    flex-direction:column-reverse;
    align-items:stretch;
  }
  .discard-taken-button {
    width:100%;
  }
  .edit-taken-batch {
    grid-template-columns:minmax(0, 1fr) 104px auto auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .workbench-account-chevron,
  .local-badge,
  .crew-option {
    transition:none;
  }
  .local-badge:hover {
    transform:none;
  }
}
#resetShift[hidden]{display:none!important}
.shift-state-banner[data-tone=open] .shift-state-icon{background:#b27a13;box-shadow:0 0 0 3px #b27a1320}
.shift-state-banner[data-tone=closed] .shift-state-icon{background:#147554;box-shadow:0 0 0 3px #14755420}
.shift-state-banner[data-tone=warning] .shift-state-icon{background:#b27a13;box-shadow:0 0 0 3px #b27a1320}
.shift-state-banner[data-tone=error]{color:#843b34;border-color:#e1b5ae;background:#fff1ee}.shift-state-banner[data-tone=error] .shift-state-icon{background:#a33d32;box-shadow:0 0 0 3px #a33d3220}
.shift-state-banner[data-tone=editing] .shift-state-icon{background:#356a9d;box-shadow:0 0 0 3px #356a9d20}
.shift-state-banner[data-tone=neutral] .shift-state-icon{background:#718078;box-shadow:none}
.shift-state-banner.is-compact{white-space:normal}
