/* ============================================================
   DriveEase — Main Stylesheet
   Aesthetic: Refined luxury dark — obsidian base, gold accents,
   Syne display font, DM Sans body, sharp geometric details.
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  /* Palette */
  --c-bg:        #0d0f12;
  --c-surface:   #14171d;
  --c-surface2:  #1c2028;
  --c-border:    #252932;
  --c-gold:      #c9a84c;
  --c-gold-dim:  #8a6d28;
  --c-gold-glow: rgba(201,168,76,.18);
  --c-text:      #e8eaf0;
  --c-muted:     #6b7280;
  --c-success:   #22c55e;
  --c-error:     #ef4444;
  --c-info:      #3b82f6;
  --c-warning:   #f59e0b;

  /* Typography */
  --f-display: 'Syne',    sans-serif;
  --f-body:    'DM Sans', sans-serif;

  /* Spacing */
  --sp-1: .25rem;  --sp-2: .5rem;  --sp-3: .75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem;--sp-6: 1.5rem;
  --sp-8: 2rem;    --sp-10:2.5rem; --sp-12:3rem;
  --sp-16:4rem;    --sp-20:5rem;

  /* Radius */
  --r-sm: 6px;  --r-md: 12px;  --r-lg: 18px;  --r-xl: 24px;  --r-full: 9999px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --shadow-gold:0 0 24px rgba(201,168,76,.25);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms ease;
  --t-spring: 300ms cubic-bezier(.34,1.56,.64,1);

  /* Layout */
  --nav-h:    70px;
  --max-w:    1200px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13,15,18,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  z-index: 1000;
  transition: background var(--t-base);
}
.nav.scrolled { background: rgba(13,15,18,.98); }
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.nav__logo {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.nav__logo-icon {
  color: var(--c-gold);
  font-size: 1.5rem;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
}
.nav__link {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav__link:hover, .nav__link.active { color: var(--c-text); background: var(--c-surface2); }
.nav__link--admin {
  color: var(--c-gold);
}
.nav__link--admin:hover { background: var(--c-gold-glow); color: var(--c-gold); }
.nav__link--cta {
  background: var(--c-gold);
  color: var(--c-bg) !important;
  font-weight: 700;
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  transition: box-shadow var(--t-base), transform var(--t-fast);
}
.nav__link--cta:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}
.nav__link--user {
  color: var(--c-muted);
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link--user:hover { color: var(--c-text); background: var(--c-surface2); }
.nav__chevron { transition: transform var(--t-base); }
.nav__dropdown { position: relative; }
.nav__dropdown.open .nav__chevron { transform: rotate(180deg); }
.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.nav__dropdown.open .nav__dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.nav__dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: .9rem;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__dropdown-menu li a:hover { color: var(--c-text); background: var(--c-surface2); }
.nav__logout { color: var(--c-error) !important; }
.nav__divider { height: 1px; background: var(--c-border); margin: var(--sp-2) 0; }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: var(--sp-2);
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}

/* ── Flash Messages ──────────────────────────────────────────── */
.flash-wrap {
  position: fixed;
  top: calc(var(--nav-h) + var(--sp-4));
  right: var(--sp-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 380px;
}
.flash {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border-left: 3px solid currentColor;
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  animation: slideIn var(--t-spring) forwards;
}
.flash--success { color: var(--c-success); }
.flash--error   { color: var(--c-error);   }
.flash--info    { color: var(--c-info);     }
.flash--warning { color: var(--c-warning);  }
.flash span { color: var(--c-text); flex: 1; font-size: .9rem; }
.flash__close { color: var(--c-muted); padding: var(--sp-1); transition: color var(--t-fast); }
.flash__close:hover { color: var(--c-text); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ── Main Content Area ───────────────────────────────────────── */
.main {
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
}

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ── Section ──────────────────────────────────────────────────── */
.section {
  padding: var(--sp-20) 0;
}
.section--sm { padding: var(--sp-12) 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .75rem 1.5rem;
  border-radius: var(--r-full);
  font-family: var(--f-display);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: all var(--t-base);
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-gold);
  color: var(--c-bg);
}
.btn--primary:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--c-gold);
  color: var(--c-gold);
}
.btn--outline:hover {
  background: var(--c-gold-glow);
}
.btn--ghost {
  background: var(--c-surface2);
  color: var(--c-text);
}
.btn--ghost:hover { background: var(--c-border); }
.btn--danger {
  background: var(--c-error);
  color: #fff;
}
.btn--sm { padding: .5rem 1rem; font-size: .8rem; }
.btn--lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-control {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--c-surface2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: .95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px var(--c-gold-glow);
}
.form-control::placeholder { color: var(--c-muted); }
.form-control.error { border-color: var(--c-error); }
.form-error {
  font-size: .8rem;
  color: var(--c-error);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.form-hint { font-size: .8rem; color: var(--c-muted); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card__body { padding: var(--sp-8); }
.card__header {
  padding: var(--sp-6) var(--sp-8);
  border-bottom: 1px solid var(--c-border);
}
.card__footer {
  padding: var(--sp-6) var(--sp-8);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface2);
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge--success  { background: rgba(34,197,94,.15);  color: var(--c-success); }
.badge--error    { background: rgba(239,68,68,.15);   color: var(--c-error);   }
.badge--warning  { background: rgba(245,158,11,.15);  color: var(--c-warning); }
.badge--info     { background: rgba(59,130,246,.15);  color: var(--c-info);    }
.badge--muted    { background: var(--c-surface2); color: var(--c-muted);       }
.badge--gold     { background: var(--c-gold-glow); color: var(--c-gold);       }

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--f-display);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
  color: var(--c-text);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--c-surface2); }

