/* ============================================
   DriveShare - P2P Car Rental Marketplace
   Global Styles
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --secondary: #34a853;
  --secondary-dark: #2d8f47;
  --accent: #fbbc04;
  --danger: #ea4335;
  --dark: #202124;
  --gray-900: #3c4043;
  --gray-700: #5f6368;
  --gray-500: #9aa0a6;
  --gray-300: #dadce0;
  --gray-100: #f1f3f4;
  --white: #ffffff;
  --bg: #f8f9fa;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.25s ease;
  --max-width: 1280px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 600; }

/* ---------- Utility ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--gray-700); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); }
.btn-success {
  background: var(--secondary);
  color: var(--white);
}
.btn-success:hover { background: var(--secondary-dark); }
.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #d33426; }
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-100); }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Header / Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 0 24px;
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
}
.logo svg { width: 32px; height: 32px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--gray-700);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  position: relative;
}
.nav-avatar:hover { box-shadow: 0 0 0 3px var(--primary-light); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px;
  z-index: 1001;
  border: 1px solid var(--gray-300);
}
.nav-dropdown a, .nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
  color: var(--gray-900);
  transition: background var(--transition);
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--gray-100); }
.nav-dropdown hr { border: none; border-top: 1px solid var(--gray-300); margin: 4px 0; }

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav-links overlay */
@media (max-width: 768px) {
  .nav-links.show {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 12px 16px;
    gap: 4px;
  }
  .nav-links.show a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .nav-actions #nav-auth,
  .nav-actions #nav-user {
    display: none;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 50%, #4285f4 100%);
  color: var(--white);
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: 3rem; margin-bottom: 16px; }
.hero p { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto 40px; }

/* ---------- Search Box ---------- */
.search-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
}
.search-field {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  min-width: 0;
}
.search-field label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-700);
  margin-bottom: 2px;
}
.search-field input,
.search-field select {
  width: 100%;
  font-size: 0.9375rem;
  color: var(--dark);
  background: transparent;
}
.search-field input::placeholder { color: var(--gray-500); }
.search-box .btn-primary {
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 24px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-label {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-top: 4px;
}

/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--gray-700); max-width: 560px; margin: 0 auto; }

/* ---------- Car Card ---------- */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.car-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--gray-300);
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.car-card-img {
  position: relative;
  height: 200px;
  background: var(--gray-100);
  overflow: hidden;
}
.car-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-card-img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.car-card-img .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.car-card-img .fav-btn:hover { transform: scale(1.1); }
.car-card-img .fav-btn.active { color: var(--danger); }
.car-card-body { padding: 16px; }
.car-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.car-card-title { font-size: 1.0625rem; font-weight: 600; }
.car-card-price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.car-card-price span { font-size: 0.8125rem; font-weight: 400; color: var(--gray-700); }
.car-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gray-700);
  font-size: 0.8125rem;
  margin-bottom: 12px;
}
.car-card-meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.car-card-meta span { display: flex; align-items: center; gap: 4px; }
.car-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
}
.car-card-rating .stars { color: var(--accent); }
.car-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-300);
}
.car-card-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--gray-700);
}
.car-card-owner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.6875rem;
}

/* ---------- How It Works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.how-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-300);
}
.how-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.how-icon svg { width: 28px; height: 28px; }
.how-card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.how-card p { color: var(--gray-700); font-size: 0.9375rem; }
.how-step {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 12px;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(135deg, #0d47a1, #1a73e8);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
  margin: 40px 0;
}
.cta-section h2 { margin-bottom: 16px; color: var(--white); }
.cta-section p { opacity: 0.9; margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-section .btn {
  background: var(--white);
  color: var(--primary);
}
.cta-section .btn:hover { background: var(--gray-100); }

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: var(--gray-500);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { margin-top: 12px; font-size: 0.875rem; line-height: 1.7; }
.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.9375rem;
}
.footer ul li { margin-bottom: 8px; }
.footer ul li a {
  font-size: 0.875rem;
  color: var(--gray-500);
  transition: color var(--transition);
}
.footer ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--primary); color: var(--white); }

/* ---------- Page Header ---------- */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 32px 0;
}
.page-header h1 { font-size: 1.75rem; margin-bottom: 4px; }
.page-header p { color: var(--gray-700); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Filter Sidebar ---------- */
.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 32px 0;
}
.filter-sidebar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-300);
  position: sticky;
  top: 80px;
  height: fit-content;
}
.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
}
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.price-range {
  display: flex;
  align-items: center;
  gap: 12px;
}
.price-range input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.price-range input:focus { border-color: var(--primary); }
.filter-divider {
  border: none;
  border-top: 1px solid var(--gray-300);
  margin: 16px 0;
}

