/* Scoped to the intended dealer's explicitly enabled workflow. Business pages retain their system. */
body.dealer-workflow{--serif:var(--sans);--t-figure:600 30px/36px var(--sans);--t-section:600 20px/28px var(--sans);--t-h1:600 30px/38px var(--sans);--r-card:12px;--r-ctl:8px;--r-in:6px;--r-page:16px;font-family:"Hanken Grotesk",system-ui,sans-serif}
.dealer-workflow h1,.dealer-workflow h2,.dealer-workflow h3,.dealer-workflow .brand b{font-family:inherit!important;font-style:normal;letter-spacing:-.02em}
.dealer-workflow h1{font-size:26px!important;line-height:1.25}.dealer-workflow h2{font-size:20px!important}.dealer-workflow .btn,.dealer-workflow input,.dealer-workflow select,.dealer-workflow textarea{border-radius:3px;min-height:44px}.dealer-workflow #view{padding-top:20px}.dealer-workflow .dw-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dealer-workflow .dw-heading h1,.dealer-workflow .dw-heading h2{margin:0}.dealer-workflow .dw-heading p{margin:6px 0 0}.dw-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.dw-toolbar input[type=search]{max-width:350px;min-width:160px;flex:1}.dw-arrivals{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:12px;border:1px solid var(--hairline);background:var(--surface-2);font-size:13px;margin-bottom:16px}.dw-arrivals a{margin-left:auto}.dw-list{background:var(--surface);border-top:1px solid var(--hairline)}.dw-customer{border-bottom:1px solid var(--hairline)}.dw-row{display:grid;grid-template-columns:110px minmax(160px,1fr) minmax(150px,1.25fr) auto;align-items:center;gap:14px;padding:10px 12px;min-height:78px}.dw-row>div{min-width:0}.dw-row small{display:block;font-size:13px;color:var(--ink-3);margin-top:4px}.dw-row a{font-weight:600;color:var(--ink)}.dw-pending{padding:10px 0}.dw-pending summary{cursor:pointer;font-size:13px;min-height:44px;display:flex;align-items:center}.dw-editor{background:var(--surface-2);padding:16px;animation:dw-in 200ms cubic-bezier(.16,1,.3,1)}.dw-editor-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dw-editor-head h2{margin:0}.dw-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dw-context p{margin:4px 0}.dw-field{display:grid;gap:5px;margin-bottom:12px;font-size:13px}.dw-field input,.dw-field textarea,.dw-field select{width:100%;font-size:15px}.dw-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.dw-pair h3{font-size:15px;margin:10px 0;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.dw-pair textarea{min-height:78px;resize:vertical}.dw-booking{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dw-form footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid var(--hairline);padding-top:12px;margin-top:12px}.dw-form footer>span{margin-right:auto;font-size:12px}.dw-history,.dw-provenance{border-top:1px solid var(--hairline);padding:8px 0}.dw-history summary,.dw-provenance summary{min-height:44px;cursor:pointer;font-size:13px;display:flex;align-items:center}.dw-history ol{padding:0;list-style:none}.dw-history li{display:grid;grid-template-columns:120px minmax(0,1fr);gap:14px;font-size:13px;padding:8px 0;border-top:1px solid var(--hairline)}.dw-provenance pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.5 inherit}.dw-sheet{position:fixed;inset:0 0 0 auto;margin:0;width:min(660px,100%);max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;background:var(--surface);color:var(--ink);padding:0;overflow:auto}.dw-sheet::backdrop{background:var(--scrim)}.dw-sheet .dw-pair{grid-template-columns:1fr}.dw-sheet .dw-editor{min-height:100%;background:var(--surface);padding:20px}.dw-sheet footer{position:sticky;bottom:0;background:var(--surface);padding:12px 0}.dw-calendar-event,.dw-person{background:var(--surface);padding:16px;border-bottom:1px solid var(--hairline)}.dw-calendar-event .btn{margin-right:8px}.dw-calendar-event p{margin:8px 0}.dw-person{display:flex;align-items:center;justify-content:space-between;gap:12px}.dealer-workflow [hidden]{display:none!important}.dealer-workflow .titles{padding:0}.dealer-workflow .section-title{font-size:20px}.dealer-workflow .dw-form details>summary{font-size:13px;min-height:44px;display:flex;align-items:center;cursor:pointer}.dealer-workflow .dw-editor:focus{outline:2px solid var(--focus)}
@keyframes dw-in{from{opacity:.75;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(max-width:700px){.dw-row{grid-template-columns:minmax(0,1fr) 136px;gap:8px 12px;padding:12px}.dw-row>div:nth-child(2){grid-column:1;grid-row:2}.dw-row>div:nth-child(3){grid-column:1/-1;grid-row:3}.dw-row>.btn{grid-column:2;grid-row:1/3}.dw-pair{grid-template-columns:1fr}.dw-field input,.dw-field select,.dw-field textarea{font-size:16px}.dw-form footer{flex-wrap:wrap}.dw-form footer>span{width:100%;margin-bottom:4px}.dw-form footer>.primary{flex:1}.dw-history li{grid-template-columns:90px minmax(0,1fr)}.dw-sheet{left:0;right:auto;width:100%;max-width:100%}.dw-sheet .dw-editor{padding:16px 12px}.dw-sheet footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}.dw-booking{grid-template-columns:1fr}.dealer-workflow .dw-context{align-items:flex-start}.dw-context strong{font-size:17px}.dw-person{display:block}.dw-arrivals{gap:8px}.dealer-workflow .dw-heading h1{font-size:24px!important}}
@media(prefers-reduced-motion:reduce){.dw-editor{animation:none}.dealer-workflow *{transition:none!important;scroll-behavior:auto!important}}

.dw-measure{border-bottom:1px solid var(--hairline);padding:8px 0}.dw-measure summary,.dealer-workflow details.report>summary{min-height:44px;cursor:pointer;display:flex;align-items:center}.dw-measure p{max-width:80ch}

.dealer-workflow :is(.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report)>summary::before{content:"";display:inline-block;flex:none;width:6px;height:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;margin-right:12px;transform:rotate(-45deg);transition:transform 150ms ease-out}.dealer-workflow :is(.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report)[open]>summary::before{transform:rotate(45deg)}.dw-toolbar button[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}

.appbar>.dealer-context-select{max-width:190px;width:190px;min-width:0;flex:0 1 190px;background:var(--frame-hover);color:var(--frame-ink);border-color:var(--frame-hover)}.more-list .dealer-context-select{width:100%}@media(max-width:700px){.appbar>.dealer-context-select{display:none}}

/* 27 October: shared finishing for the dealership workspace.
   Native disclosures, routes, form controls and workflow semantics remain intact. */
.dealer-workflow { accent-color: var(--primary); }
.dealer-workflow ::selection { background: var(--primary); color: var(--on-primary); }
.dealer-workflow :is(input, textarea) { caret-color: var(--ink); }
.dealer-workflow :is(.side-nav, .table-wrap, .sheet, dialog) { scrollbar-width: thin; }
.dealer-workflow h1 { font-size: 30px !important; line-height: 1.25; font-weight: 600; }
.dealer-workflow h2 { line-height: 1.35; }
.dealer-workflow #view { padding-top: 28px; }
.dealer-workflow .dw-heading { margin-bottom: 24px; align-items: center; }
.dealer-workflow .dw-heading p { margin-top: 8px; }
.dealer-workflow .sub { color: var(--ink-3); line-height: 1.5; }
.dealer-workflow :is(.btn, input, select, textarea) { border-radius: var(--r-ctl); }
.dealer-workflow :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  border: 1px solid var(--ctrl); background: var(--panel); color: var(--ink);
  padding: 10px 12px; font-size: 15px; line-height: 22px; min-width: 0;
  transition: border-color 120ms var(--ease-out), background-color 120ms var(--ease-out);
}
.dealer-workflow :is(input, textarea)::placeholder { color: var(--ink-3); opacity: 1; }
.dealer-workflow :is(input, select, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.dealer-workflow .appbar select.department-select, .dealer-workflow .appbar select.dealer-context-select { background: var(--frame-hover); color: var(--frame-ink); border-color: var(--frame-hover); }
.dealer-workflow .search input[type=search] { padding-left: 42px; }
.dealer-workflow .btn { font-weight: 600; transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out); }
.dealer-workflow .btn.primary:hover { background: var(--primary); filter: brightness(.96); }
.dealer-workflow .btn:disabled { filter: none; }
.dealer-workflow :is(.section-tabs a, .seg button) { transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.dealer-workflow .section-tabs { gap: 4px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--panel-line); }
.dealer-workflow .section-tabs a[aria-current=page] { background: var(--ink); color: var(--bg); }
.dealer-workflow .seg button[aria-pressed=true] { background: var(--ink); color: var(--bg); }

