/* RepairLink workshop ledger. The visual contract is in DESIGN.md. */
@font-face {
  font-family: Noto;
  src: url("/assets/noto-sans-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Noto;
  src: url("/assets/noto-sans-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Noto;
  src: url("/assets/noto-sans-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Workshop;
  src: url("/assets/roboto-condensed-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #18202b;
  --muted: #687080;
  --accent: #d94a45;
  --accent-text: #bf3834;
  --accent-hover: #a92e2a;
  --primary-fill: #bf3834;
  --primary-hover: #a92e2a;
  --control-border: #858c96;
  --accent-soft: #fff0ef;
  --base: #f4f6f9;
  --paper: #fff;
  --line: #dde2e9;
  --green: #2f7d57;
  --amber: #8a5b15;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Noto, Arial, sans-serif;
  --radius: 12px;
  --text-body: 1rem;
  --text-support: .875rem;
  --title-page: 2rem;
  --title-section: 1.5rem;
  --title-subsection: 1.25rem;
  /* Compatibility aliases for shared customer UI. */
  --blue: var(--accent-text);
  --blue-soft: var(--accent-soft);
  font-family: var(--font);
  font-size: 100%;
  color: var(--ink);
  background: var(--base);
  color-scheme: light;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: #ad402b1a;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: var(--title-page);
  line-height: 1.2;
  letter-spacing: -.6px;
}
h2 {
  font-size: var(--title-section);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
h3 {
  font-size: var(--title-subsection);
  line-height: 1.3;
}
p {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
:root[data-focus-ring="pointer"] button:focus,
:root[data-focus-ring="pointer"] a:focus,
:root[data-focus-ring="pointer"] input:focus,
:root[data-focus-ring="pointer"] textarea:focus,
:root[data-focus-ring="pointer"] select:focus,
:root[data-focus-ring="pointer"] summary:focus,
:root[data-focus-ring="pointer"] [tabindex]:focus {
  outline: none;
}
:root[data-focus-ring="keyboard"] button:focus-visible,
:root[data-focus-ring="keyboard"] a:focus-visible,
:root[data-focus-ring="keyboard"] input:focus-visible,
:root[data-focus-ring="keyboard"] textarea:focus-visible,
:root[data-focus-ring="keyboard"] select:focus-visible,
:root[data-focus-ring="keyboard"] summary:focus-visible,
:root[data-focus-ring="keyboard"] [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #e8c5b8;
  color: var(--ink);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 30;
  transform: translateY(-160%);
  border-radius: 4px;
}
.skip-link:focus {
  transform: translateY(0);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition:
    background-color 0.16s,
    border-color 0.16s,
    color 0.16s;
  white-space: normal;
  text-align: center;
}
.btn:active {
  transform: scale(0.98);
}
.button-progress {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}
@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}
.primary {
  background: var(--primary-fill);
  color: #fff;
  border-color: var(--primary-fill);
}
.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.secondary {
  background: var(--paper);
  border-color: var(--control-border);
  color: var(--ink);
}
.secondary:hover {
  background: #eaeae3;
  border-color: #979d90;
}
.danger {
  background: #fff;
  color: #a23023;
  border-color: #d9a398;
}
.danger:hover {
  background: #f9e7e3;
}
.record-deletion {
  margin: 0 24px 24px;
  padding: 18px;
  border: 1px solid #e5b8af;
  border-radius: var(--radius);
  background: #fff8f6;
}
.record-deletion h3,
.record-deletion p { margin: 0; }
.record-deletion p { margin-top: 6px; color: var(--muted); }
.record-deletion > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.wide {
  width: 100%;
}
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  transition:
    color 0.16s,
    background-color 0.16s;
}
.icon-button {
  min-width: 44px;
  padding: 10px;
}
.text-button {
  padding: 8px 7px;
}
.icon-button:hover,
.text-button:hover {
  background: #e9e8e1;
  color: var(--accent-text);
}
.muted {
  color: var(--muted);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
  font-family: Workshop, Noto, sans-serif;
  font-size: 32px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand-light {
  color: var(--accent-text);
}
.app-header {
  height: 80px;
  border-bottom: 1px solid var(--line);
  padding: 0 max(32px, calc((100vw - 1456px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
  background: #fafaf7;
}
.header-shop {
  padding-left: 28px;
  border-left: 1px solid #c9cbc2;
  font-size: 15px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex-shrink: 0;
}
.header-actions .language-toggle {
  gap: 6px;
  font-size: 14px;
}
.language-toggle strong {
  color: var(--accent-text);
  font-weight: 600;
}
.language-toggle > span {
  color: var(--muted);
}
.export-link {
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding-left: 20px;
}
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 35px;
  padding: 6px 24px;
  background: #eeeee7;
  color: #616559;
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.demo-label {
  font-weight: 600;
  color: var(--ink);
}
.workspace {
  max-width: 1456px;
  margin: 0 auto;
  padding: 0 32px 26px;
  min-width: 0;
}
:root[data-focus-ring="keyboard"] .workspace:focus {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 30px;
}
.page-heading p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 11px;
}
.heading-divider {
  color: #b1b5a8;
  margin: 0 14px;
}
.page-heading .btn {
  padding: 12px 22px;
  min-height: 50px;
}
.scope-tabs {
  display: flex;
  align-items: stretch;
  gap: 25px;
  border-bottom: 1px solid var(--line);
}
.scope-tabs > button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 4px;
  font-size: 16px;
  color: var(--muted);
}
.scope-tabs > button > span {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.scope-tabs > button:hover {
  color: var(--accent-text);
}
.scope-tabs > button.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 0;
}
.search-box {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  max-width: 560px;
  min-width: 0;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  color: var(--muted);
}
.search-box:focus-within {
  border-color: var(--accent);
}
:root[data-focus-ring="keyboard"] .search-box:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.search-box input {
  font-size: 15px;
  border: 0;
  background: none;
  padding: 0;
  height: 100%;
  outline: none;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  border-radius: 0;
}
.search-box input:focus-visible {
  outline: 0;
}
.search-box kbd {
  font: 13px var(--font);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  min-width: 21px;
  text-align: center;
  font-weight: 400;
}
.toolbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
  min-width: 0;
}
.toolbar-right select {
  width: 235px;
  min-height: 48px;
  font-size: 14px;
}
.view-switch {
  display: flex;
  gap: 5px;
}
.view-switch button {
  display: grid;
  place-items: center;
  width: 47px;
  height: 48px;
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  color: var(--muted);
}
.view-switch button:hover {
  background: #eaeae3;
}
.view-switch button.selected {
  color: var(--accent-text);
  border-color: var(--accent);
  background: #fffaf7;
}
#jobs-area {
  min-width: 0;
  min-height: 300px;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}
.jobs-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  text-align: left;
}
.jobs-table th {
  font-weight: 600;
  font-size: 13px;
  background: #fcfcfa;
  color: #5c6255;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.jobs-table th:nth-child(1) {
  width: 24%;
}
.jobs-table th:nth-child(2) {
  width: 23%;
}
.jobs-table th:nth-child(3) {
  width: 27%;
}
.jobs-table th:nth-child(5) {
  width: 104px;
}
.jobs-table td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.jobs-table tbody tr:last-child td {
  border-bottom: 0;
}
.jobs-table tbody tr {
  transition: background-color 0.14s;
  content-visibility: auto;
  contain-intrinsic-size: auto 90px;
}
.jobs-table tbody tr:hover,
.jobs-table tbody tr:focus-within {
  background: #f8f8f3;
}
.jobs-table td.open-cell {
  padding: 10px 12px 10px 0;
  text-align: right;
}
.table-job {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  border: 0;
  background: none;
  padding: 2px 0;
  max-width: 100%;
  min-height: 56px;
}
.table-job strong {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.table-job:hover strong {
  color: var(--accent-text);
}
.plate {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1.5px solid #444a3f;
  border-radius: 3px;
  padding: 3px 8px;
  background: #fff;
  font-family: Workshop, Noto, sans-serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.55px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
}
.customer-cell > small,
.stage-cell > small,
.date-cell > small {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
  color: var(--muted);
}
.stage-cell .repair-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.status-pill:before {
  content: "";
  width: 8px;
  height: 8px;
  background: #8b9183;
  border-radius: 1px;
  flex-shrink: 0;
}
.status-pill.stage-bodywork:before,
.status-pill.stage-paint:before {
  background: var(--accent);
}
.status-pill.stage-quality:before {
  background: #696951;
}
.status-pill.stage-ready:before,
.status-pill.stage-delivered:before {
  background: var(--green);
}
.status-pill.stage-ready,
.status-pill.stage-delivered {
  color: var(--green);
}
.stage-cell .table-hold,
.hold-tag {
  color: var(--amber);
}
.date-cell {
  font-size: 14px;
  white-space: nowrap;
}
.overdue,
.date-cell.overdue {
  color: #a33e2d;
}
.date-cell .priority-label {
  color: var(--amber);
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  color: var(--muted);
  font-size: 12px;
}
.workspace-footer .text-button {
  font-size: 12px;
}
.repair-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(224px, 1fr);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 0 18px;
  scroll-padding: 0 10px;
}
.board-column {
  min-width: 0;
}
.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 3px solid #b8bcae;
  padding: 17px 0;
  min-height: 64px;
}
.stage-bodywork > .column-header,
.stage-paint > .column-header {
  border-top-color: var(--accent);
}
.stage-ready > .column-header {
  border-top-color: var(--green);
}
.column-header h2 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.column-header > span {
  font-size: 12px;
  color: var(--muted);
}
.board-options {
  margin: 0 0 16px;
}
.board-options .checkbox-line {
  min-height: 44px;
  margin: 0;
}
.board-card-shell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.board-card-shell .job-card {
  width: 100%;
  border: 0;
  border-radius: 16px 16px 0 0;
}
.board-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.board-card-actions .row-action {
  min-width: 0;
}
.column-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.job-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px 16px 0;
  transition:
    border-color 0.16s,
    background-color 0.16s;
  min-width: 0;
}
.job-card:hover {
  border-color: #9c9f91;
  background: #fffdf9;
}
:root[data-focus-ring="keyboard"] .job-card:focus-visible {
  outline-offset: -3px;
}
.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 13px;
}
.job-card .plate {
  font-size: 18px;
}
.job-reference {
  font-size: 10px;
  color: var(--muted);
}
.card-vehicle {
  font-family: Workshop, Noto, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.job-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-owner {
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.hold-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}
.priority-card {
  border-left: 3px solid #ac813c;
}
.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  min-height: 49px;
  font-size: 12px;
  color: var(--muted);
  gap: 8px;
}
.job-card-footer > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.column-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
  border-top: 1px dashed #caccbf;
}
.empty-state {
  padding: 75px 24px;
  background: #fafaf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.empty-state h2 {
  font-size: 32px;
}
.empty-state p {
  max-width: 480px;
  margin: 12px auto 25px;
  color: var(--muted);
  font-size: 15px;
}
/* Job sheet and forms */
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  min-width: 0;
}
input,
select,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  padding: 11px 12px;
  min-height: 46px;
  max-width: 100%;
  font-size: var(--text-body);
  line-height: 1.5;
  font-weight: 400;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
