:root {
  --sez-bg: #eef3f8;
  --sez-surface: #ffffff;
  --sez-surface-dark: #132235;
  --sez-panel: #0e1b2b;
  --sez-panel-2: #1b2b3f;
  --sez-text: #112033;
  --sez-text-light: #f7fbff;
  --sez-muted: #6c7c8e;
  --sez-border: #d5e0ea;
  --sez-primary: #0b4f9f;
  --sez-primary-dark: #08396f;
  --sez-accent: #ff8a00;
  --sez-accent-dark: #d96c00;
  --sez-success: #17a05d;
  --sez-danger: #c62828;
  --sez-warning: #f2a900;
  --sez-metal-1: #f7f9fb;
  --sez-metal-2: #dfe6ee;
  --sez-metal-3: #b5c0cc;
  --sez-metal-dark: #7c8997;
  --status-new-bg: #ffffff;
  --status-progress-bg: #e7f2ff;
  --status-progress-border: #4d8fd8;
  --status-selected-bg: #fff4e8;
  --status-selected-border: #ff8a00;
  --status-done-bg: #e9f8ef;
  --status-rework-bg: #fff0f0;
  --status-packed-bg: #e8fff0;
  --shadow-soft: 0 8px 24px rgba(12, 32, 56, 0.08);
  --shadow-card: 0 14px 34px rgba(12, 32, 56, 0.12);
  --shadow-strong: 0 20px 50px rgba(10, 24, 44, 0.18);
  --sez-navy: var(--sez-panel);
  --sez-blue: var(--sez-primary);
  --sez-blue-light: #e7f1ff;
  --sez-orange: var(--sez-accent);
  --sez-orange-dark: var(--sez-accent-dark);
  --sez-green: var(--sez-success);
  --sez-red: var(--sez-danger);
  --sez-card: var(--sez-surface);
  --sez-shadow: var(--shadow-card);
  --sez-shadow-soft: var(--shadow-soft);
  --sez-radius: 16px;
  --sez-radius-button: 12px;
  --sez-bottom-panel: 132px;
}

/* Металлопроизводство: отдельный сенсорный экран по позициям СЭЗ. */
.metal-production-screen {
  display: grid;
  gap: 20px;
}

.metal-production-header {
  align-items: flex-start;
}

.metal-app-body {
  background:
    radial-gradient(circle at top right, rgba(11, 79, 159, 0.09), transparent 34rem),
    var(--sez-bg);
}

.metal-private-topbar .brand-copy small {
  color: #b9c8d9;
}

.metal-private-badge {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  color: #e8f2ff;
  font-weight: 850;
}

.metal-header-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.metal-create-order-button {
  display: inline-flex;
  min-height: 52px;
  box-sizing: border-box;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 13px;
  padding: 10px 17px;
  background: #fff;
  color: var(--sez-blue);
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(7, 27, 52, 0.2);
  touch-action: manipulation;
}

.metal-create-order-button:hover,
.metal-create-order-button:active {
  background: var(--sez-blue-light);
  transform: translateY(-1px);
}

.metal-source-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf1f5;
  color: #526171;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.metal-source-badge.is-manual {
  border: 1px solid #bdcff0;
  background: #edf4ff;
  color: #315f9d;
}

.metal-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metal-view-option {
  display: flex;
  min-height: 86px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  border: 2px solid var(--sez-border);
  border-radius: 16px;
  padding: 14px 18px;
  background: #fff;
  color: var(--sez-text);
  text-decoration: none;
  box-shadow: var(--sez-shadow-soft);
  touch-action: manipulation;
}

.metal-view-option > span {
  display: grid;
  gap: 4px;
}

.metal-view-option strong {
  color: var(--sez-navy);
  font-size: 23px;
  line-height: 1.1;
}

.metal-view-option small {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.metal-view-option b {
  display: inline-flex;
  min-width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0 9px;
  background: #edf1f5;
  color: var(--sez-navy);
  font-size: 25px;
  line-height: 1;
}

.metal-view-option:hover,
.metal-view-option:active {
  border-color: var(--sez-blue);
  transform: translateY(-1px);
}

.metal-view-option.is-active {
  border-color: var(--sez-blue);
  background: var(--sez-blue-light);
}

.metal-view-option.is-active b {
  background: var(--sez-blue);
  color: #fff;
}

.metal-view-option.is-completed.is-active {
  border-color: #6aa881;
  background: #edf7f0;
}

.metal-view-option.is-completed.is-active b {
  background: #4f8b67;
}

.metal-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.metal-summary-strip > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(213, 224, 234, 0.9);
  border-radius: 14px;
  padding: 15px;
  background: #f7fafc;
}

.metal-summary-strip span {
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.metal-summary-strip strong {
  color: var(--sez-navy);
  font-size: 34px;
  line-height: 1;
}

.metal-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.metal-order-card {
  position: relative;
  display: grid;
  min-height: 250px;
  align-content: space-between;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(213, 224, 234, 0.94);
  border-radius: 18px;
  padding: 24px 24px 22px 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(238, 244, 250, 0.96)),
    var(--sez-card);
  color: var(--sez-text);
  text-decoration: none;
  box-shadow: var(--sez-shadow-soft);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.metal-order-card:hover,
.metal-order-card:active {
  border-color: var(--sez-blue);
  box-shadow: var(--sez-shadow);
  transform: translateY(-2px);
}

.metal-order-card.status-in_progress .card-accent {
  background: var(--sez-blue);
}

.metal-order-card.status-ready_for_painting .card-accent {
  background: var(--sez-success);
}

.metal-order-card.status-completed .card-accent {
  background: #5f9d76;
}

.metal-order-card.status-needs_review .card-accent {
  background: var(--sez-warning);
}

.metal-order-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.metal-order-card-head > span:first-child {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.metal-order-card-head strong {
  color: var(--sez-navy);
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metal-order-number {
  color: var(--sez-blue);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

.metal-status-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #edf1f5;
  color: #526171;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.metal-status-badge.status-in_progress {
  background: #e7f1ff;
  color: var(--sez-blue);
}

.metal-status-badge.status-ready_for_painting {
  background: #e8f7ed;
  color: #137443;
}

.metal-status-badge.status-completed {
  border: 1px solid #b8d9c4;
  background: #eaf5ee;
  color: #356b49;
}

.metal-status-badge.status-needs_review {
  background: #fff1c7;
  color: #7a4b00;
}

.metal-order-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metal-order-metrics > span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f1f5f8;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 850;
}

.metal-order-metrics strong {
  color: var(--sez-navy);
  font-size: 19px;
}

.metal-card-composition {
  display: grid;
  gap: 7px;
  border-radius: 13px;
  padding: 13px 14px;
  background: rgba(231, 241, 255, 0.72);
  color: #40536a;
  font-size: 15px;
  line-height: 1.3;
}

.metal-card-composition > span {
  display: block;
  overflow-wrap: anywhere;
}

.metal-card-composition strong {
  color: var(--sez-navy);
  font-size: inherit;
}

.metal-card-composition .metal-card-more {
  color: var(--sez-blue);
  font-weight: 900;
}

.metal-sync-warning {
  border-left: 5px solid var(--sez-warning);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff8df;
  color: #7a4b00;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.metal-source-review-form {
  margin-top: 12px;
}

.metal-manual-status-card {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border-left: 7px solid var(--sez-blue);
  padding: 20px;
}

.metal-manual-status-card > div {
  display: grid;
  gap: 6px;
}

.metal-manual-status-card h2,
.metal-manual-status-card p {
  margin: 0;
}

.metal-manual-status-card p:last-child {
  color: var(--sez-muted);
  font-weight: 750;
  line-height: 1.4;
}

.metal-manual-status-card form {
  flex: 0 0 auto;
}

.metal-progress {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ef;
}

.metal-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sez-blue), #2f9fb3);
}

.metal-order-card.status-ready_for_painting .metal-progress > span,
.metal-order-card.status-completed .metal-progress > span,
.metal-task-summary:has(.status-ready_for_painting) .metal-progress > span {
  background: #5f9d76;
}

.metal-open-label {
  color: var(--sez-blue);
  font-size: 16px;
  font-weight: 900;
}

.metal-empty-state {
  padding: 36px;
}

.metal-empty-state h2,
.metal-empty-state p {
  margin-top: 0;
}

.metal-manual-order-screen {
  max-width: 1500px;
  width: min(100%, 1500px);
  margin-inline: auto;
}

.metal-manual-privacy-note {
  display: grid;
  gap: 7px;
  border-left: 7px solid var(--sez-warning);
  padding: 18px 20px;
  background: #fffaf0;
}

.metal-manual-privacy-note strong {
  color: #6f4800;
  font-size: 18px;
}

.metal-manual-privacy-note span {
  color: #725c36;
  line-height: 1.45;
}

.metal-manual-order-form {
  display: grid;
  gap: 24px;
  padding: 22px;
}

.metal-manual-order-number,
.metal-manual-lines-section {
  display: grid;
  gap: 16px;
}

.metal-manual-order-number {
  border-bottom: 1px solid var(--sez-border);
  padding-bottom: 22px;
}

.metal-manual-order-number > label,
.metal-manual-line label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--sez-navy);
  font-size: 15px;
  font-weight: 900;
}

.metal-manual-order-number > label {
  max-width: 520px;
}

.metal-manual-order-number input,
.metal-manual-line input {
  width: 100%;
  min-height: 58px;
  box-sizing: border-box;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--sez-text);
  font: inherit;
  line-height: 1.3;
}

.metal-manual-order-number input:focus,
.metal-manual-line input:focus {
  border-color: var(--sez-blue);
  outline: 3px solid rgba(11, 79, 159, 0.14);
}

.metal-manual-lines {
  display: grid;
  gap: 14px;
}

.metal-manual-line {
  display: grid;
  grid-template-columns: minmax(280px, 2.3fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) minmax(180px, 1fr);
  gap: 14px;
  border: 2px solid var(--sez-border);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}

.metal-manual-line-head {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.metal-manual-line-head strong {
  color: var(--sez-blue);
  font-size: 18px;
}

.metal-manual-remove-line,
.metal-add-line-button {
  display: inline-flex;
  min-height: 48px;
  box-sizing: border-box;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 9px 14px;
  background: #fff;
  color: var(--sez-blue);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.metal-manual-remove-line {
  min-height: 42px;
  border-color: #e3bcbc;
  color: #9d3131;
}

.metal-manual-remove-line:disabled {
  border-color: var(--sez-border);
  color: var(--sez-muted);
  cursor: default;
  opacity: 0.55;
}

.metal-add-line-button {
  width: fit-content;
  min-height: 54px;
  border-color: var(--sez-blue);
  background: var(--sez-blue-light);
}

.metal-add-line-button:hover,
.metal-add-line-button:active {
  background: #d7e9ff;
}

.metal-manual-form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--sez-border);
  padding-top: 22px;
}

.metal-manual-form-actions .toolbar-button,
.metal-manual-form-actions .metal-step-button {
  min-height: 58px;
  box-sizing: border-box;
  justify-content: center;
}

.metal-manual-submit {
  min-width: min(100%, 390px);
}

.metal-manual-order-form[aria-busy="true"] .metal-manual-submit {
  cursor: wait;
  opacity: 0.72;
}

.metal-task-summary {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(260px, 1fr) minmax(430px, 1.25fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
}

.metal-task-status {
  display: flex;
  gap: 12px;
  align-items: center;
}

.metal-task-status > div {
  display: grid;
  gap: 3px;
}

.metal-task-status strong {
  color: var(--sez-navy);
  font-size: 20px;
}

.metal-task-status > div span {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.metal-progress-wide {
  height: 16px;
}

.metal-task-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.metal-task-facts div {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  padding: 11px;
  background: #f4f7fa;
}

.metal-task-facts dt,
.metal-task-facts dd {
  margin: 0;
}

.metal-task-facts dt {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.metal-task-facts dd {
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.metal-checklist-card,
.metal-lines-card,
.metal-files-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.metal-checklist-card {
  border-left: 7px solid var(--sez-blue);
}

.metal-lines-card {
  border-left: 7px solid #2f9fb3;
}

.metal-files-card {
  border-left: 7px solid var(--sez-accent);
}

.metal-file-upload {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(320px, 1.45fr) minmax(210px, 0.55fr);
  gap: 14px;
  align-items: end;
}

.metal-file-upload label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-size: 14px;
  font-weight: 900;
}

.metal-file-upload select,
.metal-file-upload input[type="file"] {
  width: 100%;
  min-height: 58px;
  box-sizing: border-box;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--sez-text);
  font: inherit;
}

.metal-file-upload input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  background: #e7f1ff;
  color: var(--sez-blue);
  cursor: pointer;
  font-weight: 900;
}

.metal-file-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metal-file-groups > section {
  min-width: 0;
  border: 1px solid var(--sez-border);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
}

.metal-file-groups h3 {
  margin: 0 0 12px;
  color: var(--sez-navy);
  font-size: 21px;
}

.metal-file-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metal-file-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.metal-file-list li > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.metal-file-list strong {
  overflow-wrap: anywhere;
  color: var(--sez-navy);
}

.metal-file-list small {
  color: var(--sez-muted);
  font-weight: 750;
}

.metal-file-download {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--sez-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.metal-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: end;
  justify-content: space-between;
}

.metal-section-head h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 30px;
}

.metal-section-head p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--sez-muted);
  font-weight: 750;
  line-height: 1.35;
}

.metal-checklist {
  display: grid;
  gap: 10px;
}

.metal-checklist-row {
  display: grid;
  grid-template-columns: 56px minmax(260px, 1fr) minmax(120px, auto) minmax(200px, 230px);
  gap: 14px;
  align-items: center;
  min-height: 94px;
  border: 1px solid rgba(213, 224, 234, 0.95);
  border-left: 7px solid #97a5b4;
  border-radius: 15px;
  padding: 14px 16px;
  background: #ffffff;
}

.metal-checklist-row.status-in_progress {
  border-left-color: var(--sez-blue);
  background: #f3f8ff;
}

.metal-checklist-row.status-completed,
.metal-checklist-row.is-completed {
  border-left-color: var(--sez-success);
  background: #f2fbf5;
}

.metal-step-number {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #edf1f5;
  color: var(--sez-navy);
  font-size: 24px;
  font-weight: 900;
}

.status-in_progress .metal-step-number {
  background: #dcecff;
  color: var(--sez-blue);
}

.status-completed .metal-step-number,
.is-completed .metal-step-number {
  background: #dff3e6;
  color: #137443;
}

.metal-step-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.metal-step-copy strong {
  color: var(--sez-navy);
  font-size: 21px;
  line-height: 1.2;
}

.metal-step-copy span {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.metal-step-state {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #edf1f5;
  color: #526171;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.status-in_progress .metal-step-state {
  background: #dcecff;
  color: var(--sez-blue);
}

.status-completed .metal-step-state,
.is-completed .metal-step-state {
  background: #dff3e6;
  color: #137443;
}

.metal-checklist-row form {
  margin: 0;
}

.metal-step-button {
  width: 100%;
  min-height: 62px;
  border: 2px solid var(--sez-blue);
  border-radius: 13px;
  padding: 10px 16px;
  background: var(--sez-blue);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  touch-action: manipulation;
}

.metal-step-button.is-complete {
  border-color: var(--sez-success);
  background: var(--sez-success);
}

.metal-step-button:hover,
.metal-step-button:active {
  box-shadow: 0 10px 22px rgba(7, 29, 51, 0.18);
  transform: translateY(-1px);
}

.metal-step-finished-mark {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border-radius: 50%;
  background: var(--sez-success);
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
}

.metal-lines-wrap {
  overflow-x: auto;
}

.metal-lines-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.metal-lines-table th,
.metal-lines-table td {
  border-bottom: 1px solid rgba(213, 224, 234, 0.9);
  padding: 13px 11px;
  text-align: left;
  vertical-align: top;
}

.metal-lines-table th {
  background: #e9f0f8;
  color: var(--sez-navy);
  font-size: 15px;
  font-weight: 900;
}

.metal-lines-table td {
  color: var(--sez-text);
  font-size: 16px;
  line-height: 1.3;
}

.metal-lines-table td:first-child,
.metal-lines-table td:last-child,
.metal-lines-table th:first-child,
.metal-lines-table th:last-child {
  text-align: center;
}

.metal-lines-table td strong {
  color: var(--sez-navy);
  font-size: 17px;
}

.metal-privacy-note {
  border-left: 5px solid var(--sez-blue);
  border-radius: 10px;
  padding: 11px 13px;
  background: rgba(231, 241, 255, 0.86);
  color: #40536a;
  font-weight: 800;
  line-height: 1.4;
}

.metal-inbox-link {
  gap: 8px;
}

.metal-inbox-badge {
  display: inline-flex;
  min-width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 7px;
  background: var(--sez-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.metal-collaboration-card {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.metal-chat-card {
  border-left: 7px solid #2f9fb3;
}

.metal-approval-card {
  border-left: 7px solid var(--sez-accent);
}

.metal-paint-card {
  border-left: 7px solid #7454b7;
}

.metal-chat-list,
.metal-approval-list,
.metal-paint-list {
  display: grid;
  gap: 12px;
}

.metal-chat-list {
  max-height: 680px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 6px 4px 0;
}

.metal-chat-message {
  display: grid;
  width: min(86%, 900px);
  gap: 8px;
  justify-self: start;
  border: 1px solid var(--sez-border);
  border-radius: 15px 15px 15px 4px;
  padding: 14px 16px;
  background: #f7fafc;
}

.metal-chat-message.is-own {
  justify-self: end;
  border-color: #b9d5f4;
  border-radius: 15px 15px 4px 15px;
  background: var(--sez-blue-light);
}

.metal-chat-message header,
.metal-approval-head,
.metal-paint-state,
.metal-inbox-item-head,
.supply-paint-item header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.metal-chat-message header strong {
  color: var(--sez-navy);
  font-size: 17px;
}

.metal-chat-message time,
.metal-approval-recipient time,
.metal-inbox-item time {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 800;
}

.metal-chat-message p,
.metal-approval-item p,
.metal-paint-item p,
.metal-inbox-item p,
.supply-paint-item p {
  margin: 0;
  color: var(--sez-text);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.metal-chat-files,
.metal-approval-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metal-chat-files a,
.metal-approval-files a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--sez-blue);
  font-weight: 900;
  text-decoration: none;
}

.metal-touch-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--sez-border);
  padding-top: 18px;
}

.metal-touch-form > label,
.metal-decision-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-size: 15px;
  font-weight: 900;
}

.metal-touch-form input[type="date"],
.metal-touch-form textarea,
.metal-decision-form textarea {
  width: 100%;
  min-height: 58px;
  box-sizing: border-box;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--sez-text);
  font: inherit;
  line-height: 1.4;
}

.metal-touch-form textarea,
.metal-decision-form textarea {
  min-height: 104px;
  resize: vertical;
}

.metal-touch-form input:focus,
.metal-touch-form textarea:focus,
.metal-decision-form textarea:focus {
  border-color: var(--sez-blue);
  outline: 3px solid rgba(11, 79, 159, 0.14);
}

.metal-form-wide,
.metal-choice-fieldset,
.metal-submit-button {
  grid-column: 1 / -1;
}

.metal-choice-fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--sez-border);
  border-radius: 14px;
  padding: 14px;
}

.metal-choice-fieldset legend {
  padding: 0 7px;
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 900;
}

.metal-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.metal-touch-choice {
  display: flex;
  min-height: 72px;
  gap: 12px;
  align-items: center;
  border: 2px solid var(--sez-border);
  border-radius: 13px;
  padding: 11px 13px;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.metal-touch-choice:has(input:checked) {
  border-color: var(--sez-blue);
  background: var(--sez-blue-light);
}

.metal-touch-choice input {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  accent-color: var(--sez-blue);
}

.metal-touch-choice > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.metal-touch-choice strong {
  color: var(--sez-navy);
  overflow-wrap: anywhere;
}

.metal-touch-choice small {
  color: var(--sez-muted);
  font-weight: 750;
}

.metal-file-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.metal-submit-button {
  max-width: 520px;
  justify-self: end;
}

.metal-approval-item,
.metal-paint-item {
  display: grid;
  gap: 14px;
  border: 1px solid var(--sez-border);
  border-left: 7px solid var(--sez-warning);
  border-radius: 15px;
  padding: 16px;
  background: #fffdf7;
}

.metal-approval-item.status-approved,
.metal-paint-item.status-returned {
  border-left-color: var(--sez-success);
  background: #f3fbf6;
}

.metal-approval-item.status-changes_requested {
  border-left-color: var(--sez-danger);
  background: #fff6f6;
}

.metal-approval-head > div {
  display: grid;
  gap: 4px;
}

.metal-approval-head strong {
  color: var(--sez-navy);
  font-size: 20px;
}

.metal-approval-head div span,
.metal-paint-item small {
  color: var(--sez-muted);
  font-weight: 800;
}

.metal-approval-note {
  border-radius: 10px;
  padding: 11px 13px;
  background: #f6f8fa;
}

.metal-approval-recipients {
  display: grid;
  gap: 10px;
}

.metal-approval-recipient {
  display: grid;
  gap: 10px;
  border-radius: 13px;
  padding: 13px;
  background: #f5f7fa;
}

.metal-approval-recipient.status-approved {
  background: #e9f8ef;
}

.metal-approval-recipient.status-changes_requested {
  background: #fff0f0;
}

.metal-delivery-state {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-weight: 850;
}

.metal-delivery-state.is-sent {
  background: #e9f8ef;
  color: #137443;
}

.metal-delivery-state.is-warning {
  background: #fff2cf;
  color: #7a4b00;
}

.metal-delivery-state.is-error {
  background: #ffe5e5;
  color: #a31e1e;
}

.metal-recipient-state {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
}

.metal-recipient-state > span {
  display: grid;
  gap: 2px;
}

.metal-recipient-state strong {
  color: var(--sez-navy);
}

.metal-recipient-state small {
  color: var(--sez-muted);
}

.metal-recipient-state b {
  color: #7a4b00;
}

.status-approved .metal-recipient-state b {
  color: #137443;
}

.status-changes_requested .metal-recipient-state b {
  color: var(--sez-danger);
}

.metal-decision-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(213, 224, 234, 0.9);
  padding-top: 12px;
}

.metal-decision-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metal-step-button.is-warning {
  border-color: var(--sez-danger);
  background: var(--sez-danger);
}

.metal-action-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  border-radius: 13px;
  padding: 14px;
  background: #f7fafc;
}

.metal-action-empty p {
  margin: 0;
  color: var(--sez-muted);
  font-weight: 800;
}

.metal-paint-state {
  align-items: center;
  justify-content: flex-start;
}

.metal-paint-state strong {
  color: var(--sez-navy);
}

.metal-paint-state > span:not(.metal-status-badge) {
  color: var(--sez-muted);
  font-weight: 850;
}

.metal-paint-item > form {
  max-width: 420px;
  justify-self: end;
}

.metal-inbox-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
}

.metal-inbox-summary > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.metal-inbox-summary span,
.metal-inbox-summary p {
  margin: 0;
  color: var(--sez-muted);
  font-weight: 850;
}

.metal-inbox-summary strong {
  color: var(--sez-navy);
  font-size: 34px;
}

.metal-inbox-list {
  display: grid;
  gap: 12px;
}

.metal-inbox-item {
  display: grid;
  gap: 10px;
  border-left: 7px solid var(--sez-metal-dark);
  padding: 17px 19px;
}

.metal-inbox-item.is-unread {
  border-left-color: var(--sez-blue);
  background: #f5f9ff;
}

