@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0A0F2C;
  --primary-light: #1B2B5C;
  --accent: #FF6B35;
  --accent-hover: #e55a24;
  --text: #1A202C;
  --text-muted: #718096;
  --bg: #F7F8FC;
  --card: #ffffff;
  --border: #E2E8F0;
  --success: #38A169;
  --warning: #D69E2E;
  --danger: #E53E3E;
  --info: #3182CE;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--primary);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--accent); }
.navbar-brand svg { width: 36px; height: 36px; }

.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-links a {
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.navbar-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.navbar-links .btn-accent {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
}
.navbar-links .btn-accent:hover { background: var(--accent-hover); }
.navbar-links .btn-outline {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
}
.navbar-links .btn-outline:hover { border-color: #fff; }

.user-menu { display: flex; align-items: center; gap: 8px; }
.user-menu .user-name { color: rgba(255,255,255,0.9); font-size: 0.9rem; font-weight: 500; }
.user-menu .role-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}
.user-menu .role-badge.admin { background: #805ad5; }
.user-menu .role-badge.owner { background: #38a169; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,0.4); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #2f855a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c53030; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1B2B5C 50%, #2D3A7C 100%);
  padding: 80px 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 3rem; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.75); margin-bottom: 40px; }

.search-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.search-field { flex: 1; min-width: 140px; }
.search-field label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.search-field input, .search-field select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.2s;
  background: #fff;
}
.search-field input:focus, .search-field select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Stats Bar ────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--accent);
  padding: 16px 2rem;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .num { font-size: 1.5rem; font-weight: 800; color: #fff; }
.stat-item .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.8); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