select {
  background-color: #fff;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 104px;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}
input[type="date"] {
  min-width: 0;
}
.checkbox-line {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400;
  margin-top: 17px;
}
.plate-input {
  text-transform: uppercase;
  font-family: Workshop, Noto, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
}
.form-error {
  color: #9e3324;
  font-size: 14px;
  line-height: 1.5;
}
.form-error:not(:empty) {
  margin-top: 14px;
  padding: 12px;
  background: #fbeee8;
  border-left: 3px solid #ad402b;
}
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.dialog-open {
  overflow: hidden;
}
.job-dialog {
  border: 0;
  padding: 0;
  width: 600px;
  max-width: calc(100% - 36px);
  max-height: calc(100dvh - 36px);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  box-shadow: 0 22px 90px #25292338;
  overscroll-behavior: contain;
  overflow: auto;
}
.job-dialog::backdrop {
  background: #25292366;
}
.detail-dialog {
  width: 800px;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 16px 16px 16px auto;
  border-radius: 6px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 27px 32px;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}
.dialog-heading h2 {
  font-size: 30px;
  margin-top: 5px;
}
.dialog-kicker {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.dialog-heading .icon-button {
  align-self: flex-start;
}
.form-section {
  padding: 25px 32px 0;
}
.form-section > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
  font-size: 21px;
}
.mobile-arrival {
  display: none;
}
.intake-dialog {
  width: 680px;
  overflow-x: hidden;
}
.quick-intake-form,
.intake-essential {
  min-width: 0;
}
.intake-heading {
  padding-bottom: 22px;
}
.intake-capture {
  padding: 24px 32px 0;
}
.intake-camera {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 15px 16px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: #fafaf7;
  cursor: pointer;
}
.intake-camera:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.intake-camera-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent-text);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}
.intake-camera strong,
.intake-camera small {
  display: block;
}
.intake-camera strong {
  font-size: 16px;
}
.intake-camera small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.intake-camera-action {
  color: var(--accent-text);
  font-size: 13px;
}
.intake-camera input {
  position: absolute;
  width: 1px;
  max-width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  font-size: 1px;
}
:root[data-focus-ring="keyboard"] .intake-camera:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.intake-preview {
  position: relative;
  margin-top: 12px;
  min-height: 156px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}
