/*
 * Dublin Motor Showroom — Dealer Desk
 * Mobile-first, app-like stock management. Everything is scoped to .dmd-desk.
 */

.dmd-desk {
  --dmd-desk-ink: var(--dmd-ink, #101820);
  --dmd-desk-ink-soft: var(--dmd-ink-soft, #26343f);
  --dmd-desk-muted: var(--dmd-muted, #5e6972);
  --dmd-desk-paper: #eef1ef;
  --dmd-desk-surface: var(--dmd-surface, #ffffff);
  --dmd-desk-surface-soft: #f7f8f6;
  --dmd-desk-accent: var(--dmd-accent, #1c69d4);
  --dmd-desk-accent-dark: var(--dmd-accent-dark, #b83222);
  --dmd-desk-accent-foreground: var(--dmd-accent-foreground, #ffffff);
  --dmd-desk-success: var(--dmd-success, #16745b);
  --dmd-desk-warning: var(--dmd-warning, #a35e08);
  --dmd-desk-danger: var(--dmd-danger, #b42318);
  --dmd-desk-line: #d7ddda;
  --dmd-desk-radius-sm: 8px;
  --dmd-desk-radius: 14px;
  --dmd-desk-radius-lg: 22px;
  --dmd-desk-shadow: 0 12px 36px rgba(16, 24, 32, 0.09);
  --dmd-desk-shadow-raised: 0 22px 60px rgba(16, 24, 32, 0.15);
  --dmd-desk-safe-bottom: env(safe-area-inset-bottom, 0px);
  min-width: 0;
  min-height: 100vh;
  color: var(--dmd-desk-ink);
  background:
    radial-gradient(circle at 88% -5%, rgba(199, 75, 38, 0.12), transparent 28rem),
    var(--dmd-desk-paper);
  font-family: var(--dmd-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.dmd-desk,
.dmd-desk *,
.dmd-desk *::before,
.dmd-desk *::after {
  box-sizing: border-box;
}

.dmd-desk [hidden] {
  display: none !important;
}

.dmd-desk img,
.dmd-desk svg {
  display: block;
  max-width: 100%;
}

.dmd-desk button,
.dmd-desk input,
.dmd-desk select,
.dmd-desk textarea {
  max-width: 100%;
  margin: 0;
  color: inherit;
  font: inherit;
}

.dmd-desk button,
.dmd-desk select,
.dmd-desk input[type="file"] {
  cursor: pointer;
}

.dmd-desk a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.dmd-desk :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(199, 75, 38, 0.4);
  outline-offset: 3px;
}

.dmd-desk__skip-link {
  position: fixed;
  z-index: 10020;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--dmd-desk-ink);
  border-radius: var(--dmd-desk-radius-sm);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.dmd-desk__skip-link:focus {
  transform: translateY(0);
}

.dmd-desk__topbar {
  position: sticky;
  z-index: 120;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem max(1rem, env(safe-area-inset-left, 0px));
  color: #fff;
  background: rgba(16, 24, 32, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dmd-desk__brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
}

.dmd-desk__brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--dmd-desk-accent);
  border-radius: 11px;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.dmd-desk__brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dmd-desk__brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.dmd-desk__brand-name {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dmd-desk__brand-label {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dmd-desk__top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.dmd-desk__top-action {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dmd-desk__top-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.dmd-desk__top-action svg {
  width: 20px;
  height: 20px;
}

.dmd-desk__top-action-label {
  display: none;
}

.dmd-desk__network {
  position: sticky;
  z-index: 115;
  top: 68px;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  color: #5e3200;
  background: #fff1d8;
  border-bottom: 1px solid #e7bf79;
  font-size: 0.86rem;
  font-weight: 750;
  text-align: center;
}

.dmd-desk__network::before {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  content: "";
  background: var(--dmd-desk-warning);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(163, 94, 8, 0.13);
}

.dmd-desk__network[data-state="online"] {
  color: #07533e;
  background: #e8f8f1;
  border-color: #a6d9c8;
}

.dmd-desk__network[data-state="online"]::before {
  background: var(--dmd-desk-success);
  box-shadow: 0 0 0 4px rgba(22, 116, 91, 0.13);
}

.dmd-desk__network[data-state="offline"],
.dmd-desk.is-offline .dmd-desk__network {
  color: #6b250f;
  background: #fff0eb;
  border-color: #efb6a2;
}

.dmd-desk__network[data-state="offline"]::before,
.dmd-desk.is-offline .dmd-desk__network::before {
  background: var(--dmd-desk-danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.13);
}

.dmd-desk__main {
  width: min(100%, 1480px);
  min-height: calc(100vh - 68px);
  margin-inline: auto;
  padding: 1.15rem 1rem calc(9rem + var(--dmd-desk-safe-bottom));
}

.dmd-desk__intro {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.dmd-desk__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  color: var(--dmd-desk-accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dmd-desk__eyebrow::before {
  width: 24px;
  height: 2px;
  content: "";
  background: currentColor;
}

.dmd-desk__title {
  margin: 0;
  color: var(--dmd-desk-ink);
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: clamp(2.25rem, 10vw, 3.8rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 0.96;
}

.dmd-desk__subtitle {
  max-width: 60ch;
  margin: 0.55rem 0 0;
  color: var(--dmd-desk-muted);
  font-size: 1rem;
}

.dmd-desk__intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dmd-desk__button,
.dmd-desk .dmd-desk-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  appearance: none;
  color: var(--dmd-desk-ink);
  background: var(--dmd-desk-surface);
  border: 1px solid var(--dmd-desk-line);
  border-radius: 10px;
  box-shadow: none;
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dmd-desk__button:hover,
.dmd-desk .dmd-desk-button:hover {
  border-color: #adb7b2;
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.08);
  transform: translateY(-1px);
}

.dmd-desk__button:active,
.dmd-desk .dmd-desk-button:active {
  transform: translateY(0);
}

.dmd-desk__button[disabled],
.dmd-desk .dmd-desk-button[disabled],
.dmd-desk [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.dmd-desk__button svg,
.dmd-desk .dmd-desk-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.dmd-desk__button--primary,
.dmd-desk .dmd-desk-button--primary {
  color: var(--dmd-desk-accent-foreground);
  background: var(--dmd-desk-accent);
  border-color: var(--dmd-desk-accent);
}

.dmd-desk__button--primary:hover,
.dmd-desk .dmd-desk-button--primary:hover {
  color: var(--dmd-desk-accent-foreground);
  background: var(--dmd-desk-accent);
  border-color: var(--dmd-desk-accent);
  box-shadow: inset 0 0 0 2px var(--dmd-desk-accent-foreground);
}

.dmd-desk__button--dark,
.dmd-desk .dmd-desk-button--dark {
  color: #fff;
  background: var(--dmd-desk-ink);
  border-color: var(--dmd-desk-ink);
}

.dmd-desk__button--danger,
.dmd-desk .dmd-desk-button--danger {
  color: var(--dmd-desk-danger);
  background: #fff;
  border-color: #efc1bb;
}

.dmd-desk__button--danger:hover,
.dmd-desk .dmd-desk-button--danger:hover {
  color: #fff;
  background: var(--dmd-desk-danger);
  border-color: var(--dmd-desk-danger);
}

.dmd-desk__button--quiet,
.dmd-desk .dmd-desk-button--quiet {
  min-height: 42px;
  padding: 0.55rem 0.72rem;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.dmd-desk__button--wide {
  width: 100%;
}

.dmd-desk__notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  color: #174637;
  background: #edf9f4;
  border: 1px solid #b7dfd1;
  border-left: 4px solid var(--dmd-desk-success);
  border-radius: 10px;
}

.dmd-desk__notice--warning {
  color: #5f3707;
  background: #fff7e8;
  border-color: #ecd09c;
  border-left-color: var(--dmd-desk-warning);
}

.dmd-desk__notice--error {
  color: #6b1d17;
  background: #fff1ef;
  border-color: #efc1bb;
  border-left-color: var(--dmd-desk-danger);
}

.dmd-desk__notice-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: currentColor;
  border-radius: 50%;
}

.dmd-desk__notice-title {
  display: block;
  margin-bottom: 0.1rem;
  font-weight: 850;
}

.dmd-desk__notice p {
  margin: 0;
}

.dmd-desk__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 1.15rem;
}

.dmd-desk__stat,
.dmd-desk .dmd-stat {
  position: relative;
  min-width: 0;
  min-height: 118px;
  padding: 1rem;
  overflow: hidden;
  background: var(--dmd-desk-surface);
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
  box-shadow: 0 7px 22px rgba(16, 24, 32, 0.055);
}

.dmd-desk__stat::after,
.dmd-desk .dmd-stat::after {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 78px;
  height: 78px;
  content: "";
  background: rgba(199, 75, 38, 0.08);
  border-radius: 50%;
}

.dmd-desk__stat-label,
.dmd-desk .dmd-stat__label {
  display: block;
  color: var(--dmd-desk-muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.dmd-desk__stat-value,
.dmd-desk .dmd-stat__value {
  display: block;
  margin-top: 0.35rem;
  color: var(--dmd-desk-ink);
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.dmd-desk__stat-note,
.dmd-desk .dmd-stat__note {
  display: block;
  margin-top: 0.45rem;
  color: var(--dmd-desk-muted);
  font-size: 0.79rem;
}

.dmd-desk__workspace {
  min-width: 0;
  background: var(--dmd-desk-surface);
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius-lg);
  box-shadow: var(--dmd-desk-shadow);
}

.dmd-desk__tabs-wrap {
  position: sticky;
  z-index: 50;
  top: 68px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius-lg) var(--dmd-desk-radius-lg) 0 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dmd-desk:has(.dmd-desk__network:not([hidden])) .dmd-desk__tabs-wrap {
  top: 110px;
}

.dmd-desk__tabs {
  display: grid;
  grid-auto-columns: minmax(116px, 1fr);
  grid-auto-flow: column;
  gap: 0.3rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.dmd-desk__tabs::-webkit-scrollbar {
  display: none;
}

.dmd-desk__tab,
.dmd-desk__tabs [data-desk-tab] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 0.8rem;
  appearance: none;
  color: var(--dmd-desk-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.dmd-desk__tab:hover,
.dmd-desk__tabs [data-desk-tab]:hover {
  color: var(--dmd-desk-ink);
  background: #f3f5f3;
}

.dmd-desk__tab[aria-selected="true"],
.dmd-desk__tabs [data-desk-tab][aria-selected="true"] {
  color: #fff;
  background: var(--dmd-desk-ink);
  border-color: var(--dmd-desk-ink);
}

.dmd-desk__panel,
.dmd-desk__workspace [data-desk-section] {
  min-width: 0;
  padding: 1rem;
}

.dmd-desk__panel-header {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.dmd-desk__panel-title {
  margin: 0;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: clamp(1.75rem, 7vw, 2.55rem);
  font-weight: 850;
  letter-spacing: -0.018em;
  line-height: 1;
}

.dmd-desk__panel-copy {
  margin: 0.35rem 0 0;
  color: var(--dmd-desk-muted);
}

.dmd-desk__toolbar {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.dmd-desk__search {
  position: relative;
  min-width: 0;
}

.dmd-desk__search svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0.9rem;
  width: 19px;
  height: 19px;
  color: var(--dmd-desk-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.dmd-desk__search input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem 0.7rem 2.7rem;
  background: var(--dmd-desk-surface-soft);
  border: 1px solid var(--dmd-desk-line);
  border-radius: 10px;
  appearance: none;
}

.dmd-desk__search input:focus {
  background: #fff;
  border-color: var(--dmd-desk-accent);
  box-shadow: 0 0 0 3px rgba(199, 75, 38, 0.12);
  outline: 0;
}

.dmd-desk__chips {
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0.05rem 0.35rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.dmd-desk__chips::-webkit-scrollbar {
  display: none;
}

.dmd-desk__chip,
.dmd-desk [data-filter-chip] {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  appearance: none;
  color: var(--dmd-desk-ink-soft);
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.dmd-desk__chip:hover,
.dmd-desk [data-filter-chip]:hover {
  border-color: #9ea9a4;
}

.dmd-desk__chip[aria-pressed="true"],
.dmd-desk [data-filter-chip][aria-pressed="true"] {
  color: #fff;
  background: var(--dmd-desk-accent);
  border-color: var(--dmd-desk-accent);
}

.dmd-desk__chip-count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  padding: 0 0.28rem;
  color: inherit;
  background: rgba(16, 24, 32, 0.08);
  border-radius: 999px;
  font-size: 0.7rem;
}

[aria-pressed="true"] > .dmd-desk__chip-count {
  background: rgba(255, 255, 255, 0.2);
}

.dmd-desk__vehicle-grid {
  display: grid;
  gap: 0.85rem;
}

.dmd-desk__vehicle,
.dmd-desk .dmd-stock-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
  box-shadow: 0 5px 18px rgba(16, 24, 32, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dmd-desk__vehicle:hover,
.dmd-desk .dmd-stock-card:hover {
  border-color: #b8c1bd;
  box-shadow: 0 13px 32px rgba(16, 24, 32, 0.1);
}

.dmd-desk__vehicle-media,
.dmd-desk .dmd-stock-card__media {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background: #dfe3e1;
  aspect-ratio: 16 / 10;
}

.dmd-desk__vehicle-media img,
.dmd-desk .dmd-stock-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.dmd-desk__vehicle:hover .dmd-desk__vehicle-media img,
.dmd-desk .dmd-stock-card:hover .dmd-stock-card__media img {
  transform: scale(1.025);
}

.dmd-desk__vehicle-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 190px;
  place-items: center;
  color: #6f7c76;
  background: linear-gradient(145deg, #e7eae8, #d7dcda);
}

.dmd-desk__vehicle-placeholder svg {
  width: 46px;
  height: 46px;
}

.dmd-desk__status,
.dmd-desk .dmd-status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.58rem;
  color: #fff;
  background: var(--dmd-desk-ink);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.dmd-desk__vehicle-media > .dmd-desk__status,
.dmd-desk .dmd-stock-card__media > .dmd-status-badge {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  left: 0.7rem;
}

.dmd-desk__status::before,
.dmd-desk .dmd-status-badge::before {
  width: 6px;
  height: 6px;
  content: "";
  background: currentColor;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.dmd-desk__status[data-status="available"],
.dmd-desk__status[data-status="for_sale"],
.dmd-desk .dmd-status-badge--available {
  background: var(--dmd-desk-success);
}

.dmd-desk__status[data-status="reserved"],
.dmd-desk .dmd-status-badge--reserved {
  background: var(--dmd-desk-warning);
}

.dmd-desk__status[data-status="sold"],
.dmd-desk .dmd-status-badge--sold {
  background: var(--dmd-desk-accent);
}

.dmd-desk__status[data-status="archived"],
.dmd-desk__status[data-status="draft"],
.dmd-desk .dmd-status-badge--archived,
.dmd-desk .dmd-status-badge--draft {
  background: #5d6870;
}

.dmd-desk__vehicle-body,
.dmd-desk .dmd-stock-card__body {
  display: grid;
  min-width: 0;
  gap: 0.8rem;
  padding: 1rem;
}

.dmd-desk__vehicle-kicker,
.dmd-desk .dmd-stock-card__stock {
  margin: 0 0 0.25rem;
  color: var(--dmd-desk-accent-dark);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dmd-desk__vehicle-title,
.dmd-desk .dmd-stock-card__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.dmd-desk__vehicle-title a,
.dmd-desk .dmd-stock-card__title a {
  text-decoration: none;
}

.dmd-desk__vehicle-title a:hover,
.dmd-desk .dmd-stock-card__title a:hover {
  color: var(--dmd-desk-accent-dark);
}

.dmd-desk__vehicle-facts,
.dmd-desk .dmd-stock-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin: 0;
  padding: 0;
  color: var(--dmd-desk-muted);
  font-size: 0.82rem;
  list-style: none;
}

.dmd-desk__vehicle-facts li,
.dmd-desk .dmd-stock-card__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dmd-desk__vehicle-facts li + li::before,
.dmd-desk .dmd-stock-card__facts li + li::before {
  width: 3px;
  height: 3px;
  margin-right: 0.45rem;
  content: "";
  background: #9ba5a0;
  border-radius: 50%;
}

.dmd-desk__vehicle-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e6e9e7;
}

.dmd-desk__vehicle-price,
.dmd-desk .dmd-stock-card__price {
  margin: 0;
  color: var(--dmd-desk-ink);
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.75rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dmd-desk__vehicle-updated {
  color: var(--dmd-desk-muted);
  font-size: 0.73rem;
  text-align: right;
}

.dmd-desk__vehicle-actions,
.dmd-desk .dmd-stock-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dmd-desk__vehicle-actions form,
.dmd-desk .dmd-stock-card__actions form {
  min-width: 0;
  margin: 0;
}

.dmd-desk__vehicle-actions .dmd-desk__button,
.dmd-desk .dmd-stock-card__actions .dmd-desk-button {
  width: 100%;
  min-height: 44px;
  padding-inline: 0.55rem;
  font-size: 0.8rem;
}

.dmd-desk__empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(2.5rem, 10vw, 5rem) 1rem;
  color: var(--dmd-desk-muted);
  text-align: center;
}

.dmd-desk__empty-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: var(--dmd-desk-accent-dark);
  background: #f8e9e3;
  border-radius: 50%;
}

.dmd-desk__empty-icon svg {
  width: 30px;
  height: 30px;
}

.dmd-desk__empty h3 {
  margin: 0;
  color: var(--dmd-desk-ink);
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 2rem;
  line-height: 1;
}

.dmd-desk__empty p {
  max-width: 42ch;
  margin: 0;
}

/* Add/edit vehicle form. */
.dmd-desk__form {
  display: grid;
  gap: 1rem;
}

.dmd-desk__form-section,
.dmd-desk .dmd-form-section {
  min-width: 0;
  padding: 1rem;
  background: var(--dmd-desk-surface-soft);
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
}

.dmd-desk__form-heading,
.dmd-desk .dmd-form-section__heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 1rem;
}

.dmd-desk__form-step,
.dmd-desk .dmd-form-section__step {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--dmd-desk-ink);
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 850;
}

.dmd-desk__form-title,
.dmd-desk .dmd-form-section__title {
  margin: 0;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.dmd-desk__form-help,
.dmd-desk .dmd-form-section__help {
  margin: 0.25rem 0 0;
  color: var(--dmd-desk-muted);
  font-size: 0.86rem;
}

.dmd-desk__fields,
.dmd-desk .dmd-form-grid {
  display: grid;
  gap: 0.9rem;
}

.dmd-desk__field,
.dmd-desk .dmd-field {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
}

.dmd-desk__field--full,
.dmd-desk .dmd-field--full {
  grid-column: 1 / -1;
}

.dmd-desk__label,
.dmd-desk .dmd-field__label {
  color: var(--dmd-desk-ink-soft);
  font-size: 0.83rem;
  font-weight: 800;
}

.dmd-desk__required {
  color: var(--dmd-desk-danger);
}

.dmd-desk__hint,
.dmd-desk .dmd-field__hint {
  margin: 0;
  color: var(--dmd-desk-muted);
  font-size: 0.78rem;
}

.dmd-desk__input,
.dmd-desk__select,
.dmd-desk__textarea,
.dmd-desk .dmd-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dmd-desk .dmd-field select,
.dmd-desk .dmd-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.72rem 0.82rem;
  color: var(--dmd-desk-ink);
  background: #fff;
  border: 1px solid #bec7c2;
  border-radius: 9px;
  appearance: none;
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.dmd-desk__select,
.dmd-desk .dmd-field select {
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #5f6c65 50%),
    linear-gradient(135deg, #5f6c65 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.dmd-desk__textarea,
.dmd-desk .dmd-field textarea {
  min-height: 132px;
  resize: vertical;
}

.dmd-desk__input:hover,
.dmd-desk__select:hover,
.dmd-desk__textarea:hover,
.dmd-desk .dmd-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.dmd-desk .dmd-field select:hover,
.dmd-desk .dmd-field textarea:hover {
  border-color: #97a49e;
}

.dmd-desk__input:focus,
.dmd-desk__select:focus,
.dmd-desk__textarea:focus,
.dmd-desk .dmd-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.dmd-desk .dmd-field select:focus,
.dmd-desk .dmd-field textarea:focus {
  border-color: var(--dmd-desk-accent);
  box-shadow: 0 0 0 3px rgba(199, 75, 38, 0.12);
  outline: 0;
}

.dmd-desk :where(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--dmd-desk-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.dmd-desk__input-group {
  position: relative;
}

.dmd-desk__input-prefix,
.dmd-desk__input-suffix {
  position: absolute;
  z-index: 1;
  top: 50%;
  color: var(--dmd-desk-muted);
  font-size: 0.88rem;
  font-weight: 800;
  pointer-events: none;
  transform: translateY(-50%);
}

.dmd-desk__input-prefix {
  left: 0.82rem;
}

.dmd-desk__input-suffix {
  right: 0.82rem;
}

.dmd-desk__input-group--prefix input {
  padding-left: 2rem;
}

.dmd-desk__input-group--suffix input {
  padding-right: 3.4rem;
}

.dmd-desk__check-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 10px;
}

.dmd-desk__check-copy {
  min-width: 0;
}

.dmd-desk__check-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
}

.dmd-desk__check-note {
  display: block;
  margin-top: 0.15rem;
  color: var(--dmd-desk-muted);
  font-size: 0.76rem;
}

.dmd-desk__switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
}

.dmd-desk__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dmd-desk__switch-control {
  position: absolute;
  inset: 0;
  background: #9da8a3;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.dmd-desk__switch-control::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(16, 24, 32, 0.25);
  transition: transform 160ms ease;
}

.dmd-desk__switch input:checked + .dmd-desk__switch-control {
  background: var(--dmd-desk-success);
}

.dmd-desk__switch input:checked + .dmd-desk__switch-control::after {
  transform: translateX(20px);
}

.dmd-desk__switch input:focus-visible + .dmd-desk__switch-control {
  outline: 3px solid rgba(199, 75, 38, 0.4);
  outline-offset: 3px;
}

/* Image upload. */
.dmd-desk__upload,
.dmd-desk .dmd-upload {
  display: grid;
  gap: 0.9rem;
}

.dmd-desk__dropzone,
.dmd-desk [data-upload-dropzone] {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--dmd-desk-ink-soft);
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(135deg, #bec8c3 0 8px, transparent 8px 16px) border-box;
  border: 2px dashed transparent;
  border-radius: var(--dmd-desk-radius);
  cursor: pointer;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dmd-desk__dropzone:hover,
.dmd-desk [data-upload-dropzone]:hover,
.dmd-desk__dropzone.is-dragover,
.dmd-desk [data-upload-dropzone].is-dragover {
  background:
    linear-gradient(#fff7f3, #fff7f3) padding-box,
    repeating-linear-gradient(135deg, var(--dmd-desk-accent) 0 8px, transparent 8px 16px) border-box;
  transform: translateY(-1px);
}

.dmd-desk__dropzone:focus-within,
.dmd-desk [data-upload-dropzone]:focus-within {
  outline: 3px solid rgba(199, 75, 38, 0.35);
  outline-offset: 3px;
}

.dmd-desk__dropzone input[type="file"],
.dmd-desk [data-upload-dropzone] input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dmd-desk__upload-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 0.7rem;
  place-items: center;
  color: var(--dmd-desk-accent-dark);
  background: #f8e8e1;
  border-radius: 15px;
}

.dmd-desk__upload-icon svg {
  width: 26px;
  height: 26px;
}

.dmd-desk__upload-title {
  display: block;
  font-size: 1rem;
  font-weight: 850;
}

.dmd-desk__upload-copy {
  display: block;
  max-width: 38ch;
  margin: 0.3rem auto 0;
  color: var(--dmd-desk-muted);
  font-size: 0.82rem;
}

.dmd-desk__upload-count {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.35rem 0.6rem;
  color: var(--dmd-desk-ink-soft);
  background: #eef1ef;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
}

.dmd-desk__upload-error,
.dmd-desk [data-upload-error] {
  margin: 0;
  padding: 0.75rem 0.85rem;
  color: #721f17;
  background: #fff0ed;
  border: 1px solid #efc1bb;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
}

.dmd-desk__upload-error ul,
.dmd-desk [data-upload-error] ul {
  margin: 0;
  padding-left: 1.15rem;
}

.dmd-desk__previews,
.dmd-desk [data-image-previews],
.dmd-desk__existing-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.dmd-desk__preview,
.dmd-desk .dmd-upload__preview,
.dmd-desk__existing-image {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #e1e5e3;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 11px;
  aspect-ratio: 4 / 3;
}

.dmd-desk__preview img,
.dmd-desk .dmd-upload__preview img,
.dmd-desk__existing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dmd-desk__preview-meta,
.dmd-desk .dmd-upload__preview-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.4rem 0.55rem 0.5rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(8, 14, 18, 0.84));
  font-size: 0.68rem;
  line-height: 1.25;
}

.dmd-desk__preview-name,
.dmd-desk .dmd-upload__preview-name {
  display: block;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dmd-desk__preview-size,
.dmd-desk .dmd-upload__preview-size {
  color: rgba(255, 255, 255, 0.72);
}

.dmd-desk__preview-remove,
.dmd-desk .dmd-upload__preview-remove,
.dmd-desk__existing-image form button {
  position: absolute;
  z-index: 3;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(16, 24, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dmd-desk__preview-remove:hover,
.dmd-desk .dmd-upload__preview-remove:hover,
.dmd-desk__existing-image form button:hover {
  background: var(--dmd-desk-danger);
}

.dmd-desk__preview-remove svg,
.dmd-desk .dmd-upload__preview-remove svg,
.dmd-desk__existing-image form button svg {
  width: 17px;
  height: 17px;
}

.dmd-desk__primary-photo {
  position: absolute;
  z-index: 2;
  bottom: 0.45rem;
  left: 0.45rem;
  padding: 0.3rem 0.5rem;
  color: #fff;
  background: var(--dmd-desk-success);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dmd-desk__savebar {
  position: fixed;
  z-index: 110;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.7rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.7rem + var(--dmd-desk-safe-bottom)) max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--dmd-desk-line);
  box-shadow: 0 -12px 32px rgba(16, 24, 32, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dmd-desk__savebar-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.55rem;
  width: min(100%, 1040px);
  margin-inline: auto;
}

.dmd-desk__savebar .dmd-desk__button,
.dmd-desk__savebar .dmd-desk-button {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding-inline: 0.65rem;
}

.dmd-desk form[aria-busy="true"] {
  cursor: progress;
}

.dmd-desk form[aria-busy="true"] .dmd-desk__button[type="submit"]::before,
.dmd-desk form[aria-busy="true"] .dmd-desk-button[type="submit"]::before {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  content: "";
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: dmd-desk-spin 700ms linear infinite;
}

.dmd-desk__install[hidden] {
  display: none !important;
}

.dmd-desk__install-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.8rem;
  background: #edf1ef;
  border-radius: 10px;
  font-size: 0.82rem;
}

.dmd-desk__install-note p {
  margin: 0;
}

.dmd-desk__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.dmd-desk__pagination a,
.dmd-desk__pagination span {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0.45rem;
  color: var(--dmd-desk-ink-soft);
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 9px;
  font-weight: 800;
  text-decoration: none;
}

.dmd-desk__pagination a:hover {
  border-color: var(--dmd-desk-accent);
}

.dmd-desk__pagination .current,
.dmd-desk__pagination [aria-current="page"] {
  color: #fff;
  background: var(--dmd-desk-ink);
  border-color: var(--dmd-desk-ink);
}

.dmd-desk__meta-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.dmd-desk__meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--dmd-desk-line);
}

.dmd-desk__meta-row dt {
  color: var(--dmd-desk-muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.dmd-desk__meta-row dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

@keyframes dmd-desk-spin {
  to {
    transform: rotate(360deg);
  }
}

/*
 * Template integration aliases.
 * The PHP template keeps its HTML deliberately terse; these selectors map that
 * markup onto the same visual system without leaking into theme components.
 */
.dmd-desk__offline {
  position: fixed;
  z-index: 500;
  top: 76px;
  right: 0.75rem;
  left: 0.75rem;
  padding: 0.72rem 0.9rem 0.72rem 2.2rem;
  color: #6b250f;
  background: #fff0eb;
  border: 1px solid #efb6a2;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.18);
  font-size: 0.84rem;
  font-weight: 800;
}

.dmd-desk__offline::before {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--dmd-desk-danger);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.13);
  transform: translateY(-50%);
}

.dmd-desk__topbar > div:first-child {
  display: grid;
  min-width: 0;
  line-height: 1.08;
}

.dmd-desk__topbar .dmd-desk__brand {
  display: block;
  max-width: min(54vw, 330px);
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dmd-desk__app-name {
  margin-top: 0.22rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dmd-desk__top-actions > a,
.dmd-desk__top-actions > button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.7rem;
  appearance: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.dmd-desk__top-actions > a:hover,
.dmd-desk__top-actions > button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.dmd-desk-view {
  display: none;
  min-width: 0;
}

.dmd-desk-view.is-active {
  display: block;
  animation: dmd-desk-view-in 180ms ease both;
}

.dmd-desk-heading {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.dmd-desk-heading p {
  margin: 0 0 0.25rem;
  color: var(--dmd-desk-accent-dark);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dmd-desk-heading h1 {
  margin: 0;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: clamp(2.3rem, 10vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.dmd-desk-heading > a:not(.dmd-desk-primary) {
  align-self: end;
  color: var(--dmd-desk-accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.dmd-desk-primary {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  color: #fff;
  background: var(--dmd-desk-accent);
  border: 1px solid var(--dmd-desk-accent);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(199, 75, 38, 0.2);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.dmd-desk-primary:hover {
  color: #fff;
  background: var(--dmd-desk-accent-dark);
  border-color: var(--dmd-desk-accent-dark);
  transform: translateY(-1px);
}

.dmd-desk-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.dmd-desk-stats > a {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 104px;
  align-content: center;
  padding: 0.85rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
  box-shadow: 0 7px 22px rgba(16, 24, 32, 0.055);
  text-decoration: none;
}

.dmd-desk-stats > a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.dmd-desk-stats > a::after {
  position: absolute;
  right: -16px;
  bottom: -22px;
  width: 72px;
  height: 72px;
  content: "";
  background: rgba(199, 75, 38, 0.08);
  border-radius: 50%;
}

.dmd-desk-stats > a:hover {
  border-color: #b2bcb7;
  box-shadow: 0 13px 30px rgba(16, 24, 32, 0.1);
  transform: translateY(-1px);
}

.dmd-desk-stats strong {
  position: relative;
  z-index: 1;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 2.45rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.dmd-desk-stats span {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  color: var(--dmd-desk-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.dmd-desk-panel {
  min-width: 0;
  padding: 1rem;
  background: var(--dmd-desk-surface);
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius-lg);
  box-shadow: var(--dmd-desk-shadow);
}

.dmd-desk-panel__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.dmd-desk-panel__head h2 {
  margin: 0;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.9rem;
  font-weight: 850;
  line-height: 1;
}

.dmd-desk-panel__head p {
  margin: 0.25rem 0 0;
  color: var(--dmd-desk-muted);
  font-size: 0.84rem;
}

.dmd-desk-panel__head a {
  flex: 0 0 auto;
  color: var(--dmd-desk-accent-dark);
  font-size: 0.84rem;
  font-weight: 850;
}

.dmd-desk-notice {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  color: #174637;
  background: #edf9f4;
  border: 1px solid #b7dfd1;
  border-left: 4px solid var(--dmd-desk-success);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 750;
}

.dmd-desk-notice.is-error {
  color: #6b1d17;
  background: #fff1ef;
  border-color: #efc1bb;
  border-left-color: var(--dmd-desk-danger);
}

.dmd-desk-filters {
  display: flex;
  gap: 0.48rem;
  margin: 0 0 1rem;
  padding: 0.1rem 0.05rem 0.4rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.dmd-desk-filters::-webkit-scrollbar {
  display: none;
}

.dmd-desk-filters a {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.78rem;
  color: var(--dmd-desk-ink-soft);
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 999px;
  font-size: 0.81rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.dmd-desk-filters a:hover {
  border-color: #9ea9a4;
}

.dmd-desk-filters a.is-current {
  color: #fff;
  background: var(--dmd-desk-accent);
  border-color: var(--dmd-desk-accent);
}

.dmd-desk-vehicles {
  display: grid;
  gap: 0.75rem;
}

.dmd-desk-car {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
  box-shadow: 0 5px 18px rgba(16, 24, 32, 0.055);
}

.dmd-desk-car > img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  background: #dfe3e1;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.dmd-desk-car__main {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
  padding: 0.9rem;
}

.dmd-desk-car h3 {
  margin: 0.45rem 0 0;
  overflow-wrap: anywhere;
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1.03;
}

.dmd-desk-car p {
  margin: 0.4rem 0 0;
  color: var(--dmd-desk-muted);
  font-size: 0.86rem;
}

.dmd-desk-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.52rem;
  color: #fff;
  background: #5d6870;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.dmd-desk-status::before {
  width: 6px;
  height: 6px;
  content: "";
  background: currentColor;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.dmd-desk-status.is-live {
  background: var(--dmd-desk-success);
}

.dmd-desk-status.is-reserved {
  background: var(--dmd-desk-warning);
}

.dmd-desk-status.is-sold {
  background: var(--dmd-desk-accent);
}

.dmd-desk-car__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e6e9e7;
}

.dmd-desk-car__actions form {
  min-width: 0;
  margin: 0;
}

.dmd-desk-car__actions > a,
.dmd-desk-car__actions button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.5rem;
  appearance: none;
  color: var(--dmd-desk-ink-soft);
  background: #f7f8f6;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 8px;
  font-size: 0.77rem;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
}

.dmd-desk-car__actions > a {
  color: #fff;
  background: var(--dmd-desk-ink);
  border-color: var(--dmd-desk-ink);
}

.dmd-desk-car__actions button:hover {
  background: #fff;
  border-color: #9da8a3;
}

.dmd-desk-empty {
  padding: clamp(2.4rem, 10vw, 4.5rem) 1rem;
  color: var(--dmd-desk-muted);
  background: #fff;
  border: 1px dashed #b8c2bd;
  border-radius: var(--dmd-desk-radius);
  text-align: center;
}

.dmd-desk-form {
  display: grid;
  gap: 0.9rem;
}

.dmd-desk-form__section {
  min-width: 0;
  margin: 0;
  padding: 0.95rem;
  background: var(--dmd-desk-surface);
  border: 1px solid var(--dmd-desk-line);
  border-radius: var(--dmd-desk-radius);
  box-shadow: 0 6px 22px rgba(16, 24, 32, 0.055);
}

.dmd-desk-form__section > legend {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.25rem;
  color: var(--dmd-desk-ink);
  font-family: var(--dmd-font-display, "Arial Narrow", sans-serif);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1;
}

.dmd-desk-form__section > legend > span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  color: #fff;
  background: var(--dmd-desk-ink);
  border-radius: 8px;
  font-family: var(--dmd-font-body, sans-serif);
  font-size: 0.76rem;
}

.dmd-desk-form__grid {
  display: grid;
  gap: 0.82rem;
  margin-top: 0.8rem;
}

.dmd-desk-form__grid > label,
.dmd-desk-form__section > label:not(.dmd-desk-upload):not(.dmd-desk-check) {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
  color: var(--dmd-desk-ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.dmd-desk-form__grid input,
.dmd-desk-form__grid select,
.dmd-desk-form__grid textarea,
.dmd-desk-form__section > label:not(.dmd-desk-upload):not(.dmd-desk-check) input,
.dmd-desk-form__section > label:not(.dmd-desk-upload):not(.dmd-desk-check) select,
.dmd-desk-form__section > label:not(.dmd-desk-upload):not(.dmd-desk-check) textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.72rem 0.8rem;
  color: var(--dmd-desk-ink);
  background: #fff;
  border: 1px solid #bec7c2;
  border-radius: 9px;
  font-weight: 500;
  appearance: none;
}

.dmd-desk-form__grid select {
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #5f6c65 50%),
    linear-gradient(135deg, #5f6c65 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.dmd-desk-form__grid textarea,
.dmd-desk-form__section > label textarea {
  min-height: 138px;
  resize: vertical;
}

.dmd-desk-form__grid :where(input, select, textarea):focus,
.dmd-desk-form__section > label :where(input, select, textarea):focus {
  border-color: var(--dmd-desk-accent);
  box-shadow: 0 0 0 3px rgba(199, 75, 38, 0.12);
  outline: 0;
}

.dmd-desk-form__wide {
  grid-column: 1 / -1;
}

.dmd-desk-upload {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  margin: 0.9rem 0;
  padding: 1.2rem;
  overflow: hidden;
  color: var(--dmd-desk-ink-soft);
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(135deg, #bec8c3 0 8px, transparent 8px 16px) border-box;
  border: 2px dashed transparent;
  border-radius: var(--dmd-desk-radius);
  cursor: pointer;
  text-align: center;
}

.dmd-desk-upload:hover,
.dmd-desk-upload.is-dragover {
  background:
    linear-gradient(#fff7f3, #fff7f3) padding-box,
    repeating-linear-gradient(135deg, var(--dmd-desk-accent) 0 8px, transparent 8px 16px) border-box;
}

.dmd-desk-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.dmd-desk-upload__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--dmd-desk-accent-dark);
  background: #f8e8e1;
  border-radius: 15px;
  font-size: 1.7rem;
  line-height: 1;
}

.dmd-desk-upload strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 1rem;
}

.dmd-desk-upload small {
  display: block;
  max-width: 40ch;
  margin-top: 0.25rem;
  color: var(--dmd-desk-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.dmd-desk-image-preview,
.dmd-desk-existing-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.dmd-desk-image-preview:empty {
  display: none;
}

.dmd-desk-image-preview > div,
.dmd-desk-existing-images > div {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #e1e5e3;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 10px;
  aspect-ratio: 4 / 3;
}

.dmd-desk-image-preview img,
.dmd-desk-existing-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dmd-desk-demo-photo-label {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.32rem 0.52rem;
  color: #fff;
  background: rgba(16, 24, 32, 0.88);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.dmd-desk-image-preview .dmd-upload__preview-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.4rem 0.5rem 0.45rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(8, 14, 18, 0.84));
  font-size: 0.68rem;
}

.dmd-desk-existing-images button,
.dmd-desk-image-preview .dmd-upload__preview-remove {
  position: absolute;
  z-index: 2;
  top: 0.42rem;
  right: 0.42rem;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0.35rem;
  color: #fff;
  background: rgba(16, 24, 32, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
}

.dmd-desk-check {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 800;
}

.dmd-desk-check input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  accent-color: var(--dmd-desk-success);
}

.dmd-desk-savebar {
  position: fixed;
  z-index: 112;
  right: 0;
  bottom: calc(68px + var(--dmd-desk-safe-bottom));
  left: 0;
  display: grid;
  grid-template-columns: 0.65fr 0.9fr 1.15fr;
  gap: 0.45rem;
  padding: 0.62rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.62rem max(0.75rem, env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--dmd-desk-line);
  box-shadow: 0 -10px 28px rgba(16, 24, 32, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dmd-desk-savebar > a,
.dmd-desk-savebar > button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.4rem;
  appearance: none;
  color: var(--dmd-desk-ink-soft);
  background: #f4f6f4;
  border: 1px solid var(--dmd-desk-line);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
}

.dmd-desk-savebar > .is-primary {
  color: #fff;
  background: var(--dmd-desk-accent);
  border-color: var(--dmd-desk-accent);
}

.dmd-desk-savebar > button[disabled] {
  cursor: wait;
  opacity: 0.58;
}

.dmd-desk-danger {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  color: var(--dmd-desk-danger);
  background: #fff3f1;
  border: 1px solid #efc1bb;
  border-radius: 9px;
  font-size: 0.87rem;
  font-weight: 850;
  text-decoration: none;
}

.dmd-desk-nav {
  position: fixed;
  z-index: 110;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(68px + var(--dmd-desk-safe-bottom));
  padding: 0.35rem max(0.4rem, env(safe-area-inset-right, 0px)) var(--dmd-desk-safe-bottom) max(0.4rem, env(safe-area-inset-left, 0px));
  background: rgba(16, 24, 32, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 -9px 30px rgba(16, 24, 32, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dmd-desk-nav > a {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 56px;
  align-content: center;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.3rem;
  color: rgba(255, 255, 255, 0.62);
  border-radius: 9px;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.05;
  text-decoration: none;
}

.dmd-desk-nav > a > span {
  font-size: 1.25rem;
  line-height: 1;
}

.dmd-desk-nav > a:hover,
.dmd-desk-nav > a.is-current,
.dmd-desk-nav > a[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.dmd-desk-nav > a.is-current::after,
.dmd-desk-nav > a[aria-selected="true"]::after {
  position: absolute;
  right: 30%;
  bottom: 0.15rem;
  left: 30%;
  height: 2px;
  content: "";
  background: var(--dmd-desk-accent);
  border-radius: 999px;
}

.dmd-desk-nav > .dmd-desk-nav__add {
  color: #fff;
}

.dmd-desk-nav__add > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-top: -18px;
  color: #fff;
  background: var(--dmd-desk-accent);
  border: 4px solid var(--dmd-desk-ink);
  border-radius: 50%;
  box-sizing: content-box;
  box-shadow: 0 7px 18px rgba(199, 75, 38, 0.34);
}

@keyframes dmd-desk-view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 600px) {
  .dmd-desk-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .dmd-desk-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dmd-desk-stats > a:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .dmd-desk-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmd-desk-image-preview,
  .dmd-desk-existing-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .dmd-desk-car {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .dmd-desk-car > img {
    min-height: 235px;
    aspect-ratio: auto;
  }

  .dmd-desk-car__main {
    align-content: center;
    padding: 1.05rem;
  }

  .dmd-desk-car__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dmd-desk-image-preview,
  .dmd-desk-existing-images {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
	.dmd-desk__main {
		width: min(calc(100% - 104px), 1480px);
    margin-right: 0;
    margin-left: 104px;
    padding-bottom: 2rem;
  }

  .dmd-desk-nav {
    top: 76px;
    right: auto;
    width: 104px;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(74px, auto));
    align-content: start;
    padding: 1rem 0.55rem;
    border-top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 8px 0 26px rgba(16, 24, 32, 0.1);
  }

  .dmd-desk-nav > a {
    min-height: 70px;
    gap: 0.35rem;
    font-size: 0.72rem;
  }

  .dmd-desk-nav__add > span {
    margin-top: 0;
  }

  .dmd-desk-savebar {
    right: 1.5rem;
    bottom: 1.25rem;
    left: auto;
    width: auto;
    padding: 0.6rem;
    border: 1px solid var(--dmd-desk-line);
    border-radius: 13px;
    box-shadow: var(--dmd-desk-shadow-raised);
  }

  .dmd-desk-savebar > a,
  .dmd-desk-savebar > button {
    min-width: 115px;
  }

  .dmd-desk__offline {
    top: 88px;
    right: 1.5rem;
    left: 122px;
  }

  .dmd-desk-form__section {
    padding: 1.3rem;
  }

  .dmd-desk-form__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dmd-desk-image-preview,
  .dmd-desk-existing-images {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dmd-desk-vehicles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmd-desk-car {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .dmd-desk-car > img {
    min-height: 260px;
  }
}

@media (min-width: 600px) {
  .dmd-desk__top-action-label {
    display: inline;
  }

  .dmd-desk__main {
    padding: 1.5rem 1.5rem calc(9rem + var(--dmd-desk-safe-bottom));
  }

  .dmd-desk__intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .dmd-desk__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

	.dmd-desk__panel,
	.dmd-desk__workspace [data-desk-section] {
    padding: 1.25rem;
  }

  .dmd-desk__panel-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .dmd-desk__toolbar {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    align-items: center;
  }

  .dmd-desk__chips {
    justify-content: flex-end;
  }

  .dmd-desk__vehicle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmd-desk__fields,
  .dmd-desk .dmd-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmd-desk__previews,
  .dmd-desk [data-image-previews],
  .dmd-desk__existing-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .dmd-desk__topbar {
    min-height: 76px;
    padding-inline: max(1.5rem, calc((100vw - 1480px) / 2));
  }

  .dmd-desk__network {
    top: 76px;
  }

  .dmd-desk__main {
    padding: 2rem 2rem 6.5rem;
  }

  .dmd-desk__tabs-wrap {
    top: 76px;
    padding: 0.8rem 1rem;
  }

  .dmd-desk:has(.dmd-desk__network:not([hidden])) .dmd-desk__tabs-wrap {
    top: 118px;
  }

  .dmd-desk__tabs {
    grid-auto-columns: auto;
    justify-content: start;
  }

	.dmd-desk__tab,
	.dmd-desk__tabs [data-desk-tab] {
    min-width: 132px;
  }

	.dmd-desk__panel,
	.dmd-desk__workspace [data-desk-section] {
    padding: 1.5rem;
  }

  .dmd-desk__vehicle,
  .dmd-desk .dmd-stock-card {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .dmd-desk__vehicle-media,
  .dmd-desk .dmd-stock-card__media {
    height: 100%;
    min-height: 260px;
    aspect-ratio: auto;
  }

  .dmd-desk__vehicle-body,
  .dmd-desk .dmd-stock-card__body {
    align-content: center;
    padding: 1.15rem;
  }

  .dmd-desk__form {
    gap: 1.25rem;
  }

  .dmd-desk__form-section,
  .dmd-desk .dmd-form-section {
    padding: 1.4rem;
  }

  .dmd-desk__fields,
  .dmd-desk .dmd-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dmd-desk__field--span-2,
  .dmd-desk .dmd-field--span-2 {
    grid-column: span 2;
  }

  .dmd-desk__previews,
  .dmd-desk [data-image-previews],
  .dmd-desk__existing-images {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dmd-desk__savebar {
    right: 2rem;
    bottom: 1.25rem;
    left: auto;
    width: auto;
    padding: 0.65rem;
    border: 1px solid var(--dmd-desk-line);
    border-radius: 14px;
    box-shadow: var(--dmd-desk-shadow-raised);
  }

  .dmd-desk__savebar-inner {
    grid-template-columns: auto auto;
    width: auto;
  }

  .dmd-desk__savebar .dmd-desk__button,
  .dmd-desk__savebar .dmd-desk-button {
    width: auto;
    min-width: 132px;
  }
}

@media (min-width: 1180px) {
  .dmd-desk__vehicle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dmd-desk__vehicle,
  .dmd-desk .dmd-stock-card {
    grid-template-columns: minmax(240px, 0.85fr) minmax(270px, 1.15fr);
  }

  .dmd-desk__previews,
  .dmd-desk [data-image-previews],
  .dmd-desk__existing-images {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .dmd-desk__brand-name {
    max-width: 145px;
  }

  .dmd-desk__stats {
    gap: 0.55rem;
  }

  .dmd-desk__stat,
  .dmd-desk .dmd-stat {
    min-height: 108px;
    padding: 0.8rem;
  }

  .dmd-desk__vehicle-actions,
  .dmd-desk .dmd-stock-card__actions {
    grid-template-columns: 1fr;
  }

  .dmd-desk__savebar-inner {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  }

  .dmd-desk__savebar .dmd-desk__button,
  .dmd-desk__savebar .dmd-desk-button {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dmd-desk *,
  .dmd-desk *::before,
  .dmd-desk *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .dmd-desk__status,
  .dmd-desk .dmd-status-badge,
	.dmd-desk__button,
	.dmd-desk .dmd-desk-button,
	.dmd-desk__tabs [data-desk-tab],
  .dmd-desk [data-filter-chip] {
    border: 1px solid CanvasText;
  }

  .dmd-desk__dropzone,
  .dmd-desk [data-upload-dropzone] {
    border: 2px dashed CanvasText;
  }
}

@media print {
  .dmd-desk__topbar,
  .dmd-desk__network,
  .dmd-desk__tabs-wrap,
  .dmd-desk__intro-actions,
  .dmd-desk__vehicle-actions,
  .dmd-desk .dmd-stock-card__actions,
  .dmd-desk__savebar,
  .dmd-desk__install-note {
    display: none !important;
  }

  .dmd-desk {
    min-height: 0;
    background: #fff;
  }

	.dmd-desk__main,
	.dmd-desk__panel,
	.dmd-desk__workspace [data-desk-section] {
    width: 100%;
    padding: 0;
  }

  .dmd-desk__workspace,
  .dmd-desk__vehicle,
  .dmd-desk .dmd-stock-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Keep dealer-selected light accent colours readable. */
.dmd-desk :is(
  .dmd-desk__brand-mark,
  .dmd-desk__chip[aria-pressed="true"],
  [data-filter-chip][aria-pressed="true"],
  .dmd-desk-primary,
  .dmd-desk-primary:hover,
  .dmd-desk-filters a.is-current,
  .dmd-desk-savebar > .is-primary,
  .dmd-desk-nav__add > span,
  .dmd-desk__status[data-status="sold"],
  .dmd-status-badge--sold,
  .dmd-desk-status.is-sold
) {
  color: var(--dmd-desk-accent-foreground);
}