/* ---------- Results Header ---------- */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.results-count { font-size: 0.9375rem; color: var(--gray-700); }
.results-count strong { color: var(--dark); }
.sort-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-700);
  background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

/* ---------- Car Detail Page ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  padding: 32px 0;
}
.gallery {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gallery-main {
  width: 100%;
  height: 450px;
  background: var(--gray-100);
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.gallery-thumb {
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { margin-top: 24px; }
.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.detail-title { font-size: 1.75rem; }
.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.detail-price span { font-size: 0.9375rem; font-weight: 400; color: var(--gray-700); }
.detail-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}
.spec-item { text-align: center; }
.spec-item svg { width: 24px; height: 24px; color: var(--primary); margin-bottom: 6px; }
.spec-item .spec-value { font-weight: 600; font-size: 0.9375rem; }
.spec-item .spec-label { font-size: 0.75rem; color: var(--gray-700); }
.detail-section { margin-top: 32px; }
.detail-section h3 { margin-bottom: 12px; }
.detail-section p { color: var(--gray-700); line-height: 1.7; }

/* Booking Sidebar Card */
.booking-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-300);
  position: sticky;
  top: 80px;
}
.booking-price-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}
.booking-price-display .price { font-size: 1.5rem; font-weight: 700; }
.booking-price-display .per-day { color: var(--gray-700); }
.booking-date-fields { display: flex; gap: 8px; margin-bottom: 16px; }
.booking-date-fields .field {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.booking-date-fields .field label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.booking-date-fields .field input {
  width: 100%;
  font-size: 0.875rem;
  color: var(--dark);
}
.booking-divider {
  border: none;
  border-top: 1px solid var(--gray-300);
  margin: 16px 0;
}
.booking-breakdown { margin-bottom: 16px; }
.booking-breakdown .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 4px 0;
  color: var(--gray-700);
}
.booking-breakdown .total {
  font-weight: 700;
  color: var(--dark);
  font-size: 1rem;
  padding-top: 8px;
  border-top: 1px solid var(--gray-300);
  margin-top: 8px;
}

/* Reviews */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.reviews-avg {
  font-size: 2.5rem;
  font-weight: 700;
}
.reviews-count-text { color: var(--gray-700); }
.review-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-300);
}
.review-card:last-child { border-bottom: none; }
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.review-name { font-weight: 600; }
.review-date { font-size: 0.8125rem; color: var(--gray-500); }
.review-stars { color: var(--accent); margin-bottom: 4px; font-size: 0.875rem; }
.review-text { color: var(--gray-700); font-size: 0.9375rem; }

/* Owner Card */
.owner-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin-top: 16px;
}
.owner-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.owner-info h4 { margin-bottom: 2px; }
.owner-info p { font-size: 0.8125rem; color: var(--gray-700); }

/* ---------- Listing Form ---------- */
.listing-form-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 32px 0;
}
.form-steps {
  position: sticky;
  top: 80px;
  height: fit-content;
}
.form-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--gray-500);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}
.form-step-item.active { color: var(--primary); font-weight: 600; }
.form-step-item.completed { color: var(--secondary); }
.form-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}
.form-step-item.active .form-step-num { background: var(--primary); color: var(--white); }
.form-step-item.completed .form-step-num { background: var(--secondary); color: var(--white); }
.form-step-line {
  width: 2px;
  height: 24px;
  background: var(--gray-300);
  margin-left: 15px;
}
.form-content {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--gray-300);
}
.form-content h2 { margin-bottom: 8px; font-size: 1.5rem; }
.form-content > p { color: var(--gray-700); margin-bottom: 32px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--dark);
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group .hint { font-size: 0.75rem; color: var(--gray-500); margin-top: 4px; }
.photo-upload {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.photo-upload:hover { border-color: var(--primary); background: var(--primary-light); }
.photo-upload svg { width: 48px; height: 48px; color: var(--gray-500); margin: 0 auto 12px; }
.photo-upload p { color: var(--gray-700); }
.photo-upload .browse { color: var(--primary); font-weight: 600; }
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-300);
}