.intake-preview img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.intake-preview .text-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 40px;
  margin: 0;
  padding: 7px 12px;
  color: #fff;
  background: #252923d9;
}
.intake-scan-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.intake-essential {
  display: grid;
  gap: 20px;
  padding: 22px 32px 0;
}
.intake-plate {
  min-height: 62px;
  padding: 8px 14px;
  font-size: 32px;
  letter-spacing: 2px;
}
.intake-gov-lookup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: -8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  flex-wrap: wrap;
}
.intake-gov-lookup[hidden] {
  display: none;
}
.intake-gov-lookup > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.intake-gov-lookup strong,
.intake-gov-lookup small {
  display: block;
}
.intake-gov-lookup strong {
  font-size: 13px;
}
.intake-gov-lookup small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.intake-gov-lookup .btn {
  min-height: 42px;
  margin-left: auto;
  padding: 7px 12px;
  flex-shrink: 0;
  white-space: nowrap;
}
.intake-gov-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.intake-gov-manual {
  flex-basis: 100%;
}
.intake-gov-manual textarea {
  margin-top: 6px;
  min-height: 86px;
  font-size: 13px;
}
.intake-match {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -8px;
  padding: 12px 14px;
  color: var(--green);
  border-left: 3px solid var(--green);
  background: #edf5ef;
  font-size: 13px;
}
.intake-match[hidden] {
  display: none;
}
.intake-match > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.intake-match span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.intake-match .btn {
  min-height: 42px;
  margin-left: auto;
  padding: 7px 12px;
  flex-shrink: 0;
}
.intake-match.active-job {
  color: var(--amber);
  border-color: var(--amber);
  background: #fbf3e3;
}
.intake-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-inline-size: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
}
.intake-reasons legend {
  width: 100%;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
}
.intake-reasons label {
  display: block;
  cursor: pointer;
}
.intake-reasons input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.intake-reasons span {
  display: block;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 400;
}
.intake-reasons input:checked + span {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}
:root[data-focus-ring="keyboard"] .intake-reasons input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.intake-more {
  margin: 24px 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.intake-more summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.intake-more summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.intake-more-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 6px 0 22px;
}
.intake-description {
  grid-column: 1 / -1;
}
.intake-photo-choice {
  flex-direction: row;
  align-items: flex-start;
  gap: 11px;
  margin: 18px 32px 0;
  font-weight: 400;
}
.intake-photo-choice input {
  margin-top: 2px;
}
.intake-photo-choice strong,
.intake-photo-choice small {
  display: block;
}
.intake-photo-choice strong {
  font-size: 13px;
}
.intake-photo-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.intake-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fafaf7;
  padding: 22px 32px;
  margin-top: 28px;
}
.job-dialog form > .form-error:not(:empty) {
  margin-left: 32px;
  margin-right: 32px;
}
.detail-heading {
  padding: 13px 32px 25px;
  background: #fafaf7;
  border-bottom: 1px solid var(--line);
}
.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  min-height: 45px;
  gap: 12px;
}
.detail-created {
  margin-left: 15px;
}
.detail-vehicle {
  margin: 8px 0 12px;
}
.detail-vehicle h2 {
  font-size: var(--title-section);
  line-height: 1.25;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.detail-vehicle .plate {
  font-size: 23px;
}
.detail-vehicle p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 10px;
  max-width: 640px;
  white-space: pre-wrap;
}
.detail-contact {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.detail-contact > span,
.detail-contact > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.detail-contact .text-button {
  margin-left: auto;
  color: var(--accent-text);
  font-size: 13px;
}
.detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: var(--text-support);
  line-height: 1.5;
}
.detail-status > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.detail-description {
  margin-top: 4px;
}
.detail-description > summary {
  min-height: 44px;
  padding-block: 12px;
  color: var(--muted);
  font-size: var(--text-support);
  cursor: pointer;
}
.detail-description > p {
  max-width: 65ch;
  margin-bottom: 12px;
  white-space: pre-wrap;
  font-size: var(--text-body);
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 19px;
}
.detail-actions .primary {
  background: var(--ink);
  border-color: var(--ink);
}
.detail-actions .primary:hover {
  background: #454d3f;
}
.detail-actions .btn {
  font-size: 14px;
  min-height: 44px;
}
.detail-action-menu {
  min-width: 0;
}
.detail-action-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: var(--text-support);
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.detail-action-menu > summary::-webkit-details-marker {
  display: none;
}
.detail-action-menu > summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
}
.detail-action-menu[open] {
  flex-basis: 100%;
}
.detail-action-menu[open] > summary {
  justify-content: flex-start;
}
.detail-action-menu[open] > summary::after {
  content: "−";
  margin-left: auto;
}
.detail-action-menu > summary:hover {
  background: var(--base);
}
.detail-menu-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.detail-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
  overflow-x: auto;
}
.detail-tabs button {
  font-size: 14px;
  padding: 16px 0;
  min-height: 53px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  white-space: nowrap;
}
.detail-tabs button:hover {
  color: var(--accent-text);
}
.detail-tabs button.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}
.detail-tabs button > span {
  margin-left: 7px;
  font-size: 12px;
  color: var(--muted);
}
.detail-body {
  padding: 28px 32px 35px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.section-title h3 {
  font-size: var(--title-subsection);
}
.section-title > span {
  color: var(--muted);
  font-size: 12px;
}
.section-title p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 7px;
}
.internal-note {
  margin-top: 26px;
}
.internal-note h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  margin-bottom: 10px;
}
.internal-note h3 > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
}
.internal-note textarea {
  background: #fafaf7;
}
.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}
.save-row > span,
.save-row > small {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.save-row .btn {
  flex-shrink: 0;
  font-size: 14px;
}
.public-note-section {
  margin-top: 32px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.public-note-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
}
.public-note-section p {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 17px;
}
.updates-list {
  padding-left: 2px;
}
.update-item {
  position: relative;
  display: flex;
  gap: 17px;
  padding-bottom: 27px;
}
.update-item:not(:last-child):before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 15px;
  width: 1px;
  background: var(--line);
}
.update-dot {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fafaf7;
  color: var(--muted);
  flex-shrink: 0;
  border-radius: 3px;
}
.update-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0 7px;
}
.update-item p {
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.7;
}
.photo-upload {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.upload-zone {
  border: 1px dashed #adb49f;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fafaf7;
  border-radius: 5px;
  cursor: pointer;
}
.upload-zone > svg {
  color: var(--muted);
}
.upload-zone strong {
  font-size: 16px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.upload-zone span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.upload-zone small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.photo-upload input[type="file"] {
  font-size: 13px;
}
.photo-upload input::file-selector-button {
  background: #eeeee7;
  border: 0;
  border-radius: 3px;
  padding: 6px 10px;
  color: var(--ink);
  margin-right: 12px;
  font: inherit;
  cursor: pointer;
}
.photo-upload .btn {
  align-self: flex-end;
}
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 18px;
  margin-top: 30px;
}
.photo-grid figure {
  margin: 0;
  min-width: 0;
}
.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 4px;
  background: var(--base);
}
.photo-grid figcaption {
  padding-top: 10px;
}
.photo-grid strong {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  display: block;
  overflow-wrap: anywhere;
}
.photo-grid time {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.estimate-status {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  color: var(--amber);
}
.estimate-status.approved {
  color: var(--green);
}
.estimate-status.declined {
  color: #a33e2d;
}
.estimate-status strong {
  font-size: 14px;
  display: block;
  font-weight: 600;
}
.estimate-status span {
  font-size: 12px;
  line-height: 1.6;
  display: block;
  margin-top: 5px;
}
.estimate-labels {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.estimate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 36px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.estimate-row .icon-button {
  min-width: 36px;
  padding: 8px;
}
.currency-input {
  position: relative;
}
.currency-input input {
  padding-right: 29px;
}
.currency-input > span {
  position: absolute;
  right: 13px;
  top: 12px;
  color: var(--muted);
  font-size: 16px;
}
.estimate-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
  font-size: 15px;
}
.estimate-total strong {
  font-family: Workshop, Noto, sans-serif;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -1px;
}
.estimate-note {
  padding: 15px 0;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.estimate-footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 18px;
}
.share-content {
  padding: 25px 32px 0;
}
.share-illustration {
  color: var(--accent-text);
  margin: 0 0 20px;
}
.share-content > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 23px;
}
.share-content input {
  font-size: 13px;
}
.share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
}
.share-buttons > .btn {
  flex: 1;
}
.share-content .local-link-note {
  font-size: 12px;
  background: var(--base);
  padding: 14px;
  margin-top: 21px;
  border-radius: 4px;
}
.link-settings {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}
.link-settings summary {
  cursor: pointer;
  min-height: 44px;
}
.link-settings p {
  margin: 4px 0 18px;
  font-size: 13px;
}
.edit-contact > .field-grid,
.edit-contact > label {
  margin: 24px 32px 0;
}
/* Entry page retains the real workshop photograph. */
.login-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--base);
}
.login-story {
  padding: 45px max(40px, 8vw);
  display: flex;
  flex-direction: column;
  gap: 60px;
  border-right: 1px solid var(--line);
}
.login-story > .brand {
  font-size: 38px;
}
.small-line {
  font-size: 13px;
  color: var(--accent-text);
}
.login-story h1 {
  font-size: 64px;
  line-height: 1.05;
  margin: 19px 0 22px;
  letter-spacing: -1.5px;
}
.login-story p {
  font-size: 16px;
  max-width: 380px;
  color: var(--muted);
}
.login-workshop {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-workshop img {
  width: 100%;
  max-width: 450px;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  filter: saturate(0.75);
}
.login-workshop span {
  font-size: 13px;
  color: var(--muted);
}
.login-panel {
  background: #fff;
  display: grid;
  place-items: center;
  padding: 50px 40px;
}
.login-box {
  width: 100%;
  max-width: 400px;
}
.login-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 21px;
}
.login-box h2 {
  font-size: 36px;
  line-height: 1.12;
  margin-bottom: 17px;
}
.login-box > p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 29px;
}
.login-box form {
  display: grid;
  gap: 17px;
}
.login-box form > small {
  font-size: 12px;
  color: var(--muted);
}
.demo-entry {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}
.demo-entry p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 15px;
}
.demo-entry small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 12px;
}
.language-login {
  margin-top: 30px;
}
.loading-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  background: var(--base);
  padding: 30px;
  text-align: center;
}
.loading-screen p {
  font-family: Workshop, Noto, sans-serif;
  font-size: 32px;
  color: var(--ink);
}
.loading-screen > span {
  font-size: 14px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 20;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  transition:
    opacity 0.15s,
    transform 0.15s;
  line-height: 1.55;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #983e2c;
}
#print-sheet {
  display: none;
}
.dialog-status {
  margin: 0;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: #f0f1e9;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
.dialog-status:empty {
  display: none;
}
.dialog-status.error {
  color: #9e3324;
  background: #fbeee8;
  border-left: 3px solid var(--accent);
}
.job-dialog[aria-busy="true"] {
  cursor: progress;
}
.confirm-dialog {
  width: 460px;
}
.confirm-content {
  padding: 24px 32px 0;
  font-size: 15px;
  color: var(--muted);
}
.confirm-dialog .dialog-footer {
  flex-wrap: wrap;
}
@media (min-width: 1700px) {
  .workspace {
    padding-left: 0;
    padding-right: 0;
  }
  .app-header {
    padding-left: max(32px, calc((100vw - 1456px) / 2));
    padding-right: max(32px, calc((100vw - 1456px) / 2));
  }
}
@media (max-width: 1100px) {
  .header-shop {
    font-size: 13px;
  }
  .header-actions {
    gap: 9px;
  }
  .app-header {
    gap: 20px;
    padding: 0 24px;
  }
  .workspace {
    padding-left: 24px;
    padding-right: 24px;
  }
  .jobs-table th,
  .jobs-table td {
    padding-left: 16px;
    padding-right: 16px;
  }
  .jobs-table th:nth-child(1) {
    width: 24%;
  }
  .jobs-table th:nth-child(2) {
    width: 23%;
  }
  .jobs-table th:nth-child(3) {
    width: 27%;
  }
  .jobs-table th:nth-child(5) {
    width: 104px;
  }
  .toolbar-right {
    gap: 12px;
  }
  .toolbar-right select {
    width: 200px;
  }
  .search-box {
    max-width: 440px;
  }
  .login-story {
    padding: 35px;
  }
  .login-story h1 {
    font-size: 52px;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: 70px;
    gap: 15px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .brand {
    font-size: 29px;
  }
  .header-shop {
    display: none;
  }
  .header-actions {
    gap: 9px;
  }
  .export-link {
    padding-left: 12px;
  }
  .export-link span {
    display: none;
  }
  .workspace {
    padding: 0 max(20px, env(safe-area-inset-right)) 104px
      max(20px, env(safe-area-inset-left));
  }
  .page-heading #new-job {
    display: none;
  }
  .mobile-arrival {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 12;
    display: inline-flex;
    min-height: 54px;
    padding: 12px 18px;
    box-shadow: 0 8px 26px #25292342;
  }
  .page-heading {
    padding: 29px 0 25px;
    gap: 16px;
  }
  .page-heading h1 {
    font-size: 39px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .heading-divider {
    margin: 0 8px;
  }
  .page-heading .btn {
    font-size: 14px;
    padding: 10px 14px;
    min-height: 46px;
  }
  .page-heading .btn svg {
    width: 18px;
  }
  .scope-tabs {
    gap: 20px;
  }
  .scope-tabs > button {
    font-size: 14px;
    gap: 7px;
  }
  .scope-tabs > button > span {
    font-size: 12px;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 13px;
    padding: 20px 0;
  }
  .search-box {
    max-width: none;
    flex-basis: 100%;
    height: 48px;
  }
  .search-box input {
    font-size: 16px;
  }
  .toolbar-right {
    justify-content: space-between;
    width: 100%;
  }
  .toolbar-right select {
    width: min(290px, calc(100% - 117px));
    font-size: 14px;
  }
  .search-box kbd {
    display: none;
  }
  .jobs-table th:nth-child(1) {
    width: 30%;
  }
  .jobs-table th:nth-child(3) {
    width: 33%;
  }
  .jobs-table th:nth-child(5) {
    width: 104px;
  }
  .jobs-table th:nth-child(2),
  .jobs-table td.customer-cell {
    display: none;
  }
  .jobs-table th {
    font-size: 12px;
  }
  .jobs-table td {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .jobs-table .status-pill {
    font-size: 13px;
  }
  .jobs-table .stage-cell small {
    font-size: 11px;
  }
  .date-cell {
    font-size: 13px;
  }
  .plate {
    font-size: 20px;
  }
  .repair-board {
    grid-auto-columns: 260px;
    gap: 16px;
    scroll-snap-type: x proximity;
  }
  .board-column {
    scroll-snap-align: start;
  }
  .detail-dialog {
    width: 100%;
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    border-radius: 0;
  }
  .detail-heading {
    padding-left: 25px;
    padding-right: 25px;
  }
  .detail-body {
    padding: 25px;
  }
  .detail-tabs {
    padding: 0 25px;
    gap: 23px;
  }
  .detail-tabs button {
    font-size: 13px;
  }
  .detail-vehicle h2 {
    font-size: var(--title-section);
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px 26px;
    gap: 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-story > div:not(.login-workshop) {
    display: none;
  }
  .login-workshop {
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-top: 0;
  }
  .login-workshop img {
    width: 90px;
    height: 60px;
  }
  .login-panel {
    padding: 36px 25px;
  }
}
.customer-contact-dialog .btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .app-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    height: 65px;
  }
  .brand {
    font-size: 28px;
  }
  .header-actions {
    gap: 2px;
  }
  .language-toggle {
    padding: 8px 6px;
  }
  .header-actions .language-toggle {
    font-size: 12px;
  }
  .export-link {
    display: none;
  }
  .demo-banner {
    font-size: 11px;
    align-items: flex-start;
    padding: 8px max(16px, env(safe-area-inset-right)) 8px
      max(16px, env(safe-area-inset-left));
    gap: 8px;
    justify-content: flex-start;
  }
  .workspace {
    padding: 0 max(16px, env(safe-area-inset-right)) 16px
      max(16px, env(safe-area-inset-left));
  }
  .page-heading {
    align-items: flex-start;
    padding-top: 27px;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 36px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 200px;
    line-height: 1.7;
  }
  .heading-divider {
    display: none;
  }
  .heading-divider + * {
    display: block;
  }
  .heading-date {
    display: block;
    margin-top: 2px;
  }
  .page-heading .btn {
    font-size: 13px;
    padding: 10px;
    max-width: 135px;
    min-height: 46px;
    gap: 6px;
  }
  .page-heading .btn svg {
    width: 17px;
  }
  .scope-tabs {
    gap: 13px;
  }
  .scope-tabs > button {
    font-size: 12px;
    gap: 6px;
    padding-left: 0;
    padding-right: 0;
  }
  .scope-tabs > button > span {
    font-size: 11px;
  }
  .table-wrap {
    border-radius: 4px;
  }
  .jobs-table thead {
    display: none;
  }
  .jobs-table,
  .jobs-table tbody {
    display: block;
    width: 100%;
  }
  .jobs-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 17px;
    border-bottom: 1px solid var(--line);
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 145px;
  }
  .jobs-table tbody tr:last-child {
    border-bottom: 0;
  }
  .jobs-table td {
    padding: 0 !important;
    border: 0;
    display: block;
    min-width: 0;
  }
  .jobs-table td.vehicle-cell {
    grid-column: 1;
    grid-row: 1;
  }
  .jobs-table td.customer-cell {
    display: none;
  }
  .jobs-table td.stage-cell {
    grid-column: 1;
    grid-row: 2;
  }
  .jobs-table td.date-cell {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    text-align: right;
    font-size: 12px;
  }
  .jobs-table td.open-cell {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  .table-job {
    min-height: 50px;
    gap: 7px;
  }
  .table-job strong {
    font-size: 14px;
  }
  .jobs-table .stage-cell small {
    max-width: 220px;
    font-size: 11px;
  }
  .jobs-table .status-pill {
    font-size: 13px;
  }
  .status-pill:before {
    width: 7px;
    height: 7px;
  }
  .date-cell .priority-label {
    font-size: 10px;
  }
  .plate {
    font-size: 21px;
  }
  .workspace-footer {
    font-size: 11px;
  }
  .workspace-footer .text-button {
    font-size: 12px;
  }
  .job-dialog {
    max-width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 6px;
  }
  .intake-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .intake-heading {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 15px max(18px, env(safe-area-inset-right)) 15px
      max(18px, env(safe-area-inset-left));
  }
  .intake-heading h2 {
    font-size: 25px;
  }
  .intake-heading .dialog-kicker {
    display: none;
  }
  .intake-capture,
  .intake-essential {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  .intake-capture {
    padding-top: 18px;
  }
  .intake-camera {
    min-height: 76px;
    padding: 12px;
  }
  .intake-camera-action {
    display: none;
  }
  .intake-preview img {
    height: 160px;
  }
  .intake-plate {
    min-height: 64px;
    font-size: 34px;
  }
  .intake-match {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .intake-gov-lookup {
    align-items: flex-start;
    flex-direction: column;
  }
  .intake-gov-lookup .btn {
    width: 100%;
    margin-left: 0;
  }
  .intake-match .btn {
    width: 100%;
    margin-left: 0;
  }
  .intake-reasons {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .intake-reasons legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .intake-reasons label {
    flex: 0 0 auto;
  }
  .intake-more {
    margin-left: 18px;
    margin-right: 18px;
  }
  .intake-more-fields {
    grid-template-columns: 1fr;
  }
  .intake-description {
    grid-column: auto;
  }
  .intake-photo-choice {
    margin-left: 18px;
    margin-right: 18px;
  }
  .intake-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .intake-footer .primary {
    flex: 1;
  }
  .detail-dialog {
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
  .dialog-heading {
    padding: 22px 20px;
  }
  .dialog-heading h2 {
    font-size: 28px;
  }
  .form-section {
    padding: 23px 20px 0;
  }
  .field-grid {
    gap: 19px 14px;
  }
  .form-section .field-grid,
  .edit-contact .field-grid {
    grid-template-columns: 1fr;
  }
  .dialog-footer {
    padding: 20px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .dialog-footer .btn {
    font-size: 14px;
  }
  .detail-heading {
    padding: 8px 16px 16px;
  }
  .detail-created {
    font-size: 11px;
    margin-left: 10px;
  }
  .detail-vehicle h2 {
    font-size: var(--title-section);
  }
  .detail-vehicle p {
    font-size: 14px;
  }
  .detail-contact {
    gap: 7px 14px;
    font-size: 13px;
  }
  .detail-contact .text-button {
    margin-left: 0;
  }
  .detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  .detail-actions > .primary,
  .detail-action-menu[open] {
    grid-column: 1 / -1;
  }
  .detail-menu-items {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-description > summary {
    padding-block: 10px;
  }
  .detail-actions .btn {
    font-size: 13px;
    padding: 10px 13px;
  }
  .detail-tabs {
    padding: 0 16px;
    gap: 16px;
  }
  .detail-tabs button {
    font-size: 13px;
  }
  .detail-body {
    padding: 24px 16px 32px;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title h3 {
    font-size: var(--title-subsection);
  }
  .section-title > .status-pill {
    font-size: 13px;
  }
  .detail-body label {
    font-size: 13px;
  }
  .detail-body input,
  .detail-body select,
  .detail-body textarea {
    font-size: 16px;
  }
  .internal-note h3 {
    font-size: 13px;
    flex-wrap: wrap;
  }
  .internal-note h3 > span {
    font-size: 11px;
  }
  .save-row {
    flex-wrap: wrap;
    gap: 13px;
  }
  .save-row > .btn {
    margin-left: auto;
  }
  .save-row > span,
  .save-row > small {
    max-width: none;
  }
  .public-note-section h3 {
    font-size: 23px;
  }
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-grid img {
    max-height: 280px;
  }
  .photo-upload input[type="file"] {
    font-size: 12px;
  }
  .estimate-row {
    grid-template-columns: minmax(0, 1fr) 100px 28px;
    gap: 7px;
  }
  .estimate-row .icon-button {
    min-width: 28px;
    padding: 5px;
  }
  .estimate-labels {
    grid-template-columns: 1fr 132px;
    font-size: 12px;
  }
  .estimate-total strong {
    font-size: 33px;
  }
  .share-content {
    padding: 23px 20px 0;
  }
  .share-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .edit-contact > .field-grid,
  .edit-contact > label {
    margin-left: 20px;
    margin-right: 20px;
  }
  .job-dialog form > .form-error:not(:empty) {
    margin-left: 20px;
    margin-right: 20px;
  }
  .empty-state {
    padding: 45px 20px;
  }
  .empty-state h2 {
    font-size: 29px;
  }
  .empty-state p {
    font-size: 14px;
  }
  #toast {
    bottom: max(15px, env(safe-area-inset-bottom));
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: #fff;
  }
  body > * {
    display: none !important;
  }
  #print-sheet {
    display: block !important;
    font-family: Noto, Arial, sans-serif;
    font-size: 11pt;
    padding: 8mm;
    color: #111;
  }
  #print-sheet header {
    border-bottom: 2px solid #252923;
    padding-bottom: 5mm;
    margin-bottom: 8mm;
  }
  #print-sheet h1 {
    font-size: 20pt;
  }
  #print-sheet h2 {
    font-size: 16pt;
    margin: 5mm 0;
  }
  #print-sheet h3 {
    font-size: 12pt;
    margin: 7mm 0 3mm;
  }
  #print-sheet p {
    font-size: 10pt;
    line-height: 1.8;
    white-space: pre-wrap;
  }
  #print-sheet .print-info {
    background: #f4f3ef;
    padding: 5mm;
  }
  #print-sheet .print-notes {
    min-height: 30mm;
    border-bottom: 1px solid #ccc;
  }
  #print-sheet table {
    border-collapse: collapse;
    width: 100%;
    font-size: 10pt;
  }
  #print-sheet td,
  #print-sheet th {
    padding: 3mm;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }
  #print-sheet td:last-child,
  #print-sheet th:last-child {
    text-align: right;
  }
  #print-sheet footer {
    margin-top: 14mm;
    font-size: 8pt;
    color: #666;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}