.metal-inbox-kind {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.metal-unread-dot {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sez-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.metal-inbox-order {
  color: var(--sez-navy);
  font-size: 23px;
}

.metal-inbox-item footer,
.supply-paint-item footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
}

.metal-inbox-open {
  width: auto;
  min-width: 180px;
  min-height: 52px;
  text-decoration: none;
}

.supply-paint-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supply-paint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.supply-paint-item {
  display: grid;
  gap: 15px;
  border-left: 7px solid #7454b7;
  padding: 19px;
}

.supply-paint-item.status-returned {
  border-left-color: var(--sez-success);
}

.supply-paint-item.is-overdue {
  border-left-color: var(--sez-danger);
  background: #fff7f7;
}

.supply-paint-item header > div {
  display: grid;
  gap: 5px;
}

.supply-paint-item header strong {
  color: var(--sez-navy);
  font-size: 19px;
  line-height: 1.3;
}

.supply-paint-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.supply-paint-dates div {
  display: grid;
  gap: 4px;
  border-radius: 11px;
  padding: 10px;
  background: #f4f7fa;
}

.supply-paint-dates dt,
.supply-paint-dates dd {
  margin: 0;
}

.supply-paint-dates dt {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
}

.supply-paint-dates dd {
  color: var(--sez-navy);
  font-size: 17px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .metal-manual-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metal-manual-item-name {
    grid-column: 1 / -1;
  }

  .metal-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metal-task-summary {
    grid-template-columns: 1fr 1fr;
  }

  .metal-task-facts {
    grid-column: 1 / -1;
  }

  .metal-checklist-row {
    grid-template-columns: 52px minmax(220px, 1fr) minmax(190px, 220px);
  }

  .metal-step-state {
    grid-column: 2;
  }

  .metal-checklist-row form,
  .metal-step-finished-mark {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .metal-file-upload {
    grid-template-columns: 1fr 1fr;
  }

  .metal-file-upload .metal-step-button {
    grid-column: 1 / -1;
  }

  .metal-submit-button {
    max-width: none;
  }

  .supply-paint-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .metal-production-header,
  .metal-header-tools {
    align-items: stretch;
  }

  .metal-header-tools {
    width: 100%;
    justify-content: stretch;
  }

  .metal-create-order-button,
  .metal-private-badge {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .metal-manual-line {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .metal-manual-item-name {
    grid-column: auto;
  }

  .metal-manual-line-head,
  .metal-manual-form-actions,
  .metal-manual-status-card {
    align-items: stretch;
    flex-direction: column;
  }

  .metal-manual-remove-line,
  .metal-add-line-button,
  .metal-manual-form-actions .toolbar-button,
  .metal-manual-form-actions .metal-step-button,
  .metal-manual-status-card form,
  .metal-manual-status-card button {
    width: 100%;
  }

  .metal-manual-order-form {
    padding: 14px;
  }

  .metal-view-option {
    min-height: 78px;
    gap: 9px;
    padding: 11px 12px;
  }

  .metal-view-option strong {
    font-size: 19px;
  }

  .metal-view-option small {
    font-size: 12px;
  }

  .metal-view-option b {
    min-width: 43px;
    height: 43px;
    border-radius: 12px;
    font-size: 21px;
  }

  .metal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .metal-summary-strip > div:last-child {
    grid-column: 1 / -1;
  }

  .metal-order-grid {
    grid-template-columns: 1fr;
  }

  .metal-order-card {
    min-height: 220px;
    padding: 20px 18px 20px 27px;
  }

  .metal-order-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .metal-task-summary {
    grid-template-columns: 1fr;
  }

  .metal-task-facts {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .metal-file-upload,
  .metal-file-groups {
    grid-template-columns: 1fr;
  }

  .metal-file-upload .metal-step-button {
    grid-column: auto;
  }

  .metal-collaboration-card {
    padding: 14px;
  }

  .metal-chat-message {
    width: 100%;
    box-sizing: border-box;
  }

  .metal-touch-form,
  .metal-decision-actions,
  .supply-paint-dates {
    grid-template-columns: 1fr;
  }

  .metal-choice-grid,
  .metal-file-choice-grid,
  .supply-paint-grid {
    grid-template-columns: 1fr;
  }

  .metal-submit-button,
  .metal-paint-item > form,
  .metal-inbox-open {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .metal-inbox-item footer,
  .supply-paint-item footer {
    align-items: stretch;
    flex-direction: column;
  }

  .supply-paint-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metal-file-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .metal-checklist-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .metal-step-number {
    width: 44px;
    height: 44px;
  }

  .metal-step-state {
    grid-column: 2;
  }

  .metal-checklist-row form,
  .metal-step-finished-mark {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .metal-step-finished-mark {
    justify-self: start;
  }

  .metal-lines-wrap {
    overflow-x: visible;
  }

  .metal-lines-table,
  .metal-lines-table tbody {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .metal-lines-table thead {
    display: none;
  }

  .metal-lines-table tr {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) minmax(92px, auto);
    gap: 8px 10px;
    border: 1px solid rgba(213, 224, 234, 0.94);
    border-left: 6px solid #2f9fb3;
    border-radius: 13px;
    padding: 12px;
    background: #ffffff;
  }

  .metal-lines-table td,
  .metal-lines-table td:first-child,
  .metal-lines-table td:last-child {
    border: 0;
    padding: 0;
    text-align: left;
  }

  .metal-lines-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--sez-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .metal-lines-table td:nth-child(1) {
    grid-row: 1 / 3;
    color: var(--sez-navy);
    font-size: 24px;
    font-weight: 900;
  }

  .metal-lines-table td:nth-child(1)::before {
    display: none;
  }

  .metal-lines-table td:nth-child(2) {
    grid-column: 2 / -1;
  }

  .metal-lines-table td:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }
}

@media screen and (orientation: portrait), screen and (max-width: 900px) and (min-height: 900px) {
  body.portrait-layout .metal-production-screen {
    gap: 12px;
  }

  body.portrait-layout .metal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.portrait-layout .metal-order-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 12px;
  }

  body.portrait-layout .metal-checklist-card,
  body.portrait-layout .metal-lines-card,
  body.portrait-layout .metal-files-card {
    padding: 14px;
  }

  body.portrait-layout .metal-checklist-row {
    min-height: 90px;
  }

  body.portrait-layout .metal-step-button {
    min-height: 58px;
  }
}

.invoice-screen {
  gap: 16px;
}

.invoice-tabs {
  align-items: stretch;
  flex-wrap: wrap;
}

.invoice-tabs a span {
  margin-left: 6px;
  color: inherit;
  opacity: 0.75;
}

.invoice-upload-form {
  display: grid;
  gap: 12px;
}

.invoice-role-banner {
  color: #dcecff;
  font-weight: 800;
  margin: 8px 0 0;
}

.invoice-screen .terminal-header .compact-order-title {
  color: #526b82;
}

.invoice-screen .terminal-header .invoice-role-banner {
  color: #0b5aa7;
}

.invoice-upload-form--search {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.invoice-upload-context-grid {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 220px) minmax(320px, 1fr);
}

.invoice-upload-context-grid > label,
.invoice-order-search-label {
  color: #40556d;
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 6px;
}

.invoice-upload-context-grid select,
.invoice-upload-context-grid input {
  background: #fff;
  border: 1px solid rgba(27, 42, 65, 0.2);
  border-radius: 7px;
  color: #102033;
  font: inherit;
  min-height: 44px;
  padding: 8px 10px;
  width: 100%;
}

.invoice-file-dropzone {
  background: #f4f9ff;
  border: 2px dashed #8fb6d9;
  border-radius: 8px;
  min-height: 156px;
  position: relative;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.invoice-file-dropzone.is-dragover {
  background: #e7f3ff;
  border-color: #0b5aa7;
  box-shadow: inset 0 0 0 2px rgba(11, 90, 167, 0.08);
}

.invoice-file-dropzone.has-files {
  min-height: 118px;
}

.invoice-file-input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.invoice-file-dropzone-label {
  align-items: center;
  color: #40556d;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 152px;
  padding: 18px;
  text-align: center;
}

.invoice-file-dropzone.has-files .invoice-file-dropzone-label {
  min-height: 114px;
}

.invoice-file-dropzone-label > strong {
  color: #102033;
  font-size: 18px;
}

.invoice-file-dropzone-label > small {
  color: #64788e;
}

.invoice-file-pick-button {
  background: #0b5aa7;
  border: 1px solid #0b4f9f;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
}

.invoice-upload-file-list {
  display: grid;
  gap: 6px;
}

.invoice-upload-file-item {
  align-items: center;
  background: #f8fbfe;
  border: 1px solid rgba(27, 42, 65, 0.14);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 50px;
  padding: 6px 7px 6px 11px;
}

.invoice-upload-file-item > div {
  display: grid;
  min-width: 0;
}

.invoice-upload-file-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-upload-file-item span {
  color: #64788e;
  font-size: 12px;
}

.invoice-upload-file-remove {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(174, 45, 45, 0.28);
  border-radius: 6px;
  color: #a52626;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.invoice-upload-mode-hint {
  background: #f6f9fd;
  border-left: 3px solid #7c91a7;
  color: #40556d;
  font-size: 13px;
  padding: 9px 11px;
}

.invoice-upload-mode-hint.is-comparison {
  background: #eef6ff;
  border-left-color: #0b5aa7;
  color: #0b4f9f;
  font-weight: 750;
}

.invoice-upload-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.invoice-upload-actions .supply-v2-check {
  margin: 0;
}

.invoice-order-search-panel {
  min-width: min(100%, 520px);
  position: relative;
}

.invoice-order-search-label {
  width: 100%;
}

.invoice-order-search-results {
  background: #ffffff;
  border: 1px solid #cbd9e6;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  left: 0;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 72px;
  z-index: 80;
}

.invoice-order-result {
  background: #f8fbfe;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--sez-text);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.invoice-order-result:hover,
.invoice-order-result:focus {
  background: #eef6ff;
  border-color: #9fc5ec;
}

.invoice-order-result small,
.invoice-selected-order-card span,
.invoice-route-hint,
.invoice-order-suggestions {
  color: #5f7288;
  font-size: 12px;
}

.invoice-order-suggestions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.invoice-selected-order-card,
.invoice-route-hint {
  background: #f8fbfe;
  border: 1px solid rgba(27, 42, 65, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 10px;
}

.invoice-route-hint {
  background: #eef6ff;
  color: var(--sez-blue);
  font-weight: 800;
}

.invoice-director-missing {
  margin-top: 8px;
}

.is-hidden {
  display: none !important;
}

.invoice-preview-card,
.invoice-summary-card,
.invoice-warning-card,
.invoice-data-check,
.invoice-actions-card {
  margin-bottom: 12px;
}

.invoice-detail-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1fr);
}

.invoice-preview-card {
  grid-row: span 4;
  position: sticky;
  top: 76px;
}

.invoice-file-preview {
  background: #f7fafc;
  border: 1px solid rgba(27, 42, 65, 0.14);
  border-radius: 8px;
  height: min(72vh, 760px);
  min-height: 460px;
  width: 100%;
}

.invoice-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.invoice-preview-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6ff;
  color: var(--sez-blue);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.invoice-file-image-preview {
  object-fit: contain;
}

.invoice-file-placeholder {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed rgba(27, 42, 65, 0.22);
  border-radius: 8px;
  color: #5f6b7a;
  display: flex;
  min-height: 180px;
  justify-content: center;
}

.invoice-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.invoice-preview-actions form {
  margin: 0;
}

.invoice-field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-field {
  background: #f8fbfe;
  border: 1px solid rgba(27, 42, 65, 0.1);
  border-radius: 8px;
  min-width: 0;
  padding: 10px 12px;
}

.invoice-field span:first-child {
  color: #5f7288;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.invoice-field strong {
  color: #102033;
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.invoice-field strong em {
  color: #7c4b00;
  display: block;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  margin-top: 3px;
}

.invoice-field--wide {
  grid-column: span 2;
}

.invoice-field--status strong,
.invoice-field--route strong {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invoice-assignee-pill {
  background: #eef5ff;
  border: 1px solid rgba(11, 79, 159, 0.16);
  border-radius: 999px;
  color: #0b4f9f;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 9px;
}

.invoice-header-delete-form {
  margin: 0;
}

.invoice-header-delete,
.invoice-header-restore {
  cursor: pointer;
  font: inherit;
}

.invoice-header-delete {
  background: #fff5f5;
  border: 1px solid rgba(198, 40, 40, 0.25);
  color: #b71c1c;
}

.invoice-header-restore {
  background: #effaf3;
  border: 1px solid rgba(23, 160, 93, 0.25);
  color: #0b7a44;
}

.invoice-table-wrap {
  overflow-x: auto;
}

.invoice-payment-batch-toolbar {
  align-items: center;
  background: #eef7ff;
  border: 1px solid rgba(11, 79, 159, 0.2);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 9px 11px;
}

.invoice-payment-batch-toolbar > div {
  display: grid;
  gap: 2px;
}

.invoice-payment-batch-toolbar span {
  color: #5f7288;
  font-size: 12px;
}

.invoice-payment-batch-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.invoice-payment-select {
  min-width: 42px;
  text-align: center;
  width: 42px;
}

.invoice-payment-select input {
  height: 20px;
  margin: 0;
  width: 20px;
}

.invoice-payment-dashboard {
  border-left: 4px solid #0b67c2;
}

.invoice-payment-day-total {
  display: grid;
  gap: 3px;
  text-align: right;
}

.invoice-payment-day-total span,
.invoice-payment-limit-card span {
  color: #5f7288;
  font-size: 12px;
  font-weight: 800;
}

.invoice-payment-day-total strong {
  color: #0b4f9f;
  font-size: 19px;
}

.invoice-payment-limit-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.invoice-payment-limit-card {
  background: #f4f9ff;
  border: 1px solid #bfd3e8;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
}

.invoice-payment-limit-card strong {
  color: #123f72;
  font-size: 17px;
}

.invoice-payment-limit-card small {
  color: #536a82;
  overflow-wrap: anywhere;
}

.invoice-payment-limit-card.is-over-limit {
  background: #fff0f0;
  border-color: #d99b9b;
}

.invoice-payment-limit-help {
  color: #536a82;
  font-size: 12px;
  margin: 10px 0 0;
}

.invoice-payment-policy-note {
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 7px;
  max-width: 230px;
  padding: 7px 8px;
  text-align: left;
  white-space: normal;
}

.invoice-payment-policy-note.is-ok {
  background: #e9f7ef;
  color: #17633d;
}

.invoice-payment-policy-note.is-warning {
  background: #fff1d9;
  color: #7a4a00;
}

.invoice-payment-policy-note span {
  display: block;
  font-weight: 500;
  margin-top: 4px;
}

.invoice-payment-policy-card {
  align-items: center;
  border: 1px solid;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 0.7fr) minmax(280px, 1.3fr);
  margin-bottom: 12px;
  padding: 11px 13px;
}

.invoice-payment-policy-card.is-ok {
  background: #eaf8f0;
  border-color: #9bcfb1;
}

.invoice-payment-policy-card.is-warning {
  background: #fff3dc;
  border-color: #dfbd7d;
}

.invoice-payment-policy-card > div {
  display: grid;
  gap: 3px;
}

.invoice-payment-policy-card span,
.invoice-payment-policy-card small {
  color: #536a82;
  font-size: 12px;
}

.invoice-payment-policy-card p {
  margin: 0;
}

.invoice-screen .supply-v2-status.status-paid,
.invoice-screen .supply-v2-status.status-payment_order_ready {
  background: #d8f4e3;
  color: #08663a;
}

.invoice-screen .supply-v2-status.status-comparison_pending,
.invoice-screen .supply-v2-status.status-pending_pavel,
.invoice-screen .supply-v2-status.status-pending_vadim {
  background: #e5efff;
  color: #164f9b;
}

.invoice-screen .supply-v2-status.status-comparison_not_selected,
.invoice-screen .supply-v2-status.status-rejected {
  background: #f2f4f7;
  color: #5e6877;
}

.invoice-screen .supply-v2-status.status-draft,
.invoice-screen .supply-v2-status.status-revision_required {
  background: #fff3d6;
  color: #805100;
}

.invoice-screen .supply-v2-status.status-completed {
  background: #d8f4e3;
  color: #08663a;
}

.invoice-comparison-list {
  scroll-margin-top: 96px;
}

.invoice-comparison-package-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.invoice-comparison-package {
  background: #f8fbff;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 8px;
  color: #102033;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  text-decoration: none;
}

.invoice-comparison-package:hover {
  border-color: rgba(11, 79, 159, 0.48);
  box-shadow: 0 8px 18px rgba(11, 79, 159, 0.09);
}

.invoice-comparison-package .supply-v2-status {
  justify-self: start;
}

.invoice-comparison-package strong,
.invoice-comparison-package span,
.invoice-comparison-package small {
  overflow-wrap: anywhere;
}

.invoice-comparison-package small {
  color: #607187;
}

.invoice-unread-summary {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0 0;
}

.invoice-unread-badge {
  background: #c62828;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.invoice-discussion-card {
  border-left: 4px solid #0b67c2;
}

.invoice-discussion-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  max-height: 420px;
  overflow-y: auto;
}

.invoice-discussion-message {
  background: #f4f7fb;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  max-width: 900px;
  padding: 10px 12px;
}

.invoice-discussion-message.is-own {
  background: #e9f4ff;
  border-color: #b7d6f4;
  justify-self: end;
}

.invoice-discussion-message > div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.invoice-discussion-message time,
.invoice-discussion-form small {
  color: #66788c;
  font-size: 12px;
}

.invoice-discussion-message p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.invoice-discussion-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 1fr) auto;
}

.invoice-discussion-form label {
  display: grid;
  font-weight: 800;
  gap: 5px;
}

.invoice-discussion-form textarea {
  box-sizing: border-box;
  min-height: 78px;
  resize: vertical;
  width: 100%;
}

.invoice-discussion-form small {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .invoice-discussion-form {
    grid-template-columns: 1fr;
  }
}

.invoice-comparison-create-toolbar {
  background: #f3f8ff;
}

.invoice-alternative-upload-card {
  border-left: 4px solid #0b67c2;
  margin-bottom: 12px;
}

.invoice-alternative-upload-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 12px;
}

.invoice-alternative-upload-form label {
  color: #40556d;
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 6px;
}

.invoice-alternative-upload-form input[type="file"] {
  background: #fff;
  border: 1px solid rgba(27, 42, 65, 0.24);
  border-radius: 7px;
  color: #102033;
  font: inherit;
  min-height: 44px;
  padding: 8px;
  width: 100%;
}

.invoice-comparison-summary,
.invoice-comparison-edit-head,
.invoice-comparison-decision,
.invoice-comparison-secondary-actions {
  margin-bottom: 12px;
}

.invoice-comparison-main-comment,
.invoice-comparison-note-static,
.invoice-comparison-terms {
  background: #f6f9fd;
  border-left: 3px solid #0b4f9f;
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 9px 11px;
}

.invoice-comparison-main-comment span,
.invoice-comparison-note-static span,
.invoice-comparison-terms span {
  color: #607187;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.invoice-comparison-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
}

.invoice-comparison-edit-grid label,
.invoice-comparison-note,
.invoice-comparison-decision label {
  color: #40556d;
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 6px;
}

.invoice-comparison-edit-grid input,
.invoice-comparison-edit-grid textarea,
.invoice-comparison-note textarea,
.invoice-comparison-decision textarea,
.invoice-comparison-secondary-actions input {
  background: #fff;
  border: 1px solid rgba(27, 42, 65, 0.2);
  border-radius: 7px;
  color: #102033;
  font: inherit;
  padding: 9px 10px;
}

.invoice-comparison-candidates {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.invoice-comparison-analysis-card {
  margin-bottom: 12px;
}

.invoice-comparison-analysis-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0;
}

.invoice-comparison-analysis-metrics > div {
  background: #f6f9fd;
  border: 1px solid rgba(27, 42, 65, 0.12);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.invoice-comparison-analysis-metrics span {
  color: #607187;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.invoice-comparison-analysis-metrics strong {
  font-size: 20px;
}

.invoice-comparison-analysis-message {
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 750;
  margin: 10px 0;
  padding: 9px 11px;
}

.invoice-comparison-analysis-message.is-ok {
  background: #e8f7ef;
  border-color: rgba(21, 148, 90, 0.24);
  color: #12653f;
}

.invoice-comparison-analysis-message.is-warning {
  background: #fff5d7;
  border-color: rgba(179, 112, 0, 0.24);
  color: #77510b;
}

.invoice-comparison-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.invoice-comparison-filter-row button {
  background: #f6f9fd;
  border: 1px solid rgba(27, 42, 65, 0.18);
  border-radius: 6px;
  color: #29445f;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 11px;
}

.invoice-comparison-filter-row button.is-active {
  background: #0b5aa7;
  border-color: #0b5aa7;
  color: #fff;
}

.invoice-comparison-matrix-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
}

.invoice-comparison-matrix {
  border-collapse: separate;
  border-spacing: 0;
  min-width: max(100%, 980px);
  table-layout: fixed;
  width: max-content;
}

.invoice-comparison-matrix th,
.invoice-comparison-matrix td {
  border-bottom: 1px solid #c7d3df;
  border-right: 1px solid #c7d3df;
  padding: 9px 10px;
  vertical-align: top;
  width: 270px;
}

.invoice-comparison-matrix tr > :first-child {
  border-left: 1px solid #c7d3df;
  width: 330px;
}

.invoice-comparison-matrix thead th {
  background: #dfeeff;
  border-top: 1px solid #b5c7d8;
  color: #153c66;
  position: sticky;
  top: 0;
  z-index: 5;
}

.invoice-comparison-matrix thead th:first-child {
  left: 0;
  z-index: 7;
}

.invoice-comparison-matrix thead th strong,
.invoice-comparison-matrix thead th span,
.invoice-comparison-matrix tbody th strong,
.invoice-comparison-matrix tbody th span,
.invoice-comparison-matrix tbody th em {
  display: block;
}

.invoice-comparison-matrix thead th strong {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  line-height: 1.25;
  overflow: hidden;
}

.invoice-comparison-matrix thead th span {
  color: #526b82;
  font-size: 12px;
  margin-top: 3px;
}

.invoice-comparison-matrix tbody th {
  background: #fff;
  left: 0;
  position: sticky;
  z-index: 3;
}

.invoice-comparison-matrix tbody th strong {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  line-height: 1.25;
  overflow: hidden;
}

.invoice-comparison-matrix tbody th span {
  color: #5f7288;
  font-size: 12px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-comparison-matrix tbody th em {
  color: #29445f;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  margin-top: 7px;
}

.invoice-comparison-matrix-cell {
  background: #fff;
}

.invoice-comparison-matrix-cell > div {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.invoice-comparison-matrix-cell > div span {
  color: #607187;
  font-size: 11px;
}

.invoice-comparison-matrix-cell > div strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.invoice-comparison-matrix-cell > small {
  color: #9a2f2f;
  display: block;
  font-weight: 800;
  margin-top: 7px;
}

.invoice-comparison-matrix-cell.is-best {
  background: #e8f7ef;
}

.invoice-comparison-matrix-cell.is-higher {
  background: #fdecec;
}

.invoice-comparison-matrix-cell.is-missing,
.invoice-comparison-matrix-cell.is-unknown {
  background: #fff8df;
}

.invoice-comparison-missing-label {
  color: #8a5b00;
  display: block;
  padding-top: 4px;
}

.invoice-comparison-row--missing > th,
.invoice-comparison-row--possible_replacement > th {
  background: #fff8df;
}

.invoice-comparison-row--quantity_difference > th,
.invoice-comparison-row--price_difference > th {
  background: #f7faff;
}

.invoice-comparison-candidate {
  border: 2px solid rgba(27, 42, 65, 0.14);
  margin: 0;
  min-width: 0;
}

.invoice-comparison-candidate.is-recommended {
  border-color: #f0a500;
}

.invoice-comparison-candidate.is-selected {
  border-color: #15945a;
  box-shadow: 0 10px 24px rgba(21, 148, 90, 0.13);
}

.invoice-comparison-candidate-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.invoice-comparison-candidate-head h2,
.invoice-comparison-candidate-head p {
  margin: 0;
}

.invoice-comparison-choice {
  align-items: center;
  background: #eef6ff;
  border: 1px solid rgba(11, 79, 159, 0.22);
  border-radius: 7px;
  color: #0b4f9f;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
}

.invoice-comparison-choice input {
  height: 20px;
  margin: 0;
  width: 20px;
}

.invoice-comparison-metrics {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.invoice-comparison-metrics > div {
  background: #f6f9fd;
  border: 1px solid rgba(27, 42, 65, 0.1);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
}

.invoice-comparison-metrics span {
  color: #607187;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.invoice-comparison-metrics strong {
  overflow-wrap: anywhere;
}

.invoice-comparison-warning {
  background: #fff5d7;
  border: 1px solid rgba(179, 112, 0, 0.22);
  border-radius: 7px;
  display: grid;
  font-size: 12px;
  gap: 3px;
  margin-top: 9px;
  max-height: 76px;
  overflow: hidden;
  padding: 8px 10px;
}

.invoice-comparison-note {
  margin-top: 10px;
}

.invoice-comparison-sticky-actions,
.invoice-comparison-submit-form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.invoice-comparison-decision {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) auto;
}

.invoice-comparison-decision > small {
  color: #5f7288;
  grid-column: 1 / -1;
}

.invoice-comparison-secondary-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(340px, 1fr) minmax(340px, 1fr);
}

.invoice-comparison-secondary-actions h2,
.invoice-comparison-secondary-actions p {
  margin: 0;
}

.invoice-comparison-secondary-actions form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.invoice-comparison-secondary-actions input {
  min-width: 0;
  width: 100%;
}

@media (max-width: 1100px) {
  .invoice-comparison-analysis-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-comparison-candidates {
    grid-template-columns: 1fr;
  }

  .invoice-comparison-secondary-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .invoice-upload-context-grid {
    grid-template-columns: 1fr;
  }

  .invoice-upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-upload-actions .toolbar-button {
    width: 100%;
  }

  .invoice-comparison-edit-grid,
  .invoice-comparison-decision,
  .invoice-alternative-upload-form {
    grid-template-columns: 1fr;
  }

  .invoice-comparison-candidate-head {
    display: grid;
  }

  .invoice-comparison-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-comparison-analysis-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-comparison-secondary-actions form {
    align-items: stretch;
    flex-direction: column;
  }
}

.invoice-table th,
.invoice-table td {
  vertical-align: top;
}

.invoice-table-supplier {
  min-width: 210px;
  overflow-wrap: anywhere;
}

.invoice-table-amount {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .invoice-payment-day-total {
    text-align: left;
  }

  .invoice-payment-policy-card {
    grid-template-columns: 1fr;
  }
}

.invoice-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invoice-row-actions form {
  margin: 0;
}

.invoice-delete-link,
.invoice-restore-link {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.invoice-delete-link {
  color: #b71c1c;
}

.invoice-restore-link {
  color: #0b7a44;
}

.invoice-summary-metrics strong em {
  color: #7c4b00;
  display: block;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  margin-top: 3px;
}

.invoice-warning-group {
  border-radius: 8px;
  margin-top: 8px;
  padding: 10px 12px;
}

.invoice-warning-group ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.invoice-warning-critical {
  background: #fdecec;
  border: 1px solid rgba(190, 38, 38, 0.22);
}

.invoice-warning-attention {
  background: #fff7d8;
  border: 1px solid rgba(180, 112, 0, 0.22);
}

.invoice-warning-info {
  background: #edf7ff;
  border: 1px solid rgba(33, 112, 180, 0.2);
}

.invoice-data-check summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.invoice-data-check summary strong {
  color: #1b5e20;
  font-size: 13px;
}

.invoice-manual-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 12px;
}

.invoice-manual-form label {
  color: #526071;
  display: grid;
  font-size: 12px;
  gap: 4px;
}

.invoice-manual-form input,
.invoice-manual-form textarea {
  border: 1px solid rgba(27, 42, 65, 0.16);
  border-radius: 8px;
  min-height: 34px;
  padding: 7px 9px;
}

.invoice-manual-form textarea {
  min-height: 72px;
  resize: vertical;
}

.invoice-manual-wide {
  grid-column: span 2;
}

.invoice-table th,
.invoice-table td {
  vertical-align: top;
}

.invoice-table td {
  overflow-wrap: anywhere;
}

.invoice-table .invoice-analysis-name-cell {
  min-width: 420px;
  max-width: 560px;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
  min-width: 112px;
}

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) {
  min-width: 150px;
}

.invoice-analysis-row > td {
  border-bottom: 1px solid rgba(27, 42, 65, 0.1);
  padding-bottom: 7px;
  padding-top: 7px;
}

.invoice-analysis-row--cheap > td {
  background: #9bd4a8;
  color: #12351f;
}

.invoice-analysis-row--match > td {
  background: #f1fbef;
}

.invoice-analysis-row--overrun > td {
  background: #fdecec;
}

.invoice-analysis-row--warning > td {
  background: #fff7d8;
}

.invoice-analysis-row--possible-replacement > td {
  background: #ffe2b8;
}

.invoice-analysis-row--ok > td {
  background: #f8fbff;
}

.invoice-analysis-item-name,
.invoice-analysis-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.invoice-analysis-item-name {
  -webkit-line-clamp: 3;
  font-weight: 700;
  line-height: 1.22;
}

.invoice-analysis-note {
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 3px;
}

.invoice-analysis-price-source {
  font-size: 12px;
  line-height: 1.15;
  margin-top: 3px;
  white-space: nowrap;
}

.invoice-analysis-actions-cell {
  min-width: 560px;
}

.invoice-summary-card .supply-v2-metrics strong {
  font-size: 16px;
}

.invoice-action-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.invoice-action-row form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-action-row input[type="text"] {
  min-height: 38px;
  min-width: min(100%, 240px);
}

.invoice-match-form {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 550px;
}

.invoice-match-form select {
  border: 1px solid rgba(27, 42, 65, 0.18);
  border-radius: 8px;
  min-height: 34px;
  max-width: 200px;
  padding: 5px 8px;
}

@media (max-width: 760px) {
  .invoice-detail-layout {
    display: block;
  }

  .invoice-preview-card {
    position: static;
  }

  .invoice-file-preview {
    height: 62vh;
    min-height: 320px;
  }

  .invoice-field-grid {
    grid-template-columns: 1fr;
  }

  .invoice-field--wide {
    grid-column: auto;
  }

  .invoice-manual-wide {
    grid-column: auto;
  }

  .invoice-match-form,
  .invoice-analysis-actions-cell {
    min-width: 360px;
  }

  .invoice-match-form,
  .invoice-match-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 1120px) {
  .invoice-detail-layout {
    display: block;
  }

  .invoice-preview-card {
    position: static;
  }
}

.invoice-match-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.invoice-match-actions .mini-button {
  min-height: 30px;
  padding: 5px 8px;
  white-space: nowrap;
}

.warning-button {
  border-color: rgba(180, 112, 0, 0.45);
  background: #fff7df;
  color: #7c4b00;
}

.danger-button {
  border-color: rgba(190, 38, 38, 0.45);
  background: #fff1f1;
  color: #9f1d1d;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 138, 0, 0.11), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(11, 79, 159, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(11, 79, 159, 0.05), rgba(255, 138, 0, 0.04)),
    var(--sez-bg);
  color: var(--sez-text);
  font-family: "Manrope", "Inter", "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
}

body.modal-open {
  overflow: hidden;
}

body.supply-receipt-modal-open .page-shell,
body.supply-receipt-modal-open .terminal-screen {
  z-index: 3400;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--sez-blue);
}

button {
  font-family: inherit;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 14px 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 28%),
    linear-gradient(90deg, rgba(255, 138, 0, 0.18), transparent 34%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
    var(--sez-panel);
  box-shadow: 0 12px 30px rgba(7, 29, 51, 0.22);
}

.app-topbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sez-orange), var(--sez-blue));
  content: "";
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 15px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  display: block;
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.brand-fallback {
  color: var(--sez-blue);
  font-size: 22px;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.top-nav-link,
.header-link,
.home-links a,
.home-links button,
.toolbar-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sez-blue);
  border-radius: var(--sez-radius-button);
  padding: 13px 20px;
  background: var(--sez-card);
  color: var(--sez-blue);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.top-nav-link {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.top-nav-link.admin-service-link {
  min-height: 42px;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 15px;
}

.top-nav-link.primary,
.header-link,
.home-links .primary-link,
.toolbar-link,
.my-work-button {
  border-color: var(--sez-blue);
  background: var(--sez-blue);
  color: #ffffff;
}

.top-nav-link.ghost {
  color: rgba(255, 255, 255, 0.82);
}

.top-nav-link.is-active {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow:
    inset 0 -3px 0 rgba(255, 138, 0, 0.9),
    0 8px 18px rgba(0, 0, 0, 0.18);
  font-weight: 900;
}

.top-nav-link:hover,
.header-link:hover,
.home-links a:hover,
.home-links button:hover,
.toolbar-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(7, 29, 51, 0.14);
}

.page-shell,
.terminal-screen {
  width: min(100%, 1880px);
  margin: 0 auto;
  padding: 32px 32px calc(var(--sez-bottom-panel) + 36px);
}

.home-panel {
  position: relative;
  min-height: calc(100vh - 86px);
  display: grid;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 16px;
}

.page-shell.home-panel {
  width: 100%;
  padding-right: 24px;
  padding-left: 24px;
}

.home-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(7, 29, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 29, 51, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(7, 29, 51, 0.04), rgba(255, 138, 0, 0.05));
  background-size: 34px 34px, 34px 34px, auto;
  content: "";
}

.home-dashboard {
  display: grid;
  width: min(1840px, calc(100vw - 48px));
  grid-template-columns: minmax(720px, 0.95fr) minmax(760px, 1.05fr);
  gap: 22px;
  align-items: start;
  justify-self: start;
}

.home-hero {
  position: relative;
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(216, 226, 236, 0.9);
  border-radius: 24px;
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 241, 255, 0.92)),
    linear-gradient(rgba(7, 29, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 29, 51, 0.04) 1px, transparent 1px),
    var(--sez-card);
  background-size: auto, 28px 28px, 28px 28px, auto;
  box-shadow: var(--sez-shadow);
}

.home-dashboard .home-hero {
  width: 100%;
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 18px;
  align-content: start;
  padding: 30px 32px 28px;
}

.home-hero::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 100%;
  background: linear-gradient(var(--sez-orange), var(--sez-blue));
  content: "";
}

.home-logo {
  display: block;
  max-width: 172px;
  max-height: 64px;
  margin-bottom: 12px;
  object-fit: contain;
}

.home-hero-content {
  position: relative;
  z-index: 2;
}

.home-hero h1,
.terminal-header h1,
.section-card h1 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 46px;
  font-weight: 800;
  line-height: 1.08;
}

.home-dashboard .home-hero h1 {
  font-size: 50px;
}

.home-subtitle {
  max-width: 720px;
  margin: 10px 0 12px;
  color: var(--sez-muted);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.28;
}

.home-description {
  max-width: 760px;
  margin: 0 0 11px;
  color: var(--sez-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.34;
}

.home-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 11px;
  margin-top: 2px;
}

.home-links a,
.home-links button {
  position: relative;
  display: grid;
  min-height: 78px;
  align-content: center;
  justify-content: stretch;
  gap: 3px;
  overflow: hidden;
  padding: 14px 19px;
  font-size: 22px;
  box-shadow: var(--sez-shadow-soft);
  text-align: left;
}

.home-links a::before,
.home-links button::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(var(--sez-accent), var(--sez-primary));
  content: "";
}

.action-card span {
  font-size: 22px;
  font-weight: 800;
}

.action-card small {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 700;
}

.primary-link.action-card small {
  color: rgba(255, 255, 255, 0.78);
}

.home-links .admin-action-card {
  border-color: rgba(19, 34, 53, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 236, 243, 0.94)),
    var(--sez-card);
  color: var(--sez-navy);
}

.home-links .admin-action-card::before {
  background: linear-gradient(var(--sez-metal-dark), var(--sez-orange));
}

.home-links .admin-action-card:hover,
.home-links .admin-action-card:active {
  border-color: rgba(255, 138, 0, 0.62);
}

.home-my-work-trigger {
  appearance: none;
}

.home-employee-picker[hidden] {
  display: none !important;
}

.home-employee-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  padding: 24px;
}

.home-employee-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 38, 0.48);
  backdrop-filter: blur(3px);
}

.home-employee-picker-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  border: 1px solid rgba(216, 226, 236, 0.9);
  border-radius: 22px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 250, 0.96)),
    var(--sez-card);
  box-shadow: var(--shadow-strong);
}

.home-employee-picker-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-employee-picker-head h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
}

.home-employee-picker-head p:not(.screen-label) {
  margin: 8px 0 0;
  color: var(--sez-muted);
  font-size: 17px;
  font-weight: 800;
}

.home-employee-picker-close {
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(19, 34, 53, 0.18);
  border-radius: 16px;
  background: #ffffff;
  color: var(--sez-navy);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.home-employee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-employee-choice {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(11, 79, 159, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(231, 241, 255, 0.9));
  color: var(--sez-navy);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.16;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(7, 29, 51, 0.08);
}

.home-employee-choice:hover,
.home-employee-choice:active,
.home-employee-choice:focus-visible,
.home-employee-picker-close:hover,
.home-employee-picker-close:active,
.home-employee-picker-close:focus-visible {
  border-color: var(--sez-orange);
  box-shadow: 0 14px 26px rgba(7, 29, 51, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.home-current-work-panel {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 102px);
  border: 1px solid rgba(216, 226, 236, 0.92);
  border-radius: 24px;
  padding: 18px 20px 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 250, 0.94)),
    var(--sez-card);
  box-shadow: var(--sez-shadow);
}

.home-current-work-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(var(--sez-blue), var(--sez-orange));
  content: "";
}

.home-current-work-header,
.home-current-section-title,
.home-current-card-top,
.home-current-bottom,
.home-waiting-row {
  position: relative;
  z-index: 1;
}

.home-current-work-header,
.home-current-section-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.home-current-work-header h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 29px;
  line-height: 1.12;
}