/* ── Auth layout ─────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-6);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--c-gold-glow) 0%, transparent 70%);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}
.auth-card__logo {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.auth-card__logo a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 800;
}
.auth-card__logo .nav__logo-icon {
  font-size: 1.8rem;
}
.auth-card__title {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--sp-1);
}
.auth-card__subtitle {
  color: var(--c-muted);
  font-size: .95rem;
  margin-bottom: var(--sp-8);
}
.auth-card__body { padding: var(--sp-10); }
.auth-card__form { display: flex; flex-direction: column; gap: var(--sp-5); }
.auth-card__footer {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: .9rem;
  color: var(--c-muted);
}
.auth-card__footer a { color: var(--c-gold); font-weight: 600; }
.auth-card__footer a:hover { text-decoration: underline; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--c-muted);
  font-size: .8rem;
  margin: var(--sp-2) 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

/* ── Password strength ───────────────────────────────────────── */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: var(--sp-2);
}
.pw-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--c-border);
  transition: background var(--t-base);
}
.pw-strength__bar.active-1 { background: var(--c-error); }
.pw-strength__bar.active-2 { background: var(--c-warning); }
.pw-strength__bar.active-3 { background: var(--c-success); }
.pw-strength__label { font-size: .75rem; color: var(--c-muted); margin-top: var(--sp-1); }

/* ── Hero (Home) ─────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--sp-20) 0;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 60% 40%, rgba(201,168,76,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 10% 90%, rgba(201,168,76,.06) 0%, transparent 50%);
}
.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--c-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .3;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-gold);
  margin-bottom: var(--sp-5);
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--c-gold);
}
.hero__title {
  margin-bottom: var(--sp-6);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__title em {
  font-style: normal;
  color: var(--c-gold);
  position: relative;
}
.hero__body {
  color: var(--c-muted);
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: var(--sp-10);
  max-width: 500px;
}
.hero__actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  gap: var(--sp-10);
  margin-top: var(--sp-16);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-border);
}
.hero__stat-value {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-gold);
}
.hero__stat-label {
  font-size: .82rem;
  color: var(--c-muted);
  margin-top: var(--sp-1);
}

/* ── Car Cards ───────────────────────────────────────────────── */
.car-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.car-card:hover {
  border-color: var(--c-gold-dim);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}
