:root {
  --bg: #f6f5f2;
  --ink: #171717;
  --muted: #5f5c56;
  --faint: #8a867c;
  --line: #e4e1d8;
  --line-strong: #d2cec3;
  --card: #fffcf8;
  --sidebar: #fbfaf7;
  --primary: #171717;
  --primary-ink: #f7f6f3;
  --danger: #8f2424;
  --ok: #145c32;
  --ready: #0e5c54;
  --wait: #7a4e0d;
  --shadow: 0 1px 0 rgba(23, 23, 23, 0.04);
  --radius: 12px;
  --space: 8px;
  color: var(--ink);
  background: var(--bg);
  font-family: "IBM Plex Sans", "Noto Sans Georgian", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #ead9b0; color: var(--ink); }

a { color: inherit; }

button, .button, label, summary { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}

.skip:focus { top: 12px; }

.nav-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  width: 5.5rem;
  height: 44px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  opacity: 0;
  border: 0;
}

.app { min-height: 100vh; }

.side {
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  min-height: 100vh;
}

.side-head,
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-head { padding: 12px 12px 4px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.brand-name {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-sub {
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 16px;
}

.nav-label {
  margin: 18px 12px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--faint);
}

.nav-label:first-child { margin-top: 8px; }

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover { background: #efece4; }

.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--primary-ink);
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 16px 12px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.who {
  display: grid;
  gap: 2px;
  margin: 0 12px;
}

.who strong { font-weight: 600; }

.who span { color: var(--muted); font-size: 0.9rem; }

.lang { display: flex; gap: 4px; }

.lang button,
.signout {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
}

.lang button { flex: 1; padding: 0 8px; }

.lang button[aria-current="true"] {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 600;
}

.signout { text-align: left; padding: 0 12px; }

.signout:hover,
.lang button:hover { color: var(--ink); }

.bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 56px;
  padding: max(4px, env(safe-area-inset-top)) 12px 4px;
  background: rgba(246, 245, 242, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.when-open { display: none; }

.app:has(.nav-toggle:checked) .when-closed { display: none; }
.app:has(.nav-toggle:checked) .when-open { display: inline; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.side .menu-btn { display: none; }

.backdrop { display: none; }

.workspace { min-width: 0; }

main {
  width: 100%;
  padding: 28px 16px max(40px, env(safe-area-inset-bottom));
}

h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

p { margin: 0 0 8px; }

.lede { color: var(--muted); margin-top: 0; }

.page-head,
.spread {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 16px;
}

.page-head { margin-bottom: 20px; }

.page-head h1,
.page-head h2,
.page-head .lede { margin-bottom: 0; }

.panel .page-head { margin-bottom: 14px; }

.row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}

.stack,
.cards { display: grid; gap: 12px; }

.need-board {
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
}

.need-card[hidden] { display: none !important; }

.need-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(23, 23, 23, 0.03);
}

.need-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.need-copy h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.need-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.need-card .stamp {
  flex: 0 0 auto;
  margin: 1px 0 0;
  gap: 6px;
}

a.need-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
}