.home-current-work-refresh,
.home-current-updated {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.home-current-counters {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 7px;
  margin: 11px 0 13px;
}

.home-current-work-panel .home-current-counters {
  grid-template-columns: repeat(6, minmax(62px, 1fr));
  gap: 5px;
  margin: 9px 0 11px;
}

.home-current-counter {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 11px;
  padding: 6px 7px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: 0 8px 18px rgba(7, 29, 51, 0.07);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.home-current-counter:hover,
.home-current-counter:focus-visible,
.home-current-counter.is-active {
  border-color: rgba(11, 79, 159, 0.32);
  box-shadow: 0 14px 28px rgba(7, 29, 51, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.home-current-counter.is-active {
  background: #f8fbff;
  box-shadow:
    inset 0 0 0 2px rgba(11, 79, 159, 0.22),
    0 14px 28px rgba(7, 29, 51, 0.13);
}

.home-current-counter span {
  display: block;
  min-height: 20px;
  color: var(--sez-muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.home-current-counter strong {
  display: block;
  margin-top: 3px;
  color: var(--sez-navy);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.home-current-counter.is-empty {
  opacity: 0.54;
}

.home-current-counter.status-all {
  border-left: 5px solid var(--sez-blue);
}

.home-current-counter.status-in_progress {
  border-left: 5px solid #16a34a;
}

.home-current-counter.status-paused {
  border-left: 5px solid var(--sez-orange);
}

.home-current-counter.status-ready_for_photo {
  border-left: 5px solid #7c3aed;
}

.home-current-counter.status-waiting_packaging {
  border-left: 5px solid #0f766e;
  background: #f0fdfa;
}

.home-current-counter.status-labels_marking {
  border-left: 5px solid #f59e0b;
  background: #fffbeb;
}

.home-current-counter.status-ready_for_quality_check {
  border-left: 5px solid #0891b2;
}

.home-current-counter.status-rework_required {
  border-left: 5px solid var(--sez-red);
}

.home-current-quick-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.home-current-quick-dialog[hidden] {
  display: none;
}

.home-current-quick-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.home-current-quick-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(430px, 100%);
  max-height: min(680px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 58px rgba(7, 29, 51, 0.28);
}

.home-current-quick-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.home-current-quick-head h3 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 22px;
  font-weight: 950;
}

.home-current-quick-close {
  min-width: 42px;
  min-height: 42px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--sez-navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.home-current-quick-unit {
  margin: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: #f8fafc;
  color: var(--sez-text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.home-current-quick-field {
  display: grid;
  gap: 5px;
  color: var(--sez-muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-current-quick-field select,
.home-current-quick-field input {
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  text-transform: none;
}

.home-current-quick-employees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
}

.home-current-quick-employees button {
  min-height: 44px;
  cursor: pointer;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 12px;
  padding: 9px 10px;
  background: #f8fafc;
  color: var(--sez-navy);
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

.home-current-quick-employees button:hover,
.home-current-quick-employees button:focus-visible,
.home-current-quick-employees button.is-selected {
  border-color: rgba(11, 79, 159, 0.45);
  background: var(--sez-blue);
  color: #ffffff;
  outline: none;
}

.home-current-quick-message {
  min-height: 18px;
  margin: 0;
  color: #166534;
  font-size: 13px;
  font-weight: 900;
}

.home-current-quick-message.is-error {
  color: #b91c1c;
}

.home-current-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-current-quick-actions button {
  min-height: 44px;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--sez-blue);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
}

.home-current-quick-actions button.secondary {
  background: #e2e8f0;
  color: var(--sez-navy);
}

.home-current-section {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(15, 23, 42, 0.09);
  padding-top: 10px;
  margin-top: 10px;
}

.home-current-section-title {
  margin-bottom: 8px;
}

.home-current-section-title h3 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 20px;
  font-weight: 900;
}

.home-current-section-title > span {
  min-width: 36px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.home-current-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.home-current-card {
  position: relative;
  display: grid;
  gap: 4px;
  overflow: hidden;
  min-height: 108px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 9px 12px 9px 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.94));
  color: var(--sez-text);
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(7, 29, 51, 0.08);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.home-current-card:hover,
.home-current-card:active,
.home-waiting-row:hover,
.home-waiting-row:active {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(7, 29, 51, 0.12);
}

.home-current-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--sez-blue);
}

.home-current-card-top,
.home-current-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.home-current-card-top strong {
  flex: 1 1 auto;
  min-width: 88px;
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.home-current-status-badge,
.home-waiting-status {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-current-card-actions {
  display: flex;
  flex-wrap: wrap;
  flex: 0 1 auto;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.home-current-quick-button {
  min-height: 38px;
  cursor: pointer;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 999px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--sez-blue);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(7, 29, 51, 0.08);
  white-space: nowrap;
}

.home-current-quick-button.action-pause {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fff7ed;
  color: #c2410c;
}

.home-current-quick-button.action-ready_for_photo,
.home-current-quick-button.action-photo_done {
  border-color: rgba(124, 58, 237, 0.28);
  background: #f5f3ff;
  color: #6d28d9;
}

.home-current-quick-button.action-packed {
  border-color: rgba(22, 101, 52, 0.28);
  background: #ecfdf5;
  color: #166534;
}

.home-current-quick-button:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.45);
  outline-offset: 2px;
}

.home-current-order {
  color: var(--sez-blue);
  font-size: 15px;
  font-weight: 900;
}

.home-current-unit {
  display: -webkit-box;
  overflow: hidden;
  min-height: 39px;
  color: var(--sez-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-current-participants {
  display: block;
  border-radius: 9px;
  padding: 5px 7px;
  background: rgba(231, 241, 255, 0.68);
  color: var(--sez-navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.18;
}

.home-current-stage-trace,
.unit-stage-trace {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(22, 101, 52, 0.2);
  border-radius: 9px;
  padding: 6px 8px;
  background: rgba(236, 253, 245, 0.82);
  color: #14532d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.22;
}

.home-current-stage-trace strong,
.unit-stage-trace strong {
  font-weight: 900;
}

.unit-stage-trace {
  width: fit-content;
  max-width: 100%;
  font-size: 15px;
}

.unit-stage-trace-section {
  display: grid;
  gap: 10px;
}

.home-current-attendance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.home-current-attendance span {
  white-space: nowrap;
}

.home-current-attendance .current-work-time-in {
  color: #15803d;
}

.home-current-attendance .current-work-time-out {
  color: #b91c1c;
}

.home-current-attendance .current-work-time-out.is-empty {
  color: var(--sez-muted);
}

.home-current-bottom {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
  flex-wrap: wrap;
  row-gap: 4px;
}

.home-current-absence {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(234, 88, 12, 0.22);
}

.absence-state {
  background: #fff7ed;
  color: #c2410c;
}

.home-current-card.status-in_progress .home-current-accent {
  background: #16a34a;
}

.home-current-card.status-paused .home-current-accent,
.home-current-card.status-paused .home-current-status-badge {
  background: var(--sez-orange);
  color: #ffffff;
}

.home-current-card.status-ready_for_photo .home-current-accent,
.home-current-card.status-ready_for_photo .home-current-status-badge {
  background: #7c3aed;
  color: #ffffff;
}

.home-current-card.status-waiting_packaging .home-current-accent,
.home-current-card.status-waiting_packaging .home-current-status-badge {
  background: #0f766e;
  color: #ffffff;
}

.home-current-card.status-labels_marking .home-current-accent,
.home-current-card.status-labels_marking .home-current-status-badge {
  background: #f59e0b;
  color: #422006;
}

.home-current-card.status-ready_for_quality_check .home-current-accent,
.home-current-card.status-ready_for_quality_check .home-current-status-badge {
  background: #0891b2;
  color: #ffffff;
}

.home-current-card.status-rework_required .home-current-accent,
.home-current-card.status-rework_required .home-current-status-badge {
  background: var(--sez-red);
  color: #ffffff;
}

.home-current-empty {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  margin: 0;
  padding: 11px 12px;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
}

.home-waiting-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 8px;
}

.home-waiting-summary div {
  border-radius: 11px;
  padding: 8px;
  background: rgba(231, 241, 255, 0.68);
}

.home-waiting-summary div.is-alert {
  background: #fff1f1;
  box-shadow: inset 0 0 0 2px rgba(198, 40, 40, 0.22);
}

.home-waiting-summary dt {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.home-waiting-summary dd {
  margin: 5px 0 0;
  color: var(--sez-navy);
  font-size: 24px;
  font-weight: 900;
}

.home-waiting-list {
  display: grid;
  gap: 7px;
}

.home-waiting-row {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr) minmax(58px, auto);
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--sez-text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.home-waiting-row.status-rework_without_assignee {
  background: #fff1f1;
}

.home-waiting-row.status-rework_without_assignee .home-waiting-status {
  background: var(--sez-red);
  color: #ffffff;
}

.home-waiting-row.status-ready_for_photo .home-waiting-status {
  background: #7c3aed;
  color: #ffffff;
}

.home-waiting-row.status-waiting_packaging .home-waiting-status {
  background: #0f766e;
  color: #ffffff;
}

.home-waiting-row.status-ready_for_quality_check .home-waiting-status {
  background: #0891b2;
  color: #ffffff;
}

.home-waiting-text {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-waiting-time {
  color: var(--sez-muted);
  font-weight: 900;
  white-space: nowrap;
}

.home-current-updated {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
}

.home-visual {
  position: relative;
  min-height: 226px;
  border: 1px solid rgba(213, 224, 234, 0.74);
  border-radius: 22px;
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 138, 0, 0.22), transparent 18%),
    radial-gradient(circle at 22% 80%, rgba(11, 79, 159, 0.18), transparent 24%),
    linear-gradient(145deg, var(--sez-panel-2), var(--sez-panel));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), var(--shadow-card);
}

.home-visual::before {
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
}

.cabinet-silhouette {
  position: absolute;
  bottom: 30px;
  border: 2px solid rgba(247, 251, 255, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(247, 251, 255, 0.16), rgba(247, 251, 255, 0.06));
}

.cabinet-silhouette::before,
.cabinet-silhouette::after {
  position: absolute;
  right: 18px;
  left: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
  content: "";
}

.cabinet-silhouette::before {
  top: 36px;
}

.cabinet-silhouette::after {
  bottom: 38px;
}

.cabinet-silhouette.main {
  left: 54px;
  width: 112px;
  height: 186px;
}

.cabinet-silhouette.side {
  right: 52px;
  width: 90px;
  height: 150px;
}

.electric-bolt {
  position: absolute;
  top: 62px;
  left: 50%;
  width: 39px;
  height: 102px;
  transform: translateX(-50%) skewX(-12deg);
  background: var(--sez-accent);
  clip-path: polygon(54% 0, 100% 0, 62% 42%, 100% 42%, 35% 100%, 50% 55%, 8% 55%);
  filter: drop-shadow(0 0 18px rgba(255, 138, 0, 0.42));
}

.circuit-line {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--sez-accent), var(--sez-primary), transparent);
}

.circuit-line.line-a {
  top: 52px;
  right: 38px;
  left: 42px;
}

.circuit-line.line-b {
  right: 48px;
  bottom: 38px;
  left: 48px;
}

.screen-label {
  margin: 0 0 8px;
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.terminal-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.my-work-button {
  min-width: 230px;
}

.start-button {
  border-color: var(--sez-green);
  background: var(--sez-green);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(24, 160, 88, 0.2);
}

.pause-button {
  border-color: var(--sez-orange);
  background: var(--sez-orange);
  color: #ffffff;
}

.resume-button {
  border-color: var(--sez-blue);
  background: var(--sez-blue);
  color: #ffffff;
}

.assign-button {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.photo-ready-button {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #ffffff;
}

.photo-done-button {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.quality-ready-button {
  border-color: #0891b2;
  background: #0891b2;
  color: #ffffff;
}

.accepted-button {
  border-color: var(--sez-green);
  background: var(--sez-green);
  color: #ffffff;
}

.rework-button {
  border-color: var(--sez-red);
  background: var(--sez-red);
  color: #ffffff;
}

.packed-button {
  border-color: #146c43;
  background: #146c43;
  color: #ffffff;
}

.start-button:disabled {
  opacity: 0.62;
}

.toolbar-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.terminal-message {
  display: none;
  border: 2px solid var(--sez-border);
  border-radius: 14px;
  margin-bottom: 20px;
  padding: 16px 19px;
  background: var(--sez-card);
  color: var(--sez-blue);
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--sez-shadow-soft);
}

.terminal-message.is-visible {
  display: block;
}

.terminal-message.is-error {
  border-color: var(--sez-red);
  background: #fff2f2;
  color: var(--sez-red);
}

.terminal-message.is-warning {
  border-color: var(--sez-orange);
  background: #fff8ed;
  color: #9a4f00;
}

.start-decision-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  background: rgba(7, 29, 51, 0.62);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.start-decision-modal[hidden] {
  display: none;
}

.start-decision-dialog {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border: 1px solid rgba(213, 224, 234, 0.96);
  border-radius: 22px;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.96)),
    var(--sez-surface);
  box-shadow: 0 28px 70px rgba(7, 29, 51, 0.32);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.start-decision-dialog > * {
  flex: 0 0 auto;
}

.start-decision-dialog h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.16;
}

.start-decision-dialog p:not(.screen-label) {
  margin: 12px 0 0;
  color: var(--sez-muted);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.38;
}

.start-decision-actions {
  position: sticky;
  bottom: -1px;
  display: grid;
  gap: 14px;
  margin-top: 26px;
  padding-top: 14px;
  background:
    linear-gradient(180deg, rgba(247, 249, 251, 0), rgba(247, 249, 251, 0.98) 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.96));
}

.start-decision-button {
  min-height: 64px;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px 20px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.start-decision-button:hover,
.start-decision-button:active {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(7, 29, 51, 0.16);
}

.start-decision-button.add {
  border-color: var(--sez-blue);
  background: var(--sez-blue);
}

.start-decision-button.transfer {
  border-color: var(--sez-orange);
  background: var(--sez-orange);
}

.start-decision-button.transfer.secondary {
  border-color: #5b6d82;
  background: #5b6d82;
}

.start-decision-button.cancel {
  border-color: var(--sez-border);
  background: #eef3f8;
  color: var(--sez-navy);
}

.current-work-dialog {
  width: min(860px, calc(100vw - 32px));
}

.current-work-list {
  display: grid;
  gap: 10px;
  max-height: 24vh;
  max-height: 24dvh;
  margin-top: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.current-work-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-left: 7px solid var(--sez-orange);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ffffff, #f6f9fc);
}

.current-work-card strong {
  color: var(--sez-navy);
  font-size: 20px;
}

.current-work-card span {
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 700;
}

.current-work-card.is-selectable {
  cursor: pointer;
}

.current-work-card.is-selected {
  border-color: var(--sez-green);
  border-left-color: var(--sez-green);
  box-shadow: 0 0 0 3px rgba(23, 160, 93, 0.18);
}

.current-work-question.is-warning {
  border: 2px solid rgba(255, 138, 0, 0.42);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff8ed;
  color: #9a4f00;
}

.current-work-transfer-step {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.current-work-transfer-step[hidden] {
  display: none;
}

.current-work-transfer-step h3 {
  margin: 4px 0 0;
  color: var(--sez-navy);
  font-size: 24px;
}

.current-work-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  max-height: 28vh;
  max-height: 28dvh;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.my-work-multi-warning {
  display: inline-block;
  margin: 10px 0 0;
  border: 1px solid rgba(255, 138, 0, 0.44);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 248, 237, 0.92);
  color: #9a4f00;
  font-size: 18px;
  font-weight: 800;
}

.pause-panel {
  display: grid;
  gap: 18px;
  border: 2px solid rgba(255, 138, 0, 0.42);
  border-radius: var(--sez-radius);
  margin-bottom: 20px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 248, 237, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: var(--sez-shadow-soft);
}

.pause-panel[hidden] {
  display: none;
}

.pause-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pause-panel h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 28px;
}

.pause-reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.pause-reason-option {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  border: 2px solid rgba(255, 138, 0, 0.24);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.pause-reason-option input {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  accent-color: var(--sez-orange);
}

.pause-comment {
  display: grid;
  gap: 8px;
  color: var(--sez-muted);
  font-size: 17px;
  font-weight: 800;
}

.pause-comment[hidden] {
  display: none;
}

.pause-comment textarea {
  width: 100%;
  border: 2px solid rgba(255, 138, 0, 0.32);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--sez-navy);
  font: inherit;
  font-size: 18px;
  resize: vertical;
}

.pause-confirm-button {
  justify-self: start;
  border-color: var(--sez-orange);
  background: var(--sez-orange);
  color: #ffffff;
}

.order-grid,
.unit-grid,
.my-work-grid {
  display: grid;
  gap: 20px;
}

.order-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.order-tile,
.cabinet-row,
.unit-tile,
.my-work-tile,
.group-summary,
.order-summary-card,
.my-work-summary,
.section-card,
.empty-state {
  border: 1px solid var(--sez-border);
  border-radius: var(--sez-radius);
  background: var(--sez-card);
  color: var(--sez-text);
  text-decoration: none;
  box-shadow: var(--sez-shadow-soft);
}

.order-tile,
.cabinet-row,
.unit-tile,
.my-work-tile {
  position: relative;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.order-tile:hover,
.cabinet-row-link:hover,
.unit-tile:hover,
.my-work-tile:hover,
.order-tile:active,
.cabinet-row-link:active,
.unit-tile:active,
.my-work-tile:active {
  border-color: var(--sez-blue);
  box-shadow: var(--sez-shadow);
  transform: translateY(-2px);
}

.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(var(--sez-orange), var(--sez-blue));
}

.order-tile {
  display: grid;
  min-height: 230px;
  align-content: space-between;
  gap: 18px;
  padding: 28px 28px 28px 34px;
}

.order-number {
  color: var(--sez-navy);
  font-size: 38px;
  font-weight: 800;
}

.order-title,
.my-work-unit {
  color: var(--sez-muted);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.32;
}

.order-calculated-by {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 138, 0, 0.1);
  color: #9a4b00;
  font-size: 17px;
  font-weight: 800;
}

.order-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-stats span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 18px;
  font-weight: 700;
}

.order-stats strong {
  color: var(--sez-navy);
  font-size: 22px;
  font-weight: 800;
}

.order-summary-card,
.my-work-summary,
.group-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, auto);
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
  padding: 24px;
}

.order-summary-card h2,
.my-work-summary h2,
.group-summary h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 31px;
  font-weight: 800;
  line-height: 1.18;
}

.order-summary-card p {
  margin: 8px 0 0;
  color: var(--sez-muted);
  font-weight: 600;
}

.cabinet-list {
  display: grid;
  gap: 16px;
}

.cabinet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
  gap: 24px;
  align-items: center;
  padding: 24px 26px 24px 34px;
}

.cabinet-row h2 {
  margin: 0 0 12px;
  color: var(--sez-navy);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.24;
}

.unit-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff3df;
  color: var(--sez-orange-dark);
  font-size: 17px;
  font-weight: 800;
}

.cabinet-metrics,
.my-work-metrics {
  display: grid;
  gap: 12px;
  margin: 0;
}

.cabinet-metrics {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.cabinet-metrics.cabinet-metrics--four {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.cabinet-metrics div,
.my-work-metrics div {
  min-width: 0;
  border-left: 4px solid var(--sez-border);
  padding-left: 14px;
}

.cabinet-metrics dt,
.my-work-metrics dt {
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
}

.cabinet-metrics dd,
.my-work-metrics dd {
  margin: 5px 0 0;
  color: var(--sez-navy);
  font-size: 25px;
  font-weight: 800;
}

.unit-grid {
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}

.unit-tile {
  display: grid;
  min-height: 260px;
  align-content: space-between;
  gap: 11px;
  padding: 22px;
  border-width: 2px;
  text-align: left;
  cursor: pointer;
}

.unit-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unit-number {
  color: var(--sez-navy);
  font-size: 38px;
  font-weight: 800;
}

.status-chip,
.unit-selected-marker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip-new,
.status-chip-waiting {
  background: #edf3f7;
  color: var(--sez-muted);
}

.status-chip-in_progress {
  background: var(--sez-blue);
  color: #ffffff;
}

.status-chip-paused {
  background: var(--sez-orange);
  color: #ffffff;
}

.status-chip-ready_for_photo {
  background: #7c3aed;
  color: #ffffff;
}

.status-chip-waiting_packaging {
  background: #0f766e;
  color: #ffffff;
}

.status-chip-ready_for_quality_check {
  background: #0891b2;
  color: #ffffff;
}

.status-chip-accepted {
  background: var(--sez-green);
  color: #ffffff;
}

.status-chip-rework_required,
.status-chip-rework,
.status-chip-needs_rework {
  background: var(--sez-red);
  color: #ffffff;
}

.status-chip-packed {
  background: #146c43;
  color: #ffffff;
}

.unit-tile.status-new,
.unit-tile.status-waiting {
  background: var(--sez-card);
}

.unit-tile.status-in_progress {
  border-color: var(--sez-blue);
  background: var(--sez-blue-light);
}

.unit-tile.status-paused {
  border-color: var(--sez-orange);
  background: #fff2d8;
}

.unit-tile.status-ready_for_photo {
  border-color: #7c3aed;
  background: #f1eaff;
}

.unit-tile.status-waiting_packaging {
  border-color: #0f766e;
  background: #ccfbf1;
}

.unit-tile.status-ready_for_quality_check {
  border-color: #0891b2;
  background: #e6fbff;
}

.unit-tile.status-accepted {
  border-color: var(--sez-green);
  background: #e8f8ee;
}

.unit-tile.status-rework_required,
.unit-tile.status-rework,
.unit-tile.status-needs_rework {
  border-color: var(--sez-red);
  background: #fff1f1;
}

.unit-tile.status-packed {
  border-color: #146c43;
  background: #e8f8ee;
}

.unit-tile.is-selected {
  border: 3px solid var(--sez-orange);
  background: #fff8ed;
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.24), var(--sez-shadow-soft);
}

.unit-tile.status-in_progress.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.08), rgba(255, 138, 0, 0.08)),
    var(--sez-blue-light);
}

.unit-tile.status-paused.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.14), rgba(255, 138, 0, 0.14)),
    #fff2d8;
}

.unit-tile.status-ready_for_photo.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.12), rgba(255, 138, 0, 0.12)),
    #f1eaff;
}

.unit-tile.status-waiting_packaging.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.12), rgba(255, 138, 0, 0.12)),
    #ccfbf1;
}

.unit-tile.status-ready_for_quality_check.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.12), rgba(255, 138, 0, 0.12)),
    #e6fbff;
}

.unit-tile.status-rework_required.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.14), rgba(255, 138, 0, 0.14)),
    #fff1f1;
}

.unit-tile.status-accepted.is-selected,
.unit-tile.status-packed.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.1)),
    #e8f8ee;
}

.unit-selected-marker {
  display: none;
  background: var(--sez-orange);
  color: #ffffff;
}

.unit-tile.is-selected .unit-selected-marker {
  display: inline-flex;
}

.unit-name,
.my-work-group {
  color: var(--sez-navy);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
}

.unit-price,
.unit-status,
.unit-participants,
.unit-work-time,
.unit-pause-reason {
  color: var(--sez-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.34;
}

.unit-norm-hours {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 95, 159, 0.28);
  border-radius: 8px;
  padding: 5px 9px;
  background: #eaf5ff;
  color: var(--sez-blue);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.unit-norm-hours strong {
  color: var(--sez-navy);
  font-size: 16px;
  white-space: nowrap;
}

.unit-norm-hours.is-missing {
  border-color: var(--sez-border);
  background: #f1f5f9;
  color: var(--sez-muted);
}

.norm-hours-admin-cell {
  min-width: 190px;
  vertical-align: top;
}

.norm-hours-admin-cell > strong,
.norm-hours-admin-cell > small {
  display: block;
}

.norm-hours-admin-cell > small {
  max-width: 220px;
  margin-top: 3px;
  color: #64748b;
  overflow-wrap: anywhere;
}

.norm-hours-source.is-manual {
  color: #9a3412;
  font-weight: 800;
}

.norm-hours-editor {
  margin-top: 6px;
}

.norm-hours-editor > summary {
  color: #0758a7;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.norm-hours-editor form {
  display: grid;
  gap: 6px;
  min-width: 210px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #bfd3e8;
  background: #f7fbff;
}

.norm-hours-editor label {
  display: grid;
  gap: 3px;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
}

.norm-hours-editor input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
}

.norm-hours-editor .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.unit-pause-reason,
.my-work-pause-reason {
  border-left: 5px solid var(--sez-orange);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff7e6;
  color: var(--sez-navy);
  font-weight: 800;
}

.unit-history-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sez-blue);
  border-radius: 11px;
  padding: 8px 14px;
  background: var(--sez-blue);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.unit-history-link:hover,
.unit-history-link:active {
  box-shadow: 0 8px 18px rgba(7, 29, 51, 0.14);
  transform: translateY(-1px);
}

.my-work-grid {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.my-work-tile {
  display: grid;
  gap: 12px;
  padding: 26px 24px 24px 34px;
  background:
    linear-gradient(135deg, rgba(231, 241, 255, 0.96), rgba(255, 255, 255, 0.96));
}

.my-work-card-link {
  display: grid;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.my-work-order {
  color: var(--sez-blue);
  font-size: 30px;
  font-weight: 800;
}

.my-work-metrics {
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

.my-work-metrics div {
  border-left-color: var(--sez-blue);
}

.my-work-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.my-work-pause-state {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--sez-orange);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.time-metric {
  border-radius: var(--sez-radius);
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 241, 255, 0.74));
  box-shadow: var(--sez-shadow-soft);
}

.time-metric span {
  display: block;
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.time-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--sez-navy);
  font-size: 30px;
  font-weight: 800;
}

.time-metric-note,
.time-table-note {
  display: block;
  margin-top: 6px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.unit-history-section {
  margin-bottom: 20px;
}

.participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.participant-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 17px;
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

.unit-history-table,
.event-log-table {
  min-width: 1100px;
}

.pause-detail-row td {
  background: #fff7e6;
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 800;
}

.pause-detail-row span {
  display: inline-flex;
  margin: 3px 8px 3px 0;
}

.report-screen {
  max-width: 1880px;
}

.report-filter-panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr)) auto;
  gap: 16px;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--sez-border);
  border-radius: var(--sez-radius);
  margin-bottom: 20px;
  padding: 20px;
}

.report-filter-panel > * {
  position: relative;
  z-index: 1;
}

.report-filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-filter-panel input,
.report-filter-panel select {
  min-height: 52px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sez-navy);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}

.report-section {
  margin-bottom: 20px;
}

.report-table {
  min-width: 1280px;
}

.assembler-detail-table {
  min-width: 1500px;
}

.pause-reasons-table {
  min-width: 720px;
}

.report-link {
  color: var(--sez-blue);
  font-weight: 800;
  text-decoration: none;
}

.report-link:hover,
.report-link:active {
  color: var(--sez-primary-dark);
  text-decoration: underline;
}

.import-section {
  margin-bottom: 20px;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.import-path {
  margin: 14px 0 0;
  color: var(--sez-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 0;
}

.import-summary-grid div {
  border-left: 4px solid var(--sez-accent);
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--sez-blue-light);
}

.import-summary-grid dt {
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-summary-grid dd {
  margin: 6px 0 0;
  color: var(--sez-navy);
  font-size: 30px;
  font-weight: 800;
}

.import-message-list {
  margin: 0;
  padding-left: 24px;
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.import-errors {
  border-color: rgba(198, 40, 40, 0.34);
  background: #fff6f6;
}

.import-warnings {
  border-color: rgba(255, 138, 0, 0.34);
  background: #fff8ed;
}

.import-error-text {
  color: var(--sez-red);
  font-weight: 800;
}

.import-display-note {
  display: inline-block;
  color: var(--sez-muted);
  font-weight: 800;
  line-height: 1.35;
}

.import-group-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-left: 5px solid var(--sez-accent);
  border-radius: 14px;
  margin: 0 0 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff8ed 0%, #eef5fb 100%);
}

.import-group-heading h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 26px;
  line-height: 1.15;
}

.import-group-heading p {
  margin: 5px 0 0;
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
}

.import-group-heading > span {
  min-width: 68px;
  border-radius: 16px;
  padding: 10px 16px;
  background: var(--sez-navy);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.import-unchanged-details {
  border: 1px solid rgba(62, 75, 92, 0.18);
  border-radius: 14px;
  margin-top: 22px;
  padding: 12px 14px 16px;
  background: rgba(247, 249, 252, 0.82);
}

.import-unchanged-details > summary {
  cursor: pointer;
  color: var(--sez-muted);
  font-size: 19px;
  font-weight: 900;
}

.import-unchanged-details[open] > summary {
  margin-bottom: 14px;
}

.import-order-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.import-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.import-badge-new {
  background: #e2f3ff;
  color: #0b5d89;
}

.import-badge-changed {
  background: #e7f5eb;
  color: #15723b;
}

.import-badge-missing {
  background: #ffe8da;
  color: #a24800;
}

.import-badge-warning {
  background: #fff1bf;
  color: #8a5b00;
}

.import-badge-error {
  background: #ffe0e0;
  color: var(--sez-red);
}

.import-badge-none {
  background: #edf1f5;
  color: var(--sez-muted);
}

.import-order-row-attention {
  background: rgba(255, 248, 237, 0.48);
}

.import-order-row-quiet {
  color: #495564;
  background: rgba(247, 249, 252, 0.6);
}

.import-table {
  min-width: 1420px;
}

.report-metrics {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.empty-state {
  padding: 34px;
  text-align: left;
}

.empty-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  margin-bottom: 14px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 36px;
  font-weight: 800;
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 30px;
  font-weight: 800;
}

.empty-state p,
.section-card p {
  color: var(--sez-muted);
  font-weight: 600;
}

.assembler-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 24px 18px;
  background:
    linear-gradient(90deg, rgba(255, 138, 0, 0.11), transparent 36%),
    var(--sez-navy);
  box-shadow: 0 -16px 34px rgba(7, 29, 51, 0.24);
  transition: transform 160ms ease, opacity 160ms ease, visibility 160ms ease;
}

.assembler-panel-title {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.assembler-buttons {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.assembler-button {
  min-height: 58px;
  min-width: 180px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.assembler-button:hover,
.assembler-button:active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
}

.assembler-button.is-selected {
  border-color: var(--sez-green);
  background: var(--sez-green);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(24, 160, 88, 0.22);
}

.test-reset-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 2px solid rgba(198, 40, 40, 0.28);
  border-radius: var(--sez-radius);
  margin-bottom: 20px;
  padding: 18px 20px;
  background: #fff6f6;
  box-shadow: var(--sez-shadow-soft);
}

.test-reset-panel div {
  display: grid;
  gap: 6px;
}

.test-reset-panel strong {
  color: var(--sez-red);
  font-size: 22px;
  font-weight: 800;
}

.test-reset-panel span {
  color: var(--sez-muted);
  font-size: 18px;
  font-weight: 600;
}

.reset-test-button {
  min-height: 56px;
  border: 2px solid var(--sez-red);
  border-radius: var(--sez-radius-button);
  padding: 13px 20px;
  background: var(--sez-red);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.section-card {
  padding: 28px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--sez-border);
  border-radius: 14px;
  background: var(--sez-card);
}

th,
td {
  border-bottom: 1px solid var(--sez-border);
  padding: 14px 15px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--sez-blue-light);
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 800;
}

td {
  font-size: 17px;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1180px) {
  .test-reset-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .order-summary-card,
  .my-work-summary,
  .cabinet-row,
  .group-summary,
  .report-filter-panel {
    grid-template-columns: 1fr;
  }

  .cabinet-metrics,
  .my-work-metrics {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .cabinet-metrics.cabinet-metrics--four {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 18px;
  }

  .app-topbar {
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .terminal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-link {
    align-self: flex-start;
  }

  .page-shell,
  .terminal-screen {
    padding: 24px 16px calc(var(--sez-bottom-panel) + 54px);
  }

  .home-hero {
    padding: 32px 28px;
  }

  .home-hero h1,
  .terminal-header h1,
  .section-card h1 {
    font-size: 34px;
  }

  .home-links,
  .order-grid,
  .unit-grid,
  .my-work-grid,
  .time-summary-grid,
  .cabinet-metrics,
  .my-work-metrics {
    grid-template-columns: 1fr;
  }

  .cabinet-metrics.cabinet-metrics--four {
    grid-template-columns: 1fr;
  }

  .brand-copy strong {
    font-size: 20px;
  }
}

/* Visual polish layer: industrial terminal atmosphere */
body {
  position: relative;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 47%, rgba(255, 138, 0, 0.045) 47% 48%, transparent 48% 100%),
    linear-gradient(rgba(14, 27, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 27, 43, 0.035) 1px, transparent 1px);
  background-size: 520px 520px, 42px 42px, 42px 42px;
  content: "";
}

.page-shell,
.terminal-screen {
  position: relative;
  z-index: 1;
}

.app-topbar {
  min-height: 68px;
  padding: 8px 24px;
}

.app-topbar::after {
  height: 3px;
  box-shadow: 0 0 16px rgba(255, 138, 0, 0.38);
}

.brand-mark {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  border-radius: 13px;
}

.brand-mark img {
  max-width: 44px;
  max-height: 44px;
}

.brand-copy strong {
  font-size: 21px;
}

.brand-copy small {
  font-size: 13px;
}

.top-nav-link {
  min-height: 42px;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 16px;
}

.header-link {
  min-height: 44px;
  flex: 0 0 auto;
  align-self: center;
  border-radius: 11px;
  padding: 9px 16px;
  font-size: 17px;
  white-space: nowrap;
}

.tech-grid {
  position: relative;
}

.tech-grid::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 29, 51, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.52;
  content: "";
}

.metal-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.94)),
    linear-gradient(110deg, rgba(181, 192, 204, 0.18), transparent 42%, rgba(255, 255, 255, 0.32));
  box-shadow: var(--shadow-card);
}

.industrial-hero {
  min-height: 520px;
  background:
    radial-gradient(circle at 74% 22%, rgba(255, 138, 0, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 241, 255, 0.9)),
    linear-gradient(rgba(7, 29, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 29, 51, 0.04) 1px, transparent 1px),
    var(--sez-surface);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
}

.electric-line {
  box-shadow: 0 0 18px rgba(255, 138, 0, 0.28);
}

.metric-tile {
  border: 1px solid rgba(11, 79, 159, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.terminal-header {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(213, 224, 234, 0.86);
  border-radius: 20px;
  padding: 20px 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 241, 255, 0.86)),
    var(--sez-surface);
  box-shadow: var(--shadow-soft);
}

.terminal-header > * {
  position: relative;
  z-index: 2;
}

.terminal-header .screen-label {
  color: var(--sez-primary);
}

.terminal-header h1 {
  max-width: 980px;
}

.page-header-decor {
  position: absolute;
  right: 118px;
  top: 50%;
  z-index: 1;
  width: 210px;
  height: 104px;
  transform: translateY(-50%);
  opacity: 0.88;
}

.page-header-decor .header-cabinet {
  right: 18px;
  bottom: 9px;
  left: auto;
  width: 58px;
  height: 86px;
  border-color: rgba(11, 79, 159, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent 44%),
    linear-gradient(180deg, rgba(11, 79, 159, 0.12), rgba(11, 79, 159, 0.04));
}

.page-header-decor .header-cabinet::before,
.page-header-decor .header-cabinet::after {
  right: 10px;
  left: 10px;
  background: rgba(11, 79, 159, 0.2);
}

.page-header-decor .header-bolt {
  top: 14px;
  left: 54px;
  width: 26px;
  height: 72px;
  transform: skewX(-12deg);
}

.page-header-decor .header-line {
  top: 51px;
  right: 0;
  left: 0;
}

.order-summary-card,
.my-work-summary,
.group-summary {
  overflow: hidden;
}

.order-summary-card > *,
.my-work-summary > *,
.group-summary > * {
  position: relative;
  z-index: 1;
}

.cabinet-metrics div,
.my-work-metrics div {
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--sez-accent);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(231, 241, 255, 0.48));
}

.order-tile,
.cabinet-row,
.unit-tile,
.my-work-tile {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.95)),
    linear-gradient(90deg, rgba(255, 138, 0, 0.035), transparent 42%);
}

.order-tile::after,
.cabinet-row::after,
.unit-tile::after,
.my-work-tile::after {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 74px;
  height: 44px;
  pointer-events: none;
  background:
    linear-gradient(var(--sez-metal-3), var(--sez-metal-3)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--sez-metal-3), var(--sez-metal-3)) 0 50% / 78% 2px no-repeat,
    linear-gradient(var(--sez-metal-3), var(--sez-metal-3)) 0 100% / 100% 2px no-repeat;
  opacity: 0.28;
  content: "";
}

.unit-tile.status-in_progress {
  background:
    linear-gradient(145deg, rgba(231, 242, 255, 0.98), rgba(255, 255, 255, 0.82)),
    var(--status-progress-bg);
}

.unit-tile.status-paused {
  background:
    linear-gradient(145deg, rgba(255, 247, 230, 0.98), rgba(255, 255, 255, 0.84)),
    #fff0ce;
}

.unit-tile.status-ready_for_photo {
  background:
    linear-gradient(145deg, rgba(241, 234, 255, 0.98), rgba(255, 255, 255, 0.84)),
    #f1eaff;
}

.unit-tile.status-waiting_packaging {
  background:
    linear-gradient(145deg, rgba(204, 251, 241, 0.98), rgba(255, 255, 255, 0.84)),
    #ccfbf1;
}

.unit-tile.status-ready_for_quality_check {
  background:
    linear-gradient(145deg, rgba(230, 251, 255, 0.98), rgba(255, 255, 255, 0.86)),
    #e6fbff;
}

.unit-tile.status-rework_required {
  background:
    linear-gradient(145deg, rgba(255, 241, 241, 0.98), rgba(255, 255, 255, 0.86)),
    #fff1f1;
}

.unit-tile.status-accepted {
  background:
    linear-gradient(145deg, rgba(232, 248, 238, 0.98), rgba(255, 255, 255, 0.84)),
    #e8f8ee;
}

.unit-tile.status-packed {
  background:
    linear-gradient(145deg, rgba(216, 246, 226, 0.98), rgba(255, 255, 255, 0.84)),
    #d8f6e2;
}

.unit-tile.is-selected {
  background:
    linear-gradient(145deg, rgba(255, 244, 232, 0.98), rgba(255, 255, 255, 0.9)),
    var(--status-selected-bg);
}

