:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #edf3f8;
  --text: #182331;
  --muted: #5d6978;
  --line: #d5e0ea;
  --accent: #327dbd;
  --accent-strong: #1e5f98;
  --accent-soft: #e6f0fa;
  --brand-red: #e30613;
  --brand-red-soft: #fde7e9;
  --warning: #b76b00;
  --warning-bg: #fff4df;
  --danger: #a33a36;
  --danger-bg: #fdebea;
  --ok: #1f7a4d;
  --ok-bg: #e3f3eb;
  --steel: #9facb8;
  --panel: #ffffff;
  --shadow: 0 16px 34px rgba(24, 35, 49, 0.1);
  --panel-radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body.login-visible {
  overflow: hidden;
}

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

body.auth-pending > .app-header,
body.auth-pending > .workspace {
  visibility: hidden;
}

.rfid-login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(50, 125, 189, 0.18), transparent 42%),
    #edf3f8;
}

.rfid-login-card {
  width: min(520px, 100%);
  padding: 26px 34px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand-red);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 35, 49, 0.16);
  text-align: center;
}

.rfid-login-logo {
  width: min(230px, 72%);
  height: auto;
  margin: 0 auto 18px;
}

.rfid-login-card h1 {
  margin: 4px 0 10px;
  font-size: clamp(26px, 5vw, 38px);
}

.rfid-login-lead {
  max-width: 410px;
  margin: 0 auto;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.login-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 20px 0 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.login-method-tab {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  justify-content: center;
}

.login-method-tab:hover,
.login-method-tab.is-active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 4px 12px rgba(24, 35, 49, 0.08);
}

.login-method-panel {
  min-height: 235px;
  padding: 18px 16px 6px;
}

.login-method-panel > strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.login-method-panel > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-method-panel[role="tabpanel"]:focus {
  outline: none;
}

.login-field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}

.login-field input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(50, 125, 189, 0.15);
}

.login-submit-button {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  justify-content: center;
}