/* ---------- Dashboard ---------- */
.dash-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 64px);
}
.dash-sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-300);
  padding: 24px 16px;
}
.dash-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--gray-700);
  transition: all var(--transition);
  margin-bottom: 4px;
}
.dash-sidebar a:hover { background: var(--gray-100); }
.dash-sidebar a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.dash-sidebar a svg { width: 20px; height: 20px; }
.dash-content { padding: 32px; }
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.dash-stat-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 20px;
}
.dash-stat-card .label { font-size: 0.8125rem; color: var(--gray-700); margin-bottom: 4px; }
.dash-stat-card .value { font-size: 1.5rem; font-weight: 700; }
.dash-stat-card .change { font-size: 0.75rem; color: var(--secondary); margin-top: 4px; }
.dash-stat-card .change.negative { color: var(--danger); }
.dash-table-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dash-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-300);
}
.dash-table-header h3 { font-size: 1.125rem; }
.dash-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-table th, .dash-table td {
  padding: 12px 20px;
  text-align: left;
  font-size: 0.875rem;
}
.dash-table th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-table tr:not(:last-child) td { border-bottom: 1px solid var(--gray-300); }
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-active { background: #e6f4ea; color: var(--secondary); }
.status-pending { background: #fef7e0; color: #e37400; }
.status-approved { background: #e6f4ea; color: #137333; }
.status-rejected { background: #fce8e6; color: #c5221f; }
.status-completed { background: var(--primary-light); color: var(--primary); }
.status-declined { background: #fce8e6; color: var(--danger); }

/* ---------- Auth Pages ---------- */
.auth-layout {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-hero {
  background: linear-gradient(135deg, #0d47a1, #1a73e8);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
}
.auth-hero-content h2 { color: var(--white); font-size: 2rem; margin-bottom: 16px; }
.auth-hero-content p { opacity: 0.9; font-size: 1.125rem; }
.auth-hero-content ul { margin-top: 24px; }
.auth-hero-content ul li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 1rem;
}
.auth-hero-content ul li svg { width: 20px; height: 20px; color: var(--secondary); flex-shrink: 0; }
.auth-form-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
}
.auth-form {
  width: 100%;
  max-width: 420px;
}
.auth-form h2 { margin-bottom: 8px; }
.auth-form > p { color: var(--gray-700); margin-bottom: 32px; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-form .form-group label { font-size: 0.875rem; }
.auth-form .form-group input { padding: 14px 16px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--gray-500);
  font-size: 0.8125rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}
.social-btns { display: flex; gap: 12px; }
.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--transition);
}
.social-btn:hover { background: var(--gray-100); }
.auth-form .switch-text {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--gray-700);
}
.auth-form .switch-text a { color: var(--primary); font-weight: 600; }

/* ---------- Booking Confirmation ---------- */
.confirmation-layout {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 24px;
}
.confirmation-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 40px;
  border: 1px solid var(--gray-300);
  text-align: center;
}
.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.confirmation-icon svg { width: 40px; height: 40px; }
.confirmation-card h2 { margin-bottom: 8px; }
.confirmation-card > p { color: var(--gray-700); margin-bottom: 32px; }
.confirmation-details {
  text-align: left;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}
.confirmation-details .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9375rem;
}
.confirmation-details .row:not(:last-child) { border-bottom: 1px solid var(--gray-300); }
.confirmation-details .label { color: var(--gray-700); }
.confirmation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .booking-card { position: static; }
  .search-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .filter-sidebar.show { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000; overflow-y: auto; padding: 24px; background: var(--white); }
  .listing-form-layout { grid-template-columns: 1fr; }
  .form-steps { position: static; display: flex; overflow-x: auto; gap: 0; }
  .form-step-line { display: none; }
  .form-step-item { white-space: nowrap; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: fixed;
    left: -260px;
    top: 64px;
    bottom: 0;
    width: 260px;
    z-index: 1500;
    transition: left var(--transition);
    box-shadow: var(--shadow-lg);
  }
  .dash-sidebar.show { left: 0; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 60px 0 80px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .search-box { flex-direction: column; padding: 16px; }
  .search-field { width: 100%; }
  .search-box .btn-primary { width: 100%; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .cars-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .detail-specs { grid-template-columns: repeat(2, 1fr); }
  .gallery-main { height: 280px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .cta-section { padding: 40px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .booking-date-fields { flex-direction: column; }
  .dash-stats { grid-template-columns: 1fr; }
  .dash-table { font-size: 0.8125rem; }
  .dash-table th, .dash-table td { padding: 10px 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .confirmation-actions { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.5rem; }
  .car-card-img { height: 180px; }
  .gallery-main { height: 220px; }
}

/* ---------- Placeholder image ---------- */
.placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.placeholder-img svg { width: 48px; height: 48px; opacity: 0.5; }

/* ---------- Toast / Notification ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark);
  color: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  z-index: 9999;
  transform: translateY(120%);
  transition: transform var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast.show { transform: translateY(0); }
.toast.success { border-left: 4px solid var(--secondary); }
.toast.error { border-left: 4px solid var(--danger); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  transform: scale(0.9);
  transition: transform var(--transition);
}
.modal-overlay.show .modal { transform: scale(1); }
.modal h3 { margin-bottom: 16px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  width: 100%;
  height: 200px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
}

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 100;
}
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-300);
  margin-bottom: 24px;
  gap: 0;
}
.tab {
  padding: 12px 24px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-size: 0.9375rem;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- Badge / Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: #e6f4ea; color: var(--secondary); }
.tag-warning { background: #fef7e0; color: #e37400; }

/* ---------- Enhanced Responsive ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .auth-hero { padding: 40px; }
  .auth-form-container { padding: 40px 24px; }
  .detail-info { padding: 0 4px; }
  .detail-title { font-size: 1.5rem; }
  .detail-price { font-size: 1.25rem; }
  .booking-card { padding: 20px; }
  .cta-section { padding: 48px 32px; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .navbar { padding: 0 16px; }
  .navbar-inner { height: 56px; }
  .logo { font-size: 1.2rem; }
  .logo svg { width: 28px; height: 28px; }
  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 0.9375rem; margin-bottom: 24px; }
  .search-box { padding: 12px; gap: 8px; }
  .search-field { padding: 10px 12px; }
  .search-field label { font-size: 0.625rem; }
  .search-field input { font-size: 0.875rem; }
  .page-header { padding: 24px 0; }
  .page-header h1 { font-size: 1.5rem; }
  .search-layout { padding: 24px 0; gap: 24px; }
  .results-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .sort-select { width: 100%; }
  .cars-grid { grid-template-columns: 1fr; gap: 16px; }
  .car-card-img { height: 200px; }
  .how-grid { gap: 20px; }
  .how-card { padding: 24px 16px; }
  .how-icon { width: 56px; height: 56px; }
  .how-icon svg { width: 24px; height: 24px; }
  .cta-section { padding: 32px 20px; margin: 24px 0; border-radius: var(--radius-md); }
  .cta-section h2 { font-size: 1.375rem; }
  .section { padding: 40px 0; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 1.375rem; }
  .footer { padding: 40px 0 20px; }
  .footer-grid { gap: 24px; margin-bottom: 24px; }
  .detail-layout { padding: 24px 0; gap: 24px; }
  .gallery-main { height: 250px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .gallery-thumb { height: 60px; }
  .detail-specs { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
  .booking-card { padding: 16px; border-radius: var(--radius-sm); }
  .booking-date-fields { gap: 6px; }
  .booking-date-fields .field { padding: 10px; }
  .listing-form-layout { padding: 24px 0; gap: 24px; }
  .form-content { padding: 24px; }
  .form-content h2 { font-size: 1.25rem; }
  .dash-content { padding: 20px; }
  .dash-content h1 { font-size: 1.5rem; }
  .dash-stat-card { padding: 16px; }
  .dash-stat-card .value { font-size: 1.25rem; }
  .dash-table-card { overflow-x: auto; }
  .dash-table { min-width: 600px; }
  .confirmation-layout { margin: 24px auto; padding: 0 16px; }
  .confirmation-card { padding: 32px 20px; }
  .auth-layout { min-height: auto; }
  .auth-form-container { padding: 32px 20px; }
  .auth-form { max-width: 100%; }
  .auth-hero-content h2 { font-size: 1.5rem; }
  .auth-hero-content ul li { font-size: 0.875rem; }
  .social-btns { flex-direction: column; }
  .phone-country-wrap { width: 160px !important; }
  .form-grid { gap: 16px; }
  .tabs { overflow-x: auto; gap: 0; }
  .tab { padding: 10px 16px; font-size: 0.875rem; white-space: nowrap; }
  .review-card { padding: 16px 0; }
  .owner-card { padding: 16px; }
  .owner-avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
  .stats-grid { gap: 12px; }
  .stat-number { font-size: 1.375rem; }
  .stat-label { font-size: 0.8125rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .hero { padding: 36px 0 48px; }
  .hero h1 { font-size: 1.375rem; }
  .hero p { font-size: 0.875rem; }
  .search-box { padding: 8px; gap: 6px; }
  .search-field { padding: 8px 10px; }
  .search-field label { font-size: 0.5625rem; }
  .search-field input { font-size: 0.8125rem; }
  .search-box .btn-primary { padding: 12px 20px; font-size: 0.875rem; }
  .stat-number { font-size: 1.125rem; }
  .car-card-img { height: 160px; }
  .car-card-body { padding: 12px; }
  .car-card-title { font-size: 0.9375rem; }
  .car-card-price { font-size: 0.9375rem; }
  .car-card-meta { gap: 8px; font-size: 0.75rem; flex-wrap: wrap; }
  .how-card { padding: 20px 12px; }
  .how-card h3 { font-size: 1.125rem; }
  .how-card p { font-size: 0.8125rem; }
  .cta-section { padding: 24px 16px; }
  .cta-section h2 { font-size: 1.25rem; }
  .cta-section p { font-size: 0.875rem; }
  .cta-section .btn { padding: 12px 24px; font-size: 0.8755rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer h4 { font-size: 0.875rem; }
  .footer ul li a { font-size: 0.8125rem; }
  .gallery-main { height: 200px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .gallery-thumb { height: 50px; }
  .detail-title { font-size: 1.25rem; }
  .detail-price { font-size: 1.125rem; }
  .detail-specs { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
  .spec-item .spec-value { font-size: 0.8125rem; }
  .spec-item .spec-label { font-size: 0.6875rem; }
  .booking-card { padding: 14px; }
  .booking-price-display .price { font-size: 1.25rem; }
  .booking-date-fields .field { padding: 8px; }
  .booking-date-fields .field label { font-size: 0.625rem; }
  .booking-date-fields .field input { font-size: 0.8125rem; }
  .form-content { padding: 16px; }
  .form-content h2 { font-size: 1.125rem; }
  .form-content > p { font-size: 0.875rem; }
  .form-grid { gap: 12px; }
  .form-group label { font-size: 0.75rem; }
  .form-group input, .form-group select, .form-group textarea { padding: 10px 12px; font-size: 0.875rem; }
  .phone-country-wrap { width: 130px !important; }
  .phone-country-trigger span { font-size: 0.75rem !important; }
  .auth-hero-content h2 { font-size: 1.25rem; }
  .auth-hero-content p { font-size: 0.875rem; }
  .auth-hero-content ul li { font-size: 0.8125rem; gap: 8px; padding: 6px 0; }
  .auth-form h2 { font-size: 1.25rem; }
  .auth-form .form-group input { padding: 12px; }
  .confirmation-card h2 { font-size: 1.25rem; }
  .confirmation-details .row { font-size: 0.875rem; padding: 6px 0; }
  .section { padding: 32px 0; }
  .section-header h2 { font-size: 1.25rem; }
  .section-header p { font-size: 0.875rem; }
  .btn-lg { padding: 14px 24px; font-size: 0.9375rem; }
  .dash-content { padding: 16px; }
  .dash-stats { gap: 12px; }
  .dash-stat-card { padding: 12px; }
  .dash-stat-card .label { font-size: 0.75rem; }
  .dash-stat-card .value { font-size: 1.125rem; }
}

/* Photo upload grid responsive */
@media (max-width: 640px) {
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Dashboard sidebar toggle button */
.dash-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1499;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
}
@media (max-width: 1024px) {
  .dash-sidebar-toggle { display: flex; }
}

/* Ensure no horizontal overflow */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Mobile auth links in hamburger menu */
.mobile-auth-links {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--gray-300);
  margin-top: 4px;
}
.mobile-auth-links a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.mobile-auth-links .btn-primary {
  text-align: center;
}
@media (max-width: 768px) {
  .nav-links.show .mobile-auth-links {
    display: flex;
  }
}