.unit-tile.status-in_progress.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.09), rgba(255, 138, 0, 0.09)),
    linear-gradient(145deg, rgba(231, 242, 255, 0.98), rgba(255, 255, 255, 0.82)),
    var(--status-progress-bg);
}

.unit-tile.status-paused.is-selected {
  background:
    linear-gradient(0deg, rgba(11, 79, 159, 0.08), rgba(11, 79, 159, 0.08)),
    linear-gradient(145deg, rgba(255, 247, 230, 0.98), rgba(255, 255, 255, 0.84)),
    #fff0ce;
}

.unit-tile.status-ready_for_photo.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.1)),
    linear-gradient(145deg, rgba(241, 234, 255, 0.98), rgba(255, 255, 255, 0.84)),
    #f1eaff;
}

.unit-tile.status-waiting_packaging.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.1)),
    linear-gradient(145deg, rgba(204, 251, 241, 0.98), rgba(255, 255, 255, 0.84)),
    #ccfbf1;
}

.unit-tile.status-ready_for_quality_check.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.1)),
    linear-gradient(145deg, rgba(230, 251, 255, 0.98), rgba(255, 255, 255, 0.86)),
    #e6fbff;
}

.unit-tile.status-rework_required.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.12), rgba(255, 138, 0, 0.12)),
    linear-gradient(145deg, rgba(255, 241, 241, 0.98), rgba(255, 255, 255, 0.86)),
    #fff1f1;
}

.unit-tile.status-accepted.is-selected,
.unit-tile.status-packed.is-selected {
  background:
    linear-gradient(0deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.1)),
    linear-gradient(145deg, rgba(232, 248, 238, 0.98), rgba(255, 255, 255, 0.84)),
    #e8f8ee;
}

.my-work-summary {
  grid-template-columns: minmax(0, 0.8fr) minmax(520px, 1fr);
}

.my-work-summary::before {
  position: absolute;
  right: 34px;
  bottom: 18px;
  width: 96px;
  height: 138px;
  border: 2px solid rgba(11, 79, 159, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(rgba(11, 79, 159, 0.16), rgba(11, 79, 159, 0.16)) 18px 36px / 60px 2px no-repeat,
    linear-gradient(rgba(11, 79, 159, 0.16), rgba(11, 79, 159, 0.16)) 18px 76px / 60px 2px no-repeat,
    linear-gradient(145deg, rgba(11, 79, 159, 0.08), transparent);
  opacity: 0.75;
  content: "";
}

.my-work-tile .card-accent {
  width: 10px;
  background: linear-gradient(var(--sez-accent), var(--sez-primary-dark));
}

.my-work-tile::before {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--sez-primary);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  content: "В работе";
}

.my-work-tile.status-paused {
  background:
    linear-gradient(145deg, rgba(255, 247, 230, 0.98), rgba(255, 255, 255, 0.92));
}

.my-work-tile.status-paused .card-accent {
  background: linear-gradient(var(--sez-accent), var(--sez-warning));
}

.my-work-tile.status-paused::before {
  background: var(--sez-orange);
  color: #ffffff;
  content: "Пауза";
}

.my-work-tile.status-ready_for_photo {
  background:
    linear-gradient(145deg, rgba(241, 234, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.my-work-tile.status-ready_for_photo .card-accent {
  background: linear-gradient(#7c3aed, var(--sez-primary-dark));
}

.my-work-tile.status-ready_for_photo::before {
  background: #7c3aed;
  color: #ffffff;
  content: "Готов к фото";
}

.my-work-tile.status-waiting_packaging {
  background:
    linear-gradient(145deg, rgba(204, 251, 241, 0.98), rgba(255, 255, 255, 0.92));
}

.my-work-tile.status-waiting_packaging .card-accent {
  background: linear-gradient(#0f766e, var(--sez-primary-dark));
}

.my-work-tile.status-waiting_packaging::before {
  background: #0f766e;
  color: #ffffff;
  content: "Ждёт упаковки";
}

.my-work-tile.status-ready_for_quality_check {
  background:
    linear-gradient(145deg, rgba(230, 251, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.my-work-tile.status-ready_for_quality_check .card-accent {
  background: linear-gradient(#0891b2, var(--sez-primary-dark));
}

.my-work-tile.status-ready_for_quality_check::before {
  background: #0891b2;
  color: #ffffff;
  content: "Готов к проверке";
}

.my-work-tile.status-rework_required {
  background:
    linear-gradient(145deg, rgba(255, 241, 241, 0.98), rgba(255, 255, 255, 0.92));
}

.my-work-tile.status-rework_required .card-accent {
  background: linear-gradient(var(--sez-red), var(--sez-accent));
}

.my-work-tile.status-rework_required::before {
  background: var(--sez-red);
  color: #ffffff;
  content: "На доработке";
}

.assembler-panel {
  gap: 9px;
  padding: 11px 24px 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 36%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 12px),
    linear-gradient(90deg, rgba(255, 138, 0, 0.12), transparent 32%),
    var(--sez-panel);
}

.assembler-button {
  min-height: 58px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 1540px) {
  .home-dashboard {
    grid-template-columns: 1fr;
    justify-self: stretch;
  }

  .home-current-work-panel {
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .home-dashboard {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-current-work-panel {
    max-height: none;
  }

  .home-visual {
    min-height: 220px;
  }

  .home-employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-header-decor {
    display: none;
  }

  .my-work-summary {
    grid-template-columns: 1fr;
  }

  .order-supply-summary {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .supply-group-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-dashboard {
    gap: 18px;
  }

  .home-dashboard .home-hero,
  .home-current-work-panel {
    padding: 24px;
  }

  .home-current-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-current-work-panel .home-current-counters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-current-list,
  .home-waiting-summary,
  .home-waiting-row {
    grid-template-columns: 1fr;
  }

  .home-employee-picker {
    padding: 14px;
  }

  .home-employee-picker-panel {
    width: 100%;
    padding: 20px;
  }

  .home-employee-grid {
    grid-template-columns: 1fr;
  }

  .home-current-work-header,
  .home-current-card-top,
  .home-current-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
.production-action.is-hidden {
  display: none !important;
}

.order-card.is-hidden,
.order-tile.is-hidden {
  display: none !important;
}

.terminal-search-panel {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(31, 41, 55, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(230, 234, 240, 0.9)),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.05) 0 1px, transparent 1px 18px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.terminal-search-label,
.admin-login-form label {
  display: block;
  color: #4b5563;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.terminal-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(150px, auto);
  gap: 14px;
  align-items: center;
}

.terminal-search-input {
  width: 100%;
  min-height: 60px;
  border: 2px solid rgba(31, 41, 55, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font: inherit;
  font-size: 24px;
  font-weight: 650;
  padding: 12px 16px;
}

.terminal-search-row .toolbar-button {
  min-height: 60px;
  padding-inline: 24px;
  font-size: 19px;
}

.terminal-search-row .order-search-submit {
  border-color: var(--sez-blue);
  background: var(--sez-blue);
  color: #ffffff;
}

.terminal-search-input:focus {
  border-color: #f97316;
  outline: 3px solid rgba(249, 115, 22, 0.18);
}

.touch-keyboard {
  display: none;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 18px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.28);
  padding: 14px;
}

.touch-keyboard.is-visible {
  display: block;
}

.touch-keyboard[hidden] {
  display: none;
}

.touch-keyboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.touch-keyboard-title {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.touch-keyboard-layout {
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  font-size: 14px;
  font-weight: 900;
  padding: 5px 10px;
}

.touch-keyboard-rows {
  display: grid;
  gap: 8px;
}

.touch-keyboard-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
}

.touch-keyboard-key {
  min-width: 52px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(75, 85, 99, 0.98), rgba(31, 41, 55, 0.98));
  color: #f9fafb;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  padding: 0 12px;
  touch-action: manipulation;
  user-select: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 12px rgba(0, 0, 0, 0.18);
}

.touch-keyboard-key:hover,
.touch-keyboard-key:active {
  border-color: rgba(249, 115, 22, 0.78);
  background:
    linear-gradient(180deg, rgba(249, 115, 22, 0.98), rgba(194, 65, 12, 0.98));
}

.touch-keyboard-key.is-control {
  min-width: 112px;
  background:
    linear-gradient(180deg, rgba(55, 65, 81, 0.98), rgba(17, 24, 39, 0.98));
  color: #e5e7eb;
  font-size: 17px;
}

.touch-keyboard-key.is-primary {
  border-color: rgba(96, 165, 250, 0.78);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(11, 79, 159, 0.98));
  color: #ffffff;
}

.touch-keyboard-key.is-wide {
  flex: 1 1 260px;
  max-width: 420px;
}

.order-search-empty[hidden] {
  display: none;
}

.compact-order-header {
  min-height: auto;
  padding-top: 14px;
  padding-bottom: 14px;
}

.order-overview-header,
.order-top-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 0.34fr);
  align-items: start;
  gap: 10px;
}

.order-header-info {
  min-width: 0;
}

.order-header-actions--order,
.order-actions-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  align-content: start;
  justify-items: stretch;
  gap: 5px;
  min-width: 0;
}

.order-header-actions--order .header-link,
.order-header-actions--order .order-folder-button {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.08;
  text-align: center;
}

.order-header-actions--order .order-folder-actions {
  display: contents;
}

.order-header-actions--order .order-folder-buttons {
  display: contents;
}

.order-header-actions--order .order-folder-path,
.order-schemes-actions .order-folder-path {
  display: none;
}

.order-header-actions--order .order-folder-status:empty,
.order-schemes-actions .order-folder-status:empty {
  display: none;
}

.order-header-actions--order .order-folder-status {
  grid-column: 1 / -1;
  max-width: none;
  text-align: left;
}

.compact-order-header h1 {
  font-size: 32px;
  line-height: 1.05;
  margin-bottom: 6px;
}

.compact-order-title {
  max-width: 900px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.compact-order-calculated-by {
  margin: 8px 0 0;
  color: #92400e;
  font-size: 17px;
  font-weight: 800;
}

.order-calculated-badge {
  border-color: rgba(255, 138, 0, 0.24);
  background: rgba(255, 138, 0, 0.12);
  color: #92400e;
}

.order-compact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-test-reset {
  margin: 10px 0;
}

.order-sticky-workbar {
  position: static;
  top: auto;
  z-index: 1;
  border: 1px solid rgba(14, 27, 43, 0.18);
  border-radius: 10px;
  margin: 0 0 10px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(232, 238, 246, 0.95)),
    repeating-linear-gradient(115deg, rgba(14, 27, 43, 0.04) 0 1px, transparent 1px 14px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
}

.order-sticky-workbar .compact-order-header {
  min-height: 0;
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 9px 12px;
  box-shadow: none;
}

.order-sticky-workbar .compact-order-header h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1;
}

.order-sticky-workbar .compact-order-title {
  display: -webkit-box;
  max-width: min(980px, 100%);
  max-height: 38px;
  overflow: hidden;
  color: var(--sez-muted);
  font-size: 14px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-sticky-workbar .order-compact-badges {
  gap: 6px;
  margin-top: 7px;
}

.order-sticky-workbar .metric-tile {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 800;
}

.order-sticky-workbar .metric-tile strong {
  font-size: 15px;
}

.order-supply-summary,
.order-completeness-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 5px solid var(--sez-blue);
  border-radius: 10px;
  margin-top: 6px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--sez-navy);
}

.order-supply-summary > div {
  border-radius: 8px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.72);
}

.order-supply-summary span {
  display: block;
  color: var(--sez-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-supply-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--sez-navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.05;
}

.order-supply-main strong {
  font-size: 18px;
}

.order-supply-main {
  min-width: 150px;
  flex: 1 1 180px;
}

.order-supply-summary--complete {
  border-left-color: #16a34a;
}

.order-supply-summary--overdue {
  border-left-color: #dc2626;
}

.order-supply-summary--no_data {
  border-left-color: #94a3b8;
}

.supply-progress,
.unit-supply-progress {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.supply-progress {
  height: 4px;
  margin-top: 4px;
}

.supply-progress span,
.unit-supply-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.order-supply-summary--partial .supply-progress span {
  background: linear-gradient(90deg, var(--sez-blue), #38bdf8);
}

.order-supply-summary--overdue .supply-progress span {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

.order-supply-lazy-card,
.order-completeness-lazy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px dashed rgba(14, 67, 118, 0.32);
  border-left: 5px solid #94a3b8;
  border-radius: 10px;
  margin-top: 6px;
  padding: 7px 9px;
  background: rgba(248, 250, 252, 0.84);
  color: var(--sez-navy);
}

.order-supply-lazy-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
}

.order-supply-lazy-card p {
  margin: 2px 0 0;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 800;
}

.order-supply-lazy-card .order-supply-error {
  color: #b91c1c;
}

.order-supply-load-form {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.order-supply-refresh-form {
  justify-content: flex-end;
  margin-left: auto;
}

.toolbar-button-compact {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.order-supply-alert {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fee2e2;
  color: #991b1b !important;
  font-size: 12px !important;
  font-weight: 900;
  text-transform: none !important;
  white-space: nowrap;
}

.supply-summary-screen {
  width: min(100%, 1540px);
}

.supply-overview-card,
.supply-filter-card,
.supply-order-card {
  border-left: 5px solid var(--sez-blue);
}

.supply-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.supply-overview-grid > div {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f3f6f8);
}

.supply-overview-grid span {
  display: block;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.supply-overview-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--sez-navy);
  font-size: 28px;
  font-weight: 900;
}

.supply-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supply-filter-tab {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 999px;
  padding: 9px 14px;
  background: #ffffff;
  color: var(--sez-navy);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.supply-filter-tab:hover,
.supply-filter-tab.is-active {
  border-color: rgba(11, 79, 159, 0.55);
  background: var(--sez-blue);
  color: #ffffff;
}

.supply-order-list {
  display: grid;
  gap: 14px;
}

.supply-order-card {
  display: grid;
  gap: 12px;
}

.supply-order-card.supply-state--complete {
  border-left-color: #16a34a;
}

.supply-order-card.supply-state--overdue {
  border-left-color: #dc2626;
}

.supply-order-card.supply-state--no_data {
  border-left-color: #94a3b8;
}

.supply-order-head,
.supply-order-body,
.supply-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.supply-order-head h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 24px;
  line-height: 1.15;
}

.supply-state-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: #dbeafe;
  color: var(--sez-blue);
  font-size: 14px;
  font-weight: 900;
}

.supply-state-badge--complete {
  background: #bbf7d0;
  color: #065f46;
}

.supply-state-badge--overdue {
  background: #fecaca;
  color: #991b1b;
}

.supply-state-badge--no_data {
  background: #e2e8f0;
  color: #475569;
}

.supply-order-percent {
  display: grid;
  min-width: 180px;
  gap: 6px;
}

.supply-order-percent strong {
  color: var(--sez-navy);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.supply-order-card.supply-state--partial .supply-progress span {
  background: linear-gradient(90deg, var(--sez-blue), #38bdf8);
}

.supply-order-card.supply-state--overdue .supply-progress span {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

.supply-order-metrics {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 7px;
}

.supply-order-metrics span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.supply-group-details {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #f8fafc;
}

.supply-group-details summary {
  cursor: pointer;
  padding: 11px 13px;
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 900;
}

.supply-group-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.supply-group-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(130px, 0.55fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-left: 4px solid var(--sez-blue);
  border-radius: 9px;
  padding: 9px 10px;
  background: #ffffff;
}

.supply-group-row.supply-state--complete {
  border-left-color: #16a34a;
}

.supply-group-row.supply-state--overdue {
  border-left-color: #dc2626;
}

.supply-group-row.supply-state--no_data {
  border-left-color: #94a3b8;
}

.supply-group-row strong {
  display: block;
  color: var(--sez-navy);
  font-size: 15px;
  line-height: 1.2;
}

.supply-group-row span {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 800;
}

.supply-group-ready strong {
  font-size: 21px;
  line-height: 1;
}

.supply-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.supply-group-tags span {
  border-radius: 999px;
  padding: 3px 7px;
  background: #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.supply-group-tags .is-overdue {
  background: #fecaca;
  color: #991b1b;
}

.supply-group-tags .is-missing {
  background: #e2e8f0;
  color: #475569;
}

.supply-group-tags .is-ready {
  background: #bbf7d0;
  color: #065f46;
}

.supply-v2-screen {
  display: grid;
  gap: 18px;
}

.supply-v2-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
}

.supply-v2-filter-form label,
.supply-v2-line-form {
  color: var(--sez-navy);
  font-weight: 900;
}

.supply-v2-filter-form input,
.supply-v2-filter-form select,
.supply-v2-line-form input,
.supply-v2-line-form select,
.supply-v2-line-form textarea {
  width: 100%;
  border: 1px solid rgba(14, 27, 43, 0.18);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 14px;
}

.supply-v2-check {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

.supply-v2-check input {
  width: 20px;
  height: 20px;
}

.supply-v2-table {
  min-width: 1120px;
}

.supply-request-delete-form {
  display: inline-flex;
  margin: 6px 0 0 0;
}

.supply-request-delete-button {
  border-color: rgba(198, 40, 40, 0.8);
  background: #fff5f5;
  color: var(--sez-danger);
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.supply-request-delete-button:hover {
  background: #fee2e2;
  color: #991b1b;
}

.supply-v2-table small {
  display: block;
  margin-top: 4px;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 800;
}

.supply-v2-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.supply-v2-status.status-on_stock,
.supply-v2-status.status-received {
  background: #bbf7d0;
  color: #065f46;
}

.supply-v2-status.status-need_purchase,
.supply-v2-status.status-in_progress,
.supply-v2-status.status-partially_ordered {
  background: #fed7aa;
  color: #9a3412;
}

.supply-v2-status.status-ordered {
  background: #dbeafe;
  color: #1d4ed8;
}

.supply-v2-status.status-replacement_needed,
.supply-v2-status.status-cancelled {
  background: #fecaca;
  color: #991b1b;
}

.supply-v2-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.supply-v2-info-grid span,
.supply-v2-import-list span {
  display: block;
  border-left: 4px solid var(--sez-blue);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
}

.supply-v2-line-form {
  display: grid;
  min-width: 220px;
  gap: 7px;
}

.supply-v2-line-form .toolbar-button {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14px;
}

.supply-v2-import-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.supply-v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.supply-v2-tabs a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--sez-navy);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.supply-v2-tabs a.is-active,
.supply-v2-tabs a:hover {
  border-color: rgba(30, 102, 176, 0.42);
  background: #e8f2ff;
  color: var(--sez-blue);
}

.supply-v2-work-card {
  border-left: 7px solid #2f9fb3;
}

.admin-dashboard-screen {
  max-width: 1440px;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.admin-dashboard-card {
  display: grid;
  min-height: 150px;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(14, 27, 43, 0.14);
  border-left: 7px solid rgba(30, 102, 176, 0.52);
  border-radius: 12px;
  padding: 20px;
  background: #ffffff;
  color: var(--sez-navy);
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.admin-dashboard-card:hover {
  border-color: rgba(30, 102, 176, 0.34);
  background: #f8fbff;
  transform: translateY(-1px);
}

.admin-dashboard-card span {
  font-size: 22px;
  font-weight: 950;
}

.admin-dashboard-card strong {
  color: var(--sez-muted);
  font-size: 15px;
  line-height: 1.35;
}

.admin-dashboard-card.is-important {
  border-left-color: var(--sez-orange);
}

.order-legal-entity-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(14, 165, 233, 0.14);
  color: #075985;
  font-size: 0.78rem;
  font-weight: 800;
}

.legal-entity-import-panel {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 8px;
  background: rgba(240, 249, 255, 0.86);
}

.legal-entity-import-panel p {
  margin: 0;
  color: #475569;
}

.legal-entity-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.legal-entity-import-grid label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.legal-entity-import-grid select,
.report-screen select {
  min-height: 36px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: #0f172a;
}

.supply-table-screen {
  max-width: none;
}

.supply-table-help-card {
  border-left: 7px solid var(--sez-blue);
}

.supply-table-help-list {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--sez-navy);
  font-weight: 800;
  line-height: 1.55;
}

.supply-table-warning-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-left: 7px solid #f59e0b;
  background: #fff8e8;
}

.supply-table-warning-card div,
.supply-table-warning-card form,
.supply-table-warning-card strong,
.supply-table-warning-card span,
.supply-table-warning-card p {
  margin: 0;
}

.supply-table-warning-card div {
  display: grid;
  gap: 4px;
  min-width: min(100%, 420px);
}

.supply-table-warning-card p {
  flex-basis: 100%;
  color: var(--sez-muted);
  font-weight: 800;
}

.supply-compact-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 9px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.supply-compact-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--sez-blue);
}

.header-inline-form {
  display: inline-flex;
  margin: 0;
}

.header-inline-form .header-link {
  font: inherit;
  cursor: pointer;
}

.supply-table-filter-form {
  display: grid;
  gap: 12px;
}

.supply-v2-filter-card--advanced {
  padding: 0;
}

.supply-v2-filter-card--advanced[open] {
  padding-bottom: 16px;
}

.supply-advanced-filter-summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: var(--sez-navy);
  cursor: pointer;
}

.supply-advanced-filter-summary span {
  display: grid;
  gap: 2px;
}

.supply-advanced-filter-summary > span:last-child {
  display: block;
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 800;
}

.supply-v2-filter-card--advanced .supply-table-filter-form {
  padding: 0 18px;
}

.supply-filter-mode-row,
.supply-table-filter-form fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.supply-table-filter-form fieldset {
  margin: 0;
  border: 1px solid rgba(14, 27, 43, 0.12);
  border-radius: 11px;
  padding: 12px;
  background: #f8fafc;
}

.supply-table-filter-form legend {
  padding: 0 6px;
  color: var(--sez-blue);
  font-size: 13px;
  font-weight: 950;
}

.supply-filter-mode-row label,
.supply-table-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
}

.supply-filter-mode-row input,
.supply-filter-mode-row select,
.supply-table-filter-form input,
.supply-table-filter-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 14px;
}

.supply-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.supply-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.supply-active-filters--table {
  margin: 0;
  border: 1px solid rgba(30, 102, 176, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(232, 242, 255, 0.72);
}

.supply-active-filters span {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
}

.supply-active-filters a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid rgba(30, 102, 176, 0.24);
  border-radius: 999px;
  padding: 5px 10px;
  background: #e8f2ff;
  color: var(--sez-blue);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.supply-active-filters-reset {
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: #ffffff !important;
  color: var(--sez-navy) !important;
}

.supply-table-workbar {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.supply-order-jump-form,
.supply-legal-filter-form,
.supply-bulk-selection-actions,
.supply-bulk-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.supply-order-jump-form label,
.supply-legal-filter-form label {
  display: grid;
  gap: 4px;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
}

.supply-order-jump-form input,
.supply-legal-filter-form select {
  min-height: 38px;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 8px;
  padding: 7px 10px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
}

.supply-order-jump-form input {
  width: min(360px, 48vw);
}

.supply-filter-mode-row .supply-v2-check,
.supply-table-filter-form .supply-v2-check {
  display: flex;
}

.supply-v2-filter-form input::placeholder,
.supply-table-filter-form input::placeholder,
.supply-v2-line-form input::placeholder,
.supply-work-table input::placeholder,
.supply-work-table textarea::placeholder {
  color: rgba(83, 105, 130, 0.38);
  font-weight: 700;
}

.supply-table-bulk-card {
  border-left: 7px solid #f59e0b;
}

.supply-table-bulk-hint {
  margin: 0 0 12px;
  color: var(--sez-muted);
  font-weight: 800;
}

.supply-table-bulk-card button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.supply-table-bulk-card .supply-v2-filter-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.supply-bulk-selection-actions,
.supply-bulk-submit-row {
  grid-column: 1 / -1;
}

.supply-table-card {
  padding: 0;
  overflow: hidden;
}

.supply-table-anchor {
  scroll-margin-top: 86px;
}

.supply-table-empty-state {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: #ffffff;
  color: var(--sez-navy);
}

.supply-table-empty-state h2,
.supply-table-empty-state p {
  margin: 0;
}

.supply-table-empty-state ul {
  margin: 0;
  padding-left: 22px;
  color: var(--sez-muted);
  font-weight: 800;
  line-height: 1.55;
}

.supply-table-wrap {
  --supply-select-width: 46px;
  --supply-number-width: 50px;
  --supply-name-width: clamp(320px, 21vw, 410px);
  --supply-sticky-width: calc(var(--supply-select-width) + var(--supply-number-width) + var(--supply-name-width));
  --supply-header-group-height: 34px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  position: relative;
  isolation: isolate;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #ffffff;
}

body.supply-fullscreen-mode,
body.supply-fullscreen-active {
  overflow: hidden;
}

.supply-floating-x-scroll {
  position: fixed;
  bottom: 8px;
  left: var(--supply-floating-scroll-left, 420px);
  z-index: 2305;
  width: var(--supply-floating-scroll-width, calc(100vw - 440px));
  height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(7, 29, 51, 0.2);
  scrollbar-width: auto;
}

.supply-floating-x-scroll[hidden] {
  display: none !important;
}

.supply-floating-x-scroll-inner {
  width: var(--supply-floating-scroll-inner-width, 1px);
  height: 1px;
}

.supply-table-screen.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  max-width: none;
  overflow: hidden;
  padding: 10px;
  background: #f4f7fb;
}

.supply-table-screen.is-fullscreen .terminal-header,
.supply-table-screen.is-fullscreen .supply-v2-tabs,
.supply-table-screen.is-fullscreen .supply-v2-metrics,
.supply-table-screen.is-fullscreen .supply-table-help-card,
.supply-table-screen.is-fullscreen .supply-table-warning-card,
.supply-table-screen.is-fullscreen .supply-v2-filter-card--advanced,
.supply-table-screen.is-fullscreen .supply-active-filters--table,
.supply-table-screen.is-fullscreen .supply-table-bulk-card,
.supply-table-screen.is-fullscreen .supply-table-anchor {
  display: none;
}

.supply-table-screen.is-fullscreen .supply-table-workbar {
  grid-row: 1;
  position: static;
}

.supply-table-screen.is-fullscreen .supply-table-card {
  grid-row: 2;
  height: 100%;
  min-height: 0;
  padding-bottom: 28px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.supply-table-screen.is-fullscreen .supply-table-wrap {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.supply-work-table {
  --supply-select-width: 46px;
  --supply-number-width: 50px;
  --supply-name-width: clamp(320px, 21vw, 410px);
  --supply-grid-border: #93a4b7;
  --supply-grid-border-soft: #a8b6c5;
  --supply-grid-border-strong: #5f7288;
  --supply-header-border: rgba(226, 232, 240, 0.76);
  --supply-sticky-width: calc(var(--supply-select-width) + var(--supply-number-width) + var(--supply-name-width));
  --supply-header-group-height: 34px;
  --supply-sticky-cols: var(--supply-select-width) var(--supply-number-width) var(--supply-name-width);
  --supply-replacement-cols: 150px 150px 220px 190px;
  --supply-list-cols: var(--supply-sticky-cols) 140px 180px 62px 86px 88px 130px 240px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px;
  --supply-list-cols-replacements: var(--supply-sticky-cols) 140px 180px var(--supply-replacement-cols) 62px 86px 88px 130px 240px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px;
  --supply-orders-cols-compact: var(--supply-sticky-cols) 140px 180px 62px 86px 88px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px;
  --supply-orders-cols-compact-replacements: var(--supply-sticky-cols) 140px 180px var(--supply-replacement-cols) 62px 86px 88px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px;
  --supply-orders-cols-full: var(--supply-sticky-cols) 140px 180px 62px 86px 88px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px 150px 150px 160px 160px 160px 160px 160px 150px 150px 150px;
  --supply-orders-cols-full-replacements: var(--supply-sticky-cols) 140px 180px var(--supply-replacement-cols) 62px 86px 88px 140px 78px 78px 112px 150px 190px 112px 112px 96px 86px 140px 180px 140px 82px 96px 150px 150px 160px 160px 160px 160px 160px 150px 150px 150px;
  display: block;
  width: max-content;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--sez-navy);
  font-size: 13px;
  overflow: visible;
}

.supply-work-table thead,
.supply-work-table tbody {
  display: block;
  overflow: visible;
}

.supply-work-table thead {
  position: sticky;
  top: 0;
  z-index: 140;
  background: #173b62;
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.18), 0 7px 16px -14px rgba(15, 23, 42, 0.65);
}

.supply-work-table tr {
  display: grid;
  width: max-content;
  grid-template-columns: var(--supply-orders-cols-full);
  overflow: visible;
}

.supply-work-table.is-compact tr {
  grid-template-columns: var(--supply-orders-cols-compact);
}

.supply-work-table.supply-flat-table tr,
.supply-work-table.supply-flat-table.is-compact tr {
  grid-template-columns: var(--supply-list-cols);
}

.supply-work-table.is-replacements-visible tr {
  grid-template-columns: var(--supply-orders-cols-full-replacements);
}

.supply-work-table.is-replacements-visible.is-compact tr {
  grid-template-columns: var(--supply-orders-cols-compact-replacements);
}

.supply-work-table.supply-flat-table.is-replacements-visible tr,
.supply-work-table.supply-flat-table.is-replacements-visible.is-compact tr {
  grid-template-columns: var(--supply-list-cols-replacements);
}

.supply-work-table th,
.supply-work-table td {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  border-right: 1px solid var(--supply-grid-border);
  border-bottom: 1px solid var(--supply-grid-border-soft);
  padding: 5px 7px;
  background: #ffffff;
  background-clip: padding-box;
  text-align: center;
  vertical-align: middle;
  line-height: 1.22;
}

.supply-work-table thead th {
  position: sticky;
  top: 0;
  z-index: 130;
  border-right-color: var(--supply-header-border);
  border-bottom: 2px solid rgba(226, 232, 240, 0.7);
  background: #0f2742;
  background-clip: padding-box;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.supply-work-table thead tr:not(.supply-table-groups) th {
  top: 0;
  z-index: 132;
  background: #173b62;
}

.supply-work-table .supply-table-groups th {
  z-index: 84;
  border-right-color: rgba(255, 255, 255, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.42);
  background: #0b1f35;
  text-align: center;
}

.supply-sort-link,
.supply-column-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.supply-column-filter {
  position: relative;
}

.supply-column-filter-button {
  width: 100%;
  min-height: 30px;
  justify-content: space-between;
  border: 0;
  border-radius: 7px;
  padding: 4px 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.supply-header-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  line-height: 1.1;
}

.supply-header-label.is-two-line {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.supply-column-filter-button .supply-header-label {
  flex: 1 1 auto;
}

.supply-column-filter-button .supply-sort-arrow,
.supply-column-filter-button .supply-filter-caret,
.supply-column-filter-button .supply-filter-dot {
  flex: 0 0 auto;
}

.supply-column-filter-button:hover,
.supply-column-filter-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.13);
}

.supply-sort-link span,
.supply-sort-arrow,
.supply-filter-dot {
  color: #fbbf24;
  font-size: 11px;
}

.supply-sort-link.is-active {
  color: #fde68a;
}

.supply-filter-th.has-filter .supply-column-filter-button {
  color: #fde68a;
}

.supply-filter-caret {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.supply-column-filter-menu {
  position: fixed;
  z-index: 1200;
  width: min(340px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  color: var(--sez-navy);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
  white-space: normal;
}

.supply-filter-sort-actions {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.supply-filter-sort-actions a {
  display: flex;
  min-height: 40px;
  align-items: center;
  border-radius: 8px;
  padding: 8px 10px;
  background: #eef6ff;
  color: var(--sez-blue);
  font-weight: 900;
  text-decoration: none;
}

.supply-column-filter-form,
.supply-filter-search-label {
  display: grid;
  gap: 8px;
}

.supply-filter-search-label span {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
}

.supply-filter-search-label input {
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
}

.supply-filter-options {
  display: grid;
  max-height: 245px;
  overflow: auto;
  gap: 4px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 6px;
  background: #f8fafc;
}

.supply-filter-option {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.supply-filter-option:hover {
  background: #e8f2ff;
}

.supply-filter-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--sez-blue);
}

.supply-filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.supply-filter-menu-note {
  margin: 0;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 800;
}

.supply-filter-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.supply-work-table:not(.is-compact) .supply-group-compact,
.supply-work-table.is-compact .supply-group-full,
.supply-work-table.is-compact th.supply-service-col,
.supply-work-table.is-compact td.supply-service-col {
  display: none;
}

.supply-work-table .supply-table-groups {
  display: none;
}

.supply-work-table.is-compact col.supply-service-col {
  visibility: collapse;
}

.supply-work-table input,
.supply-work-table select,
.supply-work-table textarea {
  width: 100%;
  min-width: 96px;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 6px;
  padding: 6px 7px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 12px;
}

.supply-work-table textarea {
  min-width: 150px;
  resize: vertical;
}

.supply-work-table input[type="checkbox"] {
  min-width: 22px;
  width: 22px;
  height: 22px;
}

.supply-work-table thead tr {
  position: sticky;
  top: 0;
  z-index: 128;
}

.supply-work-table thead tr:not(.supply-table-groups) {
  top: 0;
  z-index: 132;
}

.supply-work-table .toolbar-button {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12px;
}

.supply-select-col {
  width: var(--supply-select-width);
  min-width: var(--supply-select-width);
  max-width: var(--supply-select-width);
  text-align: center;
}

.supply-number-col {
  width: var(--supply-number-width);
  min-width: var(--supply-number-width);
  max-width: var(--supply-number-width);
  text-align: center;
}

.supply-name-col {
  width: var(--supply-name-width);
  min-width: var(--supply-name-width);
  max-width: var(--supply-name-width);
}

.supply-work-table .supply-sticky-cell {
  position: sticky !important;
  overflow: visible;
  padding: 0;
  background: transparent;
}

.supply-work-table .supply-sticky-cell--select {
  left: 0;
  z-index: 48;
}

.supply-work-table .supply-sticky-cell--number {
  left: var(--supply-select-width);
  z-index: 49;
}

.supply-work-table .supply-sticky-cell--name {
  left: calc(var(--supply-select-width) + var(--supply-number-width));
  z-index: 50;
}

.supply-work-table thead tr:not(.supply-table-groups) .supply-sticky-cell--select {
  top: 0;
  z-index: 154;
}

.supply-work-table thead tr:not(.supply-table-groups) .supply-sticky-cell--number {
  top: 0;
  z-index: 155;
}

.supply-work-table thead tr:not(.supply-table-groups) .supply-sticky-cell--name {
  top: 0;
  z-index: 156;
}

.supply-work-table .supply-sticky-inner,
.supply-work-table .supply-sticky-cell > .supply-column-filter {
  position: sticky;
  display: flex;
  min-height: 32px;
  align-items: center;
  box-sizing: border-box;
  border-right: 1px solid var(--supply-grid-border);
  border-bottom: 1px solid var(--supply-grid-border-soft);
  background: #ffffff;
  background-clip: padding-box;
}

.supply-work-table .supply-sticky-inner {
  gap: 8px;
  overflow: hidden;
  padding: 5px 7px;
}

.supply-work-table .supply-sticky-cell > .supply-column-filter {
  padding: 0;
}

.supply-work-table .supply-sticky-cell--select > .supply-sticky-inner {
  left: 0;
  z-index: 48;
  width: var(--supply-select-width);
  justify-content: center;
}

.supply-work-table .supply-sticky-cell--number > .supply-sticky-inner {
  left: var(--supply-select-width);
  z-index: 49;
  width: var(--supply-number-width);
  justify-content: center;
}

.supply-work-table .supply-sticky-cell--name > .supply-sticky-inner,
.supply-work-table .supply-sticky-cell--name > .supply-column-filter {
  left: calc(var(--supply-select-width) + var(--supply-number-width));
  z-index: 50;
  width: var(--supply-name-width);
  justify-content: flex-start;
  border-right: 2px solid var(--supply-grid-border-strong);
  box-shadow: 12px 0 18px -16px rgba(15, 23, 42, 0.75);
  text-align: left;
}

.supply-work-table thead .supply-sticky-inner,
.supply-work-table thead .supply-sticky-cell > .supply-column-filter {
  border-right-color: var(--supply-header-border);
  border-bottom: 2px solid rgba(226, 232, 240, 0.7);
  background: #173b62;
  color: #ffffff;
  z-index: 160;
}

.supply-work-table .supply-table-groups .supply-sticky-inner {
  border-right-color: rgba(255, 255, 255, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.42);
  background: #0b1f35;
  z-index: 125;
}

.supply-work-table th.supply-divider-right,
.supply-work-table td.supply-divider-right,
.supply-work-table .supply-sticky-cell.supply-divider-right > .supply-sticky-inner,
.supply-work-table .supply-sticky-cell.supply-divider-right > .supply-column-filter {
  border-right: 2px solid var(--supply-grid-border-strong);
}

.supply-work-table thead th.supply-divider-right,
.supply-work-table thead .supply-sticky-cell.supply-divider-right > .supply-sticky-inner,
.supply-work-table thead .supply-sticky-cell.supply-divider-right > .supply-column-filter {
  border-right-color: rgba(226, 232, 240, 0.92);
}

.supply-work-table thead th:not(.supply-sticky-cell--name) .supply-column-filter-button {
  justify-content: center;
  text-align: center;
}

.supply-work-table thead th:not(.supply-sticky-cell--name) .supply-header-label {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.supply-work-table .supply-sticky-cell--name .supply-header-label,
.supply-work-table .supply-sticky-cell--name .supply-header-label.is-two-line {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

.supply-work-table .supply-sticky-cell--name .supply-column-filter-button {
  text-align: left;
}

.supply-work-table th.supply-qty-col,
.supply-work-table td.supply-qty-col,
.supply-work-table th.supply-date-col,
.supply-work-table td.supply-date-col,
.supply-work-table th.supply-invoice-col,
.supply-work-table td.supply-invoice-col,
.supply-work-table th.supply-supplier-col,
.supply-work-table td.supply-supplier-col,
.supply-work-table th.supply-status-col,
.supply-work-table td.supply-status-col,
.supply-work-table th.supply-flag-col,
.supply-work-table td.supply-flag-col,
.supply-work-table th.supply-company-col,
.supply-work-table td.supply-company-col,
.supply-work-table th.supply-action-col,
.supply-work-table td.supply-action-col {
  text-align: center;
  vertical-align: middle;
}

.supply-work-table th.supply-qty-col .supply-column-filter-button,
.supply-work-table th.supply-date-col .supply-column-filter-button,
.supply-work-table th.supply-invoice-col .supply-column-filter-button,
.supply-work-table th.supply-supplier-col .supply-column-filter-button,
.supply-work-table th.supply-status-col .supply-column-filter-button,
.supply-work-table th.supply-company-col .supply-column-filter-button {
  justify-content: center;
  text-align: center;
}

.supply-work-table th.supply-qty-col .supply-header-label,
.supply-work-table th.supply-date-col .supply-header-label,
.supply-work-table th.supply-invoice-col .supply-header-label,
.supply-work-table th.supply-supplier-col .supply-header-label,
.supply-work-table th.supply-status-col .supply-header-label,
.supply-work-table th.supply-company-col .supply-header-label {
  align-items: center;
  text-align: center;
}

.supply-work-table td.supply-qty-col,
.supply-work-table td.supply-date-col,
.supply-work-table td.supply-invoice-col,
.supply-work-table td.supply-supplier-col,
.supply-work-table td.supply-status-col,
.supply-work-table td.supply-flag-col,
.supply-work-table td.supply-company-col,
.supply-work-table td.supply-action-col {
  place-content: center;
}

.supply-work-table td.supply-status-col .supply-status-badge,
.supply-work-table td.supply-action-col .supply-row-actions,
.supply-work-table td.supply-action-col .supply-history-link {
  margin-right: auto;
  margin-left: auto;
}

.supply-work-table .supply-replacement-cell,
col.supply-replacement-cell {
  display: none;
}

.supply-work-table.is-replacements-visible th.supply-replacement-cell,
.supply-work-table.is-replacements-visible td.supply-replacement-cell {
  display: flex;
}

.supply-work-table.is-replacements-visible th.supply-replacement-cell {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.supply-work-table.is-replacements-visible td.supply-replacement-cell {
  align-items: center;
  min-width: 0;
  white-space: normal;
}

.supply-replacement-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 999px;
  padding: 1px 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.4;
  vertical-align: middle;
}

.supply-receipt-total {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.supply-receipt-total strong {
  font-weight: 950;
}

.supply-receipt-adjust-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  padding: 2px 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 950;
  line-height: 1.15;
  cursor: pointer;
}

.supply-receipt-adjust-button:hover,
.supply-receipt-adjust-button:focus-visible {
  background: #dbeafe;
  color: #1d4ed8;
  outline: none;
}

.supply-receipt-adjust-button span {
  color: #64748b;
  font-size: 10px;
}

.supply-receipt-add-button {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.supply-receipt-add-button:hover {
  background: #dbeafe;
}

.supply-receipt-history {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 8px;
  font-size: 12px;
}

.supply-receipt-history > strong {
  color: var(--sez-navy);
}

.supply-receipt-history p {
  margin: 0;
  color: var(--sez-muted);
}

.supply-receipt-history-row {
  display: grid;
  grid-template-columns: minmax(48px, 0.6fr) minmax(74px, 0.8fr) minmax(90px, 1fr) minmax(96px, 1fr) minmax(96px, auto);
  gap: 6px;
  align-items: center;
  border-radius: 7px;
  padding: 5px 6px;
  background: #f8fafc;
  color: var(--sez-navy);
}

.supply-receipt-history-row small {
  display: block;
  margin-top: 2px;
  color: var(--sez-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.supply-receipt-history-row.is-cancelled {
  background: #f1f5f9;
  color: #64748b;
  text-decoration: line-through;
}

.supply-receipt-history-row.is-correction {
  background: #fff7ed;
}

.supply-receipt-history-row a {
  color: var(--sez-blue);
  font-weight: 900;
}

.supply-receipt-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.supply-receipt-history-actions form {
  margin: 0;
}

.supply-receipt-history-button {
  min-height: 28px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 7px;
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.supply-receipt-history-button.is-danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: #fff1f2;
  color: #be123c;
}

.supply-receipt-modal[hidden] {
  display: none;
}

.supply-receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.supply-receipt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.supply-receipt-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(760px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 32px));
  gap: 14px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
  color: var(--sez-navy);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
}

.supply-receipt-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.supply-receipt-modal-form label {
  display: grid;
  gap: 5px;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
}

.supply-receipt-modal-comment,
.supply-receipt-current,
.supply-receipt-modal-actions {
  grid-column: 1 / -1;
}

.supply-receipt-current {
  margin: 0;
  border: 1px solid rgba(30, 102, 176, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  background: #eff6ff;
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
}

.supply-receipt-current {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.supply-receipt-current span {
  display: inline-flex;
  gap: 4px;
}

.supply-receipt-modal-form input,
.supply-receipt-modal-form textarea {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
}

.supply-receipt-modal-form textarea {
  resize: vertical;
}

.supply-receipt-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-replacement-note {
  display: block;
  margin-top: 4px;
  color: #92400e;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}

.warehouse-replacement-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 10px;
  margin: 8px 0;
  padding: 8px 10px;
  background: #fff7ed;
  color: #92400e;
  font-size: 13px;
  font-weight: 850;
}

.warehouse-replacement-card strong {
  color: #9a3412;
  font-size: 12px;
  text-transform: uppercase;
}

.supply-group-row td {
  border-top: 1px solid var(--supply-grid-border-strong);
  border-bottom: 1px solid var(--supply-grid-border-strong);
  padding: 0;
  font-size: 14px;
  font-weight: 900;
}

.supply-order-row td {
  border-right-color: rgba(6, 78, 59, 0.42);
  border-bottom-color: rgba(6, 78, 59, 0.52);
  background: #dcfce7;
  color: #064e3b;
}

.supply-group-main-cell {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  overflow: visible;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

.supply-group-main-cell {
  grid-column: 4 / -1;
  width: auto;
  min-width: 0;
}

.supply-group-main-cell--full {
  grid-column: 1 / -1;
  width: 100%;
  position: relative;
  border-left: 1px solid var(--supply-grid-border-strong);
  border-right: 1px solid var(--supply-grid-border-strong);
}

.supply-group-sticky-content {
  position: sticky;
  left: 0;
  z-index: 70;
  display: inline-flex;
  width: max-content;
  max-width: none;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  box-sizing: border-box;
  background: inherit;
  color: inherit;
  overflow: visible;
  white-space: nowrap;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.6);
}

.supply-group-title {
  display: inline-flex;
  min-width: 0;
  max-width: min(720px, 38vw);
  align-items: center;
  gap: 8px;
}

.supply-group-title strong,
.supply-group-sticky-content strong {
  flex: 0 0 auto;
}

.supply-group-title span,
.supply-group-sticky-content > span,
.supply-group-title em {
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-weight: 800;
}

.supply-group-title em {
  flex: 0 0 auto;
  font-style: normal;
  opacity: 0.82;
}

.supply-group-main-cell a {
  margin-left: 0;
}

.supply-cabinet-row td {
  border-right-color: rgba(146, 64, 14, 0.42);
  border-bottom-color: rgba(146, 64, 14, 0.52);
  padding: 0;
  background: #fef3c7;
  color: #92400e;
  font-weight: 900;
}

.supply-cabinet-main-cell .supply-group-title {
  max-width: min(620px, 34vw);
}

.supply-order-legal-entity,
.supply-order-recalc-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.supply-group-main-cell .supply-order-legal-entity,
.supply-group-main-cell .supply-order-recalc-form {
  margin-left: 0;
}

.supply-order-legal-entity select {
  min-width: 74px;
  min-height: 30px;
  border: 1px solid rgba(6, 78, 59, 0.24);
  border-radius: 7px;
  padding: 4px 7px;
  background: #ffffff;
  color: #064e3b;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.supply-mini-action {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 102, 176, 0.22);
  border-radius: 7px;
  padding: 3px 7px;
  background: #eef6ff;
  color: var(--sez-blue);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
}

.supply-mini-action:hover {
  background: #dbeafe;
}

.supply-line-row {
  --supply-row-bg: #ffffff;
  font-weight: 400;
}

.supply-line-row td {
  border-right-color: var(--supply-grid-border);
  border-bottom-color: var(--supply-grid-border-soft);
  background: var(--supply-row-bg);
  font-weight: 400;
}

.supply-line-row .supply-sticky-inner {
  border-right-color: var(--supply-grid-border);
  border-bottom-color: var(--supply-grid-border-soft);
  background: var(--supply-row-bg);
}

.supply-line-row:hover {
  --supply-row-bg: #f8fbff;
}

.supply-line-row.receipt-received {
  --supply-row-bg: #f0fdf4;
}

.supply-line-row.status-need_purchase {
  --supply-row-bg: #fffaf0;
}

.supply-line-row.status-cancelled,
.supply-line-row.status-replacement_needed {
  --supply-row-bg: #fff1f2;
}

.order-summary-screen {
  gap: 18px;
}

.order-summary-header {
  align-items: flex-start;
}

.order-summary-actions {
  align-items: flex-start;
}

.order-summary-meta-card,
.order-summary-totals-card,
.order-summary-table-card {
  padding: 18px;
}

.order-summary-meta,
.order-summary-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
}

.order-summary-meta div,
.order-summary-totals div,
.order-summary-total-main {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}

.order-summary-meta dt,
.order-summary-totals dt,
.order-summary-total-main span {
  margin: 0 0 4px;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-summary-meta dd,
.order-summary-totals dd {
  margin: 0;
  color: var(--sez-navy);
  font-weight: 850;
}

.order-summary-totals-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: stretch;
}

.order-summary-total-main {
  display: grid;
  align-content: center;
  gap: 8px;
  border-color: rgba(22, 163, 74, 0.24);
  background: #f0fdf4;
}

.order-summary-total-main strong {
  color: #166534;
  font-size: 28px;
  font-weight: 950;
}

.order-summary-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.16);
}

.order-summary-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a34a;
}

.order-summary-customer-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.order-summary-customer-form label {
  display: grid;
  min-width: min(420px, 100%);
  gap: 5px;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
}

.order-summary-customer-form input {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--sez-navy);
  font: inherit;
  font-size: 15px;
}

.order-summary-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  color: var(--sez-navy);
  font-size: 14px;
}

.order-summary-table th,
.order-summary-table td {
  border: 1px solid #d7e0ea;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.order-summary-table th {
  background: #173b62;
  color: #ffffff;
  font-weight: 950;
}

.order-summary-table th:first-child,
.order-summary-table td:first-child,
.order-summary-table th:nth-child(3),
.order-summary-table td:nth-child(3),
.order-summary-table th:nth-child(4),
.order-summary-table td:nth-child(4) {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.order-summary-table th:nth-child(2) {
  width: 54%;
}

.order-summary-table th:nth-child(5) {
  width: 30%;
}

.order-summary-table tr.summary-row-ready td {
  background: #dcfce7;
}

.order-summary-table tr.summary-row-pending td {
  background: #fef3c7;
}

.order-summary-table tr.summary-row-ready,
.order-summary-table tr.summary-row-ready td,
.order-summary-table tr.summary-row-pending,
.order-summary-table tr.summary-row-pending td {
  color: #102033;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.order-summary-status-cell {
  background: #fff7d6;
}

.order-summary-status-cell--ready {
  background: #dcfce7;
}

.order-summary-status-part {
  display: inline-flex;
  align-items: center;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 900;
  white-space: nowrap;
}

.order-summary-status-part--ready {
  background: #bbf7d0;
  color: #166534;
}

.order-summary-status-part--other {
  background: #fef3c7;
  color: #92400e;
}

.order-summary-empty {
  padding: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--sez-muted);
  font-weight: 850;
}

.order-summary-copy-source {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.order-summary-copy-status {
  min-height: 22px;
  margin: 0;
  color: #166534;
  font-weight: 900;
}

@media (max-width: 860px) {
  .order-summary-totals-card {
    grid-template-columns: 1fr;
  }
}

.order-summary-detail-card {
  display: grid;
  gap: 14px;
}

.order-summary-filters {
  justify-content: flex-start;
}

.order-summary-detail-totals {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.order-summary-detail-table {
  min-width: 1120px;
}

.order-summary-detail-table th,
.order-summary-detail-table td {
  vertical-align: top;
}

.order-summary-detail-table th:nth-child(1),
.order-summary-detail-table td:nth-child(1),
.order-summary-detail-table th:nth-child(2),
.order-summary-detail-table td:nth-child(2),
.order-summary-detail-table th:nth-child(7),
.order-summary-detail-table td:nth-child(7),
.order-summary-detail-table th:nth-child(8),
.order-summary-detail-table td:nth-child(8),
.order-summary-detail-table th:nth-child(9),
.order-summary-detail-table td:nth-child(9) {
  text-align: center;
}

.order-summary-detail-row.status-paused td {
  background: #fff7ed;
}

.order-summary-detail-row.status-labels_marking td {
  background: #fff7db;
}

.order-summary-detail-row.status-ready_for_photo td,
.order-summary-detail-row.status-waiting_packaging td {
  background: #eff6ff;
}

.order-summary-detail-row.status-packed td,
.order-summary-detail-row.status-ready_for_dispatch td {
  background: #ecfdf3;
}

.order-summary-detail-row.status-new td {
  background: #f8fafc;
}

.supply-name-col,
.supply-item-name {
  min-width: var(--supply-name-width);
  max-width: 420px;
  font-weight: 400;
}

.supply-manufacturer-col {
  width: 140px;
  min-width: 130px;
  max-width: 170px;
}

.supply-article-col,
.supply-invoice-col {
  width: 180px;
  min-width: 150px;
  max-width: 210px;
}

.supply-supplier-col {
  width: 190px;
  min-width: 170px;
  max-width: 230px;
}

.supply-comment-col {
  width: 180px;
  min-width: 150px;
  max-width: 240px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.supply-unit-col {
  width: 62px;
  min-width: 58px;
  max-width: 78px;
  text-align: center;
}

.supply-qty-col {
  width: 86px;
  min-width: 76px;
  max-width: 96px;
  text-align: right;
}

.supply-price-col {
  width: 88px;
  min-width: 82px;
  max-width: 100px;
  text-align: right;
  white-space: nowrap;
}

.supply-date-col {
  width: 112px;
  min-width: 104px;
  max-width: 124px;
}

.supply-status-col {
  width: 150px;
  min-width: 130px;
  max-width: 170px;
}

.supply-company-col {
  width: 82px;
  min-width: 74px;
  max-width: 90px;
  text-align: center;
  font-weight: 900;
}

.supply-replacement-col {
  width: 160px;
  min-width: 140px;
  max-width: 220px;
}

.supply-replacement-name-col {
  width: 220px;
  min-width: 180px;
  max-width: 280px;
}

.supply-replacement-reason-col {
  width: 190px;
  min-width: 160px;
  max-width: 250px;
}

.supply-cabinet-cell {
  width: 240px;
  min-width: 220px;
  max-width: 320px;
}

.supply-order-col {
  width: 130px;
  min-width: 120px;
  max-width: 160px;
}

.supply-flag-col {
  width: 86px;
  min-width: 76px;
  max-width: 100px;
  text-align: center;
}

.supply-action-col {
  width: 96px;
  min-width: 86px;
  max-width: 116px;
}

.supply-item-name-text,
.supply-item-name a,
.supply-item-name strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  font-weight: 400;
}

.supply-line-row .unit-history-link {
  display: inline-flex;
  margin-top: 6px;
}

.supply-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 170px;
  margin-top: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  white-space: normal;
}

.supply-editable-cell {
  position: relative;
  cursor: text;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.supply-editable-cell.editable-select,
.supply-editable-cell.editable-date,
.supply-editable-cell.editable-number {
  cursor: pointer;
}

.supply-editable-cell.is-empty {
  color: #94a3b8;
}

.supply-line-row .supply-editable-cell.supply-required-cell.is-empty,
.supply-line-row .supply-receipt-fact-col.supply-required-cell.is-empty,
.supply-line-row .supply-receipt-total-col.supply-required-cell.is-empty {
  background: #fde2e2;
  color: #7f1d1d;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.supply-editable-cell[data-field="supplier_name"] {
  min-width: 190px;
}

.supply-editable-cell:hover {
  box-shadow: inset 0 0 0 2px rgba(30, 102, 176, 0.22);
}

.supply-editable-cell.is-fill-active {
  box-shadow: inset 0 0 0 2px rgba(30, 102, 176, 0.36);
}

.supply-editable-cell.is-fill-active::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 7;
  width: 8px;
  height: 8px;
  border: 1px solid #ffffff;
  border-radius: 2px;
  background: var(--sez-blue);
  box-shadow: 0 0 0 1px rgba(11, 79, 159, 0.38);
  content: "";
}

.supply-editable-cell.is-fill-target {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 2px rgba(30, 102, 176, 0.36);
}

.supply-editable-cell.is-fill-source {
  box-shadow: inset 0 0 0 2px rgba(11, 79, 159, 0.58);
}

.supply-work-table.is-drag-filling {
  user-select: none;
}

.supply-editable-cell.is-saving {
  background: #eff6ff;
}

.supply-editable-cell.is-saved {
  background: #dcfce7;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.34);
}

.supply-editable-cell.is-error {
  background: #fff1f2;
  box-shadow: inset 0 0 0 2px rgba(225, 29, 72, 0.34);
}

.supply-inline-input {
  min-height: 28px;
  min-width: 88px;
  border: 1px solid rgba(30, 102, 176, 0.45);
  border-radius: 5px;
  padding: 4px 6px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
}

.supply-status-badge.stock-full,
.supply-status-badge.receipt-received {
  background: #bbf7d0;
  color: #065f46;
}

.supply-status-badge.stock-partial,
.supply-status-badge.purchase-price_requested,
.supply-status-badge.purchase-partially_ordered,
.supply-status-badge.receipt-partially_received {
  background: #fef3c7;
  color: #92400e;
}

.supply-status-badge.stock-none,
.supply-status-badge.purchase-need_purchase,
.supply-status-badge.purchase-cancelled {
  background: #ffe4e6;
  color: #9f1239;
}

.supply-status-badge.purchase-ordered {
  background: #dbeafe;
  color: #1d4ed8;
}

.supply-status-badge.stock-skipped,
.supply-status-badge.purchase-not_processed,
.supply-status-badge.receipt-not_received {
  background: #e5e7eb;
  color: #4b5563;
}

.supply-row-actions {
  display: flex;
  gap: 4px;
  min-width: 72px;
  margin-top: 0;
  align-items: center;
}

.supply-row-actions .toolbar-button,
.supply-action-details summary {
  width: 100%;
}

.supply-history-link {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 6px;
  padding: 4px 7px;
  background: #f8fafc;
  color: var(--sez-blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.supply-history-link:hover {
  background: #e8f2ff;
}

.supply-action-details {
  position: relative;
}

.supply-action-details summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 7px;
  padding: 6px 9px;
  background: #f5f8fb;
  color: var(--sez-navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.supply-action-details summary::-webkit-details-marker {
  display: none;
}

.supply-action-details[open] summary {
  border-color: rgba(30, 102, 176, 0.4);
  background: #e8f2ff;
  color: var(--sez-blue);
}

.supply-action-panel {
  display: grid;
  gap: 8px;
  min-width: 260px;
  margin-top: 8px;
  border: 1px solid rgba(14, 27, 43, 0.12);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.supply-action-panel label {
  display: grid;
  gap: 4px;
  color: var(--sez-navy);
  font-size: 12px;
  font-weight: 900;
}

.admin-inline-delete-form {
  display: inline-flex;
  margin: 0;
}

.admin-danger-link {
  border-color: rgba(245, 158, 11, 0.78);
  background: #fff7e8;
  color: #8a4b00;
}

.warehouse-section-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.warehouse-section-nav a {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 27, 43, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 238, 246, 0.84));
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.warehouse-section-nav a.is-active {
  border-color: rgba(30, 102, 176, 0.45);
  background: #e8f2ff;
  color: var(--sez-blue);
  box-shadow: inset 0 -4px 0 var(--sez-orange), 0 10px 22px rgba(15, 23, 42, 0.12);
}

.warehouse-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.warehouse-hub-card {
  display: grid;
  min-height: 230px;
  align-content: space-between;
  gap: 16px;
  border-left: 6px solid var(--sez-blue);
  padding: 22px;
  color: var(--sez-navy);
  text-decoration: none;
}

.warehouse-hub-card h2 {
  margin: 0;
  font-size: 28px;
}

.warehouse-hub-card p {
  margin: 8px 0 0;
  color: var(--sez-muted);
  font-weight: 800;
}

.warehouse-hub-card strong {
  font-size: 32px;
}

.warehouse-hub-card .warehouse-hub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-hub-card .warehouse-hub-metrics span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef4fb;
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .warehouse-hub-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-section-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .warehouse-section-nav {
    grid-template-columns: 1fr;
  }
}

.order-sticky-workbar .header-link {
  min-height: 34px;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 13px;
}

.order-work-toolbar-stack {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(250px, 1fr) minmax(270px, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  align-items: stretch;
}

.order-tool-card,
.order-panel-collapsible {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(14, 27, 43, 0.14);
  border-radius: 10px;
  padding: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(241, 245, 249, 0.87));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.order-tool-card-head {
  display: grid;
  gap: 3px;
}

.order-tool-card-head h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 14px;
  line-height: 1.16;
}

.order-panel-collapsible > summary,
.order-print-details > summary {
  cursor: pointer;
  list-style: none;
}

.order-panel-collapsible > summary::-webkit-details-marker,
.order-print-details > summary::-webkit-details-marker {
  display: none;
}

.order-panel-collapsible .order-tool-card-head,
.order-print-details .order-tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-panel-collapsible .order-tool-card-head strong,
.order-print-details .order-tool-card-head strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sez-navy);
  font-size: 14px;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-details-hint {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(11, 79, 159, 0.1);
  color: var(--sez-blue);
  font-size: 12px;
  font-weight: 900;
}

.order-panel-collapsible[open] .order-details-hint,
.order-print-details[open] .order-details-hint {
  color: #92400e;
  background: #fff7e6;
}

.order-panel-collapsible[open] .order-details-hint::before,
.order-print-details[open] .order-details-hint::before {
  content: "Свернуть";
}

.order-panel-collapsible[open] .order-details-hint,
.order-print-details[open] .order-details-hint {
  font-size: 0;
}

.order-panel-collapsible[open] .order-details-hint::before,
.order-print-details[open] .order-details-hint::before {
  font-size: 12px;
}

.order-selection-card {
  border-color: rgba(11, 79, 159, 0.2);
  background:
    linear-gradient(135deg, rgba(231, 241, 255, 0.94), rgba(255, 255, 255, 0.94));
}

.order-print-card {
  border-color: rgba(23, 160, 93, 0.2);
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.94));
}

.order-schemes-card {
  border-color: rgba(245, 158, 11, 0.23);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.94));
}

.order-action-toolbar {
  position: static;
  top: auto;
  z-index: auto;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(14, 27, 43, 0.18);
  border-radius: 10px;
  margin: 0;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(232, 238, 246, 0.72)),
    repeating-linear-gradient(115deg, rgba(14, 27, 43, 0.04) 0 1px, transparent 1px 14px);
  box-shadow: none;
}

.order-selection-toolbar,
.order-production-toolbar,
.order-print-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 126px), 1fr));
  gap: 6px;
  width: 100%;
}