/* One drawn chevron for expandable groups. The native summary stays keyboard operable. */
.dealer-workflow summary { list-style: none; }
.dealer-workflow summary::-webkit-details-marker { display: none; }
.dealer-workflow summary::marker { content: ''; }
.dealer-workflow :is(.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report,.handoff-steps,.handoff-history,.past-enquiry,.dw-page>details) > summary {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--r-ctl);
}
.dealer-workflow :is(.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report,.handoff-steps,.handoff-history,.past-enquiry,.dw-page>details) > summary::before { content: none; }
.dealer-workflow :is(.side-nav details,.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report,.handoff-steps,.handoff-history,.past-enquiry,.dw-page>details) > summary::after {
  content: ''; width: 7px; height: 7px; flex: 0 0 7px; margin: 0 3px 0 auto;
  border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
  transform: rotate(-45deg); transition: transform 160ms var(--ease-out); opacity: .8;
}
.dealer-workflow :is(.side-nav details,.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report,.handoff-steps,.handoff-history,.past-enquiry,.dw-page>details)[open] > summary::after { transform: rotate(45deg); }
.dealer-workflow :is(.dw-history,.dw-provenance,.dw-pending,.dw-measure,.dw-form details,details.report,.handoff-steps,.handoff-history,.past-enquiry) > summary:hover { background: var(--tile); }
.dealer-workflow .side-nav summary { display: flex; align-items: center; gap: 12px; font-size: 14px; min-height: 44px; padding: 10px 12px; }
.dealer-workflow .side-nav summary span { min-width: 0; }
.dealer-workflow .side-nav summary::after { width: 6px; height: 6px; flex-basis: 6px; margin-right: 1px; }
.dealer-workflow .side-nav details { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--frame-hover); }
.dealer-workflow .side-nav details a { margin-top: 4px; padding-left: 24px; font-size: 14px; }
.dealer-workflow .side-nav :is(a,summary) { transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out); }
.dealer-workflow:not(.out) main#view, .dealer-workflow .side-nav, .dealer-workflow .sheet { transition: none; }
.dealer-workflow.rail-min .side-nav summary { display: none; }
.dealer-workflow.rail-min .side-nav details a { padding-left: 13px; }