/* Appearance is a shared utility. It never re-mounts the current view. */
.theme-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  gap: 9px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.theme-control select {
  width: 114px;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 14px;
  border-color: var(--control-border);
  background-color: transparent;
}
.login-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}
.login-preferences .language-login {
  margin-top: 0;
}
.rc-header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (max-width: 1100px) {
  .header-actions .theme-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .rc-header-tools {
    gap: 6px;
  }
  .rc-header-tools .theme-label {
    display: none;
  }
  .rc-header-tools .rc-language {
    padding-left: 6px;
  }
}
@media (max-width: 520px) {
  .app-header {
    gap: 8px;
  }
  .app-header .brand {
    font-size: 26px;
  }
  .theme-control select {
    width: 111px;
    font-size: 16px;
  }
  .login-preferences {
    flex-wrap: wrap;
  }
  .login-preferences .theme-label {
    display: none;
  }
}
@media (max-width: 380px) {
  .app-header {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    gap: 6px;
  }
  .app-header .brand {
    font-size: 24px;
  }
  .app-header .icon-button {
    min-width: 38px;
    padding: 8px;
  }
  .rc-header-top {
    flex-wrap: wrap;
    gap: 12px;
  }
  .rc-header-tools {
    margin-left: auto;
  }
}

/* Dark screen palette: black steel, neutral type and workshop red. Print keeps paper colors. */
@media screen {
  :root[data-theme="dark"] {
    --ink: #f2f1ef;
    --muted: #aaa7a4;
    --accent: #ff8a78;
    --accent-text: #ff8a78;
    --accent-hover: #ffad9f;
    --accent-soft: #341719;
    --base: #0f0f10;
    --paper: #171719;
    --line: #343438;
    --green: #63b886;
    --amber: #e1ac5d;
    --raised: #202023;
    --surface-hover: #28282c;
    --control-border: #66666d;
    --primary-fill: #b52e27;
    --primary-hover: #9f261f;
    --danger-text: #ff7463;
    --danger-surface: #351718;
    color-scheme: dark;
  }
  :root[data-theme="dark"] ::selection {
    background: #7c241e;
    color: #fff;
  }
  :root[data-theme="dark"] .primary {
    background: var(--primary-fill);
    border-color: var(--primary-fill);
    color: #fff;
  }
  :root[data-theme="dark"] .primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  :root[data-theme="dark"] .secondary {
    background: var(--paper);
    border-color: var(--control-border);
  }
  :root[data-theme="dark"] .secondary:hover {
    background: var(--surface-hover);
    border-color: #8b8b93;
  }
  :root[data-theme="dark"] .intake-camera,
  :root[data-theme="dark"] .intake-reasons span {
    background: var(--paper);
    border-color: var(--control-border);
  }
  :root[data-theme="dark"] .intake-camera:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
  }
  :root[data-theme="dark"] .intake-camera-icon {
    background: var(--raised);
  }
  :root[data-theme="dark"] .intake-reasons input:checked + span {
    color: #fff;
    background: var(--primary-fill);
    border-color: var(--primary-fill);
  }
  :root[data-theme="dark"] .intake-match {
    color: var(--green);
    background: #142019;
  }
  :root[data-theme="dark"] .intake-gov-lookup {
    background: var(--accent-soft);
  }
  :root[data-theme="dark"] .record-deletion {
    background: var(--danger-surface);
    border-color: var(--danger-text);
  }
  :root[data-theme="dark"] .intake-match.active-job {
    color: var(--amber);
    background: #2a2116;
  }
  :root[data-theme="dark"] .danger {
    background: var(--danger-surface);
    color: var(--danger-text);
    border-color: #b84a3d;
  }
  :root[data-theme="dark"] .danger:hover {
    background: #491d1b;
  }
  :root[data-theme="dark"] .icon-button:hover,
  :root[data-theme="dark"] .text-button:hover {
    background: var(--surface-hover);
  }
  :root[data-theme="dark"] .app-header,
  :root[data-theme="dark"] .demo-banner,
  :root[data-theme="dark"] .empty-state,
  :root[data-theme="dark"] .dialog-heading,
  :root[data-theme="dark"] .dialog-footer,
  :root[data-theme="dark"] .detail-heading,
  :root[data-theme="dark"] .update-dot,
  :root[data-theme="dark"] .upload-zone,
  :root[data-theme="dark"] .internal-note textarea,
  :root[data-theme="dark"] .jobs-table th {
    background: var(--raised);
  }
  :root[data-theme="dark"] .header-shop {
    border-color: var(--line);
  }
  :root[data-theme="dark"] .demo-banner,
  :root[data-theme="dark"] .jobs-table th,
  :root[data-theme="dark"] .search-box kbd,
  :root[data-theme="dark"] .heading-divider {
    color: var(--muted);
  }
  :root[data-theme="dark"] .search-box,
  :root[data-theme="dark"] .view-switch button,
  :root[data-theme="dark"] .theme-control select,
  :root[data-theme="dark"] input,
  :root[data-theme="dark"] select,
  :root[data-theme="dark"] textarea {
    background-color: var(--paper);
    border-color: var(--control-border);
    color: var(--ink);
  }
  :root[data-theme="dark"] .search-box input {
    background: transparent;
  }
  :root[data-theme="dark"] input::placeholder,
  :root[data-theme="dark"] textarea::placeholder {
    color: var(--muted);
  }
  :root[data-theme="dark"] .view-switch button:hover,
  :root[data-theme="dark"] .jobs-table tbody tr:hover,
  :root[data-theme="dark"] .jobs-table tbody tr:focus-within {
    background: var(--surface-hover);
  }
  :root[data-theme="dark"] .view-switch button.selected {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-text);
  }
  :root[data-theme="dark"] .plate {
    background: var(--paper);
    border-color: #8b8b93;
    color: var(--ink);
  }
  :root[data-theme="dark"] .status-pill.stage-quality:before {
    background: var(--muted);
  }
  :root[data-theme="dark"] .overdue,
  :root[data-theme="dark"] .date-cell.overdue,
  :root[data-theme="dark"] .estimate-status.declined,
  :root[data-theme="dark"] .form-error {
    color: var(--danger-text);
  }
  :root[data-theme="dark"] .column-header {
    border-top-color: #6c6c73;
  }
  :root[data-theme="dark"] .stage-bodywork > .column-header,
  :root[data-theme="dark"] .stage-paint > .column-header {
    border-top-color: var(--accent);
  }
  :root[data-theme="dark"] .stage-ready > .column-header {
    border-top-color: var(--green);
  }
  :root[data-theme="dark"] .job-card,
  :root[data-theme="dark"] .job-dialog,
  :root[data-theme="dark"] .detail-tabs,
  :root[data-theme="dark"] .login-panel {
    background: var(--paper);
  }
  :root[data-theme="dark"] .job-card:hover {
    background: var(--raised);
    border-color: #6c6c73;
  }
  :root[data-theme="dark"] .priority-card {
    border-left-color: var(--amber);
  }
  :root[data-theme="dark"] .column-empty,
  :root[data-theme="dark"] .upload-zone {
    border-color: #6c6c73;
  }
  :root[data-theme="dark"] .job-dialog {
    box-shadow: 0 22px 90px #000000b8;
    outline: 1px solid var(--line);
  }
  :root[data-theme="dark"] .job-dialog::backdrop {
    background: #000000c7;
  }
  :root[data-theme="dark"] .detail-actions .primary {
    background: var(--raised);
    border-color: var(--control-border);
    color: var(--ink);
  }
  :root[data-theme="dark"] .detail-actions .primary:hover {
    background: var(--surface-hover);
  }
  :root[data-theme="dark"] .photo-upload input::file-selector-button {
    background: var(--surface-hover);
    color: var(--ink);
  }
  :root[data-theme="dark"] .form-error:not(:empty),
  :root[data-theme="dark"] .dialog-status.error {
    background: var(--danger-surface);
    border-color: var(--danger-text);
    color: var(--danger-text);
  }
  :root[data-theme="dark"] .dialog-status {
    background: var(--raised);
    color: var(--ink);
  }
  :root[data-theme="dark"] .skip-link {
    background: var(--raised);
    color: var(--ink);
    border: 1px solid var(--control-border);
  }
  :root[data-theme="dark"] #toast {
    background: #222225;
    border: 1px solid var(--control-border);
    color: var(--ink);
  }
  :root[data-theme="dark"] #toast.error {
    background: var(--danger-surface);
    border-color: var(--danger-text);
    color: var(--danger-text);
  }
}