.car-card__img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-surface2);
}
.car-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.car-card:hover .car-card__img { transform: scale(1.05); }
.car-card__img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--c-border);
  font-size: 4rem;
}
.car-card__badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
}
.car-card__body { padding: var(--sp-6); }
.car-card__title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--sp-1);
}
.car-card__meta {
  font-size: .82rem;
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
}
.car-card__specs {
  display: flex;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.car-card__spec {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: .8rem;
  color: var(--c-muted);
}
.car-card__spec svg { width: 14px; height: 14px; }
.car-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
}
.car-card__price {
  font-family: var(--f-display);
  font-weight: 800;
}
.car-card__price-amount {
  font-size: 1.3rem;
  color: var(--c-gold);
}
.car-card__price-period { font-size: .78rem; color: var(--c-muted); }

/* ── Cars grid ────────────────────────────────────────────────── */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}

/* ── Section heading ─────────────────────────────────────────── */
.section-heading {
  margin-bottom: var(--sp-12);
}
.section-heading__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-gold);
  margin-bottom: var(--sp-3);
}
.section-heading__eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
}
.section-heading__title { margin-bottom: var(--sp-3); }
.section-heading__body  { color: var(--c-muted); max-width: 560px; font-size: 1rem; }

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero {
  padding: var(--sp-16) 0 var(--sp-12);
  border-bottom: 1px solid var(--c-border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 100%;
  background: radial-gradient(ellipse at 80% 50%, var(--c-gold-glow), transparent 70%);
  pointer-events: none;
}
.page-hero__eyebrow {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-gold);
  margin-bottom: var(--sp-3);
}
.page-hero__title { margin-bottom: var(--sp-2); }
.page-hero__body  { color: var(--c-muted); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .82rem;
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--c-muted); transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--c-gold); }
.breadcrumb__sep { color: var(--c-border); }
.breadcrumb__current { color: var(--c-text); }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-20);
  color: var(--c-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: var(--sp-4); opacity: .4; }
.empty-state__title { font-size: 1.2rem; color: var(--c-text); margin-bottom: var(--sp-2); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-10);
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  transition: all var(--t-fast);
}
.pagination__btn:hover { color: var(--c-text); border-color: var(--c-gold-dim); }
.pagination__btn.active { background: var(--c-gold); color: var(--c-bg); border-color: var(--c-gold); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--c-border);
  padding: var(--sp-12) 0 var(--sp-8);
  background: var(--c-surface);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: var(--sp-8);
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__name {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.footer__tagline { color: var(--c-muted); font-size: .85rem; }
.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
}
.footer__nav a {
  font-size: .88rem;
  color: var(--c-muted);
  transition: color var(--t-fast);
}
.footer__nav a:hover { color: var(--c-gold); }
.footer__copy {
  font-size: .78rem;
  color: var(--c-muted);
  text-align: right;
  align-self: end;
}

/* ── Spinner / loading ───────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--c-border);
  border-top-color: var(--c-gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert boxes ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border-left: 3px solid;
  margin-bottom: var(--sp-5);
}
.alert--success { border-color: var(--c-success); background: rgba(34,197,94,.08);  color: var(--c-success); }
.alert--error   { border-color: var(--c-error);   background: rgba(239,68,68,.08);   color: var(--c-error);   }
.alert--info    { border-color: var(--c-info);    background: rgba(59,130,246,.08);  color: var(--c-info);    }
.alert--warning { border-color: var(--c-warning); background: rgba(245,158,11,.08);  color: var(--c-warning); }
.alert p { color: var(--c-text); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    gap: var(--sp-1);
    padding: var(--sp-4);
  }
  .nav__links.open { display: flex; }
  .nav__link { width: 100%; }
  .nav__dropdown-menu {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: all;
    box-shadow: none;
    border: 1px solid var(--c-border);
  }
  .nav__burger { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .hero__stats { flex-direction: column; gap: var(--sp-6); }
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__copy { text-align: center; }
  .auth-card__body { padding: var(--sp-6); }
  .hero__actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .cars-grid { grid-template-columns: 1fr; }
  .flash-wrap { left: var(--sp-4); right: var(--sp-4); max-width: none; }
}