/* ── Section Layout ───────────────────────────────────────────────────────── */
.section { padding: 64px 2rem; }
.section-header { margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.section-header p { color: var(--text-muted); margin-top: 6px; }
.container { max-width: 1200px; margin: 0 auto; }

/* ── Car Cards ────────────────────────────────────────────────────────────── */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.car-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.car-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #e2e8f0;
}
.car-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.car-card:hover .car-card-img img { transform: scale(1.05); }
.car-card-img .status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-available { background: rgba(56,161,105,0.9); color: #fff; }
.badge-unavailable { background: rgba(229,62,62,0.9); color: #fff; }

.car-card-body { padding: 18px; }
.car-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.car-card-location { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.car-specs { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.car-spec { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.car-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); }
.car-price { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.car-price span { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }

/* ── How it Works ─────────────────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.step-card { text-align: center; padding: 32px 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.6rem; }
.step-num { font-size: 0.75rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.step-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── CTA Section ──────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 80px 2rem;
  text-align: center;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.75); margin-bottom: 32px; font-size: 1rem; }

/* ── Form ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 11px 15px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.2s;
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control.is-invalid { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Auth Page ────────────────────────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; overflow: hidden; }
.auth-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); padding: 32px; text-align: center; }
.auth-header h2 { color: #fff; font-size: 1.5rem; font-weight: 700; }
.auth-header p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 4px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 14px; text-align: center; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-body { padding: 32px; }
.role-selector { display: flex; gap: 12px; margin-bottom: 20px; }
.role-option { flex: 1; border: 2px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; cursor: pointer; transition: all 0.2s; }
.role-option.selected { border-color: var(--accent); background: rgba(255,107,53,0.06); }
.role-option .role-icon { font-size: 1.5rem; margin-bottom: 6px; }
.role-option .role-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.role-option .role-desc { font-size: 0.72rem; color: var(--text-muted); }

/* ── Car Detail Page ──────────────────────────────────────────────────────── */
.car-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.gallery-main { height: 380px; border-radius: var(--radius); overflow: hidden; background: #e2e8f0; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 76px; height: 56px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.car-info-card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.car-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.car-meta-item { background: var(--bg); border-radius: 8px; padding: 12px; }
.car-meta-item .meta-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.car-meta-item .meta-value { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-top: 2px; }

.booking-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.booking-price { font-size: 2rem; font-weight: 800; color: var(--accent); }
.booking-price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.price-breakdown { background: var(--bg); border-radius: 8px; padding: 14px; margin: 16px 0; }
.price-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.85rem; }
.price-row.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; font-size: 0.95rem; }

/* ── Dashboard Layout ─────────────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 68px); }
.sidebar { background: var(--primary); padding: 32px 16px; }
.sidebar-title { color: rgba(255,255,255,0.5); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding: 0 12px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; transition: all 0.2s; cursor: pointer; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar-link.active { color: var(--accent); }
.sidebar-icon { font-size: 1.1rem; }
.dashboard-content { padding: 32px; }
.dashboard-title { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 24px; }

/* ── Stat Cards ───────────────────────────────────────────────────────────── */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-card-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.table-header h3 { font-size: 1rem; font-weight: 700; color: var(--primary); }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--bg); padding: 12px 16px; text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.car-row-img { width: 60px; height: 44px; border-radius: 6px; object-fit: cover; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dbeafe; color: #1e40af; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-completed { background: #e9d5ff; color: #6b21a8; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--border); }
.modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; color: var(--primary); }

/* ── Toast ────────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--success);
}
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #f7fafc 50%, #e2e8f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Photo Upload ─────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.upload-area:hover { border-color: var(--accent); background: rgba(255,107,53,0.03); }
.upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-area p { font-size: 0.85rem; color: var(--text-muted); }
.preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.preview-item { position: relative; width: 80px; height: 60px; border-radius: 8px; overflow: hidden; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Insurance Badge ──────────────────────────────────────────────────────── */
.insurance-badge { display: inline-flex; align-items: center; gap: 6px; background: #d1fae5; color: #065f46; padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 2rem 24px;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: 1200px; margin: 0 auto 40px; }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: 0.85rem; line-height: 1.7; max-width: 260px; }
footer h4 { color: #fff; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
footer a { display: block; font-size: 0.85rem; margin-bottom: 8px; transition: color 0.2s; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; max-width: 1200px; margin: 0 auto; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .car-detail-grid { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 8px; padding: 16px; overflow-x: auto; }
  .sidebar-title { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; height: auto; padding: 10px 1rem; gap: 8px; }
  .navbar-links { width: 100%; justify-content: center; flex-wrap: wrap; gap: 6px; }
  .navbar-links > a { font-size: 0.8rem; padding: 6px 10px; }
  #nav-dynamic { width: 100%; display: flex; justify-content: center; }
  .user-menu { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .user-menu .user-name { font-size: 0.8rem; }
  .search-box { flex-direction: column; padding: 16px; }
  .search-field { min-width: 100%; flex: none; }
  .search-box .btn { width: 100%; justify-content: center; }
  .lang-switcher { margin-left: 0; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-content { padding: 20px 16px; }
  .search-box { padding: 14px; gap: 10px; }
  .navbar { padding: 8px 12px; }
  .navbar-brand { font-size: 1.2rem; }
  .navbar-brand svg { width: 28px; height: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 16px; flex-wrap: wrap; padding: 16px; }
  .stat-item { min-width: 80px; }
  .cars-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .section { padding: 30px 0; }
  .container { padding: 0 12px; }
  .modal-box { padding: 20px; max-width: 95%; }
  .admin-form .form-row { flex-direction: column; gap: 0; }
  .table-card { overflow-x: auto; }
  .action-btns { flex-direction: column; gap: 4px; }
  .action-btns .btn { font-size: 0.75rem; padding: 4px 8px; }
}
.hidden { display: none !important; }

/* ── Language Switcher ────────────────────────────────────────────────────── */
.lang-switcher {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px; padding: 3px; margin-left: 8px;
}
.lang-btn {
  background: transparent; border: none;
  color: rgba(255,255,255,0.7);
  padding: 4px 9px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}
.lang-btn:hover { color: #fff; background: rgba(255,255,255,0.15); }
.lang-btn.active { background: var(--accent); color: #fff; }

/* ── Arabic (RTL) overrides ───────────────────────────────────────────────── */
[dir="rtl"] body { font-family: 'Poppins', 'Segoe UI', Tahoma, Arial, sans-serif; }

[dir="rtl"] .navbar { flex-direction: row-reverse; }
[dir="rtl"] .navbar-links { flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 8px; }

[dir="rtl"] .hero { direction: rtl; }
[dir="rtl"] .search-box { direction: rtl; }

[dir="rtl"] .car-card-location { flex-direction: row-reverse; }
[dir="rtl"] .car-specs { flex-direction: row-reverse; }
[dir="rtl"] .car-card-footer { flex-direction: row-reverse; }
[dir="rtl"] .car-spec { flex-direction: row-reverse; }

[dir="rtl"] .car-detail-grid { direction: rtl; }
[dir="rtl"] .car-meta-grid { direction: rtl; }
[dir="rtl"] .price-row { flex-direction: row-reverse; }

[dir="rtl"] .dashboard-layout { direction: rtl; }
[dir="rtl"] .sidebar { direction: rtl; }
[dir="rtl"] .sidebar-link { flex-direction: row-reverse; }

[dir="rtl"] .stats-cards { direction: rtl; }
[dir="rtl"] .stat-card { flex-direction: row-reverse; }

[dir="rtl"] .table-header { flex-direction: row-reverse; }
[dir="rtl"] table { direction: rtl; }
[dir="rtl"] thead th { text-align: right; }
[dir="rtl"] tbody td { text-align: right; }

[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .step-card { direction: rtl; }
[dir="rtl"] .steps-grid { direction: rtl; }

[dir="rtl"] .auth-tabs { flex-direction: row-reverse; }
[dir="rtl"] .role-selector { flex-direction: row-reverse; }
[dir="rtl"] .auth-body { direction: rtl; }

[dir="rtl"] .booking-card { direction: rtl; }
[dir="rtl"] .modal-box { direction: rtl; }
[dir="rtl"] .modal-close { left: 16px; right: auto; }
[dir="rtl"] .user-menu { flex-direction: row-reverse; }

[dir="rtl"] .gallery-thumbs { flex-direction: row-reverse; }
[dir="rtl"] .preview-grid { direction: rtl; }

[dir="rtl"] .insurance-badge { flex-direction: row-reverse; }
[dir="rtl"] .toast { flex-direction: row-reverse; }
[dir="rtl"] #toast-container { right: auto; left: 20px; }

[dir="rtl"] .btn { flex-direction: row-reverse; }
[dir="rtl"] .search-field label { text-align: right; }
[dir="rtl"] .form-group label { text-align: right; }
[dir="rtl"] .form-hint { text-align: right; }

@media (max-width: 900px) {
  [dir="rtl"] .sidebar { flex-direction: row-reverse; }
}

/* ── Chat Bubbles ────────────────────────────────────────────────────────── */
.chat-messages { max-height:400px;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--bg);border-radius:var(--radius);margin-bottom:16px; }
.chat-bubble { max-width:75%;padding:10px 14px;border-radius:14px;font-size:0.88rem;line-height:1.5;position:relative; }
.chat-bubble.sent { background:var(--accent);color:#fff;align-self:flex-end;border-bottom-right-radius:4px; }
.chat-bubble.received { background:var(--card);color:var(--text);align-self:flex-start;border-bottom-left-radius:4px;box-shadow:var(--shadow); }
.chat-bubble .chat-time { font-size:0.7rem;opacity:0.7;margin-top:4px;display:block; }
.chat-bubble .chat-sender { font-size:0.72rem;font-weight:600;margin-bottom:2px;opacity:0.85; }
.chat-input-row { display:flex;gap:8px; }
.chat-input-row input { flex:1; }

/* ── Rating Stars ────────────────────────────────────────────────────────── */
.stars { display:inline-flex;gap:2px; }
.stars .star { font-size:1.2rem;cursor:pointer;color:#e2e8f0;transition:color .15s; }
.stars .star.filled { color:#f59e0b; }
.stars .star:hover { color:#f59e0b; }
.star-display { color:#f59e0b;font-size:0.9rem; }
.rating-summary { display:flex;align-items:center;gap:8px;font-size:0.9rem; }
.rating-summary .avg { font-weight:700;font-size:1.1rem;color:var(--primary); }
.rating-summary .count { color:var(--text-muted);font-size:0.82rem; }

/* ── Notification Badge ──────────────────────────────────────────────────── */
.notif-badge { display:inline-flex;align-items:center;justify-content:center;background:var(--danger);color:#fff;font-size:0.65rem;font-weight:700;min-width:18px;height:18px;border-radius:9px;padding:0 5px;margin-left:6px; }

/* ── Wishlist Heart ──────────────────────────────────────────────────────── */
.wishlist-btn { background:none;border:2px solid var(--border);border-radius:50%;width:40px;height:40px;cursor:pointer;font-size:1.2rem;display:flex;align-items:center;justify-content:center;transition:all .2s; }
.wishlist-btn:hover { border-color:var(--danger);background:rgba(229,62,62,0.05); }
.wishlist-btn.active { border-color:var(--danger);background:var(--danger);color:#fff; }

/* ── Confirmed Badge ────────────────────────────────────────────────────── */
.badge-confirmed { background:#c4b5fd;color:#5b21b6; }

/* ── Discount Badge ─────────────────────────────────────────────────────── */
.discount-badge { display:inline-block;background:#fef3c7;color:#92400e;padding:4px 10px;border-radius:20px;font-size:0.75rem;font-weight:600;margin:2px; }

/* ── Busy Date Tag ──────────────────────────────────────────────────────── */
.busy-tag { display:inline-flex;align-items:center;gap:6px;background:#fee2e2;color:#991b1b;padding:4px 12px;border-radius:20px;font-size:0.78rem;font-weight:600;margin:3px; }
.busy-tag button { background:none;border:none;color:#991b1b;cursor:pointer;font-size:1rem;padding:0;line-height:1; }

/* ── Owner Earnings Card ─────────────────────────────────────────────────── */
.earnings-card { background:linear-gradient(135deg,#065f46,#059669);color:#fff;border-radius:var(--radius);padding:24px;margin-bottom:24px; }
.earnings-card .amount { font-size:2rem;font-weight:800; }
.earnings-card .label { font-size:0.85rem;opacity:.8; }