.admin-workshop-banner { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; padding:14px 28px; background:var(--accent-soft); color:var(--ink); border-bottom:1px solid var(--line); font-size:14px; }
.admin-workshop-banner span { min-width:0; overflow-wrap:anywhere; }
.admin-workshop-banner a { color: var(--accent-text); font-weight:700; min-height:44px; display:inline-flex; align-items:center; }
@media(max-width:760px) { .admin-workshop-banner { padding:12px 16px; gap:4px; } }
@media print { .admin-workshop-banner { display:none; } }

.photo-management {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.photo-management-summary {
  min-height: 56px;
  padding-block: 16px;
  font-weight: 600;
  cursor: pointer;
}
.photo-management-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-support);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.photo-management-body {
  padding: 8px 0 16px;
}
.photo-management p {
  max-width: 65ch;
  margin: 12px 0;
}
.photo-selection {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 16px 0;
  padding: 4px;
}
.photo-selection-item {
  display: grid;
  grid-template-columns: 20px 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.photo-selection-item img {
  width: 72px;
  height: 54px;
  object-fit: contain;
  background: var(--base);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.photo-selection-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-support);
  font-weight: 400;
}
.photo-management .checkbox-line {
  min-height: 44px;
  margin: 12px 0;
}
.stale-recovery,
.draft-recovery-note {
  padding: 16px;
  margin-block: 16px;
  border: 1px solid var(--control-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-support);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.stale-recovery p + p,
.stale-recovery .btn,
.stale-recovery .checkbox-line {
  margin-top: 12px;
}
.stale-recovery .checkbox-line {
  min-height: 44px;
}
.stale-recovery ul,
.stale-recovery dl {
  margin: 12px 0;
  padding-left: 20px;
}


/* Apple-inspired owner workspace: calm materials, obvious actions, one-click paths. */
@media screen and (min-width: 901px) {
  .app-shell {
    min-height: 100dvh;
  }
  .app-header {
    position: fixed;
    inset: 18px auto 18px 18px;
    z-index: 20;
    width: 220px;
    height: auto;
    padding: 22px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    box-shadow: 0 18px 50px #24304412, 0 2px 8px #2430440a;
    -webkit-backdrop-filter: saturate(150%) blur(24px);
    backdrop-filter: saturate(150%) blur(24px);
  }
  .sidebar-brand {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 0 10px 14px;
    border-bottom: 1px solid var(--line);
  }
  .app-header .brand {
    font-family: var(--font);
    font-size: 25px;
    letter-spacing: -1px;
  }
  .app-header .header-shop {
    display: block;
    max-width: none;
    padding: 0;
    border: 0;
    font-size: 12px;
  }
  .workspace-nav {
    display: grid;
    gap: 5px;
    align-self: auto;
  }
  .workspace-nav a {
    justify-content: flex-start;
    gap: 11px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 15px;
  }
  .workspace-nav a[aria-current="page"] {
    color: var(--ink);
    background: color-mix(in srgb, var(--accent-soft) 75%, var(--paper));
  }
  .workspace-nav a[aria-current="page"]::after {
    display: none;
  }
  .workspace-nav a[aria-current="page"] svg {
    color: var(--accent-text);
  }
  .header-actions {
    width: 100%;
    margin: auto 0 0;
    display: grid;
    align-items: stretch;
    gap: 3px;
  }
  .header-actions > .text-button,
  .header-actions > a {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
  }
  .header-actions .theme-control {
    width: 100%;
    justify-content: space-between;
    padding: 3px 2px 3px 10px;
  }
  .header-actions .theme-control select {
    width: 104px;
    border-radius: 9px;
  }
  .header-actions .language-toggle {
    justify-content: flex-start;
  }
  .header-actions .logout-link {
    color: var(--muted);
  }
  .workspace {
    max-width: 1640px;
    margin: 0 auto 0 252px;
    padding: 0 34px 30px;
  }
  .demo-banner,
  .admin-workshop-banner {
    margin-left: 252px;
  }
}

.page-heading {
  padding-top: 30px;
}
.page-heading > div {
  min-width: 0;
}
.page-heading h1,
.workspace .page-heading h1 {
  font-size: var(--title-page);
  letter-spacing: -.6px;
}
.page-heading .primary,
.mobile-arrival {
  border-radius: 14px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 20%, transparent);
}
.table-wrap,
.job-card,
.job-dialog {
  border-radius: 16px;
}
.jobs-table th {
  background: color-mix(in srgb, var(--base) 62%, var(--paper));
}
.jobs-table th:nth-child(1) { width: 19%; }
.jobs-table th:nth-child(2) { width: 17%; }
.jobs-table th:nth-child(3) { width: 19%; }
.jobs-table th:nth-child(5) { width: 330px; }
.jobs-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}
.jobs-table tbody tr:hover,
.jobs-table tbody tr:focus-within {
  background: color-mix(in srgb, var(--accent-soft) 28%, var(--paper));
}
.register-actions,
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-support);
  font-weight: 600;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