/* Today: coherent sections, compact rows and an intentional empty state. */
.dw-toolbar { gap: 8px; margin-bottom: 20px; }
.dw-toolbar input[type=search] { margin-left: 8px; max-width: 380px; }
.dw-toolbar > .sub { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; }
.dw-toolbar button[aria-pressed] { background: var(--tile); color: var(--ink); }
.dw-toolbar button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.dw-arrivals { padding: 14px 16px; border: 0; border-radius: var(--r-card); background: var(--tile); margin-bottom: 12px; line-height: 1.6; }
.dw-arrivals > strong { font-size: 14px; }
.dw-arrivals a { font-weight: 600; white-space: nowrap; text-underline-offset: 4px; }
.dw-arrivals:has(.btn) .btn { margin-left: auto; }
.dw-arrivals[role=status] { background: var(--need-bg); color: var(--need-ink); }
.dw-arrivals[role=status] a { color: inherit; }
.dw-pending { padding: 0; margin: 16px 0; border: 1px solid var(--panel-line); border-radius: var(--r-card); background: var(--panel); overflow: clip; }
.dw-count { display: inline-flex; justify-content: center; align-items: center; min-width: 24px; height: 24px; padding: 0 7px; background: var(--tile); color: var(--ink-2); border-radius: 6px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dw-pending[open] > summary { border-bottom: 1px solid var(--panel-line); border-radius: 0; }
.dw-pending[open]:not(:has(.dw-row)) > summary { border-bottom: 0; }
.dw-list { border: 1px solid var(--panel-line); border-radius: var(--r-card); overflow: clip; margin: 20px 0; }
.dw-list > .empty { padding: 32px 24px; margin: 0; color: var(--ink-2); font-size: 15px; }
.dw-customer:last-child { border-bottom: 0; }
.dw-row { min-height: 84px; padding: 16px; gap: 16px; }
.dw-row:hover { background: var(--tile); }
.dw-row a { text-decoration: none; }
.dw-row a:hover { text-decoration: underline; text-underline-offset: 4px; }
.dw-row small { margin-top: 4px; line-height: 1.5; }
.dw-row .btn { align-self: center; }
.dw-pending .dw-row { border-top: 1px solid var(--panel-line); }
.dw-pending > summary + .dw-customer .dw-row { border-top: 0; }

/* Shared content: filters, data tables, reports, settings and handovers. */
.dealer-workflow .filters { gap: 12px; padding: 16px; border-radius: var(--r-card); background: var(--tile); margin-bottom: 20px; }
.dealer-workflow .filters label { color: var(--ink-2); }
.dealer-workflow .table-wrap { border-radius: var(--r-card); background: var(--panel); }
.dealer-workflow .table th { background: var(--tile); font-weight: 600; color: var(--ink-2); padding-top: 14px; padding-bottom: 14px; }
.dealer-workflow .table td { vertical-align: middle; }
.dealer-workflow .table :is(td,th) { font-variant-numeric: tabular-nums; }
.dealer-workflow .empty-state { max-width: none; padding: 32px 24px; border-radius: var(--r-card); background: var(--panel); }
.dealer-workflow .empty-state h3 { font-size: 17px; font-weight: 600; }
.dealer-workflow .tiles { overflow: clip; margin-bottom: 20px; }
.dealer-workflow .tile { padding: 20px; min-width: 0; }
.dealer-workflow .tile b { font-size: 26px; line-height: 1.35; letter-spacing: -.025em; }
.dealer-workflow .tile .sub { margin-top: 8px; }
.dealer-workflow details.report { margin-top: 16px; }
.dealer-workflow .dw-measure { padding: 0; background: var(--panel); border-bottom: 1px solid var(--panel-line); }
.dealer-workflow .dw-measure p { padding: 0 16px 12px; margin: 0; }
.dealer-workflow :is(.dw-person,.dw-calendar-event) { padding: 20px; border-radius: var(--r-card); margin-bottom: 12px; border: 1px solid var(--panel-line); }
.dealer-workflow .dw-person p { margin: 6px 0 0; }
.dealer-workflow .handoff-row { padding-top: 20px; border-color: var(--panel-line); }
.dealer-workflow .settings .card { padding: 24px; }
.dealer-workflow .card-title { line-height: 1.4; }

/* Recording an outcome and customer detail keep the same fields and actions. */
.dw-editor { padding: 24px; background: var(--tile); }
.dw-editor-head { margin-bottom: 20px; gap: 12px; }
.dw-context { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--panel-line); }
.dw-context strong { font-size: 20px; font-weight: 600; }
.dw-field { gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.dw-field > span { font-weight: 600; }
.dw-pair { gap: 24px; margin: 20px 0; }
.dealer-workflow .dw-pair h3 { font-size: 15px; letter-spacing: 0; margin: 0 0 16px; padding-bottom: 12px; }
.dw-form footer { padding-top: 20px; margin-top: 20px; }
.dw-history, .dw-provenance { padding: 4px 0; border-color: var(--panel-line); }
.dw-history li { padding: 12px 16px; }
.dw-history time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dw-provenance > p { padding-inline: 16px; }
.dw-customer-card { padding: 20px; }
.dw-customer-card > p { padding: 16px; border-radius: var(--r-ctl); background: var(--tile); }
.dealer-workflow .sheet .panel:has(.dw-customer-card) { display: flex; width: 100%; border-left: 0; flex-direction: column; }
.dealer-workflow .sheet:has(.dw-customer-card) { background: transparent; }
.dealer-workflow .sheet:has(.dw-customer-card) .scrim { display: block; }
.dealer-workflow .sheet .panel:has(.dw-customer-card) .head { flex: none; min-height: 64px; }
.dealer-workflow .sheet .body:has(> .dw-customer-card) { display: block; flex: 1; min-height: 0; overflow-y: auto; padding: 0; }
.dw-sheet .dw-editor { padding: 28px; }
.dw-sheet .dw-form footer { gap: 12px; }

@media (max-width: 1000px) {
  .dealer-workflow .filters { padding: 12px; }
  .dealer-workflow .dw-toolbar > .sub { margin-left: 0; }
}
@media (max-width: 700px) {
  .dealer-workflow #view { padding-top: 20px; }
  .dealer-workflow h1, .dealer-workflow .dw-heading h1 { font-size: 26px !important; }
  .dealer-workflow .dw-heading { margin-bottom: 20px; align-items: flex-start; }
  .dealer-workflow :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
  .dw-toolbar input[type=search] { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 0; }
  .dw-toolbar > .sub { margin-left: auto !important; }
  .dw-row { padding: 16px; gap: 12px; grid-template-columns: minmax(0,1fr) 128px; }
  .dw-arrivals { padding: 12px 16px; gap: 8px 12px; }
  .dw-list > .empty { padding: 24px 16px; }
  .dw-editor, .dw-sheet .dw-editor, .dw-customer-card { padding: 16px; }
  .dw-pair { gap: 12px; }
  .dw-context { flex-wrap: wrap; }
  .dw-person .btn { margin-top: 16px; }
  .dealer-workflow .tile { padding: 16px; }
  .dealer-workflow .settings .card { padding: 16px; }
  .dealer-workflow .filters > * { min-width: 0; max-width: 100%; }
  .dealer-workflow .section-tabs { margin-bottom: 20px; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dealer-workflow summary::after { transition: none; }
}

/* 28 October: Today leads with the customers. One compact header line, an optional strip for
   bookings and flags, and per-row icons that open Record action as a pop-up over the page. */
.dealer-workflow .dw-today { padding-top: 0; }
.dw-topbar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dealer-workflow .dw-topbar h1 { font-size: 22px !important; line-height: 1.2; margin: 0; }
.dw-topbar > .sub { font-size: 13px; font-variant-numeric: tabular-nums; }
.dw-late-count { color: var(--late); font-weight: 600; }
.dw-scope { display: inline-flex; gap: 4px; margin-left: 4px; }
.dw-scope button[aria-pressed] { background: var(--tile); color: var(--ink); min-height: 36px; padding: 0 14px; }
.dw-scope button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.dealer-workflow .dw-topbar input[type=search] { flex: 1 1 220px; max-width: 360px; min-height: 36px; padding-block: 6px; }
.dw-total { margin-left: auto; }
.dealer-workflow .dw-topbar > .btn { min-height: 36px; }
.dw-strip { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.dw-strip strong { color: var(--ink); }
.dw-flag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border: 0; border-radius: 999px; background: var(--need-chip); color: var(--need-ink); font: 600 12px/1.4 inherit; text-decoration: none; cursor: pointer; }
.dw-flag:hover { filter: brightness(.97); }
.dealer-workflow .dw-strip .dw-alerts > summary { min-height: 28px; padding: 2px 10px; font-size: 12px; border-radius: 999px; background: var(--tile); gap: 8px; }
.dw-alerts[open] { flex-basis: 100%; }
.dw-alerts p { margin: 6px 10px; }
.dw-today .dw-list { margin-top: 0; }
.dw-today .dw-row { min-height: 72px; padding: 12px 16px; }

.dw-actions { display: grid; gap: 4px; justify-items: end; }
.dw-log, .dw-contact { display: flex; gap: 4px; }
.dw-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; transition: background-color 120ms var(--ease-out), border-color 120ms var(--ease-out); }
.dw-icon:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.dw-icon:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dw-icon .ico { width: 19px; height: 19px; }
.dw-actions.late .dw-icon { border-color: var(--late); color: var(--late); }
.dw-actions.late .dw-icon:hover { background: var(--late); color: var(--bg); }
.dw-soon { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px dashed var(--panel-line); border-radius: var(--r-ctl); background: transparent; color: var(--ink-3); font: 600 12px/1 inherit; opacity: .6; cursor: not-allowed; }
.dw-soon .ico { width: 14px; height: 14px; }

/* Record action is a centred pop-up on wider screens, full screen on a phone. */
.dw-sheet.dw-modal { inset: 0; margin: auto; width: min(820px, calc(100% - 48px)); height: fit-content; max-height: calc(100dvh - 48px); border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.28); }
.dw-sheet.dw-modal .dw-editor { min-height: 0; }
.dw-sheet.dw-modal .dw-pair { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.dw-sheet.dw-modal .dw-editor-head { position: sticky; top: -28px; z-index: 1; margin: -28px -28px 16px; padding: 20px 28px 12px; background: var(--surface); border-bottom: 1px solid var(--panel-line); }

@media (max-width: 700px) {
  .dw-topbar { gap: 8px; }
  .dealer-workflow .dw-topbar input[type=search] { order: 3; flex-basis: 100%; max-width: none; }
  .dw-today .dw-row { grid-template-columns: minmax(0,1fr) auto; }
  .dw-row > .dw-actions { grid-column: 2; grid-row: 1/3; }
  .dw-icon { width: 36px; height: 36px; }
  .dw-log { display: grid; grid-template-columns: repeat(2, 36px); }
  .dw-contact { display: none; }
  .dw-sheet.dw-modal { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .dw-sheet.dw-modal .dw-pair { grid-template-columns: 1fr; }
  .dw-sheet.dw-modal .dw-editor-head { top: -16px; margin: -16px -16px 12px; padding: 14px 16px 10px; }
}

/* 28 October (later): Today as three boxes, Overdue, To do today and Completed today, under a daily score. */
.dw-score { margin-left: auto; display: grid; grid-template-columns: auto 120px; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 4px 12px; border-radius: var(--r-ctl); background: var(--tile); cursor: help; }
.dw-score-num { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dw-score-num b { font-size: 20px; line-height: 1; color: var(--ink); margin-right: 2px; }
.dw-bar { display: block; height: 8px; border-radius: 99px; background: var(--panel-line); overflow: hidden; }
.dw-bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width 300ms var(--ease-out); }
.dw-score small { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.dw-score.hit .dw-bar i { background: var(--ink); }
.dw-box { margin: 0 0 16px; }
.dw-box-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.dealer-workflow .dw-box-head h2 { font-size: 16px !important; margin: 0; }
.dw-box-head > .sub { margin-left: auto; font-size: 13px; font-weight: 600; }
.dw-today .dw-box .dw-list { margin: 0; }
.dw-overdue .dw-box-head .dw-count { background: var(--late); color: var(--bg); }
.dw-overdue .dw-list { border-color: var(--late); }
.dw-completed .dw-list { background: var(--panel); }
.dw-done { display: grid; grid-template-columns: 110px minmax(140px,1fr) minmax(150px,2fr) 44px; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--panel-line); font-size: 14px; }
.dw-done:last-child { border-bottom: 0; }
.dw-done time { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.dw-done a { font-weight: 600; color: var(--ink); text-decoration: none; }
.dw-done a:hover { text-decoration: underline; text-underline-offset: 4px; }
.dw-done small { display: block; font-size: 12px; color: var(--ink-3); }
.dw-done-text { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.dw-pts { justify-self: end; min-width: 36px; padding: 3px 8px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.dw-pts.zero { background: var(--tile); color: var(--ink-3); }
@media (max-width: 700px) {
  .dw-score { margin-left: 0; order: 2; grid-template-columns: auto 1fr; flex: 1 1 100%; }
  .dw-done { grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px 16px; }
  .dw-done time { grid-column: 1; grid-row: 1; }
  .dw-done > div:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .dw-done-text { grid-column: 1 / -1; grid-row: 3; }
  .dw-pts { grid-column: 2; grid-row: 1 / 3; }
}
/* Customer card, 29 Oct call: full screen, vehicle at the top, the enquiry's facts, a small hand-off line, history under it. */
.dw-full-card{max-width:1100px;margin:0 auto;padding:4px 4px 24px}
.dw-car{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--hairline);border-radius:var(--r-card);background:var(--surface-2);margin-bottom:14px}
.dw-car small{display:block;font-size:12px;color:var(--ink-3)}.dw-car strong{display:block;font-size:15px}
.dw-full-card .dw-heading{margin-bottom:12px}
.dw-stages{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0 0 12px}
.dw-stages li{font-size:13px;font-weight:600;padding:6px 12px;border-radius:999px;background:var(--surface-2);color:var(--ink-3);border:1px solid var(--hairline)}
.dw-stages li.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.dw-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.dw-fact{padding:10px 12px;border:1px solid var(--hairline);border-radius:var(--r-card);background:var(--surface)}
.dw-fact small,.dw-next small{display:block;font-size:12px;color:var(--ink-3);margin-bottom:2px}.dw-fact strong{font-size:15px}
.dw-next{margin:0 0 6px;padding:10px 12px;border-radius:var(--r-card);background:var(--soon-bg,var(--surface-2))}
.dw-small-actions{font-size:13px;color:var(--ink-3);margin:6px 0 10px}
.dw-small-actions .linkish{background:none;border:0;padding:0;min-height:0;font:inherit;color:var(--ink);text-decoration:underline;cursor:pointer}
.dw-gap{display:block;font-size:12px;color:var(--ink-3);margin-top:2px}
@media(max-width:700px){.dw-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dw-phone{margin:0;font-size:15px;font-weight:600}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Customers list, 29 Oct call: totals across the top, tighter rows. */
.dw-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 12px}
.dw-totals>div{padding:8px 12px;border:1px solid var(--hairline);border-radius:var(--r-card);background:var(--surface)}
.dw-totals strong{display:block;font-size:20px;line-height:1.2}.dw-totals small{font-size:12px;color:var(--ink-3)}
.dealer-workflow .people-table.dw-compact td,.dealer-workflow .people-table.dw-compact th{padding-top:6px;padding-bottom:6px;font-size:13px}
.dealer-workflow .people-table.dw-compact tr{height:auto}
@media(max-width:700px){.dw-totals{grid-template-columns:repeat(3,minmax(0,1fr))}}
.dw-menu-label{font-size:12px;color:var(--ink-3);padding:8px 12px 2px;text-transform:uppercase;letter-spacing:.04em}
.menu a.dw-admin-item{display:flex;width:100%;box-sizing:border-box;align-items:center;gap:10px;min-height:40px;padding:0 10px;border-radius:8px;font-size:15px;color:inherit;text-decoration:none}.menu a.dw-admin-item:hover{background:var(--surface-2)}

/* Calendar, 29 Oct call */
.dw-daynav{display:flex;gap:6px;align-items:center}.dw-daynav input{width:auto}
.dw-cal-day{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--r-card);overflow:hidden;margin-bottom:12px}
.dw-cal-event{display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--hairline);border-left:4px solid var(--hairline)}
.dw-cal-event:last-child{border-bottom:0}
.dw-cal-time strong{display:block;font-size:15px}.dw-cal-time small{color:var(--ink-3);font-size:12px}
.dw-cal-body p{margin:2px 0 0;font-size:13px;color:var(--ink-3)}
.dw-cal-actions{display:flex;gap:6px}
.dw-k-test_drive{border-left-color:#2F6FB3}.dw-k-delivery{border-left-color:#2E7D4F}.dw-k-closing{border-left-color:#B5651D}.dw-k-visit{border-left-color:#6B5BA8}.dw-k-busy{border-left-color:var(--ink-3)}
@media(max-width:700px){.dw-cal-event{grid-template-columns:64px minmax(0,1fr)}.dw-cal-actions{grid-column:1/-1}}

/* Team board, 29 Oct call */
.dw-inline{display:flex;align-items:center;gap:6px;margin:0}.dw-inline span{font-size:13px;color:var(--ink-3)}.dw-inline select{width:auto;min-width:150px}
.dw-board{display:grid;grid-template-columns:repeat(5,minmax(200px,1fr));gap:10px;overflow-x:auto;padding-bottom:8px;margin-bottom:10px}
.dw-col{background:var(--surface-2);border:1px solid var(--hairline);border-radius:var(--r-card);padding:8px;min-height:120px}
.dw-col>header{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 8px}.dw-col h2{font-size:14px!important;margin:0}
.dw-card{display:block;background:var(--surface);border:1px solid var(--hairline);border-radius:10px;padding:8px 10px;margin-bottom:6px;color:var(--ink);text-decoration:none}
.dw-card:hover{border-color:var(--ink-3)}.dw-card strong{display:block;font-size:14px}.dw-card span{display:block;font-size:13px;margin-top:2px}.dw-card small{display:block;font-size:12px;color:var(--ink-3)}
.dw-col .empty{font-size:13px;color:var(--ink-3);padding:4px}
/* Reports, 29 Oct call: definitions behind an "i", smaller text, columns, no dead space. */
.info{position:relative;display:inline-flex;vertical-align:middle;margin-left:6px}
.info-btn{width:20px;height:20px;min-height:0!important;padding:0;border-radius:50%!important;border:1px solid var(--ctrl);background:var(--panel);color:var(--ink-2);font:italic 600 12px/1 Georgia,serif;cursor:pointer}
.info-btn:hover,.info-btn[aria-expanded=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.info-btn::before{content:"";position:absolute;inset:-12px}
.info-tip{position:absolute;z-index:30;top:26px;left:-8px;width:min(280px,70vw);padding:8px 10px;border-radius:8px;background:var(--ink);color:var(--bg);font:400 13px/1.45 var(--sans);text-transform:none;letter-spacing:0;box-shadow:var(--pop-shadow);white-space:normal}
.dealer-workflow .dw-report .section-title{font-size:16px!important;margin:16px 0 6px}
.dealer-workflow .dw-report .tiles,.dealer-workflow #view .tiles{margin-bottom:10px}
.dealer-workflow #view .tile{padding:10px 12px}.dealer-workflow #view .tile b{font-size:22px;line-height:1.2}
.dealer-workflow .dw-report .table td,.dealer-workflow .dw-report .table th{padding-top:5px;padding-bottom:5px;font-size:13px}
.dw-report-links{margin:0 0 8px;font-size:13px}
@media(min-width:1100px){.dealer-workflow .dw-report .report-cols{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Record action, layout A (29 Oct mock-ups, Jordan's pick): the next step first in an amber band, then what happened. */
.dw-sheet.dw-ra-modal { width: min(780px, calc(100% - 48px)); }
.dw-sheet.dw-ra-modal .dw-editor.dw-ra-editor { padding: 0; }
.dw-ra > * { margin: 0; }
.dw-ra-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 16px 24px; background: var(--surface); border-bottom: 1px solid var(--panel-line); }
.dw-ra-who { flex: 1; min-width: 0; }
.dealer-workflow .dw-ra-who h2 { margin: 0; font-size: 18px !important; }
.dw-ra-who .sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.dw-ra-car { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); font-size: 13px; font-weight: 600; }
.dealer-workflow .dw-ra-car .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.dealer-workflow .dw-ra-close { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.dw-ra-close .ico { width: 16px; height: 16px; }
.dw-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 0 !important; }
.dw-ra-enquiry, .dw-ra-car-pick, .dw-ra-at { padding: 14px 24px 0; }
.dw-ra-car-pick .sub { margin: 0; font-size: 12px; }
.dw-ra-label { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.dw-ra-next { padding: 18px 24px 6px; background: var(--need-bg); border-bottom: 1px solid var(--soon-line); }
.dw-ra-happened { padding: 18px 24px 4px; }
.dw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dealer-workflow .dw-chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; transition: background 120ms var(--ease-out), border-color 120ms var(--ease-out); }
.dealer-workflow .dw-chip:hover { border-color: var(--ink-3); }
.dealer-workflow .dw-chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.dealer-workflow .dw-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dw-ra-next .dw-chips { margin-bottom: 14px; }
.dw-ra-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.dw-ra-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dw-ra-outcomes { display: flex; gap: 8px; }
.dw-ra-divider { width: 1px; background: var(--panel-line); margin: 0 4px; }
.dw-ra-happened textarea { min-height: 70px; resize: vertical; }
.dw-ra .dw-provenance { margin: 0 24px; }
.dw-ra > .err { padding: 0 24px; }
.dealer-workflow .dw-ra > footer { position: sticky; bottom: 0; margin: 0; padding: 14px 24px; background: var(--surface); border-top: 1px solid var(--panel-line); }
.dw-ra > footer > .sub { font-size: 13px !important; color: var(--ink-3); }
@media (max-width: 700px) {
  .dw-sheet.dw-ra-modal { width: 100%; }
  .dw-ra-head { flex-wrap: wrap; padding: 12px 16px; }
  .dw-ra-car { order: 3; flex-basis: 100%; justify-content: space-between; }
  .dw-ra-next, .dw-ra-happened { padding-inline: 16px; }
  .dw-ra-enquiry, .dw-ra-car-pick, .dw-ra-at { padding-inline: 16px; }
  .dw-ra .dw-provenance { margin: 0 16px; }
  .dw-ra-grid { grid-template-columns: 1fr; }
  .dealer-workflow .dw-ra > footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
}

/* 30 Oct (Jordan): Today rows at half the height. One line per piece of work: what and when, who and the car,
   the last thing said, then the four record icons and the two coming-soon ones in a single row. Long text
   is cut with an ellipsis and shown in full on the customer card. */
.dw-today .dw-box { margin-bottom: 12px; }
.dw-today .dw-box-head { margin-bottom: 4px; }
.dw-today .dw-row { grid-template-columns: 168px minmax(180px, 1fr) minmax(160px, 1.5fr) auto; gap: 12px; min-height: 0; padding: 4px 8px 4px 12px; font-size: 14px; line-height: 20px; }
.dw-today .dw-row > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-today .dw-row small { display: inline; margin: 0 0 0 6px; font-size: 12px; }
.dw-today .dw-row > div:nth-child(3) { color: var(--ink-2); }
.dw-today .dw-actions { display: flex; align-items: center; gap: 4px; }
.dw-today .dw-icon { width: 30px; height: 30px; }
.dw-today .dw-icon .ico { width: 16px; height: 16px; }
.dw-today .dw-soon { width: 30px; height: 30px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
.dw-today .dw-done { gap: 12px; padding: 5px 12px; font-size: 14px; line-height: 20px; }
.dw-today .dw-done small { display: inline; margin-left: 6px; }
.dw-today .dw-done > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-today .dw-list > .empty { padding: 10px 12px; font-size: 14px; }
.dw-today .dw-pending .dw-row { border-top: 1px solid var(--panel-line); }
@media (max-width: 700px) {
  .dw-today .dw-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 6px 8px 6px 12px; }
  .dw-today .dw-row > div:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .dw-today .dw-row > div:nth-child(2) { grid-column: 1; grid-row: 1; }
  .dw-today .dw-row > div:nth-child(3) { grid-column: 1 / -1; grid-row: 3; font-size: 13px; }
  .dw-today .dw-row > .dw-actions { grid-column: 2; grid-row: 1 / 3; }
  .dw-today .dw-log { display: flex; }
  .dw-today .dw-icon { width: 34px; height: 34px; }
}

/* 30 Oct: Record action reads top to bottom as it happens. What happened and what came of it, then the
   required next step in the amber band, then where the lead came from as tidy label and value pairs. */
.dw-ra-happened { padding: 18px 24px 8px; }
.dw-ra-next { padding: 16px 24px 4px; border-top: 1px solid var(--soon-line); border-bottom: 1px solid var(--soon-line); }
.dw-ra-next .dw-chips { margin-bottom: 12px; }
.dw-ra-req { margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: var(--need-chip); color: var(--need-ink); font-size: 10px; letter-spacing: .04em; }
.dw-ra-next.dw-ra-missing { box-shadow: inset 4px 0 0 var(--late); }
.dw-ra-next.dw-ra-missing .dw-ra-req { background: var(--late); color: var(--bg); }
.dw-ra .dw-provenance { margin: 12px 24px 0; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); }
.dw-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 4px 16px 12px; font-size: 13px; }
.dw-facts dt { color: var(--ink-3); }
.dw-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.dw-source { margin: 0 16px 12px; padding-top: 10px; border-top: 1px solid var(--panel-line); }
.dw-source .dw-facts { margin: 4px 0 0; }
.dw-source-head { margin: 0; font-size: 13px; color: var(--ink-3); }
.dw-source-head strong { color: var(--ink); margin-right: 6px; }
.dw-ra-car-pick { margin: 12px 24px 0; padding: 12px 14px 10px; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); background: var(--tile); }
.dw-ra-car-pick .dw-field { margin-bottom: 6px; }
@media (max-width: 700px) {
  .dw-ra-next, .dw-ra-happened { padding-inline: 16px; }
  .dw-ra .dw-provenance, .dw-ra-car-pick { margin-inline: 16px; }
}

/* 30 Oct: the calendar as a picture of the day or week. A gutter of hours, a column per person, bay or day, and each
   booking a coloured block sized to its length. The kind colours: test drive blue, visit green, closing purple,
   delivery amber, meeting grey; another salesperson's booking is "Busy" and hatched. */
:root { --k-test_drive: #2F6FB3; --k-visit: #2E8A57; --k-closing: #7A4FB5; --k-delivery: #C27A0E; --k-meeting: #6B6256; --k-busy: #8D8577; }
.dw-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: calc(var(--r-ctl) + 3px); background: var(--tile); }
.dealer-workflow .dw-seg .btn { min-height: 34px; padding: 0 12px; border: 0; background: transparent; font-size: 13px; }
.dealer-workflow .dw-seg .btn[aria-pressed=true] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.dw-calendar-page .dw-topbar > .btn.primary { margin-left: auto; }
.dw-cal-hint { margin: 0 0 8px; font-size: 13px; }
.dw-cal-wrap { max-height: calc(100dvh - 230px); min-height: 360px; overflow: auto; border: 1px solid var(--panel-line); border-radius: var(--r-card); background: var(--panel); margin-bottom: 16px; }
.dw-cal { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(150px, 1fr)); grid-template-rows: auto auto; min-width: min-content; }
.dw-cal-v-week { grid-template-columns: 58px repeat(var(--cols), minmax(120px, 1fr)); }
.dw-cal-corner, .dw-cal-colhead { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--panel-line); }
.dw-cal-corner { left: 0; z-index: 4; }
.dw-cal-colhead { padding: 8px 10px; border-left: 1px solid var(--panel-line); min-width: 0; }
.dw-cal-colhead strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-cal-colhead small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-cal-colhead.is-today strong { color: var(--late); }
.dw-cal-gutter { position: sticky; left: 0; z-index: 2; background: var(--panel); }
.dw-cal-gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dw-cal-gutter span:first-child { transform: none; }
.dw-cal-col { position: relative; border-left: 1px solid var(--panel-line); cursor: cell;
  background-image: repeating-linear-gradient(to bottom, var(--panel-line) 0 1px, transparent 1px 28px), repeating-linear-gradient(to bottom, transparent 0 28px, var(--tile) 28px 56px); }
