/* =============================================================
   Nashaad Car Rental & Motors — Custom CSS
   Brand: Blue #0033FF | Orange #D67D00 | White dominant
   ============================================================= */

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

:root {
  --blue:      #0033FF;
  --blue-dark: #0026CC;
  --blue-light:#E8EEFF;
  --orange:    #D67D00;
  --orange-light: #FFF4E0;
  --white:     #FFFFFF;
  --bg:        #F7F8FA;
  --text:      #111827;
  --text-muted:#6B7280;
  --border:    #E5E7EB;
  --radius:    0.75rem;
  --shadow:    0 1px 3px 0 rgba(0,0,0,.10), 0 1px 2px -1px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.06);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; color: inherit; }
p { color: inherit; }

/* Pure white headings & text in blue and dark containers */
.hero, .hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6,
.bg-brand h1, .bg-brand h2, .bg-brand h3, .bg-brand h4, .bg-brand h5, .bg-brand h6,
.page-banner h1, .page-banner h2, .page-banner h3,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
  color: #FFFFFF !important;
}
.hero h1 span.text-orange, .bg-brand span.text-orange, .text-white span.text-orange, span.text-orange {
  color: var(--orange) !important;
}

/* ── Brand Buttons ─────────────────────────────────────────── */
.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-primary:hover  { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.62rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--blue-light); }

.btn-orange {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-orange:hover { background: #b86a00; transform: translateY(-1px); }

.btn-white {
  background: #fff;
  color: var(--blue);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-white:hover { background: var(--blue-light); }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* ── Vehicle Card ──────────────────────────────────────────── */
.vehicle-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.vehicle-card .vehicle-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg);
}
.vehicle-card .vehicle-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--blue-light), #EEF2FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--blue);
  opacity: 0.4;
}
.vehicle-card .card-body { padding: 1.25rem; }
.vehicle-card .price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
}
.vehicle-card .price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Availability Badge ────────────────────────────────────── */
.badge-available   { background:#D1FAE5; color:#065F46; }
.badge-rented      { background:#DBEAFE; color:#1E40AF; }
.badge-reserved    { background:#FEF3C7; color:#92400E; }
.badge-maintenance { background:#FFEDD5; color:#9A3412; }
.badge-unavailable { background:#F3F4F6; color:#374151; }
.badge-sold        { background:#F3F4F6; color:#374151; }

.availability-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Section Headings ──────────────────────────────────────── */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.65rem 0.875rem;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,51,255,.12);
}
.form-control::placeholder { color: #9CA3AF; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1.25em; padding-right: 2.5rem; }
.form-error { font-size: 0.8rem; color: #DC2626; margin-top: 0.25rem; }

/* ── Alert ─────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}
.alert-success { background: #D1FAE5; color: #065F46; border-color: #10B981; }
.alert-error   { background: #FEE2E2; color: #991B1B; border-color: #EF4444; }
.alert-warning { background: #FEF3C7; color: #92400E; border-color: #F59E0B; }
.alert-info    { background: var(--blue-light); color: var(--blue-dark); border-color: var(--blue); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Admin Sidebar ─────────────────────────────────────────── */
.admin-sidebar {
  width: 260px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.admin-sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #D1D5DB transparent;
}
.admin-sidebar nav::-webkit-scrollbar {
  width: 5px;
}
.admin-sidebar nav::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}
.admin-sidebar nav::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}
.admin-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  margin: 0.1rem 0;
}
.admin-sidebar .nav-link:hover { background: var(--bg); color: var(--text); }
.admin-sidebar .nav-link.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}
.admin-sidebar .nav-link.active i { color: var(--blue); }
.admin-sidebar .nav-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 1rem 0.25rem;
}

.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--bg);
  transition: margin-left 0.3s;
}

.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-content {
  padding: 2rem 1.5rem;
}