.order-selection-toolbar {
  grid-template-columns: minmax(112px, 1fr) repeat(2, minmax(92px, 0.82fr));
}

.order-action-toolbar .toolbar-button {
  min-height: 38px;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.12;
}

.toolbar-selection-summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(14, 27, 43, 0.16);
  border-radius: 9px;
  padding: 7px 10px;
  background: rgba(14, 27, 43, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.toolbar-selection-summary.has-selection {
  border-color: rgba(23, 160, 93, 0.55);
  background: #0f6b45;
}

.order-panel-body {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.order-schemes-compact-body {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.7fr);
  align-items: start;
}

.order-schemes-compact-body h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 16px;
  line-height: 1.15;
}

.order-schemes-compact-body p {
  margin: 3px 0 0;
  color: var(--sez-muted);
  font-size: 13px;
  line-height: 1.25;
}

.order-schemes-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.order-schemes-actions form,
.order-schemes-actions .order-folder-actions,
.order-schemes-actions .order-folder-buttons {
  display: contents;
}

.order-schemes-actions .toolbar-button,
.order-schemes-actions .toolbar-link,
.order-schemes-actions .order-folder-button {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.08;
  text-align: center;
}

.order-schemes-actions .order-folder-status {
  grid-column: 1 / -1;
  margin: 0;
}

.order-schemes-actions .order-folder-status:empty {
  margin: 0;
}

.order-unit-groups {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
}

.order-unit-flat-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

