:root {
  --ink: #13201d;
  --muted: #68736f;
  --paper: #f4f5f1;
  --panel: #ffffff;
  --line: #dfe4df;
  --brand: #df4f24;
  --brand-dark: #ad3718;
  --teal: #165c55;
  --soft-teal: #e3efec;
  --warning: #8a5c00;
  --soft-warning: #fff4d5;
  --danger: #a52d2d;
  --soft-danger: #fde9e7;
  --shadow: 0 12px 35px rgba(25, 45, 40, .07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body {
  display: flex;
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  flex-direction: column;
  background: var(--paper);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.quote-inquiry-shell > .back-link { display: inline-flex; margin-bottom: 22px; }
.quote-inquiry-panel > form > label { margin-bottom: 24px; }
.quote-inquiry-panel .form-actions { flex-wrap: wrap; }
.quote-inquiry-panel .form-actions [role="status"] { flex-basis: 100%; }
.quote-inquiry-panel .form-actions [role="status"]:empty { display: none; }
.quote-attachments { min-width: 0; margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.quote-attachments legend { padding: 0 7px; color: var(--ink); font-size: 14px; font-weight: 600; }
.quote-attachments__help { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.quote-attachments__list { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.quote-attachments__list:empty, .quote-attachments__error:empty { display: none; }
.quote-attachments__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.quote-attachments__name { overflow-wrap: anywhere; font-size: 13px; }
.quote-attachments__list small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.quote-attachments__remove { min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--danger); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quote-attachments__remove:disabled { cursor: wait; opacity: .55; }
.quote-attachments__error { margin: 10px 0 0; }
.quote-materials > .muted { font-size: 13px; line-height: 1.5; }
.quote-materials__list { margin: 18px 0 0; padding: 0; list-style: none; }
.quote-materials__list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.quote-materials__list a { min-width: 0; overflow-wrap: anywhere; color: var(--teal); text-underline-offset: 3px; }
.quote-materials__list small { color: var(--muted); white-space: nowrap; }
@media (max-width: 540px) {
  .quote-attachments { padding: 12px; }
  .quote-attachments__list li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .quote-attachments__name { grid-column: 1 / -1; }
}

.topbar {
  height: 74px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); display: flex;
  justify-content: space-between; align-items: center; background: #11231f; color: white;
  border-bottom: 3px solid var(--brand);
}
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 2px solid var(--brand); color: var(--brand); font-weight: 900; font-size: 21px; transform: skew(-7deg); }
.brand strong { display: block; font-size: 16px; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: #a9b9b4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.api-link { padding: 8px 13px; border: 1px solid #38534d; border-radius: 7px; color: #c9d5d1; text-decoration: none; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.admin-menu { position: relative; }
.admin-menu > summary { display: inline-flex; min-height: 38px; align-items: center; list-style: none; cursor: pointer; }
.admin-menu > summary::-webkit-details-marker { display: none; }
.admin-menu > summary::after { margin-left: 8px; content: "⌄"; font-size: 12px; }
.admin-menu[open] > summary { border-color: #8aa39d; background: rgba(255, 255, 255, .08); }
.admin-menu__items {
  position: absolute;
  z-index: 100;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 240px;
  padding: 8px;
  border: 1px solid #38534d;
  border-radius: 9px;
  background: #172d27;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .28);
}
.admin-menu__items a { padding: 11px 12px; border-radius: 6px; color: #edf3f1; text-decoration: none; font-size: 13px; font-weight: 700; }
.admin-menu__items a:hover { background: rgba(255, 255, 255, .08); }
.admin-menu__items a:focus-visible, .admin-menu > summary:focus-visible { outline: 3px solid #f1a68f; outline-offset: 2px; }
.account-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #527069; border-radius: 7px; background: transparent; color: white; text-decoration: none; font-size: 13px; font-weight: 750; cursor: pointer; }
.account-link:hover { border-color: #8aa39d; background: rgba(255, 255, 255, .06); }
.account-link.subtle { min-height: 36px; color: #c9d5d1; }
.logout-form { margin: 0; }
.account-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.account-chip strong, .account-chip small { display: block; }
.account-chip strong { max-width: 190px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-chip small { margin-top: 2px; color: #a9b9b4; font-size: 10px; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: white; font-size: 13px; font-weight: 900; }
.account-link:focus-visible, .api-link:focus-visible, .brand:focus-visible, .back-link:focus-visible { outline: 3px solid #f1a68f; outline-offset: 3px; }

.page-shell { width: 100%; max-width: 1280px; margin: 0 auto; padding: 52px 24px 80px; flex: 1; }
.hero { display: grid; grid-template-columns: 1fr 260px; align-items: end; gap: 40px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 9px; color: var(--brand-dark); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 850px; font-size: clamp(34px, 4.4vw, 61px); letter-spacing: -.045em; line-height: .98; }
h2 { display: inline; margin: 0; font-size: 22px; letter-spacing: -.025em; }
h3 { font-size: 15px; }
.lead { max-width: 760px; margin: 17px 0 0; color: var(--muted); line-height: 1.6; font-size: 17px; }
.compact-lead { margin-top: 10px; }
.hero-stat { padding: 20px; border-left: 3px solid var(--brand); background: #e9ebe5; }
.hero-stat strong, .hero-stat span { display: block; }
.hero-stat strong { font-size: 24px; }
.hero-stat span { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }

.panel { margin-top: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.calculation-shell { max-width: 920px; padding-top: 32px; }
.calculation-intro h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.calculation-intro .lead { margin-top: 12px; }
.calculation-intro__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.calculation-intro__meta a { color: var(--teal); text-underline-offset: 3px; }
.calculation-support { margin-top: 20px; color: var(--muted); font-size: 14px; }
.calculation-support a { color: var(--teal); }
.upload-panel .dropzone { min-height: 155px; padding: 20px; }
.dropzone:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.calculation-options { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calculation-options > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 700; }
.calculation-options > summary span { display: block; margin: 5px 0 0 18px; color: var(--muted); font-size: 13px; font-weight: 500; }
.calculation-options[open] { padding-bottom: 18px; }
.calculation-options .legal-consent-check { margin-bottom: 12px; }
.estimate-explanation, .request-settings { margin-top: 18px; font-size: 14px; line-height: 1.6; }
.estimate-explanation > summary, .request-settings > summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 700; }
summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
.draft-restore:has(button:not([hidden])) { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.production-terms { padding-bottom: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 800; }

.dropzone { display: grid; place-items: center; min-height: 190px; padding: 28px; border: 1.5px dashed #9baba5; border-radius: 10px; background: #f8faf7; text-align: center; cursor: pointer; transition: .18s ease; }
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: #fff7f3; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone strong { max-width: 100%; overflow-wrap: anywhere; font-size: 17px; }
.dropzone small { margin-top: 6px; color: var(--muted); }
.drop-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 13px; border-radius: 50%; background: var(--soft-teal); color: var(--teal); font-size: 24px; }
.process-selection {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(280px, 1.2fr);
  align-items: start;
  gap: 24px;
  margin-top: 20px;
  padding: 17px;
  border: 1px solid #c9d9d4;
  border-radius: 8px;
  background: #f2f8f6;
}
.process-selection__category { min-width: 0; }
.process-selection__category > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.process-selection__category strong { display: block; color: var(--teal); font-size: 16px; }
.process-selection__category p { margin: 5px 0 0; color: #596b65; font-size: 12px; line-height: 1.45; }
.process-selection__field { min-width: 0; }

label { display: grid; gap: 7px; color: #38443f; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cbd3cf; border-radius: 7px; background: white; color: var(--ink); outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22, 92, 85, .1); }
input[readonly] { background: #f0f2ef; color: #57615d; cursor: default; }
.field-help {
  display: block;
  margin-top: 1px;
  color: #596b65;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}
#material-code, #cnc-process-preference { min-width: 0; min-height: 44px; max-width: 100%; }
.form-grid { display: grid; gap: 18px; margin: 22px 0; }
.form-grid.one { grid-template-columns: minmax(220px, 1fr); }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.form-grid.three > label { min-width: 0; align-content: start; }
.form-grid.three > label > input:not([type="checkbox"]):not([type="radio"]),
.form-grid.three > label > select {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
}
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.compact-grid { margin: 13px 0; }
.optional-fields { margin: 20px 0; padding: 14px 17px; border: 1px solid var(--line); border-radius: 8px; }
.optional-fields summary, .breakdown summary, .raw-details summary { cursor: pointer; font-weight: 750; }
.optional-fields .form-grid { margin-bottom: 4px; }
.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.upload-panel .form-actions { flex-wrap: wrap; }
#upload-status:empty { display: none; }
#upload-status.upload-status--error { flex-basis: 100%; color: #8f2c27; }
.legal-consent {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #b8ccc6;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  background: #f2f8f6;
}
.legal-consent-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 44px;
  padding: 5px 0;
  color: #35453f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  cursor: pointer;
}
.legal-consent-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
  cursor: pointer;
}
.legal-consent-check input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(22, 92, 85, .32);
  outline-offset: 3px;
  box-shadow: none;
}
.legal-consent a {
  color: var(--teal);
  font-weight: 800;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.legal-consent a:focus-visible {
  outline: 3px solid rgba(22, 92, 85, .32);
  outline-offset: 3px;
}
.legal-consent__details {
  margin: 7px 0 0 33px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}
.legal-consent__details strong { color: #35453f; font-weight: 750; }
.legal-consent--compact { padding: 0; border: 0; background: none; }
.legal-consent--compact .legal-consent-check { font-weight: 500; }
.legal-consent--compact .legal-consent__details { margin-top: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: 7px; font-weight: 750; text-decoration: none; cursor: pointer; transition: .15s ease; }
.button:disabled { opacity: .55; cursor: wait; }
.button.primary { background: var(--brand); color: white; }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: var(--teal); color: white; }
.button.secondary:hover { background: #0d4943; }
.button.ghost { border-color: #b9c4bf; background: transparent; color: var(--ink); }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 13px; background: #f1f3ef; color: #58645f; text-align: left; text-transform: uppercase; letter-spacing: .055em; font-size: 10px; }
td { padding: 14px 13px; border-bottom: 1px solid #e6eae6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.table-subtitle { display: block; max-width: 380px; margin-top: 4px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.row-link { color: var(--teal); font-weight: 750; text-decoration: none; white-space: nowrap; }
.empty-state { display: grid; place-items: center; padding: 45px 15px; color: var(--muted); text-align: center; }
.empty-state span { font-size: 34px; color: #93a49e; }
.empty-state strong { margin-top: 8px; color: var(--ink); }
.empty-state p { margin: 7px 0 0; }
.empty-state.small { padding: 27px 10px; }

.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 99px; background: #ebeeeb; color: #4f5a56; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-badge.large { min-height: 34px; padding: 6px 13px; }
.status-badge[data-status$="processing"], .status-badge[data-status$="queued"], .status-badge[data-status="uploaded"], .status-badge[data-status="cad_ready"] { background: #e2edf6; color: #205878; }
.status-badge[data-status="ready_for_review"] { background: var(--soft-warning); color: var(--warning); }
.status-badge[data-status="approved"] { background: var(--soft-teal); color: var(--teal); }
.status-badge[data-status$="failed"], .status-badge[data-status="invalid_input"] { background: var(--soft-danger); color: var(--danger); }

.back-link { display: inline-block; margin-bottom: 22px; color: var(--teal); text-decoration: none; font-size: 13px; font-weight: 750; }
.job-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.job-header h1 { font-size: clamp(31px, 4vw, 52px); }
.job-actions { display: flex; align-items: center; gap: 10px; }
.estimate-pending-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.estimate-pending-panel .calculation-actions { width: auto; flex-shrink: 0; }
.estimate-pending-panel .calculation-actions__secondary { padding-top: 0; border-top: 0; }
.polling-status { margin: 20px 0 0; color: var(--danger); line-height: 1.5; }
.polling-status:empty { display: none; }
.estimate-result { display: flow-root; }
.estimate-result.is-revealing { overflow: clip; }
.alert { margin-top: 20px; padding: 15px 18px; border-radius: 8px; line-height: 1.45; }
.alert.error { border: 1px solid #efc4bf; background: var(--soft-danger); color: var(--danger); }
.material-review-note {
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid #ead49a;
  border-left: 3px solid #c68d12;
  border-radius: 8px;
  background: var(--soft-warning);
  color: #654b10;
  font-size: 13px;
  line-height: 1.5;
}
.material-review-note strong { margin-right: 4px; }
.progress-card { display: flex; align-items: center; gap: 15px; margin-top: 22px; padding: 16px 19px; border: 1px solid #c7dbe7; border-radius: 9px; background: #eef7fc; }
.progress-card p { margin: 3px 0 0; color: #547080; font-size: 13px; }
.spinner { width: 25px; height: 25px; border: 3px solid #b9d4e2; border-top-color: #266987; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); gap: 24px; }
.model-panel, .cad-panel { min-width: 0; }
.cad-panel { display: flex; flex-direction: column; }
.cad-panel > .empty-state { flex: 1; }
.model-viewer, .viewer-placeholder { height: 470px; border-radius: 8px; background: radial-gradient(circle at 50% 35%, #33433e, #14211e 75%); overflow: hidden; }
.model-viewer { position: relative; }
.model-viewer canvas { display: block; width: 100%; height: 100%; }
.model-loading { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; background: #172620; color: #c5d1cd; font-size: 13px; }
.viewer-placeholder { display: grid; place-items: center; align-content: center; color: #a8bbb4; }
.viewer-placeholder span { font-size: 50px; }
.viewer-placeholder p { color: #c6d3ce; }
.viewer-placeholder--progress {
  border: 1px solid var(--line);
  background: #f8faf8;
  color: var(--ink);
}
.model-progress__content { display: flex; align-items: center; gap: 16px; max-width: 390px; padding: 24px; }
.viewer-placeholder .model-progress__spinner { flex: 0 0 auto; width: 29px; height: 29px; font-size: 0; }
.model-progress__content strong { display: block; font-size: 17px; line-height: 1.35; }
.viewer-placeholder .model-progress__content p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.viewer-hint { margin: 9px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.projection-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.projection-strip:empty { display: none; }
.projection-thumbnail {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #f4f6f5;
  cursor: zoom-in;
  touch-action: manipulation;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.projection-thumbnail:hover { border-color: #91a69f; background: #eef2f1; }
.projection-thumbnail:focus-visible {
  outline: 3px solid rgba(22, 92, 85, .28);
  outline-offset: 2px;
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--panel);
}
.projection-thumbnail img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
}
.quality-badge { padding: 5px 9px; border-radius: 5px; background: var(--soft-teal); color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.metric-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.metric-grid dt { color: var(--muted); font-size: 11px; }
.metric-grid dd { margin: 5px 0 0; font-weight: 800; font-size: 17px; }
.estimate-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.estimate-progress strong { font-size: 16px; }
.estimate-progress p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.warning-list { margin-top: 18px; padding: 13px 16px; border-left: 3px solid #dca827; background: var(--soft-warning); color: #654b10; }
.warning-list h3 { margin: 0; }
.warning-list ul { margin: 8px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.5; }
.raw-details { margin-top: 18px; }
.raw-details pre { max-height: 340px; overflow: auto; padding: 13px; border-radius: 6px; background: #14211e; color: #cde0d9; font-size: 10px; }

.estimate-meta { color: var(--muted); font-size: 12px; }
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 25px; }
.price-cards article { display: flex; flex-direction: column; min-height: 145px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.price-cards article.featured { border-color: var(--teal); background: var(--soft-teal); }
.price-cards span { color: var(--muted); font-size: 12px; }
.price-cards strong { margin-top: auto; font-size: clamp(21px, 2.6vw, 34px); letter-spacing: -.04em; }
.price-cards small { margin-top: 2px; color: var(--muted); }
.public-price-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 24px 36px;
  width: 100%;
  margin-bottom: 22px;
  padding: 26px;
  border: 1px solid #9fc8bf;
  border-radius: 10px;
  background: var(--soft-teal);
}
.public-price-card__value { display: grid; min-width: 0; }
.public-price-card__value > span { color: #47625c; font-size: 12px; font-weight: 750; }
.public-price-card__value > strong { margin-top: 10px; color: var(--teal); font-size: clamp(34px, 5vw, 52px); letter-spacing: -.045em; }
.public-price-card__value > small,
.public-price-card__action > small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.public-price-card__action { display: grid; justify-items: stretch; gap: 8px; max-width: 270px; }
.public-price-card__action > strong { color: var(--teal); font-size: 18px; }
.calculation-actions { display: grid; gap: 8px; width: 270px; max-width: 100%; }
.calculation-actions .button { min-height: 44px; white-space: normal; text-align: center; }
.calculation-actions > .button { min-height: 48px; }
.calculation-actions > small { color: var(--muted); line-height: 1.45; }
.calculation-actions__secondary { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.calculation-actions__secondary .button { background: rgba(255, 255, 255, .32); font-size: 14px; }
.calculation-actions__secondary .button:hover { border-color: var(--line); background: var(--panel); }
.calculation-actions-panel .calculation-actions { width: 100%; max-width: 420px; }
.calculation-dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain; }
.calculation-dialog::backdrop { background: rgba(11, 25, 22, .66); backdrop-filter: blur(3px); }
#recovery-link-status:empty { display: none; }
#recovery-link-output { margin-top: 20px; }
.calculation-dialog__header { padding-right: 34px; }
.calculation-dialog .quote-modal__close { font-size: 28px; line-height: 1; }
.calculation-dialog__header h2 { font-size: clamp(24px, 4vw, 30px); }
.calculation-dialog__header p { color: var(--muted); line-height: 1.5; }
.calculation-dialog form { margin-top: 20px; }
.calculation-dialog form > label { display: grid; gap: 7px; margin-top: 16px; }
.calculation-dialog input, .calculation-dialog select { min-height: 44px; }
.calculation-dialog .form-actions { flex-wrap: wrap; }
.calculation-dialog .form-actions .button { min-height: 44px; }
.action-status { overflow-wrap: anywhere; line-height: 1.5; }
.action-status:empty { display: none; }
.action-status[data-error="true"] { color: var(--danger); }
.quote-requested-email { display: grid; min-width: 0; margin: 0; gap: 2px; }
.quote-requested-email > span { color: var(--muted); font-size: 12px; }
.quote-requested-email > strong { overflow-wrap: anywhere; color: var(--ink); font-size: 14px; line-height: 1.4; }
.public-price-card__button { min-width: 210px; min-height: 48px; touch-action: manipulation; }
.public-price-card__recalculate { background: rgba(255, 255, 255, .52); }
.public-price-card__recalculate:hover { border-color: #7da59c; background: rgba(255, 255, 255, .82); }
.public-price-card > p { grid-column: 1 / -1; margin: 0; padding-top: 15px; border-top: 1px solid #bfd7d1; color: #4e625d; font-size: 12px; line-height: 1.55; }
.quote-requested-label { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.costs-table { max-width: 900px; }
.costs-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.total-row { background: #f0f5f3; font-weight: 800; }
.breakdown { margin-top: 24px; }
.breakdown summary { margin-bottom: 13px; }
.internal-section-label { display: flex; align-items: center; gap: 10px; margin: 6px 0 13px; color: #4f5b57; font-size: 12px; font-weight: 800; }
.internal-section-label span { padding: 4px 8px; border-radius: 99px; background: #252f2c; color: white; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.quote-notice { margin: 0; padding: 15px 17px; border-left: 3px solid var(--teal); background: #f1f7f5; color: #4e625d; font-size: 13px; line-height: 1.55; }

.quote-modal-open { overflow: hidden; }
.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.quote-modal[hidden] { display: none; }
.quote-modal.is-open { opacity: 1; pointer-events: auto; }
.quote-modal__backdrop { position: absolute; inset: 0; background: rgba(11, 25, 22, .66); backdrop-filter: blur(3px); cursor: pointer; }
.quote-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100dvh - 40px);
  padding: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d7dfdb;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(9, 24, 20, .3);
  transform: translateY(12px) scale(.985);
  transition: transform 180ms ease-out;
}
.quote-modal.is-open .quote-modal__dialog { transform: translateY(0) scale(1); }
.quote-modal__dialog:focus { outline: none; }
.quote-modal__dialog:focus-visible { outline: 3px solid rgba(22, 92, 85, .35); outline-offset: 3px; }
.quote-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #43524d;
  cursor: pointer;
  touch-action: manipulation;
}
.quote-modal__close:hover { border-color: #c9d3cf; background: #f1f4f2; }
.quote-modal__close:focus-visible,
.public-price-card__button:focus-visible { outline: 3px solid rgba(22, 92, 85, .35); outline-offset: 3px; }
.quote-modal__header { padding-right: 50px; }
.quote-modal__header h2 { display: block; font-size: clamp(26px, 4vw, 36px); }
.quote-modal__header > p:last-child { max-width: 570px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.quote-modal form { margin-top: 24px; }
.quote-modal .form-grid { margin: 0; }
.quote-modal__helper { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.quote-modal .form-actions { flex-wrap: wrap; }
.quote-modal .form-actions .button { min-height: 44px; }
.quote-modal #quote-request-status,
.quote-modal .recalculation-status { flex-basis: 100%; min-height: 20px; }
.recalculation-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recalculation-form-grid > label { min-width: 0; align-content: start; }
.recalculation-material-field { grid-column: 1 / -1; }
.recalculation-modal input,
.recalculation-modal select { min-height: 44px; }
.recalculation-modal [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(165, 45, 45, .1); }
.recalculation-modal .button:disabled { cursor: not-allowed; }
.recalculation-modal form[aria-busy="true"] .button:disabled { cursor: wait; }
.error-text { color: var(--danger); font-weight: 700; }
.quote-consent { margin-top: 20px; }
.quote-consent-check { margin-top: 0; font-weight: 700; line-height: 1.5; }
.field-error { display: block; min-height: 18px; margin-top: 5px; color: var(--danger); font-size: 12px; font-weight: 700; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

.admin-quote-list { display: grid; gap: 20px; }
.admin-quote-card { margin: 0; }
.admin-quote-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.admin-quote-card__header h2 { margin-top: 4px; }
.admin-quote-card__header a { color: var(--teal); font-weight: 700; }
.admin-quote-card__meta { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 12px; }
.quote-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.quote-metrics > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.quote-metrics dt { color: var(--muted); font-size: 11px; }
.quote-metrics dd { margin: 4px 0 0; font-weight: 800; }
.admin-action-row { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; padding-top: 19px; border-top: 1px solid var(--line); }
.admin-action-row > form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.admin-action-row label { min-width: min(290px, 100%); }
.admin-inline-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 14px; padding-top: 19px; border-top: 1px solid var(--line); }
.danger-button { border-color: #d39a95; background: var(--soft-danger); color: var(--danger); }
.assignment-flow { padding-top: 19px; border-top: 1px solid var(--line); }
.assignment-flow__heading { display: flex; justify-content: space-between; gap: 16px; }
.assignment-flow__heading > div { display: grid; gap: 3px; }
.notice-copy { margin: 17px 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.notice-copy pre { max-height: 310px; overflow: auto; white-space: pre-wrap; color: #33433e; font: 12px/1.55 inherit; }
.guard-note { display: grid; gap: 3px; padding: 12px 14px; border-left: 3px solid #c68d12; background: var(--soft-warning); color: #654b10; font-size: 12px; }
.disclosure-form { width: 100%; padding: 14px; border: 1px solid #b9d7d0; border-radius: 8px; background: #eef6f4; }
.partner-list { display: grid; gap: 9px; margin-bottom: 20px; }
.partner-list > div { display: grid; grid-template-columns: minmax(130px, .4fr) 1fr auto; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.partner-list span, .partner-list small { color: var(--muted); }
.partner-create > summary { cursor: pointer; font-weight: 800; }
.partner-create form { margin-top: 18px; }
.partner-confirmations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.partner-confirmations label { display: flex; min-height: 44px; align-items: center; gap: 10px; }
.partner-confirmations input { width: 20px; height: 20px; }

.review-panel h3 { margin-top: 25px; }
.editor-wrap { border: 1px solid var(--line); border-radius: 7px; }
.operation-editor { min-width: 1050px; table-layout: fixed; }
.operation-editor th:first-child, .operation-editor th:nth-child(2) { width: 24%; }
.operation-editor th:last-child { width: 46px; }
.operation-editor td { padding: 8px; }
.operation-editor input, .operation-editor select { min-width: 0; width: 100%; min-height: 36px; padding: 6px 8px; font-size: 12px; }
.operation-editor input:disabled, .operation-editor select:disabled { background: #f0f2f1; color: #65736f; opacity: .65; }
.manual-price-row .operation-manual { border-color: var(--teal, #155e57); }
.editor-help { font-size: 13px; line-height: 1.5; }
.remove-operation { width: 31px; min-height: 31px; padding: 0; border: 0; border-radius: 5px; background: var(--soft-danger); color: var(--danger); cursor: pointer; }
.review-extras { margin-top: 22px; }
.divider-actions { justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.inline-field { display: flex; align-items: center; gap: 9px; }
.inline-field input { width: 240px; }
.approval-box { display: grid; grid-template-columns: 1fr minmax(220px, 300px) auto; align-items: end; gap: 20px; margin-top: 28px; padding: 21px; border: 1px solid #b9d7d0; border-radius: 9px; background: #eef6f4; }
.approval-box p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.approved-label { color: var(--teal); font-weight: 800; font-size: 12px; }
.align-end { align-items: end; }
.wide-field { grid-column: 1 / -1; }
.negative { color: var(--danger); font-weight: 700; }
.positive { color: var(--teal); font-weight: 700; }

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

.gateway-body { background: #11231f; }
.gateway-body .site-footer { border-color: rgba(255, 255, 255, .12); }
.gateway-shell { max-width: none; padding: 0; }
.gateway {
  display: grid;
  width: min(100%, 1280px);
  min-height: calc(100dvh - 150px);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 104px) 24px clamp(64px, 9vw, 112px);
  align-content: center;
  background-image:
    linear-gradient(rgba(117, 153, 142, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 153, 142, .08) 1px, transparent 1px);
  background-size: 48px 48px;
}
.gateway__intro { margin-bottom: clamp(30px, 5vw, 48px); }
.gateway__intro .eyebrow { color: #f27a54; }
.gateway__intro h1 { max-width: 920px; color: #fff; font-size: clamp(38px, 5.4vw, 70px); }
.gateway-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gateway-card {
  position: relative;
  display: flex;
  min-height: 330px;
  padding: clamp(28px, 4vw, 42px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}
.gateway-card--customer { background: #f7f8f4; }
.gateway-card--production { background: #dfece8; }
.gateway-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--brand);
  content: "";
}
.gateway-card:hover { transform: translateY(-4px); border-color: #f27a54; box-shadow: 0 30px 70px rgba(0, 0, 0, .28); }
.gateway-card:focus-visible { outline: 4px solid #f1a68f; outline-offset: 5px; }
.gateway-card__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid #b9cdc6;
  border-radius: 50%;
  color: var(--teal);
}
.gateway-card__icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gateway-card__audience { color: var(--brand-dark); font-size: 12px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.gateway-card h2 { display: block; max-width: 520px; margin-top: 11px; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.04; }
.gateway-card p { max-width: 560px; margin: 16px 0 28px; color: #586660; font-size: 16px; line-height: 1.55; }
.gateway-card__action { display: flex; margin-top: auto; align-items: center; justify-content: space-between; gap: 18px; color: var(--teal); font-size: 15px; font-weight: 850; }
.gateway-card__action > span { font-size: 23px; transition: transform 180ms ease-out; }
.gateway-card:hover .gateway-card__action > span { transform: translateX(4px); }

.production-form-panel { max-width: 1040px; margin-right: auto; margin-left: auto; padding: 0 34px; }
.production-form { display: grid; }
.form-section { min-width: 0; margin: 0; padding: 0 0 32px; border: 0; border-bottom: 1px solid var(--line); }
.form-section--last { border-bottom: 0; }
/* The legend sits above the fieldset's content padding, so it owns the top spacing. */
.form-section > legend { display: flex; padding: 32px 0 20px; align-items: center; gap: 12px; color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.form-section__intro { max-width: 760px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.production-contact-grid { margin-bottom: 0; }
.optional-label { color: var(--muted); font-size: 11px; font-weight: 500; }
.equipment-list { display: grid; gap: 16px; margin-top: 22px; }
.equipment-card { min-width: 0; margin: 0; padding: 22px; border: 1px solid #cbd7d2; border-radius: 10px; background: #f8faf8; }
.equipment-card__header { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 18px; }
.equipment-card__header h3 { margin: 0; font-size: 17px; }
.equipment-remove { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--danger); font-size: 13px; font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.equipment-remove:focus-visible { outline: 3px solid rgba(165, 45, 45, .25); outline-offset: 2px; }
.equipment-card__topline { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 16px; }
.machine-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding: 15px; border-left: 3px solid var(--teal); background: var(--soft-teal); }
.machine-summary > div { min-width: 0; }
.machine-summary span, .machine-summary strong { display: block; }
.machine-summary span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.machine-summary strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; }
.machine-summary > p { grid-column: 1 / -1; margin: 2px 0 0; color: #4c625b; font-size: 12px; line-height: 1.5; }
.custom-machine-fields { margin-top: 16px; padding-top: 2px; }
.custom-machine-fields .form-grid { margin-top: 0; }
.add-equipment-button { margin-top: 17px; min-height: 46px; }
.add-equipment-button > span { margin-right: 8px; font-size: 20px; line-height: 1; }
.production-consent { margin-top: 24px; }
.production-submit-row { align-items: center; }
.production-submit-row .button { min-width: 190px; min-height: 48px; }
.production-submit-row [role="status"] { max-width: 620px; }
.application-success { max-width: 850px; margin: 24px auto 0; padding: clamp(34px, 6vw, 62px); text-align: center; }
.application-success:focus { outline: none; }
.application-success__mark { display: grid; width: 58px; height: 58px; margin: 0 auto 22px; place-items: center; border-radius: 50%; background: var(--soft-teal); color: var(--teal); font-size: 29px; font-weight: 900; }
.application-success h2 { display: block; font-size: clamp(30px, 5vw, 46px); }
.application-success > p:not(.eyebrow) { max-width: 600px; margin: 16px auto 0; color: var(--muted); line-height: 1.6; }
.application-success__details { display: grid; grid-template-columns: .7fr 1.3fr; gap: 12px; margin: 30px 0 0; text-align: left; }
.application-success__details > div { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.application-success__details dt { color: var(--muted); font-size: 11px; }
.application-success__details dd { margin: 6px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.application-success__details dd span { display: block; }
.application-success .form-actions { justify-content: center; }

.admin-filter-bar { display: flex; margin-bottom: 20px; align-items: end; gap: 12px; }
.admin-filter-bar label { width: min(300px, 100%); }
.admin-production-list, .equipment-admin-list { display: grid; gap: 20px; }
.admin-production-card, .equipment-admin-card { margin: 0; }
.admin-production-card__header, .equipment-admin-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.admin-production-card__header h2, .equipment-admin-card__header h2 { display: block; margin-top: 4px; }
.admin-production-card__organization, .equipment-admin-card__header p { margin: 7px 0 0; color: var(--muted); }
.admin-production-card__meta { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 12px; }
.application-contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.application-contact-grid > div, .equipment-spec-grid > div { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.application-contact-grid dt, .equipment-spec-grid dt { color: var(--muted); font-size: 11px; }
.application-contact-grid dd, .equipment-spec-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.application-contact-grid a { color: var(--teal); }
.application-comment { margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--teal); background: #f1f7f5; }
.application-comment p { margin: 5px 0 0; color: #4e625d; line-height: 1.55; }
.application-comment--internal { border-left-color: #c68d12; background: var(--soft-warning); }
.application-equipment { padding: 20px 0; border-top: 1px solid var(--line); }
.application-equipment > h3 { margin: 0 0 14px; font-size: 17px; }
.application-equipment__list { display: grid; gap: 12px; }
.application-equipment__item { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf8; }
.application-equipment__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.application-equipment__heading > div { display: grid; gap: 4px; }
.application-equipment__heading span { color: var(--muted); font-size: 12px; }
.application-equipment__heading > span { padding: 5px 9px; border-radius: 99px; background: var(--soft-teal); color: var(--teal); font-weight: 800; }
.equipment-spec-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.equipment-spec-grid--catalog { margin: 20px 0; }
.equipment-details { color: var(--muted); font-size: 13px; line-height: 1.55; }
.admin-equipment-edit, .application-edit, .equipment-admin-edit { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.admin-equipment-edit > summary, .application-edit > summary, .equipment-admin-edit > summary, .equipment-create > summary { min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--teal); font-weight: 800; }
.admin-equipment-edit form, .application-edit form, .equipment-admin-edit form, .equipment-create form { margin-top: 12px; }
.application-review-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; margin-top: 20px; padding: 18px; align-items: end; gap: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.application-decision-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.application-decision-row > form { display: grid; align-content: start; gap: 12px; padding: 17px; border: 1px solid #b9d7d0; border-radius: 9px; background: #eef6f4; }
.application-decision-row > .application-reject-form { border-color: #e2c3c0; background: #fff7f6; }
.equipment-create-panel { margin-bottom: 20px; }
.equipment-create-panel summary { font-size: 17px; }
.equipment-active-check { display: flex; margin: 20px 0; min-height: 44px; align-items: center; gap: 10px; }
.equipment-active-check input { width: 22px; height: 22px; min-height: 22px; }
.equipment-admin-card--inactive { opacity: .72; box-shadow: none; }
.equipment-admin-card__header > div > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.equipment-toggle-form { margin-top: 17px; }
.status-badge[data-status="approved"], .status-badge[data-status="active"] { background: var(--soft-teal); color: var(--teal); }
.status-badge[data-status="rejected"] { background: var(--soft-danger); color: var(--danger); }
.status-badge[data-status="inactive"] { background: #e8ebe9; color: #59635f; }

.login-shell { display: grid; min-height: calc(100vh - 206px); place-items: center; }
.login-panel { width: min(100%, 500px); margin: 0; padding: 42px; }
.login-panel h1 { font-size: clamp(34px, 5vw, 48px); }
.login-panel .lead { font-size: 15px; }
.login-form { display: grid; gap: 18px; margin-top: 28px; }
.login-form .button { margin-top: 3px; }
.login-error { margin-top: 22px; }
.login-back { margin: 24px 0 0; }

.site-footer { border-top: 1px solid #31443e; background: #11231f; color: #c9d5d1; }
.site-footer__inner {
  display: flex;
  max-width: 1280px;
  min-height: 76px;
  margin: 0 auto;
  padding: 16px 24px;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site-footer__inner > small { line-height: 1.5; }
.site-footer__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.site-footer__links a,
.site-footer__links button {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 0;
  align-items: center;
  border: 0;
  background: transparent;
  color: #edf3f1;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.site-footer__links a:hover,
.site-footer__links button:hover { color: #fff; text-decoration-thickness: 2px; }
.site-footer__links a:focus-visible,
.site-footer__links button:focus-visible {
  outline: 3px solid #f1a68f;
  outline-offset: 3px;
}

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(420px, calc(100vw - 44px)); padding: 13px 17px; border-radius: 8px; background: #17251f; color: white; box-shadow: 0 10px 30px rgba(0,0,0,.22); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: #8f2c27; }

body.cookie-consent-visible { padding-bottom: var(--cookie-consent-space, 72px); }
.cookie-consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  width: 100%;
  margin: 0;
  padding: 10px 20px max(10px, env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid #d7e0dc;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(17, 35, 31, .1);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent__copy { min-width: 0; flex: 1 1 auto; }
.cookie-consent__copy > p {
  max-width: none;
  margin: 0;
  color: #4f5d58;
  font-size: 14px;
  line-height: 1.4;
}
.cookie-consent__copy a {
  color: var(--teal);
  font-weight: 750;
  text-underline-offset: 3px;
}
.cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.cookie-consent__button {
  min-height: 36px;
  min-width: 104px;
  padding: 0 14px;
  font-size: 13px;
  touch-action: manipulation;
  white-space: nowrap;
}
.cookie-consent__button--all {
  background: var(--teal);
  color: #fff;
}
.cookie-consent__button--all:hover { background: #0d4943; }
.cookie-consent__button--necessary {
  background: #fff;
  color: var(--ink);
  border-color: #b9c8c2;
}
.cookie-consent__button--necessary:hover { background: #f3f6f4; }
.cookie-consent__button:focus-visible,
.cookie-consent__copy a:focus-visible {
  outline: 2px solid rgba(22, 92, 85, .45);
  outline-offset: 2px;
}

@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stat { display: none; }
  .gateway { min-height: auto; align-content: start; }
  .gateway-grid { grid-template-columns: 1fr; }
  .gateway-card { min-height: 300px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .form-grid.four { grid-template-columns: repeat(2, 1fr); }
  .approval-box { grid-template-columns: 1fr 1fr; }
  .approval-box > div { grid-column: 1 / -1; }
  .application-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cookie-consent { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .topbar { height: auto; min-height: 74px; padding: 10px 14px; }
  .brand { gap: 8px; letter-spacing: .02em; }
  .brand-mark { width: 32px; height: 32px; font-size: 19px; }
  .brand strong { font-size: 13px; }
  .brand small, .account-chip { display: none; }
  .topbar-actions { gap: 6px; }
  .admin-menu__items { position: fixed; top: 67px; right: 12px; left: 12px; width: auto; }
  .account-link { min-height: 42px; padding: 0 11px; font-size: 12px; }
  .page-shell { padding: 35px 14px 60px; }
  .gateway-shell { padding: 0; }
  .gateway { padding: 44px 14px 62px; background-size: 36px 36px; }
  .gateway__intro { margin-bottom: 26px; }
  .gateway__intro h1 { font-size: clamp(34px, 12vw, 48px); }
  .gateway-grid { gap: 14px; }
  .gateway-card { min-height: 270px; padding: 25px 22px; border-radius: 12px; }
  .gateway-card__icon { width: 50px; height: 50px; margin-bottom: 22px; }
  .gateway-card h2 { font-size: 29px; }
  .gateway-card p { margin-top: 13px; font-size: 15px; }
  .site-footer__inner {
    padding: 20px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .site-footer__links { width: 100%; justify-content: flex-start; gap: 4px 18px; }
  .panel { padding: 20px 16px; }
  .production-form-panel { padding: 0 16px; }
  .form-section { padding: 0 0 24px; }
  .form-section > legend { padding: 24px 0 16px; align-items: flex-start; font-size: 19px; }
  .equipment-card { padding: 18px 14px; }
  .equipment-card__topline, .machine-summary { grid-template-columns: 1fr; }
  .machine-summary > p { grid-column: auto; }
  .production-form input, .production-form select, .production-form textarea { font-size: 16px; }
  .production-submit-row { align-items: stretch; flex-direction: column; }
  .production-submit-row .button { width: 100%; }
  .application-success__details, .application-contact-grid, .equipment-spec-grid { grid-template-columns: 1fr; }
  .application-success .form-actions { align-items: stretch; flex-direction: column; }
  .application-success .button { width: 100%; }
  .admin-filter-bar { align-items: stretch; flex-direction: column; }
  .admin-filter-bar label, .admin-filter-bar .button { width: 100%; }
  .admin-production-card__header, .equipment-admin-card__header, .application-equipment__heading { align-items: flex-start; flex-direction: column; }
  .admin-production-card__meta { justify-items: start; }
  .application-review-form, .application-decision-row { grid-template-columns: 1fr; }
  .login-panel { padding: 30px 22px; }
  .process-selection { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form-grid.two, .form-grid.three, .form-grid.four, .price-cards { grid-template-columns: 1fr; }
  .job-header { align-items: flex-start; flex-direction: column; }
  .model-viewer, .viewer-placeholder { height: 350px; }
  .projection-strip { gap: 6px; }
  .metric-grid { grid-template-columns: 1fr; }
  .estimate-pending-panel { align-items: stretch; flex-direction: column; gap: 20px; }
  .section-heading { align-items: flex-start; }
  .approval-box { grid-template-columns: 1fr; }
  .inline-field { align-items: stretch; flex-direction: column; }
  .inline-field input { width: 100%; }
  .divider-actions { align-items: stretch; flex-direction: column; }
  .public-price-card { grid-template-columns: 1fr; gap: 20px; padding: 22px 18px; }
  .public-price-card__action { max-width: none; }
  .calculation-actions { width: 100%; }
  .calculation-dialog { padding: 24px 18px; max-height: calc(100dvh - 24px); }
  .calculation-dialog .form-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .public-price-card__button { width: 100%; }
  .quote-modal { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .quote-modal__dialog { max-height: calc(100dvh - 24px); padding: 24px 18px 20px; border-radius: 12px; }
  .quote-modal__header { padding-right: 42px; }
  .quote-modal__header > p:last-child { font-size: 14px; }
  .quote-modal .form-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .quote-modal .form-actions .button { width: 100%; min-height: 48px; }
  .recalculation-form-grid { grid-template-columns: 1fr; }
  .recalculation-material-field { grid-column: auto; }
  .admin-quote-card__header { flex-direction: column; }
  .admin-quote-card__meta { justify-items: start; }
  .quote-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-inline-form, .partner-confirmations { grid-template-columns: 1fr; }
  .partner-list > div { grid-template-columns: 1fr; gap: 3px; }
  .cookie-consent {
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent__button { flex: 1; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-modal,
  .quote-modal__dialog,
  .gateway-card,
  .gateway-card__action > span { transition: none; }
  .gateway-card:hover { transform: none; }
  .spinner { animation: none; }
  html:focus-within { scroll-behavior: auto; }
}
/* Semantic visibility must win over layout rules on forms and dynamic summaries. */
[hidden] { display: none !important; }

.customer-requirements { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: #f5f7fa; padding: 1rem; border-radius: 8px; }
.draft-actions { margin-bottom: 1.5rem; }
.draft-actions button { margin: .25rem .25rem .25rem 0; }
#recovery-link-output { overflow-wrap: anywhere; flex-basis: 100%; }
.job-actions { flex-wrap: wrap; }
@media (max-width: 600px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
  .account-link { font-size: .8rem; }
  .calculation-shell { padding-top: 24px; }
  .calculation-basics.form-grid { grid-template-columns: minmax(0, 2fr) minmax(86px, 1fr); gap: 12px; }
  .calculation-basics > label { min-width: 0; grid-template-rows: 1fr auto; }
  .calculation-basics > label > input, .calculation-basics > label > select { height: 48px; }
  .upload-panel input, .upload-panel select, .upload-panel textarea { font-size: 16px; }
  .upload-panel .form-actions { flex-wrap: wrap; gap: 10px; }
  .upload-panel .form-actions .button { width: 100%; min-height: 48px; }
}

.calculation-comment { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.panel > .calculation-comment:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.calculation-comment > label { display: block; font-size: 18px; font-weight: 750; }
.calculation-comment > p { margin: 8px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.calculation-comment textarea { width: 100%; min-height: 140px; resize: vertical; line-height: 1.5; }
.calculation-comment textarea[readonly] { background: var(--bg); }
.calculation-comment__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.calculation-comment__status .button { min-height: 44px; }

.admin-archive-action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }

/* Separate customer and production entrances, shared by both frontend bundles. */
.account-entry-menu { position: relative; }
.account-entry-menu > summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px; cursor: pointer; list-style: none; white-space: nowrap; }
.account-entry-menu > summary::-webkit-details-marker { display: none; }
.account-entry-items { position: absolute; right: 0; top: 100%; z-index: 115; display: grid; gap: 4px; width: 290px; max-width: calc(100vw - 40px); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 36px #2029381a; color: var(--ink); }
.account-entry-items > strong { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.account-entry-items > a { display: block; padding: 12px 10px; border-radius: 6px; color: var(--ink); font-size: 14px; text-decoration: none; }
.account-entry-items > a:hover { background: var(--soft-teal); color: var(--brand); }
.account-choice { max-width: 980px; margin: 48px auto; }
.account-choice h1 { font-size: clamp(32px, 5vw, 52px); }
.account-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 30px 0 12px; }
.account-choice-grid .panel { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 28px; }
.account-choice-grid h2, .account-choice-grid p { margin: 0; }
.account-choice-grid .button { margin-top: auto; }
.account-switch-note { padding: 14px; background: var(--soft-teal); border-radius: 8px; font-size: 14px; }
@media (max-width: 980px) {
  .v2-navigation .account-entry-items { position: static; width: 100%; max-width: 100%; box-shadow: none; }
}
@media (max-width: 620px) {
  .account-choice-grid { grid-template-columns: 1fr; }
  .account-choice { margin: 24px auto; }
  .account-choice-grid .panel { padding: 22px; }
  .account-entry-menu > summary { padding-inline: 6px; }
}
