/* ==========================================================================
   TAXI PLUS ENTERPRISE - LUXURY DESIGN SYSTEM & FRAMEWORK
   Architected & Handcrafted by AbuD Design & Programming - Eng. Abdulqader Al-Ansi
   ========================================================================== */

:root {
  --bg-main: #070a13;
  --bg-surface-1: #0d1527;
  --bg-surface-2: #141f36;
  --bg-surface-3: #1c2b4a;
  --bg-glass: rgba(13, 21, 39, 0.85);
  --bg-glass-card: rgba(20, 31, 54, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(245, 158, 11, 0.35);

  --brand-gold: #f59e0b;
  --brand-gold-light: #fbbf24;
  --brand-gold-dark: #d97706;
  --brand-gold-glow: rgba(245, 158, 11, 0.25);
  --brand-orange: #ea580c;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);
  --accent-purple: #8b5cf6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverted: #070a13;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 30px rgba(245, 158, 11, 0.3);

  --font-sans: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell, sans-serif;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #f1f5f9;
  --bg-surface-3: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-card: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(245, 158, 11, 0.5);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 8px 30px rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Typography & Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 800; }
h4 { font-size: 1.35rem; font-weight: 700; }
h5 { font-size: 1.15rem; font-weight: 700; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

strong, b {
  color: var(--text-primary);
  font-weight: 700;
}

/* Text Highlights & Gradients */
.text-gold { color: var(--brand-gold) !important; }
.text-gold-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-emerald { color: var(--accent-emerald) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-rose { color: var(--accent-rose) !important; }
.text-indigo { color: var(--accent-indigo) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white { color: #ffffff !important; }

/* ==========================================================================
   Layout & Grid System (Robust Self-Contained Grid)
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-fluid {
  width: 100%;
  padding-left: 28px;
  padding-right: 28px;
}

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 16px; }
}

/* Flexbox Helpers */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-1 { gap: 6px !important; }
.gap-2 { gap: 12px !important; }
.gap-3 { gap: 20px !important; }
.gap-4 { gap: 32px !important; }
.flex-grow-1 { flex-grow: 1 !important; }

/* Bootstrap-compatible Grid Rows & Cols */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
  margin-right: -12px;
  gap: 20px 0;
}
.col, [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
  width: 100%;
}
.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333333%; }
.col-3 { width: 25%; }
.col-8 { width: 66.666667%; }

@media (min-width: 768px) {
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333333%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.666667%; }
}
@media (min-width: 1024px) {
  .col-lg-3 { width: 25%; }
  .col-lg-4 { width: 33.333333%; }
  .col-lg-6 { width: 50%; }
  .col-lg-8 { width: 66.666667%; }
  .col-lg-9 { width: 75%; }
}
@media (min-width: 1280px) {
  .col-xl-3 { width: 25%; }
  .col-xl-4 { width: 33.333333%; }
}

/* Spacers */
.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 36px; padding-bottom: 36px; }
.py-5 { padding-top: 60px; padding-bottom: 60px; }

.px-2 { padding-left: 12px; padding-right: 12px; }
.px-3 { padding-left: 20px; padding-right: 20px; }
.px-4 { padding-left: 32px; padding-right: 32px; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-2 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 20px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mb-5 { margin-bottom: 48px !important; }
.mt-auto { margin-top: auto !important; }
.text-center { text-align: center !important; }
.w-100 { width: 100% !important; }

/* ==========================================================================
   Luxury Cards & Glassmorphism
   ========================================================================== */
.luxury-card, .card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.luxury-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-glass-hover), transparent);
  opacity: 0;
  transition: var(--transition);
}

.luxury-card:hover, .card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.luxury-card:hover::before {
  opacity: 1;
}

.luxury-card-glow {
  background: linear-gradient(145deg, rgba(20, 31, 54, 0.9), rgba(13, 21, 39, 0.95));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
}
.luxury-card-glow:hover {
  border-color: var(--brand-gold);
  box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}

.btn-brand, .btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #070a13 !important;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}
.btn-brand:hover, .btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-outline-gold {
  background: rgba(245, 158, 11, 0.08);
  color: var(--brand-gold) !important;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-outline-gold:hover {
  background: var(--brand-gold);
  color: #070a13 !important;
  border-color: var(--brand-gold);
  transform: translateY(-2px);
}

.btn-portal, .btn-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc !important;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.btn-portal:hover, .btn-indigo:hover {
  background: #6366f1;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.btn-emerald:hover {
  background: #10b981;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger, .btn-rose {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af !important;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.btn-danger:hover, .btn-rose:hover {
  background: #f43f5e;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   Badges & Indicators
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-emerald, .badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan, .badge-info {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-rose, .badge-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-indigo, .badge-primary {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 14px 0;
  transition: var(--transition);
}

.brand-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.nav-item-link:hover, .nav-item-link.active {
  color: var(--brand-gold);
  background: rgba(245, 158, 11, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.theme-btn:hover {
  color: var(--brand-gold);
  border-color: var(--brand-gold);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--brand-gold);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .nav-menu.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface-1);
    border-bottom: 1px solid var(--border-glass);
    padding: 20px;
    gap: 10px;
    box-shadow: var(--shadow-lg);
  }
}

/* ==========================================================================
   Stat Cards (Cockpit KPI Widgets)
   ========================================================================== */
.stat-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 8px;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.stat-sub {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.form-control {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--brand-gold);
  background: var(--bg-surface-3);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}
.form-control::placeholder {
  color: var(--text-muted);
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.luxury-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}
.luxury-table th {
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}
.luxury-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-primary);
  vertical-align: middle;
}
.luxury-table tr:hover td {
  background: rgba(245, 158, 11, 0.03);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #04070e;
  border-top: 1px solid var(--border-glass);
  padding: 50px 0 25px;
}