.order-unit-group {
  border-left: 5px solid var(--group-accent, #f97316);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(243, 244, 246, 0.82));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  padding: 10px;
}

.order-unit-group-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.order-unit-group-header h2 {
  margin: 0;
  color: #111827;
  font-size: 19px;
  line-height: 1.16;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-calculated-by {
  margin: 4px 0 0;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.group-color-dot {
  width: 12px;
  height: 34px;
  border-radius: 999px;
  background: var(--group-accent, #f97316);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.grouped-unit {
  border-left: 5px solid var(--group-accent, #f97316);
}

.unit-group-label {
  display: inline-flex;
  max-width: 100%;
  width: fit-content;
  border-radius: 999px;
  background: color-mix(in srgb, var(--group-accent, #f97316) 14%, white);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 7px;
  overflow-wrap: anywhere;
}

.order-unit-grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.order-work-screen .unit-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 318px;
  height: 100%;
  align-content: stretch;
  gap: 8px;
  border-width: 1px;
  border-radius: 10px;
  padding: 14px;
}

.order-work-screen .unit-tile-top {
  gap: 8px;
}

.order-work-screen .status-chip,
.order-work-screen .unit-selected-marker {
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.1;
}

.order-work-screen .unit-selected-marker {
  position: static;
  margin-top: -2px;
}

.spec-print-select {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 9px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--sez-blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.unit-card-actions,
.cabinet-card-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  margin-top: auto;
}

.unit-production-actions {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 9px;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(231, 241, 255, 0.95), rgba(255, 255, 255, 0.96));
}

.unit-production-actions[hidden] {
  display: none !important;
}

.unit-production-title {
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.unit-production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 6px;
}

.unit-production-grid .toolbar-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.08;
}

.unit-card-actions .unit-history-link,
.unit-card-actions .spec-print-select {
  margin-top: 0;
  width: 100%;
  min-height: 34px;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 7px;
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
}

.spec-print-select input {
  width: 17px;
  height: 17px;
  accent-color: var(--sez-blue);
}

.order-spec-print-toolbar {
  margin-top: 6px;
  gap: 7px;
  border-color: rgba(11, 79, 159, 0.16);
  background:
    linear-gradient(135deg, rgba(231, 241, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.order-compact-work-toolbar {
  align-items: center;
  padding: 9px 11px;
}

.order-spec-print-toolbar .toolbar-button {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.1;
}

.order-spec-print-toolbar .toolbar-selection-summary {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.1;
}

.toolbar-label {
  color: var(--sez-navy);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.toolbar-divider {
  width: 1px;
  align-self: stretch;
  min-height: 34px;
  background: rgba(33, 48, 64, 0.16);
}

.spec-print-count {
  border-color: rgba(11, 79, 159, 0.22);
  background: #ffffff;
  color: var(--sez-blue);
}

.spec-print-count.has-selection {
  border-color: var(--sez-orange);
  background: #fff7e6;
  color: #92400e;
}

.order-work-screen .unit-name {
  min-height: 40px;
  max-height: 58px;
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.unit-supply-summary {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: 4px solid var(--sez-blue);
  border-radius: 9px;
  padding: 7px 8px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--sez-navy);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.unit-supply-summary--complete {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.unit-supply-summary--overdue {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.unit-supply-summary--no_data {
  border-left-color: #94a3b8;
  background: #f8fafc;
  color: #64748b;
}

.unit-supply-head {
  font-size: 13px;
  font-weight: 900;
}

.unit-supply-progress {
  height: 6px;
}

.unit-supply-summary--partial .unit-supply-progress span {
  background: linear-gradient(90deg, var(--sez-blue), #38bdf8);
}

.unit-supply-summary--overdue .unit-supply-progress span {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

.unit-supply-line {
  color: #334155;
}

.unit-supply-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.unit-supply-tags span {
  border-radius: 999px;
  padding: 2px 6px;
  background: #fde68a;
  color: #92400e;
  font-size: 11px;
  font-weight: 900;
}

.unit-supply-tags .is-overdue {
  background: #fecaca;
  color: #991b1b;
}

.unit-supply-tags .is-missing {
  background: #e2e8f0;
  color: #475569;
}

.order-work-screen .unit-number {
  font-size: 27px;
  line-height: 1;
}

.order-work-screen .unit-participants,
.order-work-screen .unit-price,
.order-work-screen .unit-status,
.order-work-screen .unit-work-time,
.order-work-screen .unit-pause-reason {
  font-size: 13px;
  line-height: 1.22;
}

.order-work-screen .unit-norm-hours {
  min-height: 27px;
  padding: 3px 7px;
  font-size: 12px;
}

.order-work-screen .unit-norm-hours strong {
  font-size: 13px;
}

.order-work-screen .unit-participants {
  display: -webkit-box;
  max-height: 36px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-work-screen .unit-work-time,
.order-work-screen .unit-pause-reason {
  padding: 6px 8px;
}

.order-work-screen .unit-history-link {
  min-height: 34px;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  align-self: start;
}

.unit-spec-link {
  border-color: rgba(255, 138, 0, 0.86);
  background: linear-gradient(135deg, var(--sez-orange), var(--sez-accent-dark));
}

.unit-order-navigation {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 5px solid var(--sez-blue);
}

.unit-order-navigation-title {
  min-width: 0;
}

.unit-order-navigation-title h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
}

.unit-order-navigation-title h2 span {
  color: var(--sez-muted);
}

.unit-order-navigation-title p:last-child {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.unit-order-navigation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.unit-order-navigation-actions .toolbar-button {
  min-height: 48px;
  border-radius: 10px;
  padding-inline: 14px;
  white-space: nowrap;
}

.unit-order-navigation-actions .is-disabled {
  border-color: rgba(33, 48, 64, 0.14);
  background: #eef2f6;
  color: rgba(33, 48, 64, 0.42);
  cursor: default;
  pointer-events: none;
}

.unit-order-back-link {
  border-color: rgba(33, 48, 64, 0.2);
  background: #ffffff;
  color: var(--sez-navy);
}

.unit-spec-screen {
  width: min(100%, 1500px);
  padding-bottom: 48px;
}

.order-specs-print-screen {
  display: grid;
  gap: 18px;
}

.order-specs-print-header {
  margin-bottom: 0;
}

.order-specs-print-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.order-specs-print-summary h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 28px;
}

.order-specs-print-list {
  margin: 0;
  padding-left: 24px;
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.order-schemes-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.order-schemes-actions,
.unit-schemes-actions,
.scheme-unit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.order-materials-actions {
  gap: 6px;
}

.order-materials-actions .order-folder-status {
  flex-basis: 100%;
  margin: 0;
}

.unit-scheme-badge {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.unit-scheme-badge--confirmed {
  background: rgba(37, 168, 104, 0.16);
  color: #147144;
}

.unit-scheme-badge--candidate {
  background: rgba(245, 158, 11, 0.16);
  color: #8a5200;
}

.unit-scheme-badge--missing {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.unit-schemes-panel {
  scroll-margin-top: 120px;
}

.unit-schemes-head,
.scheme-unit-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.scheme-source-list,
.scheme-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.scheme-source-card,
.scheme-link-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.scheme-link-card--confirmed {
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(240, 253, 244, 0.92);
}

.scheme-link-card--candidate {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.92);
}

.scheme-unit-list {
  display: grid;
  gap: 14px;
}

.scheme-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.scheme-columns h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.scheme-manual-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.5fr) minmax(180px, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
  align-items: end;
}

.scheme-manual-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 800;
  color: #334155;
}

.scheme-manual-form select,
.scheme-manual-form input {
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.scheme-print-page {
  padding: 0;
  break-before: auto;
  page-break-before: auto;
}

.scheme-print-page + .scheme-print-page {
  break-before: page;
  page-break-before: always;
}

.scheme-screen-only {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.scheme-screen-only p {
  margin: 0;
}

.scheme-print-sheet {
  display: flex;
  width: 100%;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
}

.scheme-print-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.scheme-print-load-status {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.scheme-print-load-status--loaded,
.scheme-print-load-status--error {
  display: none;
}

.scheme-screen-only[data-scheme-image-state="loaded"] .scheme-print-load-status--loading,
.scheme-screen-only[data-scheme-image-state="error"] .scheme-print-load-status--loading {
  display: none;
}

.scheme-screen-only[data-scheme-image-state="loaded"] .scheme-print-load-status--loaded,
.scheme-screen-only[data-scheme-image-state="error"] .scheme-print-load-status--error {
  display: block;
}

.scheme-print-placeholder {
  display: flex;
  min-height: 60vh;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: #334155;
}

@media print {
  @page schemePrint {
    size: A4 landscape;
    margin: 5mm;
  }

  .scheme-print-page {
    page: schemePrint;
    margin: 0;
    padding: 0;
    break-before: auto;
    page-break-before: auto;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .scheme-print-page + .scheme-print-page {
    break-before: auto;
    page-break-before: auto;
  }

  .scheme-print-page.is-last-scheme-page {
    break-after: auto;
    page-break-after: auto;
  }

  .scheme-print-page + .spec-print-block {
    break-before: page;
    page-break-before: always;
  }

  .scheme-screen-only,
  .scheme-print-placeholder {
    display: none !important;
  }

  .scheme-print-sheet {
    width: 287mm;
    height: 195mm;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .scheme-print-image {
    max-width: 287mm;
    max-height: 195mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .scheme-print-load-status {
    display: none !important;
  }
}

@media (max-width: 768px) {
  :root {
    --sez-bottom-panel: 72px;
  }

  html {
    min-height: 100%;
    overflow-y: auto;
  }

  body:not(.modal-open) {
    min-height: 100dvh;
    overflow-y: auto;
  }

  .app-topbar {
    position: sticky;
    flex-direction: row;
    min-height: 56px;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .brand {
    flex: 0 0 auto;
    gap: 7px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
  }

  .brand-mark img {
    max-width: 30px;
    max-height: 30px;
  }

  .brand-copy {
    max-width: 132px;
  }

  .brand-copy strong {
    font-size: 14px;
    line-height: 1.05;
  }

  .brand-copy small {
    display: none;
  }

  .top-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .top-nav-link,
  .top-nav-link.admin-service-link {
    flex: 0 0 auto;
    min-height: 34px;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .terminal-screen.order-work-screen {
    width: 100%;
    min-height: 100dvh;
    overflow: visible;
    padding: 10px 10px calc(96px + env(safe-area-inset-bottom));
  }

  .order-work-screen .order-sticky-workbar {
    position: static;
    top: auto;
    z-index: 1;
    margin-bottom: 10px;
    border-radius: 10px;
    padding: 6px;
  }

  .order-work-screen .compact-order-header {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
    padding: 7px;
  }

  .order-work-screen .order-overview-header {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
    align-items: stretch;
  }

  .order-work-screen .order-header-actions--order,
  .order-work-screen .order-header-actions--order .order-folder-buttons {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .order-work-screen .compact-order-header h1 {
    font-size: 22px;
  }

  .order-work-screen .compact-order-title {
    max-height: 34px;
    font-size: 12px;
    line-height: 1.2;
  }

  .order-work-screen .order-compact-badges {
    gap: 4px;
    margin-top: 5px;
  }

  .order-work-screen .metric-tile {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .order-work-screen .metric-tile strong {
    font-size: 13px;
  }

  .order-work-screen .order-supply-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
    padding: 6px;
  }

  .order-work-screen .order-supply-summary > div {
    padding: 5px 6px;
  }

  .order-work-screen .order-supply-summary span {
    font-size: 10px;
  }

  .order-work-screen .order-supply-summary strong {
    font-size: 13px;
  }

  .order-work-screen .order-supply-main,
  .order-work-screen .order-supply-alert {
    grid-column: 1 / -1;
  }

  .order-work-screen .order-header-actions,
  .order-work-screen .order-folder-buttons,
  .order-work-screen .order-schemes-actions {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .order-work-screen .order-header-actions--order,
  .order-work-screen .order-header-actions--order .order-folder-buttons {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    flex-wrap: initial;
  }

  .order-work-screen .order-folder-actions,
  .order-work-screen .order-materials-actions {
    min-width: 0;
  }

  .order-work-screen .order-folder-path,
  .order-work-screen .order-folder-status:empty {
    display: none;
  }

  .order-work-screen .header-link,
  .order-work-screen .order-folder-button,
  .order-work-screen .toolbar-button,
  .order-work-screen .toolbar-link,
  .order-work-screen .toolbar-selection-summary {
    flex: 0 0 auto;
    min-height: 34px;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.05;
  }

  .order-work-screen .order-work-toolbar-stack {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .order-work-screen .order-tool-card {
    gap: 6px;
    padding: 8px;
  }

  .order-work-screen .order-tool-card-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-work-screen .order-tool-card-head h2 {
    font-size: 14px;
  }

  .order-work-screen .order-action-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
    gap: 5px;
    overflow-x: visible;
    flex-wrap: initial;
    padding: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .order-work-screen .order-schemes-compact-body {
    grid-template-columns: 1fr;
  }

  .order-work-screen .order-schemes-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .order-work-screen .toolbar-divider,
  .order-work-screen .toolbar-label {
    display: none;
  }

  .order-work-screen .order-schemes-panel {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
  }

  .order-work-screen .order-schemes-panel h2 {
    margin: 0;
    font-size: 18px;
  }

  .order-work-screen .order-schemes-panel p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.25;
  }

  .order-work-screen .order-unit-groups,
  .order-work-screen .order-unit-flat-grid,
  .order-work-screen .order-unit-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    padding-bottom: 24px;
  }

  .order-work-screen .unit-tile {
    min-height: 0;
    height: auto;
    padding: 12px;
  }

  .assembler-panel--mobile-collapsible {
    max-height: calc(64px + env(safe-area-inset-bottom));
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .assembler-panel--mobile-collapsible .assembler-panel-title {
    align-self: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .assembler-panel--mobile-collapsible .assembler-buttons {
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }

  .assembler-panel--mobile-collapsible .assembler-button {
    min-width: 92px;
    min-height: 38px;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1;
  }

  .voice-widget-backdrop[hidden],
  .voice-widget-active[hidden] {
    display: none !important;
    pointer-events: none;
  }
}

@media (max-width: 480px) {
  .brand-copy {
    max-width: 98px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .top-nav-link,
  .top-nav-link.admin-service-link {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 11px;
  }

  .terminal-screen.order-work-screen {
    padding-inline: 8px;
  }

  .order-work-screen .order-supply-summary {
    grid-template-columns: 1fr 1fr;
  }

  .assembler-panel--mobile-collapsible .assembler-button {
    min-width: 84px;
  }
}

@media (max-width: 900px) {
  .order-schemes-panel,
  .unit-schemes-head,
  .scheme-unit-head {
    flex-direction: column;
  }

  .scheme-columns,
  .scheme-manual-form {
    grid-template-columns: 1fr;
  }
}

.unit-spec-warning-text {
  color: var(--sez-red);
  font-weight: 850;
}

.unit-spec-sheet {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.unit-spec-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid var(--sez-blue);
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.unit-spec-brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.unit-spec-brand img {
  width: 138px;
  max-height: 58px;
  object-fit: contain;
}

.unit-spec-brand h1 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.1;
}

.unit-spec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.unit-spec-order-badge {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(11, 79, 159, 0.18);
  border-radius: 14px;
  padding: 10px 18px;
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.unit-spec-title-block {
  display: grid;
  max-width: 520px;
  gap: 7px;
  margin-left: auto;
  color: var(--sez-navy);
  text-align: right;
}

.unit-spec-title-block strong {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.16;
}

.unit-spec-title-block span {
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 900;
}

.unit-spec-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.unit-spec-meta div {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f7f9fb;
}

.unit-spec-meta span {
  display: block;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.unit-spec-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--sez-navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.unit-spec-print-meta {
  display: none;
}

.unit-spec-supply-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, 1fr));
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 6px solid #f59e0b;
  border-radius: 14px;
  margin-bottom: 18px;
  padding: 12px;
  background: linear-gradient(135deg, #fff7e6, #ffffff);
}

.unit-spec-supply-summary div {
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.unit-spec-supply-summary span {
  display: block;
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.unit-spec-supply-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--sez-navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
}

.supply-summary--complete {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #ecfdf3, #ffffff);
}

.supply-summary--no_data {
  border-left-color: #94a3b8;
  background: linear-gradient(135deg, #f1f5f9, #ffffff);
}

.supply-summary--overdue {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
}

.unit-spec-supply-filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  margin: -6px 0 18px;
  padding: 10px 12px;
  background: #f8fafc;
}

.unit-spec-supply-filter-label {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.unit-spec-supply-filter {
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 999px;
  padding: 9px 14px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.unit-spec-supply-filter strong {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  border-radius: 999px;
  margin-left: 5px;
  padding: 1px 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.unit-spec-supply-filter:hover,
.unit-spec-supply-filter:active,
.unit-spec-supply-filter.is-active {
  border-color: rgba(11, 79, 159, 0.55);
  background: var(--sez-blue);
  color: #ffffff;
}

.unit-spec-supply-filter.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.unit-spec-supply-filter.supply-filter--ready.is-active {
  border-color: #16a34a;
  background: #15803d;
}

.unit-spec-supply-filter.supply-filter--overdue.is-active {
  border-color: #dc2626;
  background: #b91c1c;
}

.unit-spec-supply-filter.supply-filter--not-found.is-active {
  border-color: #64748b;
  background: #475569;
}

.unit-spec-active-filter-print {
  display: none;
}

.unit-spec-filter-empty {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 14px;
  margin-top: 14px;
  padding: 18px;
  background: #f8fafc;
  color: var(--sez-muted);
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}

.unit-spec-warnings {
  border-left: 5px solid var(--sez-orange);
  border-radius: 12px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: #fff7e6;
  color: var(--sez-navy);
  font-weight: 800;
}

.unit-spec-warnings p {
  margin: 0;
}

.unit-spec-table-wrap {
  overflow-x: auto;
}

.unit-spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 15px;
  table-layout: fixed;
}

.unit-spec-table th,
.unit-spec-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.unit-spec-table th {
  background: #e7f1ff;
  color: var(--sez-navy);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.unit-spec-table th:first-child,
.unit-spec-table td:first-child,
.unit-spec-cell-number {
  width: 64px;
  text-align: center;
}

.unit-spec-table th:nth-child(5),
.unit-spec-table td:nth-child(5),
.unit-spec-cell-quantity,
.unit-spec-table th:nth-child(6),
.unit-spec-table td:nth-child(6),
.unit-spec-cell-unit {
  width: 90px;
  text-align: center;
  white-space: nowrap;
}

.unit-spec-table th:nth-child(7),
.unit-spec-table td:nth-child(7) {
  width: 210px;
}

.unit-spec-cell-name,
.unit-spec-cell-manufacturer,
.unit-spec-cell-article {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.unit-spec-replacement-note {
  display: block;
  margin-top: 4px;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.supply-status-cell {
  min-width: 180px;
}

.supply-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #334155;
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.supply-status-detail {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.supply-status-print-detail {
  display: none;
}

.supply-status-badge--warehouse,
.supply-status-badge--received {
  color: #065f46;
  background: #bbf7d0;
}

.supply-status-badge--ordered,
.supply-status-badge--expected,
.supply-status-badge--matched {
  color: #92400e;
  background: #fde68a;
}

.supply-status-badge--overdue {
  color: #991b1b;
  background: #fecaca;
}

.supply-status-badge--not_found,
.supply-status-badge--no_data {
  color: #475569;
  background: #e2e8f0;
}

.supply-row--warehouse,
.supply-row--received {
  background: #f0fdf4;
}

.supply-row--ordered,
.supply-row--expected,
.supply-row--matched {
  background: #fff7ed;
}

.supply-row--overdue {
  background: #fff1f2;
}

.supply-row--not_found,
.supply-row--no_data {
  background: #f8fafc;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 7mm 8mm;
  }

  body {
    background: #ffffff !important;
    color: #000000;
    font-size: 12px;
  }

  .app-topbar,
  .no-print,
  .unit-order-navigation,
  .unit-spec-actions,
  .unit-spec-supply-filter-panel,
  .supply-column-filter-menu,
  .supply-active-filters,
  .supply-v2-filter-card,
  .assembler-panel {
    display: none !important;
  }

  .terminal-screen.unit-spec-screen {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .unit-spec-sheet {
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .spec-print-block {
    page-break-after: always;
    break-after: page;
  }

  .spec-print-block:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .unit-spec-header {
    display: grid;
    grid-template-columns: minmax(58mm, 0.72fr) minmax(42mm, 0.55fr) minmax(0, 1.28fr);
    gap: 5mm;
    align-items: center;
    border-bottom-color: #000000;
    margin-bottom: 5px;
    padding-bottom: 5px;
  }

  .unit-spec-brand {
    gap: 8px;
  }

  .unit-spec-brand img {
    width: 82px;
    max-height: 34px;
  }

  .unit-spec-brand h1 {
    color: #000000;
    font-size: 15px;
    line-height: 1.08;
  }

  .unit-spec-order-badge {
    min-height: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #000000;
    font-size: 20pt;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
  }

  .unit-spec-title-block {
    display: grid;
    align-self: center;
    max-width: none;
    gap: 2px;
    margin: 0;
    color: #000000;
    text-align: right;
  }

  .unit-spec-title-block strong {
    font-size: 14px;
    line-height: 1.12;
  }

  .unit-spec-title-block span {
    color: #333333;
    font-size: 10.5px;
    line-height: 1.1;
  }

  .screen-label,
  .unit-spec-meta span {
    color: #333333 !important;
  }

  .unit-spec-meta {
    display: none;
  }

  .unit-spec-print-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    border-bottom: 1px solid #999999;
    margin: 0 0 6px;
    padding: 4px 0 5px;
    color: #000000;
    font-size: 9pt;
    font-weight: 600;
    line-height: 1.18;
  }

  .unit-spec-print-meta span {
    display: inline-flex;
    gap: 3px;
    min-width: 0;
  }

  .unit-spec-print-meta span + span::before {
    margin-right: 9px;
    color: #777777;
    content: "|";
  }

  .unit-spec-print-meta strong {
    color: #000000;
    font-size: inherit;
  }

  .unit-spec-supply-summary {
    grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 0.62fr));
    gap: 4px;
    border: 1px solid #999999;
    border-left: 4px solid #666666;
    border-radius: 0;
    margin: 0 0 5px;
    padding: 4px 5px;
    background: #ffffff !important;
    break-inside: avoid;
  }

  .unit-spec-supply-summary div {
    padding: 0;
    background: transparent !important;
  }

  .unit-spec-supply-summary span {
    color: #333333;
    font-size: 7pt;
  }

  .unit-spec-supply-summary strong {
    color: #000000;
    font-size: 8.5pt;
  }

  .unit-spec-active-filter-print {
    display: block;
    border-bottom: 1px solid #999999;
    margin: -2px 0 5px;
    padding-bottom: 4px;
    color: #000000;
    font-size: 8.5pt;
    font-weight: 700;
  }

  .unit-spec-filter-empty {
    border: 1px solid #999999;
    border-radius: 0;
    margin-top: 6px;
    padding: 5px;
    background: #ffffff !important;
    color: #000000;
    font-size: 9pt;
  }

  .unit-spec-table {
    table-layout: fixed;
    font-size: 9.5pt;
    line-height: 1.18;
  }

  .unit-spec-table th,
  .unit-spec-table td {
    border-color: #777777;
    padding: 3px 5px;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
  }

  .unit-spec-table th {
    background: #eeeeee !important;
    color: #000000;
    font-size: 8.5pt;
    line-height: 1.1;
  }

  .unit-spec-table th:nth-child(1),
  .unit-spec-table td:nth-child(1) {
    width: 4.5%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }

  .unit-spec-table th:nth-child(2),
  .unit-spec-table td:nth-child(2) {
    width: 45%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .unit-spec-table th:nth-child(3),
  .unit-spec-table td:nth-child(3) {
    width: 11%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .unit-spec-table th:nth-child(4),
  .unit-spec-table td:nth-child(4) {
    width: 15.5%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .unit-spec-table th:nth-child(5),
  .unit-spec-table td:nth-child(5) {
    width: 6.5%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
  }

  .unit-spec-table th:nth-child(6),
  .unit-spec-table td:nth-child(6) {
    width: 6.5%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
  }

  .unit-spec-table th:nth-child(7),
  .unit-spec-table td:nth-child(7) {
    width: 11%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .unit-spec-col-number {
    width: 4.5%;
  }

  .unit-spec-col-name {
    width: 45%;
  }

  .unit-spec-col-manufacturer {
    width: 11%;
  }

  .unit-spec-col-article {
    width: 15.5%;
  }

  .unit-spec-col-quantity {
    width: 6.5%;
  }

  .unit-spec-col-unit {
    width: 6.5%;
  }

  .unit-spec-col-supply {
    width: 11%;
  }

  .unit-spec-cell-article {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .unit-spec-cell-quantity,
  .unit-spec-cell-unit {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
  }

  .supply-status-cell {
    min-width: 0;
  }

  .supply-status-badge {
    border-radius: 0;
    padding: 0;
    background: transparent !important;
    color: #000000 !important;
    font-size: inherit;
    font-weight: 700;
  }

  .supply-status-detail {
    display: none;
  }

  .supply-status-print-detail {
    display: block;
    margin-top: 1px;
    color: #333333;
    font-size: 7.5pt;
    line-height: 1.12;
  }

  .supply-row--warehouse,
  .supply-row--received,
  .supply-row--ordered,
  .supply-row--expected,
  .supply-row--matched,
  .supply-row--overdue,
  .supply-row--not_found,
  .supply-row--no_data {
    background: #ffffff !important;
  }

}

.order-work-screen .unit-tile::after {
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 28px;
  opacity: 0.16;
}

.consumables-screen {
  padding-bottom: calc(var(--sez-bottom-panel) + 36px);
}

.consumables-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
  align-items: start;
}

.consumables-picker,
.consumables-form-card,
.consumables-recent {
  padding: 20px;
}

.consumables-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.consumables-picker h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 28px;
  line-height: 1.1;
}

.consumables-search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(33, 48, 64, 0.12);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.96)),
    linear-gradient(90deg, rgba(11, 79, 159, 0.08), transparent 42%);
  box-shadow: var(--sez-shadow-soft);
}

.consumables-search-panel input {
  width: 100%;
  min-height: 52px;
  border: 2px solid rgba(31, 41, 55, 0.16);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--sez-navy);
  font: inherit;
  font-size: 20px;
}

.consumables-touch-keyboard {
  grid-column: 1 / -1;
}

.consumables-path,
.consumables-hint {
  border-left: 5px solid var(--sez-orange);
  border-radius: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff7e6;
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 800;
}

.consumables-hint {
  border-left-color: var(--sez-blue);
  background: var(--sez-blue-light);
  color: var(--sez-blue);
  font-size: 16px;
}

.consumables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.consumables-empty-search {
  grid-column: 1 / -1;
  border: 1px dashed rgba(33, 48, 64, 0.24);
  border-radius: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--sez-muted);
  font-size: 20px;
  font-weight: 800;
}

.consumable-tile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 96px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(11, 79, 159, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.92)),
    linear-gradient(90deg, rgba(255, 138, 0, 0.055), transparent 42%);
  color: var(--sez-navy);
  text-align: left;
  box-shadow: var(--sez-shadow-soft);
  cursor: pointer;
}

.consumable-tile:hover,
.consumable-tile:active,
.consumable-tile.is-selected {
  border-color: var(--sez-orange);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.16), var(--sez-shadow-soft);
  transform: translateY(-1px);
}

.consumable-thumb {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 79, 159, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.consumable-thumb img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.consumable-tile-text {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.consumable-tile-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.16;
}

.consumable-tile-meta {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.consumables-step-title {
  display: flex;
  min-height: 64px;
  align-items: center;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--sez-panel);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.consumables-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.consumables-manual[hidden] {
  display: none;
}

.consumables-form,
.consumables-manual label {
  display: grid;
  gap: 10px;
}

.consumables-form label,
.consumables-manual label {
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
}

.consumables-form input,
.consumables-form textarea,
.consumables-manual input,
.consumable-admin-actions input {
  width: 100%;
  border: 2px solid rgba(31, 41, 55, 0.16);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--sez-navy);
  font: inherit;
  font-size: 18px;
}

.consumable-number-keyboard {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(33, 48, 64, 0.24);
  border-radius: 14px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(22, 31, 45, 0.96), rgba(33, 48, 64, 0.96)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 9px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
}

.consumable-number-keyboard[hidden] {
  display: none;
}

.consumable-number-keyboard-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.consumable-number-keyboard-row:last-child {
  grid-template-columns: 1fr 1fr;
}

.consumable-number-keyboard button {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff, #e7eef6);
  color: var(--sez-navy);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.consumable-number-keyboard button:active {
  background: var(--sez-orange);
  color: #ffffff;
}

.selected-material {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 14px;
  background: var(--sez-blue-light);
}

.selected-material-body {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.selected-material span,
.selected-material small {
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.selected-material strong {
  color: var(--sez-navy);
  font-size: 22px;
  line-height: 1.18;
}

.selected-material-thumb {
  background: #ffffff;
}

.consumables-recent {
  margin-top: 18px;
}

.consumable-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.consumable-status.status-new {
  background: #fff3df;
  color: var(--sez-orange-dark);
}

.consumable-status.status-in_progress {
  background: var(--sez-blue-light);
  color: var(--sez-blue);
}

.consumable-status.status-done {
  background: #e8f8ee;
  color: #146c43;
}

.consumable-status.status-cancelled {
  background: #fff1f1;
  color: var(--sez-red);
}

.consumable-status.status-sent {
  background: #e8f8ee;
  color: #146c43;
}

.consumable-status.status-failed {
  background: #fff1f1;
  color: var(--sez-red);
}

.consumable-status.status-skipped {
  background: #eef2f7;
  color: var(--sez-steel);
}

.consumable-admin-actions {
  display: grid;
  min-width: 280px;
  gap: 8px;
}

.consumable-admin-actions .toolbar-button {
  min-height: 42px;
  padding: 7px 10px;
  font-size: 15px;
}

.catalog-admin-details summary {
  width: fit-content;
  cursor: pointer;
}

.catalog-admin-form,
.catalog-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
  align-items: end;
}

.catalog-admin-form label,
.catalog-filter-form label,
.catalog-inline-form {
  display: grid;
  gap: 7px;
}

.catalog-admin-form input,
.catalog-admin-form select,
.catalog-filter-form input,
.catalog-filter-form select,
.catalog-inline-form input,
.catalog-inline-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(33, 48, 64, 0.2);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
}

.catalog-image-picker {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.catalog-image-preview,
.consumable-catalog-visual {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 10px;
  background: #ffffff;
}

.catalog-image-preview img,
.consumable-catalog-visual img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.order-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.order-folder-actions {
  display: flex;
  max-width: min(100%, 560px);
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.order-folder-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-folder-button {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 16px;
  line-height: 1.1;
}

.order-folder-copy-button {
  border-color: rgba(11, 79, 159, 0.32);
  background: #ffffff;
  color: var(--sez-blue);
}

.order-folder-path,
.order-folder-status {
  max-width: 520px;
  margin: 0;
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.order-folder-status {
  min-height: 16px;
  color: var(--sez-green);
}

.order-folder-status:empty {
  display: none;
}

.order-folder-status.is-warning {
  color: var(--sez-orange);
}

.order-folder-status.is-error {
  color: var(--sez-red);
}

.admin-status-screen {
  padding-bottom: 40px;
}

.admin-status-card h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 28px;
}

.admin-status-bulk-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.admin-status-bulk-form > label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.admin-status-bulk-form input[type="text"],
.admin-status-bulk-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 17px;
}

.admin-status-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.admin-status-checkbox input {
  width: 22px;
  height: 22px;
}

.admin-status-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-status-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.admin-status-filter-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.admin-status-filter-form input[type="search"],
.admin-status-filter-form select,
.admin-cabinet-status-table input[type="text"],
.admin-cabinet-status-table select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 9px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 16px;
}

.admin-status-filter-form .admin-status-checkbox {
  align-self: center;
}

.admin-status-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-employee-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-employee-filter a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(33, 48, 64, 0.16);
  border-radius: 10px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--sez-slate);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.admin-employee-filter a span {
  margin-left: 7px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #edf2f7;
  color: var(--sez-muted);
  font-size: 13px;
}

.admin-employee-filter a.is-active {
  border-color: rgba(11, 79, 159, 0.32);
  background: var(--sez-blue-light);
  color: var(--sez-blue);
}

.admin-employee-filter a.is-active span {
  background: #ffffff;
  color: var(--sez-blue);
}

.admin-status-table-wrap {
  margin-top: 4px;
}

.admin-status-table {
  min-width: 1450px;
}

.admin-cabinet-status-table {
  min-width: 1900px;
}

.admin-status-table td {
  vertical-align: top;
}

.admin-status-table td > strong,
.admin-status-table td > span,
.admin-status-table td > small {
  display: block;
}

.admin-status-table td > span,
.admin-status-table td > small {
  color: var(--sez-muted);
  font-weight: 700;
}

.admin-status-unit-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sez-navy);
  font-weight: 900;
}

.admin-status-unit-check input {
  width: 24px;
  height: 24px;
}

.admin-status-flag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef2f6;
  color: var(--sez-muted);
  font-weight: 900;
}

.admin-status-flag.active {
  background: #e6f6ed;
  color: var(--sez-green);
}

.admin-status-flag.inactive {
  background: #fee2e2;
  color: #b42318;
}

.notification-recipient-table {
  min-width: 1680px;
}

.notification-recipient-form {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 150px minmax(170px, 1fr) minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.notification-recipient-form input[type="text"],
.notification-recipient-form select {
  min-height: 42px;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--sez-navy);
  font: inherit;
  font-weight: 800;
}

.notification-recipient-form.target-type-chat input[name="max_chat_id"],
.notification-recipient-form.target-type-user input[name="max_user_id"] {
  border-color: rgba(18, 129, 74, 0.45);
  background: #f0fdf4;
}

.max-chat-instruction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.max-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.max-chat-actions .danger-button {
  background: #7f1d1d;
  color: #fff;
  border-color: rgba(127, 29, 29, 0.35);
}

.max-chat-steps {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--sez-muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.notification-test-inline,
.max-chat-assign-form,
.max-chat-group-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-test-inline select,
.max-chat-assign-form select,
.max-chat-group-form select {
  min-height: 44px;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 8px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-weight: 900;
}

.max-chat-group-form {
  flex-wrap: wrap;
}

.notification-test-inline select {
  min-width: min(520px, 100%);
}

.max-chat-table {
  min-width: 1380px;
}

.max-chat-diagnostics {
  margin-top: 16px;
  border-top: 1px solid rgba(33, 48, 64, 0.12);
  padding-top: 14px;
}

.max-chat-raw-details {
  margin-top: 12px;
  border: 1px solid rgba(33, 48, 64, 0.14);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.max-chat-raw-details summary {
  cursor: pointer;
  color: var(--sez-navy);
  font-weight: 900;
}

.max-chat-raw-details pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
  font-size: 13px;
}

.max-chat-message {
  max-width: 360px;
  color: var(--sez-muted);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-status-screen {
  padding-bottom: 44px;
}

.system-status-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  border-left: 7px solid var(--sez-green);
}

.system-status-summary h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 34px;
}

.system-status-summary p {
  margin: 0;
  color: var(--sez-muted);
  font-size: 18px;
  font-weight: 800;
}

.system-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.system-status-card {
  display: grid;
  gap: 13px;
  align-content: start;
  border-left: 7px solid var(--sez-green);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 250, 0.96)),
    repeating-linear-gradient(135deg, rgba(33, 48, 64, 0.04) 0 1px, transparent 1px 10px);
}

.system-status-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.system-status-card h2 {
  margin: 0;
  color: var(--sez-navy);
  font-size: 27px;
  line-height: 1.12;
}

.system-status-message {
  margin: 0;
  color: var(--sez-slate);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.36;
}

.system-status-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: #e6f6ed;
  color: var(--sez-green);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.system-status-badge--warning {
  background: #fff7db;
  color: #9a5b00;
}

.system-status-badge--error {
  background: #fee2e2;
  color: #b42318;
}

.system-status-badge--disabled {
  background: #eef2f6;
  color: var(--sez-muted);
}

.system-status--warning {
  border-left-color: #f59e0b;
}

.system-status--error {
  border-left-color: #dc2626;
}

.system-status--disabled {
  border-left-color: #94a3b8;
}

.system-status-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
  margin: 0;
}

.system-status-details div {
  border: 1px solid rgba(33, 48, 64, 0.1);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.system-status-details dt {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.system-status-details dd {
  margin: 4px 0 0;
  color: var(--sez-navy);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.service-control-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-control-actions-card {
  display: grid;
  gap: 14px;
}

.service-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-control-actions form {
  margin: 0;
}

.service-control-check {
  display: inline-flex;
  max-width: 100%;
  border-radius: 8px;
  padding: 4px 8px;
  background: #eef2f7;
  color: #334155;
}

.service-control-check--ok {
  background: #dcfce7;
  color: #166534;
}

.service-control-check--warning {
  background: #fef3c7;
  color: #92400e;
}

.service-control-check--error {
  background: #fee2e2;
  color: #991b1b;
}

.service-control-details {
  margin-top: 8px;
  max-width: 100%;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.service-control-details summary {
  cursor: pointer;
  color: var(--sez-blue);
  font-weight: 850;
}

.service-control-details pre {
  max-height: 220px;
  margin: 8px 0 0;
  overflow: auto;
  border-radius: 8px;
  padding: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.service-control-agent-card {
  border-left: 5px solid var(--sez-blue);
}

.service-control-warning {
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.admin-hint-list {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--sez-navy);
  font-weight: 750;
  line-height: 1.5;
}

.service-control-log-table td {
  max-width: 360px;
  vertical-align: top;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .service-control-grid {
    grid-template-columns: 1fr;
  }
}

.admin-employees-screen {
  padding-bottom: 40px;
}

.admin-employee-create {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.admin-employee-create h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 28px;
}

.admin-employee-form,
.admin-employee-row-form {
  display: grid;
  gap: 10px;
}

.admin-employee-form {
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.65fr) minmax(160px, 0.55fr) auto auto;
  align-items: end;
}

.admin-employee-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.admin-employee-form input,
.admin-employee-row-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 9px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 16px;
}

.admin-employee-checkbox {
  min-height: 44px;
}

.admin-employee-checkbox input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
}

.admin-employees-table {
  min-width: 1580px;
}

.admin-employees-table td {
  vertical-align: top;
}

.admin-employees-table tr.is-muted {
  opacity: 0.68;
}

.admin-employees-table code {
  display: inline-block;
  border-radius: 8px;
  padding: 4px 7px;
  background: #eef2f6;
  color: var(--sez-slate);
  font-weight: 800;
}

.admin-employees-table small {
  color: var(--sez-muted);
  font-weight: 700;
}

.admin-employee-row-form {
  min-width: 260px;
}

.admin-employees-table td form {
  margin: 0;
}

.admin-rates-screen,
.assembly-economics-screen {
  padding-bottom: 40px;
}

.admin-rate-create {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(360px, 1.5fr);
  gap: 18px;
  align-items: start;
}

.admin-rate-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.5fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-rate-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.admin-rate-form input,
.admin-rate-form select,
.assembly-economics-screen input,
.assembly-economics-screen select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 9px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 16px;
}

.admin-rate-comment {
  grid-column: span 2;
}

.employee-schedule-form {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.employee-schedule-weekdays {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.employee-schedule-weekdays legend {
  padding: 0 6px;
  color: var(--sez-navy);
  font-weight: 900;
}

.employee-schedule-weekdays label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.admin-rate-checkbox input[type="checkbox"],
.employee-schedule-weekdays input[type="checkbox"],
.assembly-economics-screen input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
}

.admin-rates-table {
  min-width: 980px;
}

.admin-rates-table tr.is-muted,
.assembly-economics-table tr.is-muted {
  opacity: 0.68;
}

.assembly-economics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.assembly-economics-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(14, 27, 43, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.assembly-economics-summary span {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.assembly-economics-summary strong {
  color: var(--sez-navy);
  font-size: 24px;
  font-weight: 950;
}

.assembly-economics-summary article.is-warning {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fff7ed;
}

.assembly-economics-table {
  min-width: 1380px;
}

.assembly-economics-table tr.is-overrun {
  background: #fff1f2;
}

.assembly-economics-person,
.assembly-economics-warning {
  display: block;
  width: fit-content;
  margin: 2px 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 800;
}

.assembly-economics-warning {
  background: #fff7ed;
  color: #9a3412;
}

.assembly-economics-card {
  display: grid;
  gap: 16px;
}

.assembly-economics-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.assembly-economics-unit-list {
  display: grid;
  gap: 14px;
}

.assembly-economics-unit {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(14, 27, 43, 0.12);
  border-left: 7px solid rgba(22, 163, 74, 0.55);
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.assembly-economics-unit.is-overrun {
  border-left-color: rgba(220, 38, 38, 0.7);
  background: #fff7f7;
}

.assembly-economics-unit header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.assembly-economics-unit header strong {
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 950;
}

.assembly-economics-unit header span {
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef2f6;
  color: var(--sez-slate);
  font-weight: 850;
}

.assembly-economics-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}

.assembly-economics-metrics div {
  border: 1px solid rgba(14, 27, 43, 0.1);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.assembly-economics-metrics dt {
  color: var(--sez-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.assembly-economics-metrics dd {
  margin: 4px 0 0;
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 950;
}

.assembly-economics-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assembly-economics-warnings span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 850;
}

.assembly-economics-detail-scroll {
  max-width: 100%;
}

.assembly-economics-detail-table {
  min-width: 720px;
}

.assembly-economics-detail-table tr.is-warning {
  background: #fff7ed;
}

.schedule-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  background:
    linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(255, 255, 255, 0.9));
  color: #075985;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.schedule-mode-badge.mode-extended {
  border-color: rgba(249, 115, 22, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(255, 247, 237, 0.92));
  color: #9a3412;
}

.home-hero .schedule-mode-badge {
  margin-top: 10px;
}

.terminal-header .schedule-mode-badge {
  margin-top: 10px;
}

.work-schedule-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
}

.work-schedule-current h2,
.work-schedule-actions h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 30px;
}

.work-schedule-actions {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(340px, 1.5fr);
  gap: 18px;
}

.work-schedule-form {
  display: grid;
  gap: 14px;
}

.work-schedule-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.work-schedule-form input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 17px;
}

.work-schedule-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.work-schedule-table {
  min-width: 980px;
}

.work-schedule-table small {
  display: block;
  margin-top: 4px;
  color: var(--sez-muted);
  font-weight: 700;
}

.attendance-screen {
  padding-bottom: 160px;
}

.attendance-panel {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
}

.attendance-panel h2 {
  margin: 0 0 14px;
  color: var(--sez-navy);
  font-size: 32px;
}

.attendance-actions {
  display: grid;
  gap: 12px;
  min-width: 280px;
}

.attendance-actions form {
  margin: 0;
}

.attendance-button {
  width: 100%;
  min-height: 64px;
  justify-content: center;
  font-size: 18px;
}

.attendance-interval-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.attendance-interval {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(33, 48, 64, 0.14);
  border-left: 5px solid var(--sez-green);
  border-radius: 14px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.92));
  color: var(--sez-navy);
  font-weight: 800;
}

.attendance-interval strong {
  color: var(--sez-green);
  font-size: 20px;
}

.attendance-interval em {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(249, 115, 22, 0.12);
  color: #9a3412;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.attendance-admin-create {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.5fr);
  gap: 20px;
  align-items: start;
}

.attendance-admin-create h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 28px;
}

.attendance-admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
}

.attendance-admin-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.attendance-timesheet-card {
  display: block;
}

.attendance-timesheet-details {
  display: grid;
  gap: 14px;
}

.attendance-timesheet-summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.attendance-timesheet-summary::-webkit-details-marker {
  display: none;
}

.attendance-timesheet-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.attendance-timesheet-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.attendance-timesheet-employees {
  grid-column: span 2;
}

.attendance-timesheet-employees small {
  color: var(--sez-muted);
  font-weight: 700;
}

.attendance-admin-form input,
.attendance-admin-form select,
.attendance-timesheet-form input,
.attendance-timesheet-form select,
.admin-status-filter-form input[type="date"],
.admin-status-filter-form input[type="datetime-local"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(33, 48, 64, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 17px;
}

.attendance-table {
  min-width: 1180px;
}

.attendance-table td:last-child {
  max-width: 360px;
  white-space: normal;
}

.attendance-import-upload {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.4fr);
  gap: 20px;
  align-items: center;
}

.attendance-import-upload h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 28px;
}

.attendance-import-form {
  display: grid;
  gap: 14px;
}

.attendance-import-form label {
  display: grid;
  gap: 7px;
  color: var(--sez-navy);
  font-weight: 800;
}

.attendance-import-form input[type="file"] {
  width: 100%;
  min-height: 52px;
  border: 1px dashed rgba(33, 48, 64, 0.34);
  border-radius: 10px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
}

.attendance-import-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attendance-import-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.attendance-import-summary .metric-tile {
  display: grid;
  gap: 5px;
  min-height: 88px;
  align-content: center;
  border-left: 5px solid var(--sez-orange);
  background: linear-gradient(135deg, #ffffff, #f3f6f8);
}

.attendance-import-summary .metric-tile strong {
  color: var(--sez-navy);
  font-size: 28px;
}

.attendance-import-summary .metric-tile span {
  color: var(--sez-muted);
  font-weight: 800;
}

.guard-light-panel {
  display: grid;
  gap: 16px;
}

.guard-light-file-path {
  display: grid;
  gap: 6px;
  color: var(--sez-navy);
  font-weight: 800;
}

.guard-light-file-path code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid rgba(33, 48, 64, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--sez-slate);
  font-size: 15px;
  line-height: 1.35;
}

.guard-light-summary {
  margin-top: 0;
}

.guard-light-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.guard-light-actions p {
  margin: 0;
  color: var(--sez-muted);
  font-weight: 700;
}

.guard-light-error {
  margin: 0;
}

.guard-light-run-table {
  min-width: 1180px;
}

.guard-light-run-table td:last-child {
  max-width: 420px;
  white-space: normal;
}

.attendance-import-tags,
.attendance-import-diagnostics {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.attendance-import-tags {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.attendance-import-tag {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-left: 5px solid var(--sez-orange);
  border-radius: 10px;
  padding: 11px 13px;
  background: #fff7ed;
  color: var(--sez-navy);
  font-weight: 700;
}

.ignored-rfid-inline-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.ignored-rfid-inline-form input {
  min-height: 40px;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--sez-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.attendance-import-diagnostics {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.attendance-import-diagnostics > div {
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid rgba(33, 48, 64, 0.14);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.attendance-import-diagnostics strong {
  color: var(--sez-navy);
  font-size: 17px;
}

.attendance-import-diagnostics span {
  color: var(--sez-muted);
  font-weight: 700;
}

.attendance-import-table {
  min-width: 1380px;
}

.attendance-report-status {
  display: inline-flex;
  max-width: 260px;
  align-items: center;
  border: 1px solid rgba(33, 48, 64, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f6;
  color: var(--sez-slate);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
}

.attendance-report-cell {
  display: grid;
  gap: 5px;
  min-width: 200px;
}

.attendance-report-cell small {
  color: var(--sez-muted);
  font-weight: 800;
}

.attendance-report-status.mode-attendance,
.attendance-report-status.mode-ok {
  border-color: rgba(23, 160, 93, 0.32);
  background: #e8f7ef;
  color: #0f6b45;
}

.attendance-report-status.mode-gaps {
  border-color: rgba(249, 115, 22, 0.36);
  background: #fff7ed;
  color: #9a3412;
}

.attendance-report-status.mode-fallback,
.attendance-report-status.mode-disabled,
.attendance-report-status.mode-no_data {
  border-color: rgba(100, 116, 139, 0.3);
  background: #f1f5f9;
  color: #475569;
}

.attendance-metric-source {
  font-size: 18px !important;
  line-height: 1.25;
}

.report-table {
  min-width: 1640px;
}

.assembler-detail-table {
  min-width: 1900px;
}

.assembler-panel.needs-selection {
  box-shadow:
    0 -8px 24px rgba(46, 204, 113, 0.28),
    0 0 0 3px rgba(46, 204, 113, 0.55) inset;
}

.catalog-actions-cell {
  min-width: 220px;
}

.catalog-actions-cell form,
.catalog-edit-details {
  margin: 0 0 8px;
}

.catalog-inline-form {
  min-width: 280px;
  margin-top: 8px;
}

.admin-login-page {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
}

.admin-login-card {
  width: min(620px, 100%);
  padding: 26px;
}

.admin-login-card h1 {
  margin: 0 0 8px;
}

.admin-login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.external-access-page {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.external-access-card {
  width: min(680px, 100%);
  padding: clamp(24px, 4vw, 38px);
}

.external-access-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
}

.external-access-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--sez-muted);
  font-size: 22px;
}

.external-access-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.external-pin-input {
  min-height: 60px;
  font-size: 30px;
  letter-spacing: 0.16em;
  text-align: center;
}

.assembler-buttons {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.assembler-button {
  min-width: 0;
  white-space: normal;
}

.home-links .warehouse-action-card::before {
  background: linear-gradient(#17a05d, var(--sez-blue));
}

.warehouse-screen {
  display: grid;
  gap: 22px;
}

.warehouse-header {
  align-items: start;
}

.warehouse-create-card,
.warehouse-pick-actions,
.warehouse-summary-strip {
  display: grid;
  gap: 18px;
}

.warehouse-create-card {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.warehouse-create-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: end;
  justify-content: space-between;
}

.warehouse-create-head p:last-child {
  max-width: 760px;
  font-weight: 800;
}

.warehouse-create-card h2,
.warehouse-task-column h2,
.warehouse-diagnostics h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
  font-size: 30px;
}

.warehouse-create-card p,
.warehouse-inbound-placeholder p,
.warehouse-diagnostics p {
  margin: 0;
  color: var(--sez-muted);
  line-height: 1.35;
}

.warehouse-putaway-create {
  border-left: 7px solid #2f9fb3;
}

.warehouse-preview-panel {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.warehouse-putaway-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(240px, 340px) auto;
  gap: 12px;
  align-items: end;
}

.warehouse-putaway-create-form label {
  display: grid;
  gap: 6px;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 900;
}

.warehouse-putaway-create-form input,
.warehouse-putaway-create-form select {
  min-height: 52px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--sez-text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
}

.warehouse-order-grid,
.warehouse-task-list {
  display: grid;
  gap: 14px;
}

.warehouse-order-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.warehouse-inventory-teaser,
.warehouse-inventory-filters,
.warehouse-inventory-update,
.warehouse-inventory-aliases,
.warehouse-inventory-history {
  border-left: 7px solid var(--sez-blue);
}

.warehouse-inventory-teaser {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
}

.warehouse-inventory-teaser h2,
.warehouse-inventory-update h2,
.warehouse-inventory-aliases h2,
.warehouse-inventory-history h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
}

.warehouse-inventory-teaser p,
.warehouse-inventory-update p {
  margin: 0;
  color: var(--sez-muted);
  line-height: 1.35;
}

.warehouse-inventory-mini,
.warehouse-alias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-inventory-mini span,
.warehouse-alias-list span {
  border-radius: 999px;
  padding: 8px 11px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-weight: 900;
}

.warehouse-inventory-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.warehouse-inventory-filters form,
.warehouse-inventory-update form {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.warehouse-inventory-update form {
  grid-template-columns: minmax(220px, 320px) minmax(300px, 1fr) auto;
}

.warehouse-inventory-filters label,
.warehouse-inventory-update label {
  display: grid;
  gap: 6px;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 900;
}

.warehouse-inventory-filters input,
.warehouse-inventory-filters select,
.warehouse-inventory-update input,
.warehouse-inventory-update textarea {
  min-height: 52px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--sez-text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
}

.warehouse-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.warehouse-inventory-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(213, 224, 234, 0.9);
  border-left: 7px solid #92a2b3;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  color: var(--sez-text);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(25, 44, 65, 0.08);
}

.warehouse-inventory-card.status-ok,
.warehouse-inventory-item-head.status-ok {
  border-left-color: var(--sez-success);
}

.warehouse-inventory-card.status-low,
.warehouse-inventory-item-head.status-low {
  border-left-color: var(--sez-danger);
}

.warehouse-inventory-card.status-check,
.warehouse-inventory-item-head.status-check {
  border-left-color: var(--sez-warning);
}

.warehouse-inventory-card.status-no_data,
.warehouse-inventory-item-head.status-no_data {
  border-left-color: #7b8794;
}

.warehouse-inventory-card strong {
  color: var(--sez-navy);
  font-size: 19px;
  line-height: 1.22;
}

.warehouse-inventory-material,
.warehouse-inventory-status,
.warehouse-inventory-size {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f2f6fb;
  color: var(--sez-muted);
  font-weight: 900;
}

.warehouse-inventory-size {
  background: #e7f1ff;
  color: var(--sez-blue);
}

.warehouse-inventory-status {
  background: #eef4f8;
  color: var(--sez-navy);
}

.warehouse-inventory-card dl,
.warehouse-inventory-item-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-inventory-card dl {
  margin: 0;
}

.warehouse-inventory-card dl div,
.warehouse-inventory-item-head div {
  display: grid;
  gap: 4px;
  border-radius: 10px;
  padding: 10px;
  background: #f7fafc;
}

.warehouse-inventory-card dt,
.warehouse-inventory-item-head span {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
}

.warehouse-inventory-card dd,
.warehouse-inventory-item-head strong {
  margin: 0;
  color: var(--sez-navy);
  font-size: 18px;
  font-weight: 900;
}

.warehouse-inventory-history-table {
  min-width: 980px;
}

.warehouse-inventory-hint {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border-left: 5px solid #7b8794;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f6f8fa;
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 800;
}

.warehouse-inventory-hint.status-ok {
  border-left-color: var(--sez-success);
}

.warehouse-inventory-hint.status-low {
  border-left-color: var(--sez-danger);
  background: #fff0f0;
}

.warehouse-inventory-hint.status-check {
  border-left-color: var(--sez-warning);
  background: #fff8df;
}

.warehouse-inventory-hint.status-no_data {
  border-left-color: #7b8794;
}

.warehouse-order-admin-form {
  display: grid;
  gap: 8px;
}

.warehouse-order-admin-form select {
  min-height: 44px;
  border: 2px solid var(--sez-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--sez-text);
  font: inherit;
  font-weight: 800;
}

.warehouse-order-card,
.warehouse-task-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(213, 224, 234, 0.94);
  border-left: 7px solid var(--sez-accent);
  border-radius: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 250, 0.96)),
    var(--sez-card);
  box-shadow: var(--sez-shadow-soft);
}

.warehouse-order-card strong,
.warehouse-task-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sez-navy);
  font-size: 20px;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.warehouse-order-number {
  display: block;
  margin-bottom: 5px;
  color: var(--sez-blue);
  font-size: 18px;
  font-weight: 900;
}

.warehouse-task-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.warehouse-task-column {
  min-width: 0;
}

.warehouse-task-column.is-completed {
  align-self: start;
}

.warehouse-task-column.is-completed .warehouse-task-list {
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 5px;
}

.warehouse-done-search {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 900;
}

.warehouse-done-search input {
  min-height: 44px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--sez-text);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}

.warehouse-done-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.warehouse-task-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-putaway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-putaway-actions form {
  margin: 0;
}

.warehouse-status-badge,
.warehouse-line-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.warehouse-task-card.status-in_progress {
  border-left-color: var(--sez-blue);
}

.warehouse-task-card.status-completed,
.warehouse-task-card.status-sent_to_supply {
  border-left-color: var(--sez-success);
}

.warehouse-task-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
}

.warehouse-task-progress .supply-progress {
  grid-column: 1 / -1;
}

.warehouse-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 800;
}

.warehouse-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.warehouse-small-action {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
}

.warehouse-pick-actions {
  position: sticky;
  top: 104px;
  z-index: 20;
  grid-template-columns: minmax(280px, 1fr) repeat(6, auto);
  align-items: center;
  border-left: 7px solid var(--sez-blue);
}

.warehouse-progress-wide {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  color: var(--sez-muted);
  font-weight: 900;
}

.warehouse-progress-wide .supply-progress {
  grid-column: 1 / -1;
}

.warehouse-complete-button {
  border-color: var(--sez-success);
  background: var(--sez-success);
  color: #ffffff;
}

.warehouse-diagnostics {
  border-left: 7px solid var(--sez-warning);
}

.warehouse-admin-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(5, minmax(170px, auto));
  gap: 14px;
  align-items: end;
  border-left: 7px solid #66788a;
}

.warehouse-admin-panel h2 {
  margin: 0 0 8px;
  color: var(--sez-navy);
}

.warehouse-admin-panel p {
  margin: 0;
  color: var(--sez-muted);
  line-height: 1.35;
}

.warehouse-admin-form {
  display: grid;
  gap: 8px;
}

.warehouse-admin-form label {
  display: grid;
  gap: 6px;
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 900;
}

.warehouse-admin-form select {
  min-height: 50px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--sez-text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
}

.warehouse-cancel-button {
  border-color: var(--sez-warning);
  background: #fff7e8;
  color: #8a4b00;
}

.warehouse-delete-button {
  border-color: var(--sez-danger);
  background: var(--sez-danger);
  color: #ffffff;
}

.warehouse-summary-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.warehouse-summary-strip div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(213, 224, 234, 0.9);
  border-radius: 12px;
  padding: 14px;
  background: #f7fafc;
}

.warehouse-summary-strip span {
  color: var(--sez-muted);
  font-size: 15px;
  font-weight: 800;
}

.warehouse-summary-strip strong {
  color: var(--sez-navy);
  font-size: 32px;
}

.warehouse-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-table-wrap {
  overflow-x: auto;
}

.warehouse-pick-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
  table-layout: fixed;
}

.warehouse-pick-table th,
.warehouse-pick-table td {
  border-bottom: 1px solid rgba(213, 224, 234, 0.9);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.warehouse-pick-table th {
  background: #e9f0f8;
  color: var(--sez-navy);
  font-size: 15px;
  font-weight: 900;
}

.warehouse-pick-table td {
  font-size: 15px;
  line-height: 1.3;
}

.warehouse-pick-table th:nth-child(1),
.warehouse-pick-table td:nth-child(1) {
  width: 54px;
}

.warehouse-pick-table th:nth-child(2),
.warehouse-pick-table td:nth-child(2) {
  width: 150px;
}

.warehouse-pick-table th:nth-child(3),
.warehouse-pick-table td:nth-child(3) {
  width: 360px;
}

.warehouse-pick-table th:nth-child(4),
.warehouse-pick-table td:nth-child(4) {
  width: 170px;
}

.warehouse-pick-table th:nth-child(5),
.warehouse-pick-table td:nth-child(5),
.warehouse-pick-table th:nth-child(6),
.warehouse-pick-table td:nth-child(6),
.warehouse-pick-table th:nth-child(7),
.warehouse-pick-table td:nth-child(7),
.warehouse-pick-table th:nth-child(8),
.warehouse-pick-table td:nth-child(8) {
  width: 82px;
}

.warehouse-pick-table th:nth-child(10),
.warehouse-pick-table td:nth-child(10) {
  width: 330px;
}

.warehouse-line-status-full {
  background: #f1fbf5;
}

.warehouse-line-status-done {
  background: #f1fbf5;
}

.warehouse-line-status-full.warehouse-line-low-stock {
  background: #fff8df;
}

.warehouse-line-status-partial {
  background: #fff7e8;
}

.warehouse-line-status-none {
  background: #fff0f0;
}

.warehouse-line-status-not_found {
  background: #fff0f0;
}

.warehouse-line-status-skipped {
  background: #f4f6f8;
}

.warehouse-pick-line,
.warehouse-all-checked {
  scroll-margin-top: 180px;
}

.warehouse-line-sources {
  margin-top: 6px;
  color: var(--sez-muted);
  font-size: 13px;
}

.warehouse-line-sources span {
  display: block;
}

.warehouse-photo-link,
.warehouse-step-photo-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.warehouse-comment-badge {
  display: inline-flex;
  width: fit-content;
  margin: 6px 0 4px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-size: 12px;
  font-weight: 900;
}

.warehouse-print-meta {
  display: none;
}

.warehouse-print-summary {
  display: none;
}

.warehouse-line-actions,
.warehouse-line-action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.warehouse-line-action-form {
  grid-column: 1 / -1;
}

.warehouse-line-button,
.warehouse-step-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.warehouse-line-button.low-stock,
.warehouse-step-button.low-stock {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  line-height: 1.06;
}

.warehouse-line-button.full,
.warehouse-step-button.full {
  background: var(--sez-success);
}

.warehouse-line-button.low-stock,
.warehouse-step-button.low-stock,
.warehouse-line-badge.is-low-stock {
  background: #f4b63e;
  color: #1c2733;
}

.warehouse-line-button.none,
.warehouse-step-button.none {
  background: var(--sez-danger);
}

.warehouse-line-button.partial,
.warehouse-step-button.partial {
  background: var(--sez-warning);
  color: #1c2733;
}

.warehouse-line-button.skip,
.warehouse-step-button.skip {
  background: #66788a;
}

.warehouse-line-button:disabled,
.warehouse-step-button:disabled,
.warehouse-step-screen.is-warehouse-step-cooling .warehouse-step-button {
  opacity: 0.58;
  cursor: wait;
  filter: grayscale(0.12);
}

.warehouse-partial-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.warehouse-line-comment,
.warehouse-step-comment {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  color: var(--sez-muted);
  font-size: 14px;
  font-weight: 900;
}

.warehouse-line-comment textarea,
.warehouse-step-comment textarea {
  width: 100%;
  border: 2px solid var(--sez-border);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  resize: vertical;
}

.warehouse-step-comment summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--sez-border);
  border-radius: 12px;
  padding: 9px 12px;
  background: #f3f7fb;
  color: var(--sez-navy);
  cursor: pointer;
  list-style: none;
}

.warehouse-step-comment summary::-webkit-details-marker {
  display: none;
}

.warehouse-step-comment summary::after {
  color: var(--sez-blue);
  font-size: 18px;
  content: "+";
}

.warehouse-step-comment[open] summary::after {
  content: "-";
}

.warehouse-step-comment-preview {
  margin: 2px 0 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #e7f1ff;
  color: var(--sez-blue);
  font-size: 14px;
  line-height: 1.25;
}

.warehouse-partial-form input,
.warehouse-step-partial input {
  min-height: 48px;
  width: 100%;
  border: 2px solid var(--sez-border);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 800;
}

.warehouse-step-card {
  display: grid;
  gap: 24px;
  border: 1px solid rgba(213, 224, 234, 0.92);
  border-left: 8px solid var(--sez-accent);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(234, 242, 251, 0.96)),
    var(--sez-card);
  box-shadow: var(--sez-shadow);
}

.warehouse-step-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.warehouse-step-main-zone,
.warehouse-step-side-zone {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.warehouse-step-counter,
.warehouse-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.warehouse-step-order-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-step-order-button {
  min-height: 46px;
  padding: 9px 14px;
  font-size: 16px;
}

.warehouse-step-order-button.is-disabled {
  border-color: #c9d4df;
  background: #eef3f7;
  color: #7a8a99;
  cursor: default;
  opacity: 0.7;
  pointer-events: none;
}

.warehouse-step-counter span {
  color: var(--sez-muted);
  font-size: 22px;
  font-weight: 900;
}

.warehouse-step-counter strong {
  border-radius: 999px;
  padding: 9px 15px;
  background: #e7f1ff;
  color: var(--sez-blue);
}

.warehouse-step-item h2 {
  max-width: 1200px;
  margin: 8px 0 18px;
  color: var(--sez-navy);
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.08;
}

.warehouse-putaway-target-order {
  display: grid;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  border: 2px solid rgba(47, 159, 179, 0.28);
  border-left: 7px solid #2f9fb3;
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #effbff, #ffffff);
  color: var(--sez-navy);
}

.warehouse-putaway-target-order span {
  color: var(--sez-muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.warehouse-putaway-target-order strong {
  color: #083f73;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 0.98;
  font-weight: 950;
}

.warehouse-putaway-target-order small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.12;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.warehouse-step-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.warehouse-step-metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.warehouse-step-metrics-grid.is-putaway-step {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.warehouse-step-metrics div {
  display: grid;
  gap: 6px;
  border-radius: 14px;
  padding: 16px;
  background: #f3f7fb;
}

.warehouse-step-metrics span {
  color: var(--sez-muted);
  font-size: 16px;
  font-weight: 800;
}

.warehouse-step-metrics strong {
  color: var(--sez-navy);
  font-size: 24px;
  word-break: break-word;
}

.warehouse-step-metrics-grid div {
  min-width: 0;
  padding: 10px 12px;
}

.warehouse-step-metrics-grid span {
  font-size: 12px;
  line-height: 1.12;
  text-transform: uppercase;
}

.warehouse-step-metrics-grid strong {
  font-size: 17px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.warehouse-step-inventory {
  display: grid;
  gap: 7px;
  border: 2px solid #d5e7f8;
  border-left: 5px solid var(--sez-blue);
  border-radius: 12px;
  padding: 9px 10px;
  background: #f3f9ff;
}

.warehouse-step-inventory.status-ok {
  border-color: #b9e7c9;
  border-left-color: var(--sez-success);
  background: #f1fbf5;
}

.warehouse-step-inventory.status-low {
  border-color: #f1d18a;
  border-left-color: #f4b63e;
  background: #fff8df;
}

.warehouse-step-inventory.status-check {
  border-color: #f1c28a;
  border-left-color: var(--sez-warning);
  background: #fff7e8;
}

.warehouse-step-inventory.status-no_data {
  border-color: #d3dce6;
  border-left-color: #66788a;
  background: #f4f6f8;
}

.warehouse-step-inventory span,
.warehouse-step-inventory dt {
  color: var(--sez-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-step-inventory strong {
  color: var(--sez-navy);
  font-size: 18px;
  line-height: 1.08;
}

.warehouse-step-inventory dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.warehouse-step-inventory dt,
.warehouse-step-inventory dd {
  margin: 0;
}

.warehouse-step-inventory dd {
  color: var(--sez-navy);
  font-size: 14px;
  font-weight: 900;
}

.warehouse-step-inventory p {
  margin: 0;
  color: #8a4b00;
  font-size: 12px;
  font-weight: 900;
}

.warehouse-step-inventory-head {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.warehouse-step-inventory-foot {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.warehouse-step-inventory-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sez-navy) !important;
}

.warehouse-step-inventory-link {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sez-blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.warehouse-putaway-source-card {
  border-left-color: #2f9fb3;
}

.warehouse-step-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.warehouse-step-comment {
  font-size: 17px;
}

.warehouse-step-comment textarea {
  min-height: 96px;
  font-size: 20px;
}

.warehouse-step-button {
  min-height: 86px;
  font-size: 24px;
}

.warehouse-step-partial {
  display: grid;
  gap: 8px;
}

.warehouse-step-partial label {
  display: grid;
  gap: 6px;
  color: var(--sez-muted);
  font-size: 17px;
  font-weight: 900;
}

.warehouse-compare-summary,
.warehouse-compare-grid {
  display: grid;
  gap: 16px;
}

.warehouse-compare-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.warehouse-compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.warehouse-supply-order-table {
  min-width: 980px;
}

.warehouse-muted-row {
  background: #f3f4f6;
  color: #66788a;
}

.warehouse-compare-table th,
.warehouse-compare-table td {
  border-bottom: 1px solid rgba(213, 224, 234, 0.9);
  padding: 8px 7px;
  text-align: left;
  vertical-align: top;
}

.warehouse-aggregate-details {
  border-bottom: 1px solid rgba(213, 224, 234, 0.9);
  padding: 10px 0;
}

.warehouse-aggregate-details summary {
  color: var(--sez-navy);
  font-weight: 900;
  cursor: pointer;
}

.warehouse-aggregate-details p {
  margin: 6px 0 0;
  color: var(--sez-muted);
}

.warehouse-print-only {
  display: none;
}

@media (max-width: 1366px) and (max-height: 900px) {
  body:has(.warehouse-screen) .app-topbar {
    min-height: 54px;
    gap: 12px;
    padding: 6px 14px;
  }

  body:has(.warehouse-screen) .brand {
    gap: 9px;
  }

  body:has(.warehouse-screen) .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
  }

  body:has(.warehouse-screen) .brand-mark img {
    max-width: 34px;
    max-height: 34px;
  }

  body:has(.warehouse-screen) .brand-copy strong {
    font-size: 16px;
  }

  body:has(.warehouse-screen) .brand-copy small {
    display: none;
  }

  body:has(.warehouse-screen) .top-nav {
    gap: 6px;
  }

  body:has(.warehouse-screen) .top-nav-link {
    min-height: 34px;
    border-radius: 9px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .warehouse-screen {
    gap: 12px;
    padding: 16px 14px calc(var(--sez-bottom-panel) + 24px);
  }

  .warehouse-header {
    gap: 12px;
    margin-bottom: 4px;
    padding: 8px 12px;
  }

  .warehouse-header h1 {
    font-size: clamp(24px, 2.5vw, 32px);
  }

  .warehouse-header .compact-order-title {
    font-size: 13px;
    line-height: 1.2;
  }

  .warehouse-pick-actions {
    top: 76px;
    grid-template-columns: minmax(220px, 1fr) repeat(3, auto);
    gap: 8px;
    padding: 10px 12px;
    border-left-width: 5px;
  }

  .warehouse-pick-actions .toolbar-button,
  .warehouse-pick-actions .toolbar-link {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .warehouse-progress-wide {
    gap: 3px 8px;
    font-size: 14px;
  }

  .warehouse-summary-strip {
    gap: 8px;
  }

  .warehouse-summary-strip div {
    padding: 9px 10px;
  }

  .warehouse-summary-strip span {
    font-size: 13px;
  }

  .warehouse-summary-strip strong {
    font-size: 24px;
  }

  .warehouse-list-filters {
    gap: 7px;
  }

  .warehouse-list-filters .toolbar-button {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .warehouse-list-card {
    padding: 12px;
  }

  .warehouse-table-wrap {
    overflow-x: visible;
  }

  .warehouse-pick-table {
    display: block;
    min-width: 0;
    border: 0;
    background: transparent;
  }

  .warehouse-pick-table thead {
    display: none;
  }

  .warehouse-pick-table tbody {
    display: grid;
    gap: 10px;
  }

  .warehouse-pick-table tr {
    display: grid;
    grid-template-columns: 42px minmax(0, 1.25fr) minmax(122px, 0.46fr) minmax(246px, 0.64fr);
    grid-template-areas:
      "number item need actions"
      "maker item picked actions"
      "article unit diff actions"
      ". status status actions";
    gap: 7px 9px;
    overflow: hidden;
    border: 1px solid rgba(213, 224, 234, 0.95);
    border-left: 6px solid var(--sez-blue);
    border-radius: 13px;
    padding: 9px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(7, 29, 51, 0.08);
  }

  .warehouse-pick-table tr[hidden] {
    display: none !important;
  }

  .warehouse-pick-table th,
  .warehouse-pick-table td,
  .warehouse-pick-table th:nth-child(n),
  .warehouse-pick-table td:nth-child(n) {
    display: block;
    width: auto;
    border-bottom: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .warehouse-pick-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--sez-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .warehouse-pick-table td:nth-child(1) {
    grid-area: number;
    text-align: center;
    color: var(--sez-navy);
    font-size: 24px;
    font-weight: 900;
  }

  .warehouse-pick-table td:nth-child(1)::before,
  .warehouse-pick-table td:nth-child(10)::before {
    display: none;
  }

  .warehouse-pick-table td:nth-child(2) {
    grid-area: maker;
  }

  .warehouse-pick-table td:nth-child(3) {
    grid-area: item;
  }

  .warehouse-pick-table td:nth-child(3) strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--sez-navy);
    font-size: 15px;
    line-height: 1.18;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .warehouse-pick-table td:nth-child(4) {
    grid-area: article;
  }

  .warehouse-pick-table td:nth-child(5) {
    grid-area: unit;
  }

  .warehouse-pick-table td:nth-child(6),
  .warehouse-pick-table td:nth-child(7),
  .warehouse-pick-table td:nth-child(8) {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
  }

  .warehouse-pick-table td:nth-child(6)::before,
  .warehouse-pick-table td:nth-child(7)::before,
  .warehouse-pick-table td:nth-child(8)::before {
    margin: 0;
  }

  .warehouse-pick-table td:nth-child(6) {
    grid-area: need;
  }

  .warehouse-pick-table td:nth-child(7) {
    grid-area: picked;
  }

  .warehouse-pick-table td:nth-child(8) {
    grid-area: diff;
  }

  .warehouse-pick-table td:nth-child(9) {
    grid-area: status;
  }

  .warehouse-pick-table td:nth-child(10) {
    grid-area: actions;
  }

  .warehouse-inventory-hint {
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.18;
  }

  .warehouse-photo-link {
    margin-top: 5px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .warehouse-line-sources {
    margin-top: 4px;
    font-size: 11px;
  }

  .warehouse-line-badge,
  .warehouse-comment-badge {
    padding: 4px 7px;
    font-size: 11px;
  }

  .warehouse-line-actions,
  .warehouse-line-action-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .warehouse-line-button {
    min-height: 42px;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .warehouse-line-comment {
    gap: 4px;
    font-size: 11px;
  }

  .warehouse-line-comment textarea {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .warehouse-partial-form {
    gap: 6px;
  }

  .warehouse-partial-form input {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .warehouse-step-screen {
    min-height: calc(100vh - 68px);
  }

  .warehouse-step-screen .warehouse-header {
    align-items: center;
  }

  .warehouse-step-screen .order-header-actions {
    gap: 8px;
  }

  .warehouse-step-screen .header-link {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .warehouse-step-card {
    gap: 12px;
    border-left-width: 6px;
    border-radius: 18px;
    padding: 14px;
  }

  .warehouse-step-layout {
    grid-template-columns: minmax(0, 1fr) minmax(236px, 300px);
    gap: 10px;
  }

  .warehouse-step-main-zone,
  .warehouse-step-side-zone {
    gap: 8px;
  }

  .warehouse-step-counter,
  .warehouse-step-nav {
    gap: 8px;
  }

  .warehouse-step-order-nav {
    gap: 6px;
  }

  .warehouse-step-top-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-step-order-button {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .warehouse-step-counter span {
    font-size: 16px;
  }

  .warehouse-step-counter strong {
    padding: 6px 10px;
    font-size: 14px;
  }

  .warehouse-step-item .screen-label {
    grid-area: label;
    margin-bottom: 4px;
    font-size: 12px;
  }

  .warehouse-step-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "target target"
      "label photo"
      "title title"
      "metrics metrics";
    gap: 6px 12px;
    align-items: start;
  }

  .warehouse-putaway-target-order {
    grid-area: target;
    margin-bottom: 2px;
    padding: 7px 10px;
    border-left-width: 5px;
    border-radius: 10px;
  }

  .warehouse-putaway-target-order span {
    font-size: 10px;
  }

  .warehouse-putaway-target-order strong {
    font-size: clamp(26px, 4vw, 40px);
  }

  .warehouse-putaway-target-order small {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }

  .warehouse-step-item h2 {
    grid-area: title;
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 8px;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.06;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .warehouse-step-photo-link {
    grid-area: photo;
    justify-self: end;
    margin-top: 0;
    padding: 5px 9px;
    font-size: 12px;
  }

  .warehouse-step-metrics {
    grid-area: metrics;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .warehouse-step-metrics-grid.is-pick-step {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .warehouse-step-metrics-grid.is-putaway-step {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .warehouse-step-metrics div {
    gap: 2px;
    min-width: 0;
    border-radius: 9px;
    padding: 6px 7px;
  }

  .warehouse-step-metrics span {
    font-size: 10px;
  }

  .warehouse-step-metrics strong {
    font-size: 13px;
  }

  .warehouse-step-metrics-grid div {
    padding: 5px 6px;
  }

  .warehouse-step-metrics-grid span {
    font-size: 9px;
    line-height: 1.08;
  }

  .warehouse-step-metrics-grid strong {
    font-size: 12px;
    line-height: 1.08;
  }

  .warehouse-step-inventory {
    gap: 6px;
    border-left-width: 5px;
    border-radius: 12px;
    padding: 7px 9px;
  }

  .warehouse-step-inventory > div {
    min-width: 0;
  }

  .warehouse-step-inventory strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  .warehouse-step-inventory span,
  .warehouse-step-inventory dt {
    font-size: 10px;
  }

  .warehouse-step-inventory dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .warehouse-step-inventory dd {
    font-size: 13px;
  }

  .warehouse-step-inventory p {
    font-size: 12px;
  }

  .warehouse-step-inventory-link {
    align-self: start;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .warehouse-step-actions {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 8px;
  }

  .warehouse-step-comment {
    font-size: 13px;
  }

  .warehouse-step-comment summary {
    min-height: 40px;
    padding: 7px 10px;
  }

  .warehouse-step-comment-preview {
    font-size: 12px;
  }

  .warehouse-step-comment textarea {
    min-height: 58px;
    padding: 7px 9px;
    font-size: 14px;
  }

  .warehouse-step-button {
    min-height: 60px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 18px;
  }

  .warehouse-step-partial {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: end;
  }

  .warehouse-step-partial label {
    gap: 4px;
    font-size: 0;
  }

  .warehouse-step-partial input {
    min-height: 42px;
    padding: 7px 9px;
    font-size: 15px;
  }

  .warehouse-step-partial .warehouse-step-button {
    min-height: 42px;
    font-size: 14px;
  }

  .warehouse-step-nav .toolbar-button {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 14px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm 10mm;
  }

  .warehouse-pick-screen {
    width: 100%;
    padding: 0;
  }

  .warehouse-screen-only,
  .warehouse-no-print,
  .app-topbar {
    display: none !important;
  }

  .warehouse-print-only {
    display: block !important;
  }

  .warehouse-print-sheet-header {
    margin: 0 0 2mm;
    padding: 0;
    color: #111827;
    text-align: center;
  }

  .warehouse-print-sheet-header h1 {
    margin: 0 0 1mm;
    color: #000000;
    font-size: 26pt;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
  }

  .warehouse-print-sheet-header p {
    margin: 0.7mm 0 0;
    color: #111827;
    font-size: 9pt;
    font-weight: 750;
    line-height: 1.12;
  }

  .warehouse-print-header,
  .warehouse-list-card,
  .warehouse-summary-strip {
    box-shadow: none;
  }

  .warehouse-print-header {
    min-height: 0;
    margin: 0 !important;
    padding: 0 0 0.6mm;
    border: 0;
    background: #ffffff !important;
  }

  .warehouse-print-header .screen-label,
  .warehouse-print-header h1,
  .warehouse-print-header .compact-order-title,
  .warehouse-print-header .order-compact-badges {
    display: none !important;
  }

  .warehouse-print-meta {
    display: block;
    margin: 0;
    color: #111827;
    font-size: 9pt;
    font-weight: 800;
    line-height: 1.05;
  }

  .warehouse-print-order {
    font-size: 20pt;
    font-weight: 950;
    letter-spacing: 0;
  }

  .warehouse-print-summary {
    display: block;
    margin: 0.6mm 0 1mm;
    color: #111827;
    font-size: 8.8pt;
    font-weight: 700;
    line-height: 1.05;
  }

  .warehouse-print-header h1 {
    margin: 0 0 2mm;
    font-size: 18pt;
  }

  .warehouse-print-header .compact-order-title {
    margin: 0 0 2mm;
    font-size: 9pt;
  }

  .warehouse-print-header .order-compact-badges {
    gap: 3mm;
  }

  .warehouse-print-header .metric-tile {
    min-height: 0;
    padding: 2mm 3mm;
    font-size: 8pt;
  }

  .warehouse-print-header .metric-tile strong {
    font-size: 11pt;
  }

  .warehouse-summary-strip {
    display: none !important;
  }

  .warehouse-list-card {
    border: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  .warehouse-print-table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #777777;
    font-size: 8.5pt;
    line-height: 1.15;
    table-layout: fixed;
  }

  .warehouse-print-table thead {
    display: table-header-group;
  }

  .warehouse-print-table tbody {
    display: table-row-group;
  }

  .warehouse-print-table thead,
  .warehouse-print-table tbody,
  .warehouse-print-table tr {
    margin: 0;
    padding: 0;
    border-spacing: 0;
    break-before: auto;
    page-break-before: auto;
  }

  .warehouse-print-table tr {
    height: auto;
    min-height: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .warehouse-print-table th,
  .warehouse-print-table td {
    border: 1px solid #777777;
    padding: 3px 5px;
    margin: 0;
    height: auto;
    min-height: 0;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: top;
  }

  .warehouse-print-table th {
    background: #eef2f7 !important;
    color: #111827;
    font-weight: 900;
    line-height: 1.1;
  }

  .warehouse-print-table tbody tr:first-child td {
    padding-top: 3px;
  }
}

@media (max-width: 760px) {
  .unit-order-navigation {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .unit-order-navigation-actions {
    justify-content: stretch;
  }

  .unit-order-navigation-actions .toolbar-button {
    flex: 1 1 160px;
    justify-content: center;
  }

  .order-sticky-workbar {
    top: 136px;
    padding: 7px;
  }

  .order-sticky-workbar .compact-order-header {
    gap: 8px;
    padding: 8px;
  }

  .order-sticky-workbar .compact-order-header h1 {
    font-size: 24px;
  }

  .order-sticky-workbar .compact-order-title {
    max-height: 34px;
    font-size: 13px;
  }

  .order-action-toolbar {
    gap: 7px;
    padding: 9px;
  }

  .order-action-toolbar .toolbar-button,
  .toolbar-selection-summary {
    min-height: 46px;
    font-size: 15px;
  }

  .terminal-search-row {
    grid-template-columns: 1fr;
  }

  .touch-keyboard {
    padding: 10px;
  }

  .touch-keyboard-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .touch-keyboard-key {
    min-width: 44px;
    min-height: 50px;
    font-size: 19px;
    padding-inline: 10px;
  }

  .touch-keyboard-key.is-control {
    min-width: 104px;
    font-size: 16px;
  }

  .compact-order-header h1 {
    font-size: 26px;
  }

  .order-supply-summary {
    grid-template-columns: 1fr 1fr;
  }

  .order-supply-main,
  .order-supply-alert {
    grid-column: 1 / -1;
  }

  .order-work-toolbar-stack {
    grid-template-columns: 1fr;
  }

  .order-tool-card {
    padding: 9px;
  }

  .supply-order-head,
  .supply-order-body,
  .supply-order-actions {
    align-items: stretch;
  }

  .supply-order-actions .toolbar-button {
    flex: 1 1 180px;
  }

  .order-unit-group-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .order-unit-group-header .unit-badge {
    grid-column: 2;
    justify-self: start;
  }

  .order-unit-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .consumables-workspace,
  .consumables-manual {
    grid-template-columns: 1fr;
  }

  .consumables-grid {
    grid-template-columns: 1fr;
  }

  .admin-employee-create,
  .admin-employee-form,
  .attendance-panel,
  .attendance-admin-create,
  .attendance-import-upload {
    grid-template-columns: 1fr;
  }

  .attendance-actions {
    min-width: 0;
  }

  .warehouse-create-card,
  .warehouse-putaway-create-form,
  .warehouse-inventory-teaser,
  .warehouse-inventory-filters form,
  .warehouse-inventory-update form,
  .warehouse-inventory-item-head,
  .warehouse-task-columns,
  .warehouse-pick-actions,
  .warehouse-summary-strip,
  .warehouse-inventory-summary,
  .warehouse-admin-panel,
  .warehouse-compare-summary,
  .warehouse-compare-grid,
  .warehouse-step-metrics,
  .warehouse-step-actions {
    grid-template-columns: 1fr;
  }

  .warehouse-pick-actions {
    top: 132px;
  }

  .warehouse-step-item {
    display: block;
  }

  .warehouse-step-layout {
    grid-template-columns: 1fr;
  }

  .warehouse-step-metrics-grid.is-pick-step,
  .warehouse-step-metrics-grid.is-putaway-step,
  .warehouse-step-top-nav {
    grid-template-columns: 1fr;
  }

  .warehouse-step-button {
    min-height: 68px;
  }
}

.voice-screen {
  gap: 18px;
}

.voice-screen [hidden],
.voice-widget [hidden] {
  display: none !important;
}

.voice-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.voice-card,
.voice-warning-card {
  border-radius: 8px;
}

.voice-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.voice-card-head h2 {
  margin: 0;
}

.voice-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.voice-status-pill.is-online {
  background: rgba(22, 163, 74, 0.16);
  color: #166534;
}

.voice-status-pill.is-offline {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.voice-secure-hint {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.45;
}

.voice-call-state {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  font-weight: 800;
}

.voice-message {
  margin-bottom: 12px;
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.voice-actions-large .toolbar-button {
  min-height: 58px;
  min-width: 150px;
  font-size: 1.05rem;
}

.voice-mic-test {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.voice-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
}

.voice-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15, #ef4444);
  transition: width 0.08s linear;
}

.voice-log-table td {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.voice-terminal-panel {
  max-width: 980px;
  margin: 0 auto;
}

.voice-incoming-panel,
.voice-active-panel {
  margin-top: 16px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.voice-incoming-panel h2,
.voice-active-panel h2 {
  margin-top: 0;
}

.voice-widget {
  position: relative;
  z-index: 80;
}

.voice-widget-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.voice-widget-card {
  width: min(620px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
}

.voice-widget-card h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.voice-widget-active {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 120;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
}

@media (max-width: 900px) {
  .voice-grid {
    grid-template-columns: 1fr;
  }

  .voice-mic-test {
    grid-template-columns: 1fr;
  }

  .voice-widget-active {
    left: 12px;
    right: 12px;
    bottom: 86px;
  }
}

.event-time-cell {
  display: grid;
  gap: 4px;
}

.event-time-cell small,
.event-correction-reason,
.muted-text {
  color: #64748b;
  font-size: 0.82rem;
}

.event-correction-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
}

.event-log-table tr.is-time-corrected td {
  background: rgba(254, 243, 199, 0.28);
}

.event-correction-cell {
  min-width: 220px;
}

.inline-admin-correction summary {
  cursor: pointer;
  color: #0f766e;
  font-weight: 800;
}

.inline-admin-correction form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.inline-admin-correction label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.inline-admin-correction input,
.inline-admin-correction textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.compact-action {
  min-height: 36px;
  padding: 8px 12px;
}

@media print {
  @page order-summary {
    size: A4 landscape;
    margin: 10mm 9mm;
  }

  .order-summary-screen,
  .order-summary-screen * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .order-summary-screen {
    page: order-summary;
    width: 100%;
    max-width: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    color: #000000;
  }

  .order-summary-screen .app-topbar,
  .order-summary-screen .no-print,
  .order-summary-screen .order-summary-copy-source,
  .order-summary-screen .order-summary-copy-status,
  .app-topbar:has(+ .order-summary-screen) {
    display: none !important;
  }

  .order-summary-header,
  .order-summary-meta-card,
  .order-summary-totals-card,
  .order-summary-table-card {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #ffffff !important;
    box-shadow: none;
  }

  .order-summary-header {
    display: block;
    margin-bottom: 4mm;
    text-align: center;
  }

  .order-summary-header .screen-label {
    color: #333333 !important;
    font-size: 9pt;
    font-weight: 800;
  }

  .order-summary-header h1 {
    margin: 0;
    color: #000000;
    font-size: 18pt;
    line-height: 1.08;
  }

  .order-summary-header .compact-order-title {
    margin-top: 1.5mm;
    color: #111111;
    font-size: 10pt;
  }

  .order-summary-meta {
    grid-template-columns: 1fr;
    gap: 1mm;
    margin-bottom: 3mm;
    font-size: 9.5pt;
  }

  .order-summary-meta div {
    display: grid;
    grid-template-columns: 27mm 1fr;
    gap: 3mm;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #ffffff !important;
  }

  .order-summary-meta dt,
  .order-summary-meta dd {
    color: #000000;
    font-size: 9.5pt;
    line-height: 1.18;
  }

  .order-summary-totals-card {
    display: block;
    margin-bottom: 3mm;
  }

  .order-summary-total-main {
    border: 1px solid #000000;
    border-radius: 0;
    margin-bottom: 2mm;
    padding: 2mm;
    background: #ffffff !important;
  }

  .order-summary-total-main span,
  .order-summary-total-main strong {
    color: #000000;
    font-size: 11pt;
  }

  .order-summary-progress {
    display: none;
  }

  .order-summary-totals {
    grid-template-columns: repeat(3, 1fr);
    gap: 1mm;
    margin-bottom: 2mm;
  }

  .order-summary-totals div {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 1.4mm 1.8mm;
    background: #ffffff !important;
  }

  .order-summary-totals dt,
  .order-summary-totals dd {
    color: #000000;
    font-size: 8.7pt;
    line-height: 1.1;
  }

  .order-summary-totals dd {
    font-size: 12pt;
  }

  .order-summary-table {
    border-collapse: collapse;
    color: #000000;
    font-size: 9pt;
    page-break-inside: auto;
  }

  .order-summary-table th,
  .order-summary-table td {
    border: 1px solid #000000;
    padding: 2.2mm 2mm;
    color: #000000;
    line-height: 1.15;
  }

  .order-summary-table th {
    background: #e5e7eb !important;
    font-weight: 900;
  }

  .order-summary-status-cell {
    background: #fef3c7 !important;
  }

  .order-summary-status-cell--ready {
    background: #dcfce7 !important;
  }

  .order-summary-status-part {
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    padding: 1mm 1.8mm;
    color: #000000 !important;
  }

  .order-summary-status-part--ready {
    background: #bbf7d0 !important;
  }

  .order-summary-status-part--other {
    background: #fef3c7 !important;
  }

  .order-summary-empty {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 3mm;
    background: #ffffff !important;
    color: #000000;
  }
}

@media screen and (orientation: portrait), screen and (max-width: 900px) and (min-height: 900px) {
  body.portrait-layout {
    --sez-bottom-panel: 98px;
    --portrait-gap: 12px;
    overflow-x: hidden;
    font-size: 18px;
  }

  body.portrait-layout.touch-keyboard-open .terminal-screen {
    padding-bottom: calc(var(--sez-bottom-panel) + var(--touch-keyboard-height, 300px) + 28px);
  }

  body.portrait-layout.consumable-number-keyboard-open .terminal-screen {
    padding-bottom: calc(var(--sez-bottom-panel) + var(--consumable-number-keyboard-height, 260px) + 28px);
  }

  body.portrait-layout.consumables-keyboard-open .assembler-panel {
    transform: translateY(calc(100% + env(safe-area-inset-bottom)));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body.portrait-layout.consumables-keyboard-open.touch-keyboard-open .consumables-screen {
    padding-bottom: calc(var(--touch-keyboard-height, 300px) + 34px);
  }

  body.portrait-layout.consumables-keyboard-open.consumable-number-keyboard-open .consumables-screen {
    padding-bottom: calc(var(--consumable-number-keyboard-height, 260px) + 34px);
  }

  body.portrait-layout .app-topbar {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
  }

  body.portrait-layout .brand {
    gap: 10px;
  }

  body.portrait-layout .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 10px;
  }

  body.portrait-layout .brand-mark img {
    max-width: 36px;
    max-height: 36px;
  }

  body.portrait-layout .brand-copy strong {
    font-size: 18px;
  }

  body.portrait-layout .brand-copy small {
    font-size: 12px;
  }

  body.portrait-layout .top-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  body.portrait-layout .top-nav-link,
  body.portrait-layout .top-nav-link.admin-service-link {
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 9px;
    padding: 8px 11px;
    font-size: 15px;
    white-space: nowrap;
  }

  body.portrait-layout .page-shell,
  body.portrait-layout .terminal-screen {
    width: 100%;
    max-width: none;
    padding: 14px 12px calc(var(--sez-bottom-panel) + 22px);
    overflow-x: hidden;
  }

  body.portrait-layout .home-dashboard {
    gap: 12px;
  }

  body.portrait-layout .home-current-work-panel {
    order: -1;
    max-height: none;
    border-radius: 16px;
    padding: 14px;
  }

  body.portrait-layout .home-current-quick-button {
    min-height: 48px;
    padding: 10px 13px;
    font-size: 15px;
  }

  body.portrait-layout .home-dashboard .home-hero {
    grid-template-columns: 1fr;
    border-radius: 16px;
    padding: 16px;
  }

  body.portrait-layout .home-dashboard .home-hero h1 {
    font-size: 34px;
  }

  body.portrait-layout .home-subtitle {
    margin-block: 6px;
    font-size: 18px;
  }

  body.portrait-layout .home-description,
  body.portrait-layout .home-visual {
    display: none;
  }

  body.portrait-layout .home-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.portrait-layout .home-links a,
  body.portrait-layout .home-links button {
    min-height: 68px;
    padding: 10px 14px;
  }

  body.portrait-layout .home-links .action-card span {
    font-size: 18px;
  }

  body.portrait-layout .terminal-header {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
  }

  body.portrait-layout .terminal-header h1,
  body.portrait-layout .section-card h1 {
    max-width: 100%;
    font-size: clamp(26px, 4.4vw, 36px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  body.portrait-layout .terminal-header p,
  body.portrait-layout .compact-order-title {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.portrait-layout .page-header-decor {
    display: none;
  }

  body.portrait-layout .header-link,
  body.portrait-layout .toolbar-button,
  body.portrait-layout .toolbar-link,
  body.portrait-layout .my-work-button {
    min-height: 54px;
    padding: 12px 14px;
    font-size: 18px;
    line-height: 1.15;
  }

  body.portrait-layout .toolbar,
  body.portrait-layout .terminal-actions,
  body.portrait-layout .order-header-actions,
  body.portrait-layout .order-schemes-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
    gap: 8px;
    align-items: stretch;
  }

  body.portrait-layout .toolbar-divider,
  body.portrait-layout .toolbar-label {
    display: none;
  }

  body.portrait-layout .toolbar-selection-summary {
    min-height: 48px;
    justify-content: center;
    white-space: normal;
  }

  body.portrait-layout .terminal-search-panel,
  body.portrait-layout .section-card,
  body.portrait-layout .empty-state,
  body.portrait-layout .group-summary,
  body.portrait-layout .attendance-panel {
    padding: 14px;
  }

  body.portrait-layout .terminal-search-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body.portrait-layout .terminal-search-input,
  body.portrait-layout .terminal-search-row input {
    grid-column: 1 / -1;
    min-height: 58px;
    font-size: 22px;
  }

  body.portrait-layout .terminal-search-row .toolbar-button {
    min-height: 54px;
    padding-inline: 12px;
  }

  body.portrait-layout .order-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 12px;
  }

  body.portrait-layout .order-tile {
    min-height: 176px;
    gap: 12px;
    padding: 20px 18px 20px 26px;
  }

  body.portrait-layout .order-number {
    font-size: clamp(30px, 6vw, 40px);
  }

  body.portrait-layout .order-title,
  body.portrait-layout .my-work-unit {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  body.portrait-layout .order-stats span {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 16px;
  }

  body.portrait-layout .order-sticky-workbar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding: 6px;
  }

  body.portrait-layout .order-sticky-workbar .compact-order-header {
    gap: 6px;
    padding: 7px;
  }

  body.portrait-layout .order-overview-header,
  body.portrait-layout .order-work-screen .order-overview-header {
    grid-template-columns: 1fr;
  }

  body.portrait-layout .order-header-actions--order,
  body.portrait-layout .order-header-actions--order .order-folder-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 5px;
    overflow: visible;
  }

  body.portrait-layout .order-header-actions--order .order-folder-actions,
  body.portrait-layout .order-header-actions--order .order-folder-buttons {
    display: contents;
  }

  body.portrait-layout .order-header-actions--order .header-link,
  body.portrait-layout .order-header-actions--order .order-folder-button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 13px;
  }

  body.portrait-layout .order-sticky-workbar .compact-order-header h1 {
    font-size: clamp(22px, 5vw, 30px);
  }

  body.portrait-layout .order-sticky-workbar .compact-order-title {
    max-height: 30px;
    font-size: 12px;
    line-height: 1.18;
  }

  body.portrait-layout .order-compact-badges,
  body.portrait-layout .unit-supply-tags {
    gap: 4px;
  }

  body.portrait-layout .order-sticky-workbar .metric-tile {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
  }

  body.portrait-layout .order-supply-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 5px;
    padding: 4px;
  }

  body.portrait-layout .order-supply-summary > div {
    padding: 4px 6px;
  }

  body.portrait-layout .order-supply-summary span {
    font-size: 10px;
  }

  body.portrait-layout .order-supply-summary strong {
    font-size: 12px;
  }

  body.portrait-layout .order-supply-main,
  body.portrait-layout .order-supply-alert {
    grid-column: 1 / -1;
  }

  body.portrait-layout .order-supply-main strong {
    font-size: 16px;
  }

  body.portrait-layout .order-supply-lazy-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 5px;
    padding: 7px;
  }

  body.portrait-layout .order-supply-lazy-card p {
    font-size: 11px;
    line-height: 1.2;
  }

  body.portrait-layout .order-supply-load-form,
  body.portrait-layout .order-supply-load-form .toolbar-button {
    width: fit-content;
  }

  body.portrait-layout .order-work-toolbar-stack {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 7px;
  }

  body.portrait-layout .order-tool-card {
    gap: 4px;
    padding: 6px;
  }

  body.portrait-layout .order-selection-card .order-tool-card-head {
    display: none;
  }

  body.portrait-layout .order-selection-toolbar {
    grid-template-columns: minmax(116px, 1fr) repeat(2, minmax(92px, 0.8fr));
  }

  body.portrait-layout .order-tool-card-head h2 {
    font-size: 14px;
  }

  body.portrait-layout .order-action-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
    gap: 5px;
    padding: 5px;
  }

  body.portrait-layout .order-action-toolbar .toolbar-button,
  body.portrait-layout .order-action-toolbar .toolbar-link,
  body.portrait-layout .order-action-toolbar .toolbar-selection-summary {
    min-height: 34px;
    padding: 6px 7px;
    font-size: 13px;
  }

  body.portrait-layout .order-schemes-compact-body {
    grid-template-columns: 1fr;
  }

  body.portrait-layout .order-schemes-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.portrait-layout .order-unit-groups,
  body.portrait-layout .order-unit-flat-grid,
  body.portrait-layout .order-unit-grid,
  body.portrait-layout .unit-grid,
  body.portrait-layout .my-work-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
    gap: 12px;
  }

  body.portrait-layout .unit-tile,
  body.portrait-layout .order-work-screen .unit-tile {
    min-height: 0;
    height: auto;
    gap: 9px;
    padding: 14px;
  }

  body.portrait-layout .unit-name,
  body.portrait-layout .order-work-screen .unit-name,
  body.portrait-layout .unit-participants,
  body.portrait-layout .unit-pause-reason {
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    -webkit-line-clamp: unset;
  }

  body.portrait-layout .unit-number {
    font-size: 30px;
  }

  body.portrait-layout .status-chip,
  body.portrait-layout .unit-selected-marker,
  body.portrait-layout .order-work-screen .status-chip,
  body.portrait-layout .order-work-screen .unit-selected-marker {
    padding: 7px 10px;
    font-size: 15px;
  }

  body.portrait-layout .unit-card-actions,
  body.portrait-layout .unit-order-navigation-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    width: 100%;
  }

  body.portrait-layout .unit-production-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  }

  body.portrait-layout .unit-production-grid .toolbar-button {
    min-height: 44px;
    font-size: 14px;
  }

  body.portrait-layout .unit-history-link,
  body.portrait-layout .spec-print-select {
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }

  body.portrait-layout .group-summary,
  body.portrait-layout .attendance-panel,
  body.portrait-layout .cabinet-row,
  body.portrait-layout .order-summary-card,
  body.portrait-layout .my-work-summary {
    grid-template-columns: 1fr;
  }

  body.portrait-layout .cabinet-metrics,
  body.portrait-layout .my-work-metrics {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  body.portrait-layout .pause-panel {
    gap: 12px;
    padding: 14px;
  }

  body.portrait-layout .pause-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.portrait-layout .pause-reason-grid,
  body.portrait-layout .current-work-employee-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  body.portrait-layout .start-decision-modal {
    align-items: stretch;
    padding: 10px;
  }

  body.portrait-layout .start-decision-dialog,
  body.portrait-layout .current-work-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }

  body.portrait-layout .start-decision-actions {
    gap: 10px;
  }

  body.portrait-layout .start-decision-button {
    min-height: 58px;
    padding: 13px 14px;
    font-size: 19px;
  }

  body.portrait-layout .current-work-list,
  body.portrait-layout .current-work-employee-grid {
    max-height: 34dvh;
  }

  body.portrait-layout .assembler-panel {
    gap: 6px;
    padding: 8px 10px 10px;
  }

  body.portrait-layout .assembler-panel-title {
    font-size: 12px;
  }

  body.portrait-layout .assembler-buttons {
    gap: 8px;
  }

  body.portrait-layout .assembler-button {
    min-width: 118px;
    min-height: 50px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 17px;
  }

  body.portrait-layout .touch-keyboard.is-visible {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    z-index: 115;
    max-height: min(42dvh, 430px);
    margin: 0;
    overflow-y: auto;
    padding: 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.portrait-layout .touch-keyboard-head {
    margin-bottom: 8px;
  }

  body.portrait-layout .touch-keyboard-title {
    font-size: 13px;
  }

  body.portrait-layout .touch-keyboard-rows {
    gap: 6px;
  }

  body.portrait-layout .touch-keyboard-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  body.portrait-layout .touch-keyboard-key {
    flex: 1 1 44px;
    min-width: 42px;
    max-width: 76px;
    min-height: 46px;
    border-radius: 8px;
    padding: 0 8px;
    font-size: clamp(17px, 3.2vw, 21px);
  }

  body.portrait-layout .touch-keyboard-key.is-control {
    flex-basis: 112px;
    max-width: none;
    font-size: clamp(14px, 2.8vw, 17px);
  }

  body.portrait-layout .touch-keyboard-key.is-wide {
    flex-basis: min(100%, 360px);
    max-width: none;
  }

  body.portrait-layout .consumables-screen {
    padding-bottom: calc(var(--sez-bottom-panel) + 24px);
  }

  body.portrait-layout .consumables-workspace,
  body.portrait-layout .consumables-manual {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.portrait-layout .consumables-picker,
  body.portrait-layout .consumables-form-card,
  body.portrait-layout .consumables-recent {
    padding: 14px;
  }

  body.portrait-layout .consumables-picker-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  body.portrait-layout .consumables-search-panel {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
  }

  body.portrait-layout .consumables-search-panel input,
  body.portrait-layout .consumables-touch-keyboard {
    grid-column: 1 / -1;
  }

  body.portrait-layout .consumables-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 10px;
  }

  body.portrait-layout .consumable-tile {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 86px;
    padding: 12px;
  }

  body.portrait-layout .consumable-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  body.portrait-layout .consumable-thumb img {
    width: 34px;
    height: 34px;
  }

  body.portrait-layout .consumables-form input,
  body.portrait-layout .consumables-form textarea,
  body.portrait-layout .consumables-manual input {
    min-height: 54px;
    font-size: 18px;
  }

  body.portrait-layout .consumable-number-keyboard:not([hidden]) {
    position: fixed;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    z-index: 116;
    max-height: min(40dvh, 330px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.portrait-layout .consumable-number-keyboard button {
    min-height: 48px;
  }

  body.portrait-layout .consumables-recent .table-scroll,
  body.portrait-layout .table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.portrait-layout .attendance-panel {
    gap: 14px;
  }

  body.portrait-layout .attendance-actions {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.portrait-layout .attendance-actions form,
  body.portrait-layout .attendance-button {
    width: 100%;
  }

  body.portrait-layout .attendance-button {
    min-height: 68px;
    font-size: 20px;
  }
}