.rfid-reader-indicator {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rfid-reader-indicator span {
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(50, 125, 189, 0.35);
  border-radius: inherit;
  animation: rfid-pulse 1.8s ease-out infinite;
}

.rfid-reader-indicator svg {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rfid-scan-field {
  display: block;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rfid-scan-field input {
  width: 1px;
  min-height: 1px;
  position: absolute;
  opacity: 0.01;
}

.rfid-login-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.login-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rfid-login-status.is-error {
  color: var(--danger);
}

.rfid-login-status.is-ok {
  color: var(--ok);
}

.rfid-session-status {
  position: fixed;
  z-index: 120;
  top: 16px;
  left: 50%;
  width: min(520px, calc(100% - 24px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(24, 35, 49, 0.18);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
  transform: translateX(-50%);
}

.rfid-session-status.is-error {
  border-left-color: var(--danger);
  color: var(--danger);
}

.rfid-session-status.is-ok {
  border-left-color: var(--ok);
  color: var(--ok);
}

@keyframes rfid-pulse {
  from {
    opacity: 0.85;
    transform: scale(0.84);
  }
  to {
    opacity: 0;
    transform: scale(1.18);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(50, 125, 189, 0.22);
  outline-offset: 2px;
}

.app-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 3px solid var(--brand-red);
}

.app-header h1,
.panel-heading h3,
.panel-heading h2,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: 26px;
  line-height: 1.1;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  width: clamp(148px, 18vw, 230px);
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rfid-session-hint {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.role-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
}

.export-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 32, 0.42);
}

.export-panel.is-hidden {
  display: none;
}

.export-card {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.export-card label {
  margin-top: 14px;
}

.export-card textarea {
  min-height: 280px;
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.primary-button {
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: #e2edf6;
}

.danger-button {
  border: 1px solid rgba(163, 58, 54, 0.35);
  background: var(--danger-bg);
  color: var(--danger);
}

.danger-button:hover {
  border-color: var(--danger);
  background: #f8d7d5;
}

.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-button:disabled:hover {
  background: var(--accent);
}

.ghost-button:disabled:hover {
  background: var(--surface-2);
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.small-button svg {
  width: 16px;
  height: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 292px;
  gap: 16px;
  padding: 16px;
  align-items: start;
}

.workspace.without-quote {
  grid-template-columns: 232px minmax(0, 1fr);
}

.side-menu {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 114px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-red);
  border-radius: var(--panel-radius);
}

.side-logo {
  display: block;
  width: min(170px, 100%);
  height: auto;
  margin-bottom: 10px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.side-nav-item:hover {
  background: var(--surface-2);
}

.side-nav-item.is-active {
  border-color: rgba(227, 6, 19, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 4px 0 0 var(--brand-red);
}

.side-nav-item.is-muted {
  color: #8a969e;
}

.side-nav-item.is-hidden {
  display: none;
}

.side-menu-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.side-menu-footer span,
.side-menu-footer strong {
  display: block;
}

.side-menu-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.side-menu-footer strong {
  margin-top: 4px;
  font-size: 14px;
}

.side-menu-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.program-area {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.quote-menu {
  position: sticky;
  top: 16px;
  min-width: 0;
  max-height: calc(100vh - 114px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--panel-radius);
}

.quote-menu.is-hidden {
  display: none;
}

.quote-menu-heading,
.quote-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-menu-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.quote-menu-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quote-menu-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.quote-menu-metrics span,
.quote-item-meta,
.quote-item-subline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.quote-menu-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.1;
}

.quote-current,
.quote-saved,
.quote-client,
.quote-finish {
  display: grid;
  gap: 10px;
}

.quote-current .eyebrow,
.quote-saved .eyebrow,
.quote-client .eyebrow {
  margin-bottom: 0;
}

.quote-client-card,
.quote-current-card,
.quote-item,
.quote-empty {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.quote-client-card {
  display: grid;
  gap: 7px;
}

.quote-client-card strong,
.quote-client-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-client-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.quote-current-card {
  border-color: rgba(50, 125, 189, 0.35);
  background: var(--accent-soft);
}

.quote-current-card.is-empty {
  border-style: dashed;
  background: var(--surface-2);
}

.quote-item {
  display: grid;
  gap: 10px;
}

.quote-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-item-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.quote-item-title strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.quote-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-finish .primary-button {
  width: 100%;
}

.quote-items-list {
  display: grid;
  gap: 8px;
}

.quote-empty {
  border-style: dashed;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.config-panel,
.summary-panel,
.offers-panel,
.order-panel,
.production-panel,
.worker-panel,
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  min-width: 0;
}

.app-module.is-hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.config-panel {
  padding: 18px;
}

.configurator-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.configurator-actions .primary-button {
  min-width: 220px;
}

.summary-panel,
.offers-panel,
.order-panel,
.production-panel,
.worker-panel,
.admin-panel {
  padding: 18px;
}

.offer-save-heading,
.offers-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

#openDraftOffersButton[hidden] {
  display: none;
}

.offers-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  gap: 12px;
  margin-top: 18px;
}

.offers-register-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.offers-table-wrap {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.offers-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.offers-table th,
.offers-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.offers-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.offers-table th:nth-child(1) {
  width: 125px;
}

.offers-table th:nth-child(2) {
  width: 185px;
}

.offers-table th:nth-child(3) {
  width: 75px;
}

.offers-table th:nth-child(4) {
  width: 120px;
}

.offers-table th:nth-child(5) {
  width: 115px;
}

.offers-table th:nth-child(6) {
  width: 155px;
}

.offers-table th:nth-child(7) {
  width: 135px;
}

.offers-table tbody tr:last-child td {
  border-bottom: 0;
}

.offers-table tbody tr:hover {
  background: #f8fbfd;
}

.offers-table tbody tr.is-current {
  background: var(--accent-soft);
}

.orders-register {
  margin-top: 18px;
}

.current-order-detail {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.current-order-heading h3 {
  margin: 0;
  font-size: 21px;
}

.order-empty-state {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  text-align: center;
}

.order-empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.order-empty-state span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.order-empty-state[hidden],
.current-order-detail[hidden] {
  display: none;
}

.offer-register-main,
.offer-register-meta {
  display: block;
  overflow-wrap: anywhere;
}

.offer-register-main {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.offer-register-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.offer-register-price {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.offer-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.offer-delete-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.offer-register-empty {
  padding: 34px 18px !important;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center !important;
}

.form-section {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading.compact {
  align-items: flex-start;
}

.section-heading {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.step-card .section-heading {
  align-items: flex-start;
}

.step-card .section-heading > div {
  min-width: 0;
  flex: 1 1 auto;
}

.section-heading span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.step-card.is-complete .section-heading span {
  background: var(--ok-bg);
  color: var(--ok);
}

.section-heading h2,
.panel-heading h3,
.panel-heading h2 {
  font-size: 18px;
  line-height: 1.2;
}

.step-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.step-toggle {
  flex: 0 0 auto;
}

.drawings-step .status-pill {
  flex: 0 0 auto;
  margin-top: 2px;
}

.drawings-step-body {
  display: grid;
  gap: 16px;
}

.step-body[hidden] {
  display: none;
}

.step-card.is-collapsed {
  padding-bottom: 12px;
}

.step-card.is-collapsed .section-heading {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  min-height: 40px;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.client-subsection {
  margin-top: 14px;
}

.client-subsection:first-child {
  margin-top: 0;
}

.client-subsection h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subsection-heading h3 {
  margin: 0;
}

.subsection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.client-picker-card {
  width: min(860px, 100%);
}

.client-picker-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.client-picker-item {
  width: 100%;
  min-height: 68px;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.client-picker-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.client-picker-main,
.client-picker-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.client-picker-main strong,
.client-picker-main span,
.client-picker-meta span {
  overflow-wrap: anywhere;
}

.client-picker-main strong {
  font-size: 14px;
}

.client-picker-main span,
.client-picker-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.client-picker-meta {
  flex: 0 0 min(280px, 42%);
  text-align: right;
}

.client-picker-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

fieldset {
  border: 0;
  margin: 12px 0 0;
  padding: 0;
}

legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  margin-bottom: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
}

.segmented label {
  margin: 0;
  display: block;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.segmented span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(24, 32, 38, 0.12);
}

.model-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.model-strip-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.model-chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
  min-height: 58px;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

.model-chip strong,
.model-chip span {
  display: block;
}

.model-chip strong {
  font-size: 14px;
}

.model-chip span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.model-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.option-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 42px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.option-list input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.option-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.option-list label.disabled {
  color: #8a969e;
  background: #f5f7f8;
}

.stainless-panel-field {
  max-width: 320px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-pill.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.door-stage {
  position: relative;
  min-height: clamp(430px, 40vw, 640px);
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background:
    linear-gradient(90deg, rgba(24, 32, 38, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(24, 32, 38, 0.04) 1px, transparent 1px),
    #f9fbfb;
  background-size: 28px 28px;
}

.door-stage.with-photo {
  background: #e1e4e7;
}

.door-stage.with-technical-layout {
  background:
    linear-gradient(90deg, rgba(24, 32, 38, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(24, 32, 38, 0.035) 1px, transparent 1px),
    #fbfcfc;
  background-size: 24px 24px;
}

.door-layout-technical {
  display: none;
  width: min(98%, 980px);
}

.door-layout-technical svg {
  display: block;
  width: 100%;
  height: auto;
}

.door-stage.with-technical-layout .door-layout-technical {
  display: block;
}

.door-stage.with-technical-layout .door-photo,
.door-stage.with-technical-layout .wall-opening,
.door-stage.with-technical-layout .rail,
.door-stage.with-technical-layout .floor-line,
.door-stage.with-technical-layout .door-measure {
  display: none;
}

.door-photo {
  width: min(94%, 960px);
  max-height: 560px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(24, 32, 38, 0.16);
}

.door-photo.mirrored {
  transform: scaleX(-1);
}

.door-photo.is-hidden {
  display: none;
}

.door-stage.with-photo .wall-opening,
.door-stage.with-photo .rail,
.door-stage.with-photo .floor-line {
  display: none;
}

.door-stage.with-photo .door-measure {
  background: rgba(255, 255, 255, 0.9);
}

.wall-opening {
  width: min(42vw, 430px);
  max-width: calc(100% - 110px);
  aspect-ratio: 0.72;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 18px solid #cfd7dc;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #aab6bd;
}

.door-frame {
  position: relative;
  width: 88%;
  height: 92%;
  border: 8px solid var(--steel);
  background: #e7ecef;
}

.door-leaf {
  position: absolute;
  inset: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #71818b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    #dce5e8;
  color: #26343d;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.door-leaf.sliding {
  transform: translateX(18%);
  box-shadow: -20px 0 0 rgba(50, 125, 189, 0.16);
}

.door-leaf.hinged {
  transform: perspective(720px) rotateY(-12deg);
  transform-origin: left center;
  box-shadow: 16px 0 0 rgba(24, 32, 38, 0.08);
}

.door-leaf.double {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #71818b calc(50% - 1px), #71818b calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    #dce5e8;
}

.rail {
  position: absolute;
  width: min(48vw, 540px);
  max-width: calc(100% - 80px);
  height: 10px;
  top: 74px;
  background: #7c8c95;
  border-radius: 999px;
  box-shadow: 0 10px 0 rgba(124, 140, 149, 0.18);
}

.rail.hidden,
.hinge.hidden,
.heater-line.hidden {
  display: none;
}

.hinge {
  position: absolute;
  left: -17px;
  width: 9px;
  height: 38px;
  border-radius: 999px;
  background: #6d7d85;
}

.hinge-top {
  top: 22%;
}

.hinge-bottom {
  bottom: 22%;
}

.heater-line {
  position: absolute;
  inset: -12px;
  border: 3px solid #d86435;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 0 16px rgba(216, 100, 53, 0.22);
}

.floor-line {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 62px;
  height: 3px;
  background: #aeb9bf;
}

.door-measure {
  position: absolute;
  min-width: 82px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.door-measure.top {
  top: 26px;
}

.door-measure.side {
  right: 18px;
  writing-mode: vertical-rl;
  min-width: 26px;
  min-height: 82px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.parametric-section {
  margin-top: 0;
}

.parametric-drawing {
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.parametric-drawing svg {
  display: block;
  width: 100%;
  height: auto;
}

.parametric-drawing.with-cad {
  background: #f8fbfb;
}

.parametric-drawing text {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.detail-item {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-item strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.25;
}

.offer-document {
  margin-top: 16px;
}

.offer-sheet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: #fff;
  box-shadow: 0 18px 38px rgba(24, 35, 49, 0.08);
}

.offer-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-top: 5px solid var(--brand-red);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.offer-brand-block {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.offer-brand-block img {
  width: 148px;
  height: auto;
  flex: 0 0 auto;
}

.offer-brand-block h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.offer-meta-card {
  min-width: 176px;
  display: grid;
  grid-template-columns: auto;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.offer-meta-card span,
.offer-lead span,
.offer-terms span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.offer-meta-card strong {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.25;
}

.offer-lead,
.offer-terms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.offer-lead div,
.offer-terms div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 14px;
  background: #fff;
}

.offer-lead strong,
.offer-terms strong {
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.offer-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
}

.offer-status.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.offer-status.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.offer-status.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.offer-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 22px 0;
}

.offer-party {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.offer-party h3 {
  margin: 3px 0 8px;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.offer-party p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.offer-section {
  padding: 18px 22px 0;
}

.offer-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.offer-section-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.offer-section-heading > span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.offer-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.offer-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

.offer-table th,
.offer-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
}

.offer-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.offer-table tr:last-child td {
  border-bottom: 0;
}

.offer-table strong,
.offer-table span {
  display: block;
}

.offer-table span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.offer-table-note {
  color: var(--text) !important;
}

.offer-col-no {
  width: 46px;
  color: var(--accent-strong);
  font-weight: 900;
}

.offer-col-price {
  min-width: 118px;
  text-align: right !important;
  white-space: nowrap;
  font-weight: 900;
}

.offer-terms {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.offer-terms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-payment {
  padding: 18px 22px 0;
}

.offer-payment p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.offer-footer {
  display: grid;
  gap: 6px;
  padding: 16px 22px 22px;
  background: #fff;
}

.offer-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.warning-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.warning {
  border-radius: 7px;
  padding: 10px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.warning.error {
  background: var(--danger-bg);
  color: var(--danger);
}

#summaryText {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.summary-text-source {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  min-height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.offer-export-status {
  min-height: 18px;
  margin: 12px 0 8px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.offer-export-status.is-error {
  color: var(--danger);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 5px var(--ok-bg);
}

.status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 0 5px var(--warning-bg);
}

.status-dot.danger {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-bg);
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.order-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pricing-preview-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.payment-portal {
  margin-top: 16px;
}

.payment-flow-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.payment-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payment-card-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.payment-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.payment-details div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.payment-details .payment-title {
  grid-column: 1 / -1;
}

.payment-details span,
.payment-upload,
.payment-confirmation-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.payment-details strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.payment-upload {
  min-width: min(260px, 100%);
  display: grid;
  gap: 6px;
}

.payment-upload input {
  padding: 9px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.payment-confirmation-note {
  flex: 1 1 220px;
  padding: 10px;
  border-radius: 7px;
  background: var(--surface-2);
}

.pricing-preview-heading,
.pricing-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pricing-preview-heading h3,
.pricing-admin-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.pricing-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pricing-preview-summary div,
.pricing-breakdown-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.pricing-preview-summary span,
.pricing-breakdown-row span,
.pricing-breakdown-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.pricing-preview-summary strong,
.pricing-breakdown-row strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.2;
}

.pricing-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.pricing-breakdown-row {
  display: grid;
  gap: 3px;
}

.pricing-breakdown-row small {
  font-size: 11px;
  font-weight: 700;
}

.pricing-preview-empty {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fff;
}

.pricing-preview-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inline-status {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.inline-status:empty {
  display: none;
}

.inline-status.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.inline-status.is-error {
  background: var(--danger-bg);
  color: var(--danger);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.process-step {
  min-height: 88px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.process-step span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.process-step strong {
  font-size: 14px;
  line-height: 1.2;
}

.process-step small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.process-step.is-done {
  border-color: rgba(31, 122, 77, 0.22);
  background: var(--ok-bg);
}

.process-step.is-done span {
  background: var(--ok);
  color: #fff;
}

.process-step.is-current {
  border-color: rgba(227, 6, 19, 0.25);
  box-shadow: inset 4px 0 0 var(--brand-red);
}

.process-step.is-current span {
  background: var(--accent);
  color: #fff;
}

.process-step.is-waiting {
  color: #6e7b84;
  background: #f8fafb;
}

.handoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.handoff-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.handoff-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.readiness {
  margin-top: 12px;
  padding: 10px;
  border-radius: 7px;
}

.readiness.is-ready {
  background: var(--ok-bg);
  color: var(--ok);
}

.readiness.is-waiting {
  background: var(--warning-bg);
  color: var(--warning);
}

.readiness strong,
.handoff-summary span,
.document-metrics span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness ul,
.handoff-summary ul,
.document-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.handoff-summary {
  margin-top: 12px;
}

.handoff-summary span,
.document-metrics span {
  color: var(--muted);
}

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

.document-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.document-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.document-list {
  columns: 2;
  column-gap: 18px;
}

.optima-proforma-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.optima-proforma-card.is-error {
  border-color: var(--danger);
}

.optima-proforma-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.optima-proforma-heading > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.optima-proforma-heading strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.optima-proforma-card p,
.optima-proforma-card small {
  margin: 0;
  line-height: 1.45;
}

.optima-proforma-card p {
  font-size: 13px;
  font-weight: 700;
}

.optima-proforma-card small {
  color: var(--muted);
  font-weight: 700;
}

.optima-proforma-card .primary-button {
  justify-self: start;
}

.production-grid,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.admin-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.admin-tile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 3px;
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-tile:hover,
.admin-tile:focus-visible,
.admin-tile.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 12px 26px rgba(20, 39, 45, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.admin-tile.is-active {
  background: #fff;
}

.admin-tile-icon {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.admin-tile-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-tile strong {
  align-self: end;
  font-size: 15px;
  line-height: 1.2;
}

.admin-tile span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.admin-grid > .handoff-card {
  scroll-margin-top: 18px;
}

.admin-section {
  grid-column: 1 / -1;
}

.admin-section.is-hidden {
  display: none;
}

.admin-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  margin-top: 12px;
}

.admin-editor-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.rfid-admin-field small,
.auth-password-field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.rfid-admin-field input {
  letter-spacing: 0.12em;
}

.checkbox-field.rfid-clear-field {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  align-self: end;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.checkbox-field.rfid-clear-field input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  flex: 0 0 auto;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.permission-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.admin-list-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.admin-list-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.admin-list-heading strong {
  font-size: 15px;
}

.admin-list-heading span {
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.admin-record-list {
  display: grid;
  gap: 8px;
}

.admin-record {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.admin-record-main,
.admin-record-meta {
  min-width: 0;
}

.admin-record-main strong,
.admin-record-main span,
.admin-record-meta {
  display: block;
  overflow-wrap: anywhere;
}

.admin-record-main strong {
  font-size: 15px;
  line-height: 1.25;
}

.admin-record-main span,
.admin-record-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.admin-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.production-grid + .production-grid {
  margin-top: 10px;
}

.production-section-nav {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.production-section-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.production-section-nav a:hover,
.production-section-nav a:focus-visible,
.production-section-nav a.is-active {
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
}

.production-section-nav a.is-active {
  box-shadow: inset 0 -3px 0 var(--brand-red);
}

.production-section.is-hidden,
.production-grid.is-hidden {
  display: none;
}

.production-dashboard {
  margin-top: 18px;
  scroll-margin-top: 18px;
}

.production-dashboard-heading,
.production-dashboard-pane-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.production-dashboard-heading h3,
.production-dashboard-pane-heading h4 {
  margin: 0;
  letter-spacing: 0;
}

.production-dashboard-heading h3 {
  font-size: 20px;
}

.production-dashboard-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: capitalize;
}

.production-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-dashboard-metric {
  min-width: 0;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--steel);
  border-radius: 7px;
  background: #fff;
}

.production-dashboard-metric > span,
.production-dashboard-metric > strong,
.production-dashboard-metric > small {
  display: block;
  overflow-wrap: anywhere;
}

.production-dashboard-metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.production-dashboard-metric > strong {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.production-dashboard-metric > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.production-dashboard-metric.is-progress,
.production-dashboard-metric.is-week {
  border-top-color: var(--accent);
}

.production-dashboard-metric.is-success {
  border-top-color: var(--ok);
  background: color-mix(in srgb, var(--ok-bg) 45%, #fff);
}

.production-dashboard-metric.is-danger {
  border-top-color: var(--brand-red);
  background: color-mix(in srgb, var(--brand-red-soft) 52%, #fff);
}

.production-dashboard-metric.is-warning {
  border-top-color: var(--warning);
  background: color-mix(in srgb, var(--warning-bg) 58%, #fff);
}

.production-dashboard-details {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
  margin-top: 10px;
}

.production-dashboard-pane {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-dashboard-pane-heading span,
.production-alert-row span,
.production-active-task > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.production-dashboard-pane-heading h4 {
  margin-top: 2px;
  font-size: 15px;
}

.production-dashboard-pane-heading b {
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  text-align: center;
}

.production-alert-list,
.production-active-task-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.production-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 0 10px 10px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--steel);
}

.production-alert-row.is-danger {
  border-left-color: var(--brand-red);
}

.production-alert-row.is-warning {
  border-left-color: var(--warning);
}

.production-alert-row.is-success {
  border-left-color: var(--ok);
}

.production-alert-row strong,
.production-alert-row small,
.production-active-task strong,
.production-active-task small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.production-alert-row strong,
.production-active-task strong {
  font-size: 13px;
  line-height: 1.3;
}

.production-alert-row small,
.production-active-task small,
.production-dashboard-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.production-active-task {
  width: 100%;
  min-height: 68px;
  display: grid;
  justify-items: start;
  gap: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.production-active-task:hover,
.production-active-task:focus-visible {
  background: #fff;
  outline: 0;
}

.production-dashboard-empty {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 4px;
}

.production-dashboard-empty strong {
  font-size: 13px;
}

.production-weekly-plan {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-materials-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-materials-heading,
.production-material-door-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-materials-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.production-materials-heading > span {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.production-inventory-card,
.production-requirements-card {
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.production-inventory-card {
  border-top: 4px solid var(--steel);
}

.production-inventory-card.is-synced {
  border-top-color: var(--ok);
}

.production-inventory-card.is-waiting {
  border-top-color: var(--warning);
}

.production-inventory-heading,
.production-inventory-source {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.production-inventory-heading h4,
.production-requirements-heading h4 {
  margin: 0;
  font-size: 17px;
}

.production-inventory-heading > div:first-child > span,
.production-inventory-source small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-inventory-source {
  align-items: flex-end;
  flex-direction: column;
  text-align: right;
}

.production-inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.production-inventory-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-inventory-summary > div.is-positive {
  border-left-color: var(--ok);
}

.production-inventory-summary > div.is-danger {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 42%, #fff);
}

.production-inventory-summary span,
.production-inventory-summary strong {
  display: block;
}

.production-inventory-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-inventory-summary strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.production-inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.5fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-inventory-checkbox {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.production-inventory-checkbox input {
  width: auto;
  margin: 0;
}

.production-inventory-table-wrap {
  max-width: 100%;
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.production-inventory-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

.production-inventory-table th,
.production-inventory-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.production-inventory-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-inventory-table tbody tr:last-child td {
  border-bottom: 0;
}

.production-inventory-table tr.is-zero td {
  color: var(--muted);
}

.production-inventory-table tr.has-shortage td {
  background: color-mix(in srgb, var(--danger-bg) 38%, #fff);
  color: var(--danger);
}

.production-inventory-table td strong,
.production-inventory-table td small {
  display: block;
}

.production-inventory-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.production-inventory-empty {
  padding: 20px !important;
  color: var(--muted);
  text-align: center !important;
}

.production-inventory-result {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.production-requirements-card {
  margin-top: 18px;
}

.production-requirements-heading {
  margin-bottom: 4px;
}

.production-material-summary,
.production-material-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-material-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-material-summary > div.is-danger {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 42%, #fff);
}

.production-material-summary > div.is-warning {
  border-left-color: var(--warning);
  background: color-mix(in srgb, var(--warning-bg) 46%, #fff);
}

.production-material-summary span,
.production-material-summary strong,
.production-material-result span,
.production-material-result strong {
  display: block;
}

.production-material-summary span,
.production-material-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-material-summary strong {
  margin-top: 3px;
  font-size: 18px;
}

.production-material-filters {
  grid-template-columns: minmax(190px, 1.2fr) minmax(170px, 1fr) minmax(150px, 0.8fr) 78px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-material-result {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.production-material-result strong {
  font-size: 16px;
}

.production-material-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.production-material-door {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--steel);
  border-radius: 7px;
  background: #fff;
}

.production-material-door.has-shortage {
  border-left-color: var(--danger);
}

.production-material-door.has-ordered {
  border-left-color: var(--warning);
}

.production-material-door.is-ready {
  border-left-color: var(--ok);
}

.production-material-door-heading {
  align-items: center;
  padding: 11px 12px;
  background: var(--surface-2);
}

.production-material-door-heading span,
.production-material-door-heading strong,
.production-material-door-heading small {
  display: block;
  overflow-wrap: anywhere;
}

.production-material-door-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-material-door-heading strong {
  margin-top: 3px;
  font-size: 14px;
}

.production-material-door-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-material-rows {
  display: grid;
}

.production-material-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(130px, 0.72fr) minmax(190px, 1fr) 145px auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
}

.production-material-row.is-shortage {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 35%, #fff);
}

.production-material-row.is-ordered {
  border-left-color: var(--warning);
  background: color-mix(in srgb, var(--warning-bg) 36%, #fff);
}

.production-material-row.is-ready {
  border-left-color: var(--ok);
}

.production-material-name {
  min-width: 0;
  align-self: center;
}

.production-material-name span,
.production-material-name strong,
.production-material-name small {
  display: block;
  overflow-wrap: anywhere;
}

.production-material-name span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-material-name strong {
  margin-top: 3px;
  font-size: 13px;
}

.production-material-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.production-material-row label {
  min-width: 0;
}

.production-material-row input,
.production-material-row select {
  width: 100%;
}

.production-material-row > button {
  min-height: 42px;
  white-space: nowrap;
}

.production-material-updated {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.production-quality-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-quality-heading,
.production-quality-door-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-quality-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.production-quality-heading > span {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.production-quality-summary,
.production-quality-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-quality-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-quality-summary > div.is-danger {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 42%, #fff);
}

.production-quality-summary > div.is-success {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok-bg) 44%, #fff);
}

.production-quality-summary span,
.production-quality-summary strong,
.production-quality-result span,
.production-quality-result strong {
  display: block;
}

.production-quality-summary span,
.production-quality-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-quality-summary strong {
  margin-top: 3px;
  font-size: 18px;
}

.production-quality-filters {
  grid-template-columns: minmax(190px, 1.2fr) minmax(170px, 1fr) minmax(150px, 0.8fr) 78px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-quality-result {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.production-quality-result strong {
  font-size: 16px;
}

.production-quality-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.production-quality-door {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 7px;
  background: #fff;
}

.production-quality-door.is-waiting {
  border-left-color: var(--steel);
}

.production-quality-door.is-correction {
  border-left-color: var(--danger);
}

.production-quality-door.is-approved {
  border-left-color: var(--ok);
}

.production-quality-door-heading {
  align-items: center;
  padding: 11px 12px;
  background: var(--surface-2);
}

.production-quality-door-heading span,
.production-quality-door-heading strong,
.production-quality-door-heading small {
  display: block;
  overflow-wrap: anywhere;
}

.production-quality-door-heading > div:first-child > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-quality-door-heading > div:first-child > strong {
  margin-top: 3px;
  font-size: 14px;
}

.production-quality-door-heading > div:first-child > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-quality-door-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.production-quality-waiting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.production-quality-waiting strong,
.production-quality-waiting span {
  font-size: 11px;
}

.production-quality-waiting span {
  color: var(--muted);
  font-weight: 800;
}

.production-quality-rows {
  display: grid;
}

.production-quality-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) minmax(140px, 0.7fr) minmax(230px, 1.2fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
}

.production-quality-row.is-correction {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 35%, #fff);
}

.production-quality-row.is-passed {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok-bg) 24%, #fff);
}

.production-quality-name {
  min-width: 0;
  align-self: center;
}

.production-quality-name span,
.production-quality-name strong,
.production-quality-name small {
  display: block;
  overflow-wrap: anywhere;
}

.production-quality-name span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-quality-name strong {
  margin-top: 3px;
  font-size: 13px;
}

.production-quality-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.production-quality-row label {
  min-width: 0;
}

.production-quality-row input,
.production-quality-row select {
  width: 100%;
}

.production-quality-row > button {
  min-height: 42px;
  white-space: nowrap;
}

.production-quality-updated {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.production-dispatch-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-dispatch-heading,
.production-dispatch-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-dispatch-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.production-dispatch-heading > span {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.production-dispatch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-dispatch-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-dispatch-summary > div.is-success {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok-bg) 44%, #fff);
}

.production-dispatch-summary span,
.production-dispatch-summary strong {
  display: block;
}

.production-dispatch-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-dispatch-summary strong {
  margin-top: 3px;
  font-size: 18px;
}

.production-dispatch-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.production-dispatch-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 7px;
  background: #fff;
}

.production-dispatch-card.is-blocked {
  border-left-color: var(--steel);
}

.production-dispatch-card.is-ready,
.production-dispatch-card.is-released {
  border-left-color: var(--ok);
}

.production-dispatch-card-heading {
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
}

.production-dispatch-card-heading span,
.production-dispatch-card-heading strong,
.production-dispatch-card-heading small {
  display: block;
  overflow-wrap: anywhere;
}

.production-dispatch-card-heading > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-dispatch-card-heading > div > strong {
  margin-top: 3px;
  font-size: 15px;
}

.production-dispatch-card-heading > div > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-dispatch-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.production-dispatch-steps > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  padding: 10px;
  background: #fff;
}

.production-dispatch-steps > div + div {
  border-left: 1px solid var(--line);
}

.production-dispatch-steps > div > span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.production-dispatch-steps strong,
.production-dispatch-steps small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.production-dispatch-steps strong {
  font-size: 11px;
}

.production-dispatch-steps small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.production-dispatch-steps > div.is-complete {
  background: color-mix(in srgb, var(--ok-bg) 34%, #fff);
}

.production-dispatch-steps > div.is-complete > span {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}

.production-dispatch-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.production-dispatch-form label {
  min-width: 0;
}

.production-dispatch-form input,
.production-dispatch-form select,
.production-dispatch-form textarea {
  width: 100%;
  min-width: 0;
}

.production-dispatch-form label.is-wide {
  grid-column: 1 / -1;
}

.production-dispatch-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.production-dispatch-checklist > label {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  cursor: pointer;
}

.production-dispatch-checklist input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ok);
}

.production-dispatch-checklist strong,
.production-dispatch-checklist small {
  display: block;
  overflow-wrap: anywhere;
}

.production-dispatch-checklist strong {
  font-size: 12px;
}

.production-dispatch-checklist small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.production-dispatch-missing,
.production-dispatch-release-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 12px;
  padding: 9px 11px;
  border-left: 3px solid var(--warning);
  background: var(--warning-bg);
}

.production-dispatch-release-meta {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}

.production-dispatch-missing strong,
.production-dispatch-release-meta span {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-dispatch-missing span,
.production-dispatch-release-meta strong {
  min-width: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.production-dispatch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 14px 14px;
}

.production-dispatch-history {
  margin: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.production-dispatch-history summary {
  padding: 10px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.production-dispatch-history ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.production-dispatch-history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.production-dispatch-history strong,
.production-dispatch-history span {
  font-size: 10px;
}

.production-dispatch-history span {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

.production-reports-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-reports-heading,
.production-report-block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-reports-heading h3,
.production-report-block-heading h4 {
  margin: 0;
  letter-spacing: 0;
}

.production-reports-heading h3 {
  font-size: 19px;
}

.production-reports-heading > span,
.production-report-block-heading > span {
  max-width: 380px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.production-report-filters {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-report-filters label,
.production-report-filters input,
.production-report-filters select {
  min-width: 0;
  width: 100%;
}

.production-report-filters .small-button {
  min-height: 42px;
  white-space: nowrap;
}

.production-report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.production-report-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-report-metrics > div:nth-child(2),
.production-report-metrics > div:nth-child(4),
.production-report-metrics > div:nth-child(10) {
  border-left-color: var(--ok);
}

.production-report-metrics > div:nth-child(7),
.production-report-metrics > div:nth-child(8),
.production-report-metrics > div:nth-child(9) {
  border-left-color: var(--warning);
}

.production-report-metrics span,
.production-report-metrics strong {
  display: block;
  overflow-wrap: anywhere;
}

.production-report-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.production-report-metrics strong {
  margin-top: 4px;
  font-size: 18px;
}

.production-report-layout {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.production-report-block,
.production-report-history {
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.production-report-table-wrap {
  max-width: 100%;
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.production-report-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.production-report-table th,
.production-report-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.production-report-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-report-table tbody tr:last-child td {
  border-bottom: 0;
}

.production-report-table td strong,
.production-report-table td small {
  display: block;
}

.production-report-table td small {
  max-width: 420px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.production-report-stage-list {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.production-report-stage-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1.4fr) minmax(105px, auto);
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
}

.production-report-stage-row + .production-report-stage-row {
  border-top: 1px solid var(--line);
}

.production-report-stage-row > div:first-child strong,
.production-report-stage-row > div:first-child span {
  display: block;
}

.production-report-stage-row > div:first-child strong {
  font-size: 12px;
}

.production-report-stage-row > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.production-report-stage-row > strong {
  font-size: 12px;
  text-align: right;
}

.production-report-stage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.production-report-stage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.production-report-history {
  margin-top: 20px;
}

.production-report-timeline {
  display: grid;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.production-report-event {
  min-width: 0;
  display: grid;
  grid-template-columns: 125px 78px minmax(0, 1fr) minmax(120px, 180px);
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}

.production-report-event time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.production-report-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-report-category.is-materials {
  background: var(--warning-bg);
  color: var(--warning);
}

.production-report-category.is-quality {
  background: var(--ok-bg);
  color: var(--ok);
}

.production-report-category.is-dispatch {
  background: #e8eef4;
  color: var(--steel);
}

.production-report-category.is-audit {
  background: #f0e8ef;
  color: #76506f;
}

.production-report-event > div {
  min-width: 0;
}

.production-report-event > div strong,
.production-report-event > div span {
  display: block;
  overflow-wrap: anywhere;
}

.production-report-event > div strong {
  font-size: 12px;
}

.production-report-event > div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.production-report-event > strong {
  min-width: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.production-archive-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.production-archive-heading,
.production-audit-heading,
.production-audit-subheading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-archive-heading h3,
.production-audit-heading h4,
.production-audit-subheading h5 {
  margin: 0;
  letter-spacing: 0;
}

.production-archive-heading h3 {
  font-size: 19px;
}

.production-archive-heading > span,
.production-audit-subheading > span {
  max-width: 390px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.production-archive-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-archive-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--steel);
  background: var(--surface-2);
}

.production-archive-summary > div:nth-child(3),
.production-archive-summary > div:nth-child(4) {
  border-left-color: var(--ok);
}

.production-archive-summary span,
.production-archive-summary strong {
  display: block;
}

.production-archive-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-archive-summary strong {
  margin-top: 3px;
  font-size: 18px;
}

.production-archive-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(150px, 0.35fr) auto 76px;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-archive-filters label,
.production-archive-filters input,
.production-archive-filters select {
  min-width: 0;
  width: 100%;
}

.production-archive-filters .small-button {
  min-height: 42px;
}

.production-archive-result-count {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.production-archive-result-count span,
.production-archive-result-count strong {
  display: block;
}

.production-archive-result-count span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-archive-result-count strong {
  font-size: 16px;
}

.production-archive-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.production-archive-record {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 7px;
  background: #fff;
}

.production-archive-record.is-completed,
.production-archive-record.is-released {
  border-left-color: var(--ok);
}

.production-archive-record-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(390px, 1.7fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.production-archive-record-main > div:first-child span,
.production-archive-record-main > div:first-child strong,
.production-archive-record-main > div:first-child small {
  display: block;
  overflow-wrap: anywhere;
}

.production-archive-record-main > div:first-child span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-archive-record-main > div:first-child strong {
  margin-top: 3px;
  font-size: 14px;
}

.production-archive-record-main > div:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.production-archive-record-main dl {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.production-archive-record-main dl > div {
  min-width: 0;
}

.production-archive-record-main dt,
.production-archive-record-main dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.production-archive-record-main dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-archive-record-main dd {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 850;
}

.production-archive-record-actions {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.production-audit-detail {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.production-audit-heading {
  align-items: center;
}

.production-audit-heading > div {
  min-width: 0;
}

.production-audit-heading h4,
.production-audit-heading span {
  display: block;
  overflow-wrap: anywhere;
}

.production-audit-heading h4 {
  font-size: 16px;
}

.production-audit-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

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

.production-audit-metrics > div {
  min-width: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--steel);
  background: #fff;
}

.production-audit-metrics span,
.production-audit-metrics strong {
  display: block;
  overflow-wrap: anywhere;
}

.production-audit-metrics span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-audit-metrics strong {
  margin-top: 3px;
  font-size: 14px;
}

.production-audit-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.production-audit-dates > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.production-audit-dates dt,
.production-audit-dates dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.production-audit-dates dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-audit-dates dd {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
}

.production-audit-subheading {
  align-items: center;
  margin-top: 18px;
}

.production-audit-subheading h5 {
  font-size: 14px;
}

.production-audit-door-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.production-audit-door-list > div {
  min-width: 0;
  padding: 10px;
  border-left: 3px solid var(--steel);
  background: #fff;
}

.production-audit-door-list strong,
.production-audit-door-list span,
.production-audit-door-list small {
  display: block;
  overflow-wrap: anywhere;
}

.production-audit-door-list strong {
  font-size: 12px;
}

.production-audit-door-list span,
.production-audit-door-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.production-audit-timeline {
  max-height: 680px;
  overflow-y: auto;
  background: #fff;
}

.production-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.production-weekly-plan-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.production-weekly-plan-heading h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.production-weekly-plan-heading > div:first-child > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-plan-range-actions,
.production-plan-move-actions {
  display: flex;
  gap: 6px;
}

.production-plan-attention {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.production-plan-attention > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line));
  border-left: 4px solid var(--warning);
  border-radius: 7px;
  background: var(--warning-bg);
}

.production-plan-attention > section.is-overdue {
  border-color: color-mix(in srgb, var(--brand-red) 32%, var(--line));
  border-left-color: var(--brand-red);
  background: var(--brand-red-soft);
}

.production-plan-attention-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.production-plan-attention-heading span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-plan-attention-heading strong {
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  text-align: center;
}

.production-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.production-plan-week {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--steel);
  border-radius: 7px;
  background: #fff;
}

.production-plan-week.is-current {
  border-top-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 34%, #fff);
}

.production-plan-week.is-overloaded {
  border-top-color: var(--brand-red);
  background: color-mix(in srgb, var(--brand-red-soft) 42%, #fff);
}

.production-plan-week-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.production-plan-week-heading span,
.production-plan-week-heading h4,
.production-plan-week-heading small {
  display: block;
}

.production-plan-week-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-plan-week-heading h4 {
  margin: 2px 0 0;
  font-size: 17px;
  letter-spacing: 0;
}

.production-plan-week-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-capacity-control {
  width: 86px;
  display: grid;
  flex: 0 0 86px;
  gap: 4px;
}

.production-capacity-input {
  width: 100%;
  font-size: 10px;
}

.production-capacity-input input {
  min-width: 0;
  margin-top: 4px;
  padding: 7px;
  text-align: center;
}

.production-capacity-control .small-button {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 11px;
}

.production-capacity-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.8fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-2);
}

.production-capacity-status div,
.production-capacity-status strong,
.production-capacity-status span {
  min-width: 0;
}

.production-capacity-status strong,
.production-capacity-status span {
  display: block;
}

.production-capacity-status strong {
  font-size: 12px;
}

.production-capacity-status span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.production-capacity-status.is-overloaded strong,
.production-capacity-status.is-overloaded span {
  color: var(--danger);
}

.production-capacity-status progress {
  width: 100%;
  height: 9px;
  accent-color: var(--accent);
}

.production-capacity-status.is-overloaded progress {
  accent-color: var(--brand-red);
}

.production-plan-week-orders {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.production-plan-order {
  min-width: 0;
  padding: 10px 0 10px 10px;
  border-top: 1px solid var(--line);
  border-left: 3px solid var(--steel);
}

.production-plan-order.is-high {
  border-left-color: var(--warning);
}

.production-plan-order.is-urgent {
  border-left-color: var(--brand-red);
}

.production-plan-order-main {
  width: 100%;
  min-height: 0;
  display: grid;
  justify-items: start;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.production-plan-order-main:hover strong,
.production-plan-order-main:focus-visible strong {
  color: var(--accent-strong);
}

.production-plan-order-main:focus-visible {
  outline: 2px solid rgba(50, 125, 189, 0.28);
  outline-offset: 3px;
}

.production-plan-order-main span,
.production-plan-order-main strong,
.production-plan-order-main small {
  display: block;
  overflow-wrap: anywhere;
}

.production-plan-order-main span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-plan-order-main strong {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
}

.production-plan-order-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-plan-order-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(105px, 0.8fr) auto;
  gap: 6px;
  align-items: end;
  margin-top: 8px;
}

.production-plan-order-controls label {
  min-width: 0;
  font-size: 10px;
}

.production-plan-order-controls input,
.production-plan-order-controls select {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 7px;
  font-size: 12px;
}

.production-plan-move-actions .small-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  font-size: 17px;
}

.production-plan-week-empty {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

#productionOrdersSection,
#productionRouteSection,
#productionTeamSection,
#productionDocsSection {
  scroll-margin-top: 18px;
}

#productionOrdersSection,
#productionRouteSection,
#productionTeamSection {
  grid-column: 1 / -1;
}

.production-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-client-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-left: 8px;
  border-left: 3px solid var(--steel);
}

.production-client-card.is-priority-high {
  border-left-color: var(--warning);
}

.production-client-card.is-priority-urgent {
  border-left-color: var(--brand-red);
}

.production-order-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.production-client-card + .production-client-card {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.production-client-card.is-complete .production-client-toggle {
  border-color: rgba(31, 122, 77, 0.28);
  background: var(--ok-bg);
}

.production-order-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) 78px;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-order-toolbar label {
  min-width: 0;
}

.production-order-filter-count {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.production-order-filter-count span,
.production-order-filter-count strong {
  display: block;
}

.production-order-filter-count span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-order-filter-count strong {
  font-size: 16px;
}

.production-order-progress,
.production-door-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.production-order-progress span,
.production-door-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.production-client-card.is-complete .production-order-progress span,
.production-door-card.is-completed .production-door-progress span {
  background: var(--ok);
}

.production-order-detail {
  display: grid;
  gap: 12px;
}

.production-order-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.production-order-context > div {
  min-width: 0;
  padding: 10px;
  border-left: 3px solid var(--brand-red);
  background: var(--surface-2);
}

.production-order-context span,
.production-order-context strong {
  display: block;
}

.production-order-context span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-order-context strong {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-qr-toolbar,
.production-door-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.production-qr-toolbar {
  padding: 10px 12px;
  border-left: 3px solid var(--brand-blue);
  background: var(--surface-2);
}

.production-qr-toolbar span,
.production-qr-toolbar strong {
  display: block;
}

.production-qr-toolbar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-qr-toolbar strong {
  margin-top: 3px;
  font-size: 13px;
}

.production-client-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.5fr) minmax(120px, 0.8fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.production-client-toggle:hover,
.production-client-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  outline: 0;
}

.production-client-toggle small,
.production-week-hint,
.production-door-card span,
.production-door-card dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.production-client-toggle strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.production-week-row {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 160px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.production-week-hint {
  padding: 10px;
  border-radius: 7px;
  background: var(--surface-2);
  text-transform: none;
}

.production-door-list {
  display: grid;
  gap: 8px;
}

.production-door-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--steel);
  border-radius: 7px;
  background: #fff;
}

.production-door-card.is-in-progress {
  border-left-color: var(--warning);
}

.production-door-card.is-quality {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 22%, #fff);
}

.production-door-card.is-completed {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok-bg) 28%, #fff);
}

.production-door-card strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.production-door-toggle {
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: start;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.production-door-toggle:hover strong,
.production-door-toggle:focus-visible strong {
  color: var(--accent-strong);
}

.production-door-toggle:focus-visible {
  outline: 2px solid rgba(50, 125, 189, 0.28);
  outline-offset: 4px;
}

.production-door-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.production-serial-number {
  display: block;
  width: fit-content;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 3px solid var(--brand-red);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.4;
}

.production-door-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--surface-2);
}

.production-door-summary span,
.production-door-summary strong {
  display: block;
}

.production-door-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-door-summary strong {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
}

.production-door-detail {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.production-door-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.production-door-specs > div {
  min-width: 0;
  padding: 9px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.production-door-specs > div.is-wide {
  grid-column: span 2;
}

.production-door-specs dt,
.production-door-specs dd {
  display: block;
}

.production-door-specs dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-door-specs dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-door-stages {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-door-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-door-subheading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-door-subheading strong {
  margin: 0;
  font-size: 12px;
}

.production-door-stages ol {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.production-door-stage-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.production-door-stage-row > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.production-door-stage-row.is-in-progress > span {
  background: var(--warning-bg);
  color: var(--warning);
}

.production-door-stage-row.is-completed > span {
  background: var(--ok-bg);
  color: var(--ok);
}

.production-door-stage-row strong,
.production-door-stage-row small {
  display: block;
}

.production-door-stage-row strong {
  margin: 0;
  font-size: 12px;
}

.production-door-stage-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-notes-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.production-notes-editor.is-order {
  border-left-color: var(--brand-red);
}

.production-notes-editor label {
  min-width: 0;
}

.production-notes-editor textarea {
  min-height: 76px;
  resize: vertical;
}

.production-door-card div {
  min-width: 0;
}

.production-door-card dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-route {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.production-progress-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.production-progress-row + .production-progress-row {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.production-progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.production-progress-heading strong,
.production-progress-heading span {
  display: block;
}

.production-progress-heading strong {
  font-size: 14px;
  line-height: 1.3;
}

.production-progress-heading div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-progress-count {
  min-width: 48px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.production-progress-count.is-complete {
  background: var(--ok-bg);
  color: var(--ok);
}

.production-progress-sync {
  min-height: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-progress-sync.is-error {
  color: var(--danger);
}

.assignment-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.assignment-list li {
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.assignment-list strong,
.assignment-list span {
  display: block;
}

.assignment-list strong {
  font-size: 13px;
}

.assignment-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-stage-assignment {
  margin-top: 3px;
  color: var(--steel) !important;
  font-weight: 800;
}

.production-assignment-summary,
.production-assignment-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.production-assignment-summary > div {
  min-width: 0;
  padding: 10px;
  border-left: 3px solid var(--brand-red);
  background: var(--surface-2);
}

.production-assignment-summary span,
.production-assignment-summary strong,
.production-assignment-result span,
.production-assignment-result strong {
  display: block;
}

.production-assignment-summary span,
.production-assignment-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-assignment-summary strong {
  margin-top: 3px;
  font-size: 17px;
}

.production-assignment-filters {
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(160px, 1fr) 78px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.production-assignment-result {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.production-assignment-result strong {
  font-size: 16px;
}

.production-assignment-warning {
  margin-top: 10px;
}

.production-assignment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.production-assignment-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) 92px minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--steel);
  border-radius: 7px;
  background: #fff;
}

.production-assignment-row.is-actionable {
  border-left-color: var(--warning);
}

.production-assignment-row.is-started {
  border-left-color: var(--ok);
}

.production-assignment-row.is-blocked {
  border-color: rgba(163, 58, 54, 0.34);
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 34%, #fff);
}

.production-assignment-task {
  min-width: 0;
}

.production-assignment-task span,
.production-assignment-task strong,
.production-assignment-task small {
  display: block;
  overflow-wrap: anywhere;
}

.production-assignment-task span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-assignment-task strong {
  margin-top: 3px;
  font-size: 14px;
}

.production-assignment-task small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-assignment-row label {
  min-width: 0;
}

.production-assignment-row select {
  width: 100%;
}

.production-assignment-row .status-pill {
  align-self: center;
  justify-self: stretch;
  text-align: center;
}

.production-assignment-actions {
  display: grid;
  gap: 6px;
}

.production-assignment-actions button {
  min-height: 42px;
  white-space: nowrap;
}

.production-block-notice,
.production-block-editor {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 10px;
  border-left: 3px solid var(--danger);
  background: var(--danger-bg);
}

.production-block-notice span,
.production-block-notice strong,
.production-block-notice small {
  display: block;
}

.production-block-notice span,
.worker-block-notice span {
  color: var(--danger);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-block-notice strong {
  margin-top: 3px;
  font-size: 13px;
}

.production-block-notice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.production-block-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.production-block-editor > div {
  display: flex;
  gap: 6px;
}

.production-door-stage-row.is-blocked {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-bg) 52%, #fff);
}

.production-stage-block {
  display: block;
  margin-top: 3px;
  color: var(--danger);
  font-weight: 850;
}

.worker-identity-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.worker-identity-bar label {
  width: min(420px, 100%);
}

.worker-identity-bar > div {
  min-width: 120px;
  padding: 8px 10px;
  border-left: 3px solid var(--brand-red);
  background: #fff;
}

.worker-identity-bar span,
.worker-identity-bar strong {
  display: block;
}

.worker-identity-bar span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-identity-bar strong {
  margin-top: 3px;
  font-size: 17px;
}

.worker-task-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.worker-task-card.is-started {
  border-color: rgba(31, 122, 77, 0.46);
  box-shadow: inset 4px 0 0 var(--ok);
}

.worker-task-card.is-blocked {
  border-color: rgba(163, 58, 54, 0.46);
  box-shadow: inset 4px 0 0 var(--danger);
}

.worker-block-notice {
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid var(--danger);
  background: var(--danger-bg);
}

.worker-material-notice {
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid var(--warning);
  background: var(--warning-bg);
}

.worker-material-notice span,
.worker-material-notice strong,
.worker-material-notice small {
  display: block;
}

.worker-material-notice span {
  color: var(--warning);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-material-notice strong,
.worker-material-notice small {
  margin-top: 3px;
}

.worker-material-notice strong {
  font-size: 13px;
}

.worker-material-notice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.worker-block-notice strong,
.worker-block-notice small {
  display: block;
  margin-top: 3px;
}

.worker-block-notice strong {
  font-size: 13px;
}

.worker-block-notice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.worker-task-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.worker-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.worker-task-head h3 {
  margin: 0;
  font-size: 20px;
}

.worker-stage-detail {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 11px;
  border-left: 4px solid var(--brand-red);
  background: var(--surface-2);
}

.worker-stage-detail span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-stage-detail strong {
  font-size: 14px;
  line-height: 1.35;
}

.worker-task-start-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.worker-task-start-meta strong {
  color: var(--ink);
  text-align: right;
}

.worker-task-action {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--brand-red);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.worker-task-action.is-finish {
  background: var(--ok);
}

.worker-task-action:hover:not(:disabled) {
  filter: brightness(0.94);
}

.worker-task-action:focus-visible {
  outline: 3px solid rgba(32, 91, 122, 0.25);
  outline-offset: 2px;
}

.worker-task-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.access-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

#roleMatrix {
  max-width: 100%;
  overflow-x: auto;
}

.access-table.permission-table {
  margin-top: 14px;
}

.access-table th,
.access-table td {
  border: 1px solid var(--line);
  padding: 9px;
  text-align: center;
  overflow-wrap: anywhere;
}

.access-table th:first-child {
  text-align: left;
}

.access-table thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.access-table td.is-blocked {
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.permission-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.pricing-admin-card {
  grid-column: 1 / -1;
}

.pricing-admin-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.pricing-admin-grid,
.pricing-admin-subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pricing-admin-subgrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.recipe-pricing-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 34%, #fff);
}

.recipe-pricing-panel h4 {
  margin: 0;
  font-size: 18px;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.recipe-settings-grid {
  margin-top: 14px;
}

.recipe-material-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.recipe-material-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.recipe-material-cost-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.recipe-cost-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 130px 76px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.recipe-cost-row > span:first-child,
.recipe-cost-row strong,
.recipe-cost-row small {
  display: block;
  min-width: 0;
}

.recipe-cost-row strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.recipe-cost-row small,
.recipe-cost-row > span:last-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.recipe-cost-row input {
  min-width: 0;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .workspace.without-quote {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .quote-menu {
    grid-column: 2;
    position: static;
    max-height: none;
  }

  .door-stage {
    min-height: 430px;
  }

  .production-material-row {
    grid-template-columns: minmax(180px, 1fr) 140px minmax(170px, 1fr);
  }

  .production-quality-row {
    grid-template-columns: minmax(190px, 1fr) 140px minmax(190px, 1fr);
  }

  .production-dispatch-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-report-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .production-report-filters .small-button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .workspace.without-quote {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .side-menu {
    min-height: calc(100vh - 104px);
    padding: 10px;
  }

  .side-menu-title {
    text-align: center;
  }

  .side-logo {
    width: 118px;
    margin-right: auto;
    margin-left: auto;
  }

  .side-nav-item {
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 10px;
    text-align: left;
    font-size: 12px;
  }

  .side-menu-footer {
    display: none;
  }

  .quote-menu {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .rfid-session-hint {
    display: none;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    width: min(210px, 70vw);
  }

  .config-panel,
  .summary-panel,
  .offers-panel,
  .order-panel,
  .production-panel,
  .worker-panel,
  .admin-panel,
  .quote-menu {
    padding: 12px;
  }

  .field-grid,
  .order-grid,
  .detail-grid,
  .model-strip,
  .handoff-grid,
  .production-grid,
  .admin-grid,
  .admin-tile-grid,
  .production-metrics,
  .production-dashboard-details,
  .production-order-toolbar,
  .production-assignment-summary,
  .production-assignment-filters,
  .production-assignment-row,
  .production-block-editor,
  .production-material-filters,
  .production-inventory-toolbar,
  .production-material-row,
  .production-quality-filters,
  .production-quality-row,
  .production-dispatch-form,
  .production-dispatch-checklist,
  .production-dispatch-steps,
  .production-door-summary,
  .production-door-specs,
  .production-notes-editor,
  .quote-menu-metrics,
  .pricing-preview-summary,
  .admin-manager-layout,
  .permission-check-grid,
  .admin-record,
  .pricing-admin-grid,
  .pricing-admin-subgrid,
  .recipe-cost-row,
  .offers-toolbar,
  .payment-details,
  .production-client-toggle,
  .production-week-row,
  .production-door-card dl,
  .production-order-context,
  .worker-task-list {
    grid-template-columns: 1fr;
  }

  .recipe-material-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

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

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

  .production-report-filters,
  .production-report-stage-row {
    grid-template-columns: 1fr;
  }

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

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

  .production-archive-filters,
  .production-archive-record-main,
  .production-audit-dates {
    grid-template-columns: 1fr;
  }

  .production-archive-record-main dl,
  .production-audit-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-archive-record-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .production-report-stage-row > strong {
    text-align: left;
  }

  .production-report-event {
    grid-template-columns: minmax(105px, auto) minmax(76px, auto);
    align-items: start;
  }

  .production-report-event > div,
  .production-report-event > strong {
    grid-column: 1 / -1;
    text-align: left;
  }

  .production-progress-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .worker-identity-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .worker-identity-bar label,
  .worker-identity-bar > div {
    width: 100%;
  }

  .production-dashboard-heading,
  .production-dashboard-pane-heading,
  .production-alert-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .production-dashboard-heading,
  .production-dashboard-pane-heading {
    flex-direction: column;
  }

  .production-alert-row .small-button {
    width: 100%;
  }

  .production-weekly-plan-heading,
  .production-plan-week-heading,
  .production-materials-heading,
  .production-inventory-heading,
  .production-material-door-heading,
  .production-quality-heading,
  .production-quality-door-heading,
  .production-dispatch-heading,
  .production-dispatch-card-heading,
  .production-reports-heading,
  .production-report-block-heading,
  .production-archive-heading,
  .production-audit-heading,
  .production-audit-subheading {
    align-items: stretch;
    flex-direction: column;
  }

  .production-inventory-source {
    align-items: flex-start;
    text-align: left;
  }

  .production-materials-heading > span {
    max-width: none;
    text-align: left;
  }

  .production-quality-heading > span {
    max-width: none;
    text-align: left;
  }

  .production-dispatch-heading > span {
    max-width: none;
    text-align: left;
  }

  .production-reports-heading > span,
  .production-report-block-heading > span,
  .production-archive-heading > span,
  .production-audit-subheading > span {
    max-width: none;
    text-align: left;
  }

  .production-dispatch-steps > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .production-dispatch-missing,
  .production-dispatch-release-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-dispatch-missing span,
  .production-dispatch-release-meta strong {
    text-align: left;
  }

  .production-dispatch-history li {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-dispatch-history span {
    text-align: left;
  }

  .production-material-door-heading .small-button {
    width: 100%;
  }

  .production-material-updated {
    grid-column: auto;
    text-align: left;
  }

  .production-quality-door-actions,
  .production-quality-waiting {
    align-items: stretch;
    flex-direction: column;
  }

  .production-quality-door-actions .small-button {
    width: 100%;
  }

  .production-quality-updated {
    grid-column: auto;
    text-align: left;
  }

  .production-plan-range-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .production-plan-range-actions .small-button {
    width: 100%;
    min-width: 0;
    padding-left: 7px;
    padding-right: 7px;
    white-space: normal;
  }

  .production-plan-attention,
  .production-plan-grid,
  .production-plan-order-controls,
  .production-capacity-status {
    grid-template-columns: 1fr;
  }

  .production-capacity-control,
  .production-capacity-input {
    width: 100%;
    flex-basis: auto;
  }

  .production-plan-move-actions .small-button {
    flex: 1 1 50%;
  }

  .production-door-specs > div.is-wide {
    grid-column: auto;
  }

  .production-door-actions {
    justify-content: flex-start;
  }

  .production-notes-editor .small-button {
    width: 100%;
  }

  .production-progress-count {
    align-self: flex-start;
  }

  .document-metrics {
    grid-template-columns: 1fr;
  }

  .document-list {
    columns: 1;
  }

  .subsection-heading,
  .client-picker-item {
    align-items: stretch;
    flex-direction: column;
  }

  .configurator-actions {
    justify-content: stretch;
  }

  .configurator-actions .primary-button {
    width: 100%;
  }

  .admin-record-actions {
    justify-content: stretch;
  }

  .admin-record-actions .small-button {
    flex: 1 1 120px;
  }

  .offer-sheet-header,
  .offer-brand-block,
  .offer-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .offer-brand-block img {
    width: 132px;
  }

  .offer-brand-block h2 {
    font-size: 20px;
  }

  .offer-lead,
  .offer-terms,
  .offer-parties {
    grid-template-columns: 1fr;
  }

  .offer-parties,
  .offer-section,
  .offer-payment {
    padding-left: 14px;
    padding-right: 14px;
  }

  .offer-sheet-header,
  .offer-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .subsection-actions {
    justify-content: flex-start;
  }

  .order-heading-actions {
    justify-content: flex-start;
  }

  .offers-heading-actions,
  .offer-save-heading {
    justify-content: flex-start;
  }

  .client-picker-meta {
    flex: 1 1 auto;
    text-align: left;
  }

  .door-stage {
    min-height: 360px;
  }

  .wall-opening {
    width: min(78vw, 320px);
    max-width: calc(100% - 72px);
  }

  .door-measure.side {
    right: 8px;
  }
}

@media (max-width: 560px) {
  .rfid-login-screen {
    padding: 12px;
  }

  .rfid-login-card {
    padding: 22px 18px;
  }

  .login-method-panel {
    min-height: 230px;
    padding-right: 2px;
    padding-left: 2px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .workspace.without-quote {
    grid-template-columns: 1fr;
  }

  .side-menu {
    position: static;
    min-height: auto;
    padding: 12px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-qr-toolbar,
  .production-door-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .production-dispatch-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .production-dispatch-actions .small-button {
    width: 100%;
  }

  .production-report-metrics {
    grid-template-columns: 1fr;
  }

  .production-archive-record-main dl,
  .production-audit-metrics {
    grid-template-columns: 1fr;
  }

  .production-archive-record-actions .small-button,
  .production-audit-heading .small-button {
    width: 100%;
  }

  .side-menu-footer {
    display: block;
  }

  .quote-menu {
    grid-column: 1;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-header,
  .side-menu,
  .quote-menu,
  .config-panel .step-card:not(.drawings-step),
  .drawings-step .section-heading,
  .offers-panel,
  .order-panel,
  .summary-actions,
  .warning-list,
  .summary-text-source {
    display: none;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .config-panel,
  .summary-panel {
    border: 0;
    padding: 0;
  }

  .drawings-step {
    display: block;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
  }

  .drawings-step .step-body[hidden] {
    display: block;
  }

  .offer-sheet {
    border: 0;
    box-shadow: none;
  }

  .offer-table-wrap {
    overflow: visible;
  }

  .offer-table {
    min-width: 0;
  }
}