.dw-cal-col:hover { background-color: color-mix(in srgb, var(--tile) 40%, transparent); }
.dw-cal-col.is-today { background-color: color-mix(in srgb, var(--need-bg) 60%, transparent); }
.dw-cal-now { position: absolute; left: 0; right: 0; z-index: 2; height: 2px; background: var(--late); pointer-events: none; }
.dw-cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--late); }
.dw-ev { --k: var(--k-meeting); position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 18px; overflow: hidden; padding: 2px 6px 2px 8px; border: 0; border-left: 3px solid var(--k); border-radius: 6px; background: color-mix(in srgb, var(--k) 16%, var(--panel)); color: var(--ink); text-align: left; font: 500 12px/16px var(--sans); cursor: pointer; }
.dw-ev strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-ev span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-ev:hover { background: color-mix(in srgb, var(--k) 26%, var(--panel)); z-index: 2; }
.dw-ev:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; z-index: 2; }
.dw-ev.with { background: transparent; border: 1px dashed var(--k); border-left: 3px solid var(--k); }
.dw-ev-test_drive { --k: var(--k-test_drive); } .dw-ev-visit { --k: var(--k-visit); } .dw-ev-closing { --k: var(--k-closing); } .dw-ev-delivery { --k: var(--k-delivery); } .dw-ev-meeting { --k: var(--k-meeting); }
.dw-ev-busy { --k: var(--k-busy); background: repeating-linear-gradient(135deg, var(--tile) 0 6px, var(--panel) 6px 12px); }
.dw-cal-day h2 { margin: 0; padding: 12px 14px; font-size: 15px !important; border-bottom: 1px solid var(--hairline); }
.dw-cal-event.dw-k-test_drive { border-left-color: var(--k-test_drive); } .dw-cal-event.dw-k-visit { border-left-color: var(--k-visit); } .dw-cal-event.dw-k-closing { border-left-color: var(--k-closing); } .dw-cal-event.dw-k-delivery { border-left-color: var(--k-delivery); } .dw-cal-event.dw-k-other { border-left-color: var(--k-meeting); } .dw-cal-event.dw-k-busy { border-left-color: var(--k-busy); }
.dealer-workflow .dw-cal-actions .btn { min-height: 34px; }
/* One booking's details. */
.dw-sheet.dw-ev-modal { width: min(460px, calc(100% - 32px)); padding: 0; }
.dw-ev-card { --k: var(--k-meeting); border-top: 4px solid var(--k); }
.dw-ev-card .dw-facts { margin: 14px 24px; font-size: 14px; gap: 6px 18px; }
.dw-ev-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 24px; border-top: 1px solid var(--panel-line); }
/* New booking: customer search and the invite list. */
.dw-book-who input[type=search] { width: 100%; }
.dw-pick-list { display: grid; gap: 2px; margin-top: 6px; }
.dw-pick { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 10px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.dw-pick:hover, .dw-pick:focus-visible { background: var(--tile); }
.dw-pick small, .dw-pick-chosen small { color: var(--ink-3); font-size: 12px; }
.dw-pick-chosen { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); }
.dw-pick-chosen small { display: block; }
.dw-invite-note { margin: -4px 0 8px; font-size: 13px; }
.dw-invites { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; padding-bottom: 12px; }
.dw-invite { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--panel-line); border-radius: var(--r-ctl); cursor: pointer; font-size: 14px; }
.dw-invite:has(input:checked) { border-color: var(--ink); background: var(--tile); }
.dealer-workflow .dw-invite input { min-height: 0; width: 18px; height: 18px; accent-color: var(--ink); }
.dw-invite small { display: block; font-size: 12px; color: var(--ink-3); }
@media (max-width: 700px) {
  .dw-calendar-page .dw-topbar > .btn.primary { margin-left: 0; }
  .dw-cal { grid-template-columns: 46px repeat(var(--cols), minmax(132px, 1fr)); }
  .dw-cal-v-week { grid-template-columns: 46px repeat(var(--cols), minmax(104px, 1fr)); }
  .dw-cal-wrap { max-height: calc(100dvh - 300px); }
}


.dw-ra-invite { padding-bottom: 6px; }
.dw-ra-invite .dw-invites { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dw-ra > .err { margin: 10px 24px 0; padding: 8px 12px; border-radius: var(--r-ctl); }
.dw-cal-col { background-image: repeating-linear-gradient(to bottom, var(--panel-line) 0 1px, transparent 1px 28px), repeating-linear-gradient(to bottom, transparent 0 28px, color-mix(in srgb, var(--tile) 55%, transparent) 28px 56px); }
