/* Dealer pages: shared look from the support pages (styles/contact.css).
   Loaded after each page's own stylesheet on the signed-in dealer pages
   (dashboard, browse, listing, messages, profile, account settings,
   transactions, ticket thread). It only adjusts shape, type, spacing and
   phone layout; each page keeps its own colors for light and dark. */

body {
  --dt-accent: #CC1F1F;
  --dt-line: rgba(255, 255, 255, 0.09);
  --dt-shadow: none;
  --dt-muted: rgba(255, 255, 255, 0.62);
}

body.light {
  --dt-line: #E3E5EA;
  --dt-shadow: 0 1px 2px rgba(17, 18, 20, 0.04), 0 8px 24px rgba(17, 18, 20, 0.06);
  --dt-muted: #5E636E;
}

/* ── Page headings ──────────────────────────────────────────── */
.page-header h1,
.welcome-text h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* The short red rule that opens the support page's eyebrow. */
.page-header h1::before,
.welcome-text h1::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--dt-accent);
}

.page-header .page-sub,
.welcome-text p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--dt-muted);
}

/* ── Panels and cards ───────────────────────────────────────── */
.panel,
.card,
.profile-hero,
.price-card,
.dealer-card,
.summary-grid > *,
.stats-grid > *,
.chat-layout {
  border-radius: 12px;
  border-color: var(--dt-line);
  box-shadow: var(--dt-shadow);
}

.panel-title,
.card-title,
.dealer-card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Controls ───────────────────────────────────────────────── */
.btn,
.btn-primary,
.modal-btn,
.panel-action {
  border-radius: 8px;
}

.btn,
.btn-primary {
  letter-spacing: 0.04em;
}

.form-input,
.filter-select,
.filter-search input,
.sidebar-search input,
.chat-input,
.field-edit input,
.field-edit textarea,
.field-edit select {
  border-radius: 8px;
}

:focus-visible {
  outline: 2px solid var(--dt-accent);
  outline-offset: 2px;
}

/* ── Header with a Back link (listing, profile, settings, transactions) ── */
.back-btn {
  border-radius: 8px;
}

/* ── Layout safety: the main column never grows past the screen ── */
.main {
  width: 100%;
  min-width: 0;
}

/* Settings tabs scroll sideways instead of widening the page. */
.settings-nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.settings-nav::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .topnav {
    padding-left: 16px !important;
    padding-right: 12px !important;
  }

  .topnav-left {
    gap: 14px !important;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  /* Logo plus "Back to dashboard" is wider than a phone: keep the arrow,
     hide the words visually (screen readers still read them). */
  .topnav .back-btn {
    font-size: 0 !important;
    gap: 0 !important;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
    border: 1px solid var(--dt-line);
  }

  .topnav .back-btn i {
    font-size: 18px !important;
  }

  .page-header h1::before,
  .welcome-text h1::before {
    margin-bottom: 10px;
  }
}

/* Links inside form and field hints (e.g. "Contact support"). */
.form-hint a,
.field-hint a {
  color: #F04545;
  font-weight: 600;
}

body.light .form-hint a,
body.light .field-hint a {
  color: #B91C1C;
}
