/* Personal display settings; the light theme retains the existing design. */
.display-shortcut { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.display-shortcut p { margin:6px 0 0; }
.display-settings { max-width:900px; }
.theme-choices { border:0; padding:0; margin:0 0 24px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.theme-choices legend { font-weight:700; margin-bottom:10px; }
.theme-choice { position:relative; cursor:pointer; }
.theme-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.theme-choice-body { display:flex; gap:12px; align-items:flex-start; min-height:100%; padding:16px; border:1px solid var(--vd-border); border-radius:var(--vd-control-radius); background:var(--vd-surface); }
.theme-choice-icon { color:var(--vd-primary); }
.theme-choice strong,.theme-choice small { display:block; }
.theme-choice small { margin-top:4px; color:var(--vd-text-secondary); line-height:1.4; }
.theme-choice input:checked + .theme-choice-body { border-color:var(--vd-primary); box-shadow:inset 0 0 0 1px var(--vd-primary); background:var(--vd-surface-info); }
.theme-choice input:focus-visible + .theme-choice-body { outline:3px solid var(--vd-cold); outline-offset:3px; }
@media(max-width:760px) { .theme-choices { grid-template-columns:1fr; } }

/* Semantic dark palette, derived from the Vendolution app style guide. */
html[data-theme='dark'] {
  color-scheme:dark;
  --vd-bg-app:#022B5C;
  --vd-bg-nav:#003B7D;
  --vd-bg-elevated:#074A91;
  --vd-bg-hover:#164776;
  --vd-surface:#093564;
  --vd-surface-subtle:#072f5b;
  --vd-surface-info:#164776;
  --vd-text-primary:#fff;
  --vd-text-secondary:#b9d1eb;
  --vd-primary:#c5e2ff;
  --vd-border:#31577c;
  --vd-dark-input:#082f59;
  --vd-dark-warning:#ffe1c6;
  --vd-dark-success:#bbf2d6;
  --vd-dark-danger:#ffb8b8;
  --vd-status-neutral:#d6d6d6;
  --vd-status-neutral-bg:#193f64;
  --vd-status-revision:#99c9ff;
  --vd-status-revision-bg:#113f6d;
  --vd-status-ready:#7bdbae;
  --vd-status-ready-bg:#15463e;
  --vd-status-reserved:#f29158;
  --vd-status-sold:#d1dbe5;
  --vd-progress-track:#526d83;
  --vd-shadow-card:none;
}
html[data-theme='dark'] body.theme-light { background:var(--vd-bg-app); color:var(--vd-text-primary); }
html[data-theme='dark'] body.theme-light :is(h1,h2,h3),
html[data-theme='dark'] :is(.topbar-title,.machine-hero .hero-detail-grid strong,.kpi-card strong,.machine-cell strong,.sales-card-price strong) { color:var(--vd-text-primary); }
html[data-theme='dark'] .main-area { background:var(--vd-bg-app); }
html[data-theme='dark'] .auth-screen { background:#fff; }
html[data-theme='dark'] :is(.topbar,.surface,.kpi-card,.quick-action,.machine-hero,.sales-card,.user-card,.confirm-dialog,.auth-panel,.summary-strip,.machine-delete-zone,.aftersales-workspace .aftersales-machine) { background:var(--vd-surface); color:var(--vd-text-primary); border-color:var(--vd-border); }
html[data-theme='dark'] .surface.aftersales-workspace { background:transparent; border:0; }
html[data-theme='dark'] :is(.sales-reserve-form[open]>summary) { background:var(--vd-bg-hover); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.kpi-card:hover,.top-profile:hover,.user-action:hover) { background:var(--vd-bg-hover); }}
html[data-theme='dark'] :is(.field label,.kpi-heading,.data-table th,.machine-hero .hero-detail-grid span,.detail-head .back-link,.muted,.field-note,.section-heading p,.table-toolbar p,.eyebrow) { color:var(--vd-text-secondary); }
html[data-theme='dark'] :is(.btn-primary,.page-content:has(.detail-head) .btn-primary) { background:var(--vd-warm); border-color:var(--vd-warm); color:#0c2340; }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] .btn-primary:hover { background:#f7b182; }}
html[data-theme='dark'] :is(.btn-secondary,.sales-tab.selected) { background:var(--vd-dark-input); border-color:var(--vd-border); color:#fff; }
html[data-theme='dark'] :is(.btn-outline-light,.btn-subtle,.sales-tab,.user-action,.user-list-more summary) { background:var(--vd-dark-input); border-color:var(--vd-border); color:var(--vd-text-primary); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.btn-outline-light:hover,.btn-subtle:hover,.sales-tab:hover,.user-list-more summary:hover) { background:var(--vd-bg-hover); color:#fff; }}
html[data-theme='dark'] :is(.btn-danger-outline,.user-action-danger) { background:var(--vd-dark-input); border-color:var(--vd-danger); color:var(--vd-dark-danger); }
html[data-theme='dark'] .btn-danger-solid { background:#a92d38; border-color:#a92d38; color:#fff; }
html[data-theme='dark'] :is(.field input,.field select,.field textarea,.filters input,.filters select,.search-wrap,.status-inline select,select:not([multiple]):not([size])) { background-color:var(--vd-dark-input); color:var(--vd-text-primary); border-color:var(--vd-border); -webkit-text-fill-color:currentColor; }
html[data-theme='dark'] .field input::placeholder,
html[data-theme='dark'] .field textarea::placeholder,
html[data-theme='dark'] .filters input::placeholder { color:var(--vd-text-secondary); -webkit-text-fill-color:var(--vd-text-secondary); opacity:1; }
html[data-theme='dark'] :is(.field input:disabled,.field select:disabled,.field textarea:disabled,.revision-readonly .field select:disabled) { background:var(--vd-bg-app); color:var(--vd-text-secondary); -webkit-text-fill-color:var(--vd-text-secondary); opacity:.75; }
html[data-theme='dark'] select:not([multiple]):not([size]) { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23c5e2ff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html[data-theme='dark'] .filters .search-wrap input { background:transparent; }
html[data-theme='dark'] :is(.data-table th,.sales-card-photo,.hero-photo,.thumb,.workshop-task-done,.purchase-origin-summary,.account-action-note) { background:var(--vd-dark-input); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.data-table tbody tr:hover) { background:var(--vd-dark-input); }}
html[data-theme='dark'] :is(.data-table td,.data-table th,.detail-tabs,.hero-detail-grid>div,.user-card-bottom,.photos-layout .photo-card,.page-content:has(.detail-head) .surface) { border-color:var(--vd-border); }
html[data-theme='dark'] :is(.inline-link,.inspection-task-remove,.photo-primary-form button,.archive-actions>summary,.tab-link,.clear-filter) { color:var(--vd-primary); }
html[data-theme='dark'] :is(.vd-select-menu,.brand-choice-options) { background:var(--vd-dark-input); }
html[data-theme='dark'] :is(.vd-select-menu [role='option'],.brand-choice-options [role='option']) { color:var(--vd-text-primary); }
html[data-theme='dark'] :is(.vd-select-menu [role='option'].vd-select-active,.brand-choice-options [role='option'][aria-selected='true']) { background:var(--vd-bg-hover); color:#fff; }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.vd-select-menu [role='option']:hover,.brand-choice-options [role='option']:hover) { background:var(--vd-bg-hover); color:#fff; }}
/* A shared status vocabulary for every dark-mode view. */
html[data-theme='dark'] :is(.status-pill,.page-content:has(.detail-head) .status-pill,.aftersales-badges .status-pill) { width:fit-content; max-width:100%; min-height:26px; padding:4px 10px; border:1px solid transparent; border-radius:6px; font-size:12px; font-weight:600; line-height:16px; white-space:normal; background:var(--vd-status-neutral-bg); color:var(--vd-status-neutral); }
html[data-theme='dark'] :is(.status-in-revisie,.status-te-reviseren,.page-content:has(.detail-head) .status-in-revisie) { background:var(--vd-status-revision-bg); color:var(--vd-status-revision); }
html[data-theme='dark'] :is(.status-verkoopklaar,.status-available,.page-content:has(.detail-head) .status-verkoopklaar,.page-content:has(.detail-head) .status-available) { background:var(--vd-status-ready-bg); color:var(--vd-status-ready); }
html[data-theme='dark'] :is(.status-offer,.status-gereserveerd,.page-content:has(.detail-head) .status-offer) { background:transparent; color:var(--vd-status-reserved); border-color:var(--vd-status-reserved); }
html[data-theme='dark'] :is(.status-verkocht,.page-content:has(.detail-head) .status-verkocht) { background:var(--vd-status-neutral-bg); color:var(--vd-status-sold); }
html[data-theme='dark'] :is(.workshop-progress-complete strong,.sold-banner) { color:var(--vd-status-ready); }
html[data-theme='dark'] .workshop-progress progress { accent-color:var(--vd-text-on-dark); background:var(--vd-progress-track); }
html[data-theme='dark'] .workshop-progress progress::-webkit-progress-bar { background:var(--vd-progress-track); }
html[data-theme='dark'] .workshop-progress progress::-webkit-progress-value { background:var(--vd-text-on-dark); }
html[data-theme='dark'] .workshop-progress progress::-moz-progress-bar { background:var(--vd-text-on-dark); }
html[data-theme='dark'] .summary-strip .dot.info { background:var(--vd-status-neutral); }
html[data-theme='dark'] .summary-strip .dot.warning { background:var(--vd-status-revision); }
html[data-theme='dark'] .summary-strip .dot.success { background:var(--vd-status-ready); }
html[data-theme='dark'] .summary-strip .dot.blue { background:var(--vd-status-reserved); }
html[data-theme='dark'] .kpi-symbol.success-text { background:var(--vd-status-ready-bg); color:var(--vd-status-ready); }
html[data-theme='dark'] .title-with-badge { column-gap:8px; }
html[data-theme='dark'] .title-with-badge .status-pill { margin:0; }
html[data-theme='dark'] :is(.dashboard-statuses,.aftersales-badges) { gap:8px; }
html[data-theme='dark'] .activity-item { border-color:var(--vd-border); }
html[data-theme='dark'] .sidebar-column .activity-item { padding-top:10px; padding-bottom:10px; min-height:48px; }
html[data-theme='dark'] .sidebar-column .activity-item > div { min-width:0; overflow-wrap:anywhere; }
html[data-theme='dark'] :is(.machine-row-reserved,.inventory-table tbody tr.machine-row-reserved,.dashboard-table tbody tr.machine-row-reserved) { background:var(--vd-surface) !important; color:var(--vd-text-primary); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.machine-row-reserved:hover,.inventory-table tbody tr.machine-row-reserved:hover,.dashboard-table tbody tr.machine-row-reserved:hover) { background:var(--vd-dark-input) !important; }}
html[data-theme='dark'] :is(.offer-reservation-active,.sales-reservation) { background:var(--vd-dark-input); color:var(--vd-text-primary); border-left:3px solid var(--vd-warm); }
html[data-theme='dark'] .offer-list-note { color:var(--vd-dark-warning) !important; }
html[data-theme='dark'] :is(.inventory-table,.dashboard-table) .machine-row-reserved td:first-child { position:relative; border-left:0; box-shadow:none; }
html[data-theme='dark'] :is(.inventory-table,.dashboard-table) .machine-row-reserved td:first-child::before { content:''; position:absolute; left:0; top:8px; bottom:8px; width:3px; background:var(--vd-warm); pointer-events:none; }
@media(max-width:760px) {
  html[data-theme='dark'] :is(.inventory-table,.dashboard-table) tbody tr.machine-row-reserved { border-left:1px solid var(--vd-border); }
  html[data-theme='dark'] :is(.inventory-table,.dashboard-table) .machine-row-reserved td:first-child { position:static; }
  html[data-theme='dark'] :is(.inventory-table,.dashboard-table) .machine-row-reserved td:first-child::before { left:-1px; }
}
html[data-theme='dark'] .arrow-link { background:var(--vd-dark-input); color:var(--vd-primary); box-shadow:none; }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] .arrow-link:hover { background:var(--vd-bg-hover); color:var(--vd-text-primary); box-shadow:none; }}@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.btn-secondary:hover,.user-action:hover) { background:var(--vd-bg-hover); box-shadow:none; }}
html[data-theme='dark'] :is(.field-validation-error,.user-action-danger) { color:var(--vd-dark-danger); }
html[data-theme='dark'] :is(.form-validation-summary,.account-action-note-danger,.machine-delete-zone,.alert-error) { background:#5e2835; border-color:var(--vd-danger); color:#fff; }
html[data-theme='dark'] .alert-success { background:#154d4d; border-color:var(--vd-neutral); color:#fff; }
html[data-theme='dark'] :focus-visible { outline-color:var(--vd-cold) !important; }
html[data-theme='dark'] :is(.machine-cell small,.data-table td small,.machine-form-number span,.hero-placeholder strong,.activity-item p,.activity-item small,.timeline-body p,.timeline-meta,.definition-list span,.notes-panel p,.finance-stat small,.cost-list small,.photo-caption small,.danger-zone p) { color:var(--vd-text-secondary); }
html[data-theme='dark'] :is(.hero-placeholder a,.activity-item strong,.timeline-top strong,.definition-list strong,.total-row strong) { color:var(--vd-text-primary); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] :is(.machine-cell:hover strong,.activity-item:hover strong) { color:var(--vd-text-primary); }}
html[data-theme='dark'] :is(.finance-stat,.notes-panel,.definition-list .total-row,.lookup-item,.tip-card,.section-number,.activity-marker,.timeline-bullet,.tag,.counter) { background:var(--vd-dark-input); color:var(--vd-text-primary); border-color:var(--vd-border); }
html[data-theme='dark'] :is(.tip-icon,.lookup-item button) { color:var(--vd-primary); }
html[data-theme='dark'] :is(.warn-note,.serial-case-warning) { background:var(--vd-dark-input); color:var(--vd-text-primary); border-color:var(--vd-border); }

/* The work overview has its own muted dark palette. */
html[data-theme='dark']:has(.aftersales-workspace) {
  --vd-work-page:#12263d;
  --vd-work-card:#1b354d;
  --vd-work-border:#31495f;
  --vd-work-text:#f5f7fa;
  --vd-work-muted:#b8c8d9;
  --vd-work-action:#294e70;
}
html[data-theme='dark']:has(.aftersales-workspace) .main-area { background:var(--vd-work-page); }
html[data-theme='dark'] .aftersales-workspace .aftersales-machine { background:var(--vd-work-card); border-color:var(--vd-work-border); color:var(--vd-work-text); box-shadow:none; }
html[data-theme='dark'] :is(.aftersales-meta,.aftersales-workspace .workshop-signals) { color:var(--vd-work-muted); }
html[data-theme='dark'] .aftersales-workspace .aftersales-actions .btn-secondary { background:var(--vd-work-action); border-color:var(--vd-work-border); color:var(--vd-work-text); }@media (hover:hover) and (pointer:fine){
html[data-theme='dark'] .aftersales-workspace .aftersales-actions .btn-secondary:hover { background:var(--vd-bg-hover); }}