a.need-create:hover { background: #2c2b28; }

a.need-create:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.need-card .stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.need-glass {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.need-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}



.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.panel li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel li:last-child { border-bottom: 0; padding-bottom: 0; }

.section-note { margin: -4px 0 14px; }

.panel .car-list { gap: 0; }

.panel li.car-row { padding-top: 12px; }

.panel li.car-row:first-child { padding-top: 0; }

.car-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.car-row strong { font-weight: 600; }

.car-row .help { margin-top: 2px; }

.car-row form { margin: 0; }

.add-car {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.add-car summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.add-car form { margin-top: 8px; }

.facts:not([hidden]) {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0 0 16px;
}

.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.phone-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

a.whatsapp {
  display: inline-flex;
  color: #128c7e;
  line-height: 0;
}

a.whatsapp:hover { color: #075e54; }

.notes-block { white-space: pre-wrap; margin: 0; }

td.notes-cell {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

td.car .help,
td.job-client .help { display: block; }

td.car a.rowlink {
  display: inline;
  min-height: 0;
  margin: 0;
}

table.jobs {
  table-layout: fixed;
}

table.jobs col.col-pick { width: 5.4%; }
table.jobs col.col-job { width: 6.1%; }
table.jobs col.col-client { width: 18.1%; }
table.jobs col.col-car { width: 13.6%; }
table.jobs col.col-vin { width: 21.2%; }
table.jobs col.col-notes { width: 13.8%; }
table.jobs col.col-when { width: 11.3%; }
table.jobs col.col-status { width: 10.5%; }

table.jobs th,
table.jobs td {
  vertical-align: top;
  padding-left: 6px;
  padding-right: 6px;
}

table.jobs th.pick,
table.jobs td.pick { padding: 0; }

table.jobs td.job-client,
table.jobs td.car,
table.jobs td.job-vin,
table.jobs td.notes-cell,
table.jobs td.job-when {
  overflow-wrap: anywhere;
}

table.jobs th.status,
table.jobs td.status {
  width: auto;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.photo-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  cursor: zoom-in;
}

.photo-popup {
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
}

.photo-popup::backdrop {
  background: rgba(23, 23, 23, 0.72);
}

.photo-popup[open] {
  display: grid;
  place-items: center;
}

.photo-popup img {
  display: block;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.photo-popup form {
  margin: 0;
}

.photo-popup-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.94);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(23, 23, 23, 0.2);
}

.photo-popup-close:hover,
.photo-popup-close:focus-visible {
  background: #fff;
}

.dealer-quick {
  width: min(36rem, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(23, 23, 23, 0.22);
}

.dealer-quick::backdrop {
  background: rgba(23, 23, 23, 0.48);
}

.dealer-quick-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: 0;
  padding: 18px 18px 16px;
  overflow: auto;
}

.dealer-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dealer-quick-head h2 { margin: 0; }

.dealer-quick-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.dealer-quick-close:hover,
.dealer-quick-close:focus-visible { background: #f3f1ea; }

.dealer-quick .errorlist { margin: 0 0 12px; }

.dealer-quick .errorlist[hidden] { display: none; }

.dealer-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-frame { position: relative; }

.photo-frame form { margin: 0; }

button.photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 23, 23, 0.18);
}

button.photo-delete:hover,
button.photo-delete:focus-visible {
  background: #fff;
  color: var(--danger);
}

.photo-add { margin: 0; }

.photo-add label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.photo-add label:hover,
.photo-add label:focus-within {
  background: #f7f5f0;
  color: var(--ink);
}

.photo-add input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.line > .actions { flex: 1 1 100%; }

.line p { margin: 0; }

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table { min-width: 100%; }

.only-narrow { display: none; }

.dealer-board {
  display: grid;
  gap: 0;
}

/* .dealer-board comes after .only-narrow and would otherwise stay visible on wide screens. */
.dealer-board.only-narrow { display: none; }

.dealer-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* Author display:flex beats the hidden attribute, so a typed search left every card on screen. */
.dealer-row[hidden] { display: none !important; }

.dealer-row:last-of-type { border-bottom: 0; }

.dealer-row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dealer-row-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dealer-row-title .rowlink {
  margin: 0;
  min-height: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dealer-row-title .stamp {
  flex: 0 0 auto;
  margin: 0;
}

.dealer-phone {
  width: fit-content;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.dealer-address {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.dealer-row-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.dealer-row-action .bin {
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.dealer-board .quiet { margin: 0; padding: 12px 0; }

table { width: 100%; border-collapse: collapse; }

td a[href^="tel:"] { white-space: nowrap; }

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover td { background: #f7f5f0; }

td.money, th.money { text-align: right; }

th.pick,
td.pick {
  width: 44px;
  padding: 0;
  text-align: center;
}

.pick label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  margin: 0;
  font-weight: 400;
}

td.pick .pick-num { display: none; }

tbody tr:has(.job-pick:checked) td { background: #f4f0e6; }

.copy-bar:not([hidden]) {
  position: sticky;
  top: 8px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

th.status,
td.status {
  width: 1px;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

td.status .stamp { margin: 0; }

th.row-action,
td.row-action {
  width: 1px;
  white-space: nowrap;
  padding-left: 4px;
  padding-right: 4px;
  text-align: right;
}

td.row-action form,
.status-cell form { margin: 0; }
td.row-action button.bin,
.status-cell button.bin { width: 32px; min-height: 32px; }

button.bin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

button.bin:hover,
button.bin:focus-visible {
  background: #fbf4f4;
  color: var(--danger);
  border-color: #e7cccc;
}

.money, .num { font-variant-numeric: tabular-nums; }

.money { white-space: nowrap; }

a.rowlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0;
  font-weight: 600;
  text-decoration: none;
}

main a:not(.button):not(.brand):not(.rowlink) {
  text-decoration: underline;
  text-decoration-color: #c4b48a;
  text-underline-offset: 3px;
}

main a:not(.button):hover { text-decoration-color: currentColor; }

a.source {
  color: #6b5a32;
  font-size: 0.78rem;
  word-break: break-all;
}

.stamp {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 4px 4px 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1efe8;
  color: #3f3d38;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.stamp-done { background: #e5f2ea; color: var(--ok); }
.stamp-muted { background: #eeeae3; color: #4e4b45; }
.stamp-wait { background: #f8ecd8; color: var(--wait); }
.stamp-live { background: #f1efe8; color: #3f3d38; }
.stamp-ready { background: #e3f1ef; color: var(--ready); }
.stamp-new { background: #e7eef6; color: #1a365d; }

.button:not([hidden]),
button.primary:not([hidden]),
button.secondary:not([hidden]),
.danger:not([hidden]),
button.danger:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.button,
button.primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.button:hover,
button.primary:hover { background: #2c2b28; }

.button.secondary,
button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
button.secondary:hover { background: #f3f1ea; }

.danger,
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: #e7cccc;
}

.danger:hover,
button.danger:hover { background: #fbf4f4; }

.inline { display: inline; }

.panel form > button,
form.panel > button { margin-top: 4px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }

.field[hidden],
.glass-options[hidden] {
  display: none !important;
}

.field:has(input[type="checkbox"]):not(:has(.choices)) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.glass-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 4px 12px;
  margin-bottom: 14px;
}

.glass-options .field {
  margin-bottom: 0;
}

.glass-options .field:has(input[type="checkbox"]) {
  min-height: 36px;
  gap: 8px;
}

label { font-weight: 600; }

.control,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: inherit;
}

textarea,
textarea.control { min-height: 96px; resize: vertical; }

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--ink);
}

.choices {
  display: grid;
  gap: 8px;
}

.choices > div label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-weight: 500;
  cursor: pointer;
}

.choices input[type="radio"],
.choices input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.help { margin: 0; color: var(--muted); font-size: 0.92rem; }

.error,
.errorlist { color: var(--danger); margin: 0; font-weight: 600; }

.errorlist { list-style: none; padding: 0; }

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.message {
  padding: 12px 14px;
  border-radius: 10px;
  background: #e7f3ec;
  border: 1px solid #cfe6d8;
  color: var(--ok);
}

.message.error {
  background: #fbf4f4;
  border-color: #f0d4d4;
  color: var(--danger);
}

form.panel { max-width: 36rem; }

form.panel.filters { max-width: none; }

.toolbar,
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.toolbar {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toolbar label,
.filters .field { display: grid; gap: 6px; margin: 0; }

.toolbar button,
.filters > button { justify-self: start; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel > .pager { margin-bottom: 16px; }

.panel > .pager ~ .pager { margin-top: 16px; margin-bottom: 0; }

.login-body { background: #171717; }

main.login {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding: 48px 48px max(48px, env(safe-area-inset-bottom));
  color: #f7f6f3;
  background:
    linear-gradient(180deg, rgba(196, 163, 90, 0.16), rgba(196, 163, 90, 0) 28%),
    #171717;
}

.login-brand h1 {
  margin: 0 0 8px;
  color: inherit;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: 0.18em;
  font-weight: 500;
}

.login-brand p {
  margin: 0;
  max-width: 16rem;
  color: #c8c4ba;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  padding: 48px;
  background: var(--bg);
}

.login-panel .lang,
.login-panel form:not(.lang) { width: min(100%, 22rem); }

.login-panel .lang { margin-bottom: 20px; }

.login-panel .lang button { color: var(--muted); }

.login-panel button.primary { width: 100%; margin-top: 4px; }

@media (min-width: 721px) {
  main.login { grid-template-rows: 1fr; }
}

@media (min-width: 960px) {
  .app:has(.side) {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .side {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--line);
  }

  main { padding: 40px 48px 72px; }

  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 959px) {
  .bar { display: flex; }

  .side {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(20rem, calc(100vw - 3.5rem));
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    overflow: auto;
    border-right: 1px solid var(--line);
  }

  .side .menu-btn { display: inline-flex; }

  .app:has(.nav-toggle:checked) .side {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .app:has(.nav-toggle:checked) .backdrop {
    display: block;
    position: fixed;
    z-index: 20;
    inset: 0;
    background: rgba(23, 23, 23, 0.36);
    color: transparent;
    font-size: 0;
  }

  body:has(.nav-toggle:checked) { overflow: hidden; }

  .app:has(.nav-toggle:checked) .bar .menu-btn,
  .app:has(.nav-toggle:checked) .bar .nav-toggle { visibility: hidden; }

  .grid { grid-template-columns: 1fr; }

  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { font-size: 15px; }

  main {
    padding: 12px 8px max(24px, env(safe-area-inset-bottom));
  }

  .bar { padding-left: 8px; padding-right: 8px; }

  h1 {
    font-size: 1.28rem;
    margin-bottom: 4px;
  }

  h2 {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  p { margin-bottom: 6px; }

  .page-head { margin-bottom: 12px; gap: 8px; }

  .panel .page-head { margin-bottom: 8px; }

  .grid,
  .stack,
  .cards,
  .need-board { gap: 0; }

  .panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .panel:last-child { border-bottom: 0; margin-bottom: 0; }

  .panel ul { gap: 6px; }

  .panel li { padding-bottom: 6px; }

  .panel li.car-row { padding-top: 8px; }

  .section-note { margin: 0 0 8px; }

  .need-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .need-card:not([hidden]):not(:has(~ .need-card:not([hidden]))) { border-bottom: 0; }

  .need-copy h2 { font-size: 1rem; }

  .need-meta { font-size: 0.85rem; }

  .field { margin-bottom: 10px; }

  .facts {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 4px 8px;
    margin-bottom: 10px;
  }

  .line {
    padding: 10px 0;
    gap: 8px;
  }

  .messages { margin-bottom: 10px; gap: 6px; }

  .message { padding: 8px 10px; border-radius: 8px; }

  th, td { padding: 8px 6px; }

  .page-head,
  .spread,
  .line,
  .car-row { flex-direction: column; align-items: stretch; }

  .car-row form,
  .car-row button,
  .add-car summary { width: 100%; }

  .page-head > .button,
  .page-head > a.button,
  .page-head .actions > .button,
  .page-head .actions > a.button,
  .spread > .button,
  .spread > a.button,
  .line > form,
  .actions,
  .actions form,
  .actions button,
  .panel form > button,
  form.panel > button { width: 100%; }

  table.wide { min-width: 52rem; }

  .only-wide { display: none !important; }

  .only-narrow { display: block; }

  .dealer-board.only-narrow { display: grid; }

  tbody tr:hover td,
  tbody tr:hover td:first-child { background: #f0eee8; }

  .toolbar,
  .filters { grid-template-columns: 1fr; }

  .toolbar button,
  .filters button,
  .copy-bar:not([hidden]) button { width: 100%; }

  main.login {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .login-brand {
    min-height: auto;
    padding: max(20px, env(safe-area-inset-top)) 16px 16px;
  }

  .login-brand h1 { font-size: 1.75rem; }

  .login-panel { padding: 16px 16px 32px; }

  .table-scroll {
    margin: 0 -8px;
    padding: 0 8px;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
    box-shadow: 1px 0 0 var(--line);
  }

  thead th:first-child { z-index: 2; }

  tbody tr:hover td:first-child { background: #f0eee8; }

  table.jobs.wide { min-width: 0; }

  .table-scroll:has(table.jobs) {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  table.jobs {
    display: block;
    width: 100%;
    table-layout: auto;
  }

  table.jobs thead { display: none; }

  table.jobs tbody { display: block; }

  table.jobs tr[data-job] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--line);
  }

  table.jobs tr[data-job]:has(td.pick) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
  }

  table.jobs tr[data-job][hidden] { display: none !important; }

  table.jobs td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    position: static;
    box-shadow: none;
    background: transparent;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  table.jobs tbody tr:hover td,
  table.jobs tbody tr:hover td:first-child,
  table.jobs tbody tr:has(.job-pick:checked) td { background: transparent; }

  table.jobs tbody tr[data-job]:hover { background: #f7f5f0; }

  table.jobs tbody tr[data-job]:has(.job-pick:checked) { background: #f4f0e6; }

  table.jobs td.car { display: contents; }

  table.jobs tr[data-job]:has(td.pick) td.pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    grid-column: 1;
    grid-row: 1;
    width: auto;
  }

  table.jobs tr[data-job]:has(td.pick) td.car {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  table.jobs .pick-num {
    display: inline;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    color: inherit;
    font-size: 1.4em;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
  }

  table.jobs tr[data-job]:has(td.pick) td.pick label {
    width: 36px;
    min-height: 32px;
    height: 32px;
  }

  table.jobs td.job-num {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin-top: 0;
  }

  table.jobs tr[data-job]:has(td.pick) td.job-num { display: none; }

  table.jobs td.car > a {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  table.jobs tr[data-job]:has(td.pick) td.car > a { grid-column: 3; }

  table.jobs td.car > .help {
    grid-column: 2 / -1;
    order: 1;
  }

  table.jobs tr[data-job]:has(td.pick) td.car > .help { grid-column: 3 / -1; }

  table.jobs td.status {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: auto;
    padding: 0;
  }

  table.jobs tr[data-job]:has(td.pick) td.status { grid-column: 3; }

  table.jobs td.job-client,
  table.jobs td.job-vin,
  table.jobs td.notes-cell,
  table.jobs td.job-when { grid-column: 2 / -1; }

  table.jobs td.job-client { order: 2; }

  table.jobs td.job-vin,
  table.jobs td.notes-cell,
  table.jobs td.job-when { order: 3; }

  table.jobs tr[data-job]:has(td.pick) td.job-client,
  table.jobs tr[data-job]:has(td.pick) td.job-vin,
  table.jobs tr[data-job]:has(td.pick) td.notes-cell,
  table.jobs tr[data-job]:has(td.pick) td.job-when { grid-column: 2 / -1; }

  table.jobs td:has(> .empty) { display: none; }

  table.jobs a.rowlink {
    display: inline;
    min-height: 0;
    margin: 0;
  }

  table.jobs td.car .help {
    display: block;
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4;
  }

  table.jobs td.job-num a.rowlink {
    color: inherit;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
  }

  table.jobs td.job-client { margin-top: 4px; }

  table.jobs .status-cell {
    flex-wrap: wrap;
    justify-content: flex-end;
    white-space: normal;
  }

  table.jobs td[data-label]::before {
    content: attr(data-label);
    margin-right: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  table.jobs tr#job-none { display: block; }

  table.jobs tr#job-none[hidden] { display: none !important; }

  table.jobs tr#job-none td {
    display: block;
    padding: 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side,
  .button,
  button.primary,
  button.secondary,
  .danger { transition: none; }
}

.nav-toggle:focus-visible + .menu-btn {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.dossier {
  width: min(720px, 100%);
}

.dossier .crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.dossier .crumb:hover { color: var(--ink); }

.identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.monogram {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 12px;
  background:
    linear-gradient(#c4a35a, #c4a35a) top / 100% 2px no-repeat,
    #171717;
  color: #f6f1e6;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.identity-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.identity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.identity h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.8vw, 1.95rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.identity .button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color 160ms ease, color 160ms ease;
}

.contact svg { color: currentColor; }

.contact:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.file-note {
  margin: 6px 0 0;
  max-width: 36rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-k {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.dossier .sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0 0 12px;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(23, 23, 23, 0.03);
}

.sheet-head { padding: 12px 14px 6px; }

.dossier .sheet-head h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fleet,
.work-list {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
}

.vehicle,
.work {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 56px;
  border-radius: 10px;
  transition: background-color 160ms ease;
}

.vehicle,
.work-main {
  padding: 10px 8px 10px 10px;
}

.vehicle:hover,
.work:hover,
.work:focus-within { background: #f4f1ea; }

.glyph {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  margin-right: 10px;
  border-radius: 9px;
  background: #f1eee6;
  color: #3c3832;
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.work-main .glyph {
  width: auto;
  min-width: 36px;
  padding: 0 6px;
}

.vehicle-copy,
.work-copy {
  flex: 1;
  min-width: 0;
}

.vehicle-copy strong,
.work-copy strong {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.vehicle-copy .help,
.work-meta {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dossier .stamp {
  flex: 0 0 auto;
  gap: 6px;
  margin: 0 4px 0 8px;
  padding: 0 9px 0 8px;
  white-space: nowrap;
}

.dossier .stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dossier .vehicle form,
.dossier .work form {
  display: flex;
  align-items: center;
  margin: 0 2px 0 0;
}

.dossier .vehicle .bin,
.dossier .work .bin {
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.dossier .add-car {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.dossier .add-car summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 4px 4px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.dossier .add-car summary::-webkit-details-marker { display: none; }

.dossier .add-car summary::marker { content: ""; }

.dossier .add-car summary:hover,
.dossier .add-car[open] summary {
  background: #f4f1ea;
  color: var(--ink);
}

.dossier .add-car summary svg { color: currentColor; }

.dossier .add-car form,
.dossier .invite {
  margin: 4px 8px 10px;
  padding: 14px 14px 6px;
  border-radius: 12px;
  background: #f6f4ee;
}

.dossier .invite { margin-top: 0; }

.dossier .invite h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.dossier .quiet {
  margin: 0;
  padding: 4px 14px 14px;
  color: var(--muted);
}

.dossier .invite .quiet { padding: 0 0 8px; }

.dossier .car-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}

.dossier .car-form .field { margin-bottom: 12px; }

.dossier .car-form .errorlist,
.dossier .car-form > button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-bottom: 10px;
}

.work-main {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  color: inherit;
  border-radius: 10px;
}

.work-meta,
.work-note {
  display: block;
  overflow-wrap: anywhere;
}

.work-note {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.retire {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.retire form { margin: 0; }

main .dossier a.contact:not(.button),
main .dossier a.crumb:not(.button),
main .dossier a.work-main:not(.button) {
  text-decoration: none;
}

main .dossier a.contact:not(.button):hover,
main .dossier a.crumb:not(.button):hover,
main .dossier a.work-main:not(.button):hover {
  text-decoration: none;
}

@media (max-width: 720px) {
  .dossier .crumb {
    margin-bottom: 10px;
    font-size: 0.85rem;
    min-height: 28px;
  }

  .identity {
    gap: 10px;
    margin-bottom: 14px;
  }

  .monogram {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .identity h1 { font-size: 1.35rem; }

  .identity .button {
    min-height: 32px;
    padding: 0 10px;
  }

  .dossier .sheet {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 14px;
  }

  .sheet-head { padding: 0 0 4px; }

  .dossier .sheet-head h2 { font-size: 0.72rem; }

  .vehicle,
  .work { min-height: 48px; border-radius: 0; }

  .vehicle,
  .work-main { padding: 8px 0; }

  .glyph {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border-radius: 8px;
  }

  .work-main .glyph {
    min-width: 32px;
    padding: 0 4px;
  }

  .vehicle-copy .help,
  .work-meta { font-size: 0.82rem; }

  .dossier .add-car summary {
    width: auto;
    min-height: 40px;
    padding: 0 8px;
  }

  .dossier .add-car form,
  .dossier .invite {
    padding: 8px 0 4px;
  }

  .dossier .quiet { padding: 2px 0 8px; }

  .dossier .invite .quiet { padding: 0 0 6px; }

  .dossier .car-form { grid-template-columns: 1fr; }

  .dossier .car-form .field { margin-bottom: 8px; }

  .dossier .car-form > button,
  .dossier .retire button { width: 100%; }

  .work { align-items: flex-start; }

  .work-main {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 6px;
  }

  .work-main .glyph { margin-top: 2px; }

  .work-copy { flex: 1 1 calc(100% - 48px); }

  .dossier .work-main .stamp {
    margin: 0 0 0 40px;
  }
}

@media (max-width: 420px) {
  .identity-title {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .identity .button {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact,
  .vehicle,
  .work,
  .dossier .add-car summary { transition: none; }
}

.dealer-file .identity-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dealer-file .identity-status .stamp {
  margin: 0;
}

.dealer-file .identity-status .stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 2px;
}

.reach {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.reach-pair {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.contact.whatsapp {
  width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  color: #0f6b5c;
  border-color: #c5ddd7;
  background: #f2faf8;
}

.contact.whatsapp:hover {
  color: #075e54;
  border-color: #9fc8be;
}

.contact.sms {
  width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  color: #3a4553;
  border-color: #d5d8de;
  background: #f4f6f8;
}

.contact.sms:hover {
  color: var(--ink);
  border-color: #b7bec8;
}

.contact-static {
  cursor: default;
  max-width: 100%;
}

.contact-static:hover {
  border-color: var(--line);
  color: var(--muted);
}

.coverage {
  display: grid;
  gap: 12px;
  padding: 4px 14px 16px;
}

.coverage-row {
  display: grid;
  gap: 6px;
}

.coverage-k {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}

.chip-quiet {
  background: #f6f4ee;
  color: #3f3d38;
}

.dealer-photos {
  padding: 2px 10px 12px;
}

.stock-list { padding-bottom: 4px; }

.stock {
  align-items: flex-start;
}

.stock-copy { padding-right: 8px; }

.stock-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin: 2px 8px 0 0;
}

.dealer-file .stock .stamp {
  margin: 0;
}

.dealer-file .stock .stamp::before { display: none; }

main .dossier a.contact.whatsapp:not(.button),
main .dossier a.contact.sms:not(.button),
main .job-desk a.contact.sms:not(.button) {
  text-decoration: none;
}

@media (max-width: 720px) {
  .coverage { padding: 0 0 8px; }

  .dealer-photos { padding: 0 0 4px; }

  .stock {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .stock-copy { flex: 1 1 calc(100% - 48px); }

  .stock-marks {
    width: 100%;
    justify-content: flex-start;
    margin: 0 0 0 40px;
  }
}

.job-desk {
  width: min(1080px, 100%);
}

.job-id {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.job-id-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.job-id-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}

.job-id h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.job-num {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.job-id-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.job-id-actions .stamp {
  margin: 0;
  gap: 6px;
}

.job-id-actions .stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.job-id-actions form { margin: 0; }

.job-id-actions .bin {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.job-id .contact { margin: 0; }

.job-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.job-id .file-note { margin-top: 4px; }

.comm {
  display: grid;
  gap: 6px;
  max-width: 36rem;
  margin-top: 4px;
}

.comm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 1.25rem;
}

.comm-head .note-k { margin: 0; }

.comm-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.comm-status[data-state="saved"] { color: var(--ok); }

.comm-status[data-state="error"] { color: var(--danger); }

.comm textarea { min-height: 88px; }

.job-id > .button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.job-desk .panel > h2,
.job-desk .glass-catalog > summary h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.job-desk .glass-catalog > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: -8px -8px 0;
  padding: 8px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}

.job-desk .glass-catalog > summary::-webkit-details-marker { display: none; }

.job-desk .glass-catalog > summary::marker { content: ""; }

.job-desk .glass-catalog > summary h2 { margin: 0; }

.job-desk .glass-catalog > summary:hover,
.job-desk .glass-catalog[open] > summary {
  background: #f4f1ea;
  color: var(--ink);
}

.job-desk .glass-catalog > summary:hover h2,
.job-desk .glass-catalog[open] > summary h2 { color: var(--ink); }

.job-desk .glass-catalog > summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.job-desk .glass-catalog[open] > summary { margin-bottom: 12px; }

.glass-catalog-chevron {
  flex: 0 0 auto;
  color: currentColor;
}

.job-desk .glass-catalog[open] .glass-catalog-chevron { transform: rotate(180deg); }

.glass-offers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.glass-offer {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 12px 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.glass-offer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.glass-offer-id {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.glass-offer-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.glass-offer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.glass-offer-meta .stamp { margin: 0; }

a.source.glass-offer-source {
  flex: 1 1 8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.glass-offer-add { margin: 0; }

.glass-offer-add button {
  min-height: 36px;
  padding: 0 14px;
}

.glass-offer-dealer {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.glass-offer-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.glass-offer-name {
  margin: 0;
  font-weight: 600;
}

.glass-offer-who .contact {
  min-height: 32px;
  color: var(--ink);
}

.glass-offer-address {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.glass-offer-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem;
  gap: 8px 12px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.glass-offer-figures.has-dealer {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.5rem;
}

.glass-offer-figures div { min-width: 0; }

.glass-offer-figures dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.glass-offer-figures dd {
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.glass-offer-figures dd span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.glass-offer-figures .ours dd { color: var(--ink); }

.glass-offer-figures .glass-offer-empty {
  color: var(--faint);
  font-size: 1rem;
  font-weight: 500;
}

.job-edit {
  margin-bottom: 16px;
}

.job-edit[hidden] { display: none !important; }

.job-sum {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.job-footer-actions {
  margin-top: 4px;
  padding-top: 4px;
}

main .job-desk a.contact:not(.button) {
  text-decoration: none;
}

main .job-desk a.contact:not(.button):hover {
  text-decoration: none;
}

@media (max-width: 720px) {
  .job-id {
    flex-wrap: wrap;
    margin-bottom: 16px;
  }

  .job-id-title {
    width: 100%;
  }

  .job-id > .button {
    order: 3;
  }

  .job-desk .grid {
    gap: 10px;
  }

  .job-desk .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(23, 23, 23, 0.03);
    padding: 14px;
    margin-bottom: 0;
  }

  .job-desk .panel > h2 {
    margin-bottom: 10px;
    font-size: 0.72rem;
  }

  .job-desk .glass-catalog > summary h2 { font-size: 0.72rem; }

  .job-desk .panel form > button,
  .job-desk .job-footer-actions button {
    width: 100%;
  }

  .job-desk .panel form.glass-offer-add > button {
    width: auto;
  }

  .job-desk .actions {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .job-id-title {
    flex-wrap: wrap;
  }
}

.address-search-wrap {
  position: relative;
  z-index: 2;
}

.address-picker-field--search-open .address-search-wrap { z-index: 30; }

.address-suggestions {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  margin: 0;
  padding: 4px;
  overflow: auto;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.08);
}

.address-suggestions[hidden] { display: none; }

.address-suggestions button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.address-suggestions button:hover,
.address-suggestions button:focus-visible { background: #f3f1ea; }

.address-suggestion-detail {
  color: var(--faint);
  font-size: 0.85rem;
}

.delivery-map-wrap { position: relative; z-index: 1; }

.delivery-map {
  height: 280px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #e7e4dc;
}

.delivery-map-wrap--expanded {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
}

.delivery-map-wrap--expanded .delivery-map {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.leaflet-container { font-family: inherit; }

.leaflet-gl-layer,
.maplibregl-canvas-container,
.maplibregl-canvas { pointer-events: none; }

.delivery-map-fullscreen {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  box-shadow: 0 1px 4px rgba(23, 23, 23, 0.2);
}

.address-pin-wrap { background: transparent; border: 0; }

.address-pin {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #171717;
  box-shadow: 0 1px 4px rgba(23, 23, 23, 0.35);
  transform: rotate(-45deg);
}

textarea.address-picker-input {
  min-height: 44px;
  resize: vertical;
}

.address-picker-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.address-picker-hint:empty { display: none; }

.address-picker-hint--error {
  color: var(--danger);
  font-weight: 600;
}