.row-action:hover {
  background: color-mix(in srgb, var(--base) 74%, var(--paper));
  color: var(--ink);
}
.row-action-open {
  color: var(--accent-text);
}
.row-action:active,
.workspace-nav a:active {
  transform: scale(.97);
}

.quick-dialog {
  width: min(500px, calc(100vw - 32px));
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  box-shadow: 0 24px 80px #18202b2e, 0 4px 18px #18202b14;
  -webkit-backdrop-filter: saturate(150%) blur(26px);
  backdrop-filter: saturate(150%) blur(26px);
}
.quick-dialog[style] {
  left: var(--quick-left);
  top: var(--quick-top);
  transform: none;
}
.quick-dialog[open] {
  animation: none;
}
.quick-dialog::backdrop {
  background: transparent;
  animation: none !important;
}
:root[data-theme="dark"] .quick-dialog::backdrop {
  background: transparent;
}
.quick-dialog .dialog-heading {
  padding: 22px 26px 18px;
  background: transparent;
}
.quick-dialog .dialog-heading h2 {
  font-size: 25px;
}
.quick-dialog .quick-identity {
  margin-top: 20px;
}
.quick-dialog .dialog-footer {
  padding-top: 18px;
}
.detail-dialog {
  border-radius: 20px 0 0 20px;
}
.detail-actions {
  flex-wrap: wrap;
}
.detail-actions .primary {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
}
.detail-actions .primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