/* ── KPI Cards ─────────────────────────────────────────────── */
.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow 0.2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.kpi-icon.blue   { background: var(--blue-light); color: var(--blue); }
.kpi-icon.orange { background: var(--orange-light); color: var(--orange); }
.kpi-icon.green  { background: #D1FAE5; color: #059669; }
.kpi-icon.red    { background: #FEE2E2; color: #DC2626; }
.kpi-icon.purple { background: #EDE9FE; color: #7C3AED; }
.kpi-value  { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-label  { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.kpi-trend  { font-size: 0.75rem; font-weight: 600; margin-top: 0.4rem; }
.kpi-trend.up   { color: #059669; }
.kpi-trend.down { color: #DC2626; }

/* ── Public Nav ────────────────────────────────────────────── */
.nav-public {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  height: 70px;
  display: flex;
  align-items: center;
}
.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-brand span { color: var(--orange); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0026CC 0%, #0033FF 50%, #0044FF 100%);
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}
.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='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Booking Card ──────────────────────────────────────────── */
.booking-card {
  background: var(--white);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
}

/* ── Feature Specs ─────────────────────────────────────────── */
.spec-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.spec-item i { color: var(--blue); width: 16px; }

/* ── Loyalty Level Colors ──────────────────────────────────── */
.level-bronze { color: #CD7F32; }
.level-silver { color: #9CA3AF; }
.level-gold   { color: var(--orange); }
.level-vip    { color: var(--blue); }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-bar-wrap { background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 99px; background: var(--blue); transition: width 0.5s ease; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.5s ease both; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.pulse-dot { animation: pulse-dot 1.5s infinite; }

/* ── Skeleton Loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Mobile overlay ────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 39;
}
.sidebar-overlay.active { display: block; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

@media (max-width: 768px) {
  .section-title { font-size: 1.5rem; }
  .hero { min-height: 70vh; }
  .kpi-value { font-size: 1.4rem; }
  .admin-content { padding: 1rem; }
}

/* ── WhatsApp Button ───────────────────────────────────────── */
.whatsapp-btn {
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.875rem;
}
.whatsapp-btn:hover { background: #1ebe5a; transform: translateY(-1px); }

/* ── Rental Calendar ───────────────────────────────────────── */
.calendar-grid {
  display: grid;
  gap: 0;
  overflow-x: auto;
}
.calendar-cell {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  min-height: 36px;
  font-size: 0.75rem;
  min-width: 36px;
}
.calendar-cell.rented     { background: #DBEAFE; }
.calendar-cell.reserved   { background: #FEF3C7; }
.calendar-cell.maintenance{ background: #FFEDD5; }
.calendar-cell.available  { background: #D1FAE5; }

/* ── GPS / Tracking ────────────────────────────────────────── */
.gps-map-placeholder {
  background: linear-gradient(135deg, #EEF2FF, var(--blue-light));
  border: 2px dashed var(--blue);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: var(--blue);
}

/* ── Notification dot ──────────────────────────────────────── */
.notif-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid white;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .admin-sidebar, .admin-topbar, .btn-primary, .btn-secondary,
  nav, footer, .no-print { display: none !important; }
  .admin-main { margin-left: 0 !important; }
  body { background: white; }
}

/* ── Searchable Select Component ───────────────────────────── */
.searchable-select-wrap {
  position: relative;
  width: 100%;
}
.searchable-select-native {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none !important;
}
.searchable-select-trigger {
  background-image: none !important;
  min-height: 42px;
  padding: 0.58rem 0.875rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.15s;
}
.searchable-select-trigger:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.12);
}
.searchable-select-dropdown {
  animation: searchSelectSlideDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
}
@keyframes searchSelectSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.searchable-select-list::-webkit-scrollbar {
  width: 5px;
}
.searchable-select-list::-webkit-scrollbar-thumb {
  background-color: #E2E8F0;
  border-radius: 9999px;
}
.searchable-select-list::-webkit-scrollbar-thumb:hover {
  background-color: #CBD5E1;
}