@media (prefers-contrast: more) {
  .app-header,
  .table-wrap,
  .work-panel,
  .metric-strip,
  .parts-table {
    border-width: 2px;
  }
  .row-action {
    border: 1px solid var(--line);
  }
}
@media (max-width: 900px) {
  .app-header {
    position: sticky;
    top: 0;
    z-index: 18;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 14px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: saturate(150%) blur(22px);
    backdrop-filter: saturate(150%) blur(22px);
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
  }
  .app-header .brand { font-size: 24px; }
  .app-header .header-shop { display: none; }
  .header-actions {
    display: flex;
    margin-left: auto;
    gap: 4px;
  }
  .header-actions .subscription-link,
  .header-actions #manage-templates-side,
  .header-actions .theme-control,
  .header-actions .export-link,
  .header-actions .logout-link span,
  .header-actions .language-toggle span {
    display: none;
  }
  .header-actions .logout-link,
  .header-actions .language-toggle {
    min-width: 44px;
    padding: 8px;
  }
  .workspace-nav {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 4px;
  }
  .workspace-nav a {
    flex-direction: column;
    gap: 2px;
    min-height: 54px;
    padding: 6px 4px;
    border-radius: 10px 10px 0 0;
    font-size: 11px;
  }
  .workspace-nav a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-text);
  }
  .workspace-nav a[aria-current="page"]::after { display: none; }
  .workspace {
    margin: 0;
    padding: 0 max(16px, env(safe-area-inset-right)) 104px max(16px, env(safe-area-inset-left));
  }
  .demo-banner,
  .admin-workshop-banner { margin-left: 0; }
  .jobs-table { min-width: 920px; }
  .table-wrap { overflow-x: auto; }
}
@media (max-width: 680px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading #new-job {
    display: inline-flex;
  }
  .mobile-arrival {
    display: none;
  }
  .quick-dialog,
  .quick-dialog[style] {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    inset: auto 0 0;
    margin: 0;
    transform: none;
    border-radius: 22px 22px 0 0;
  }
  .quick-dialog::backdrop {
    background: #18202b33;
  }
  .detail-dialog {
    border-radius: 0;
  }
}
@media (max-width: 520px) {
  .table-wrap {
    overflow: hidden;
    border-radius: 14px;
  }
  .jobs-table {
    min-width: 0;
  }
  .jobs-table td.open-cell {
    grid-column: 1 / 3;
    grid-row: 3;
    width: 100%;
    padding-top: 6px !important;
  }
  .register-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .register-actions .row-action {
    min-width: 0;
    padding-inline: 5px;
  }
  .register-actions .row-action svg {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header,
  .quick-dialog {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
