/* ============================================================
   CloudNet Cab – Global App Styles v2.0
   ============================================================ */

:root {
  --primary:   #1a56db;
  --primary-d: #1e429f;
  --accent:    #f59e0b;
  --success:   #10b981;
  --danger:    #ef4444;
  --bg:        #f1f5fb;
  --card-bg:   #ffffff;
  --text:      #1f2937;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --radius:    16px;
  --shadow:    0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---- Cards ---- */
.cab-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  overflow: hidden;
}

/* ---- Buttons ---- */
.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: all .2s;
}
.btn:active { transform: scale(.97); }

.btn-primary   { background: var(--primary); border: none; }
.btn-primary:hover { background: var(--primary-d); }
.btn-accent    { background: var(--accent); color: #fff; border: none; }
.btn-success   { background: var(--success); border: none; }
.btn-full      { width: 100%; padding: 14px; font-size: 16px; }

/* ---- Inputs ---- */
.form-control, .form-select {
  border-radius: 12px;
  min-height: 50px;
  border: 1.5px solid var(--border);
  padding: 10px 16px;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
  outline: none;
}
.form-label { font-weight: 600; color: var(--text); margin-bottom: 6px; font-size: 14px; }

/* ---- Gradient Banners ---- */
.hero-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
}
.hero-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
}
.hero-dark {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
}

/* ---- Stat Cards ---- */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-card .stat-icon  { font-size: 28px; margin-bottom: 8px; }

/* ---- Quick Action Tiles ---- */
.action-tile {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all .25s;
  color: var(--text);
}
.action-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}
.action-tile .tile-icon { font-size: 34px; margin-bottom: 10px; }
.action-tile .tile-label { font-weight: 700; font-size: 14px; }

/* ---- Booking Card ---- */
.booking-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.booking-item.status-completed { border-left-color: var(--success); }
.booking-item.status-cancelled { border-left-color: var(--danger); }
.booking-item.status-ongoing   { border-left-color: var(--accent); }

/* ---- Navbar (Customer/Driver) ---- */
.top-nav {
  background: var(--primary);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.top-nav .brand { color: #fff; font-weight: 700; font-size: 20px; text-decoration: none; }
.top-nav .nav-actions a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 13px; margin-left: 14px; }

/* ---- Bottom Nav (Mobile) ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: color .2s;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bottom-nav a i { font-size: 20px; margin-bottom: 2px; }

/* ---- Page wrapper with bottom nav ---- */
.page-wrapper { padding-bottom: 80px; }

/* ---- Badges ---- */
.status-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- Alert Styles ---- */
.alert { border-radius: 12px; font-size: 14px; }

/* ---- Map ---- */
#map { height: 400px; border-radius: var(--radius); }

/* ---- Admin Sidebar ---- */
.admin-sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  overflow-y: auto;
  z-index: 1000;
  transition: transform .3s;
}
.admin-sidebar .sidebar-logo {
  padding: 22px 20px 18px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.07);
  color: #fff;
  padding-left: 26px;
}
.admin-sidebar a i { width: 18px; text-align: center; }

.admin-content {
  margin-left: 240px;
  padding: 28px;
  min-height: 100vh;
}
.admin-topbar {
  background: #fff;
  padding: 14px 28px;
  margin-left: 240px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 240px;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content, .admin-topbar { margin-left: 0; }
  .admin-topbar { padding: 12px 16px; }
  .admin-content { padding: 16px; }
}

/* ---- Loader ---- */
.spinner-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}

/* ---- Trip Progress Steps ---- */
.trip-steps { list-style: none; padding: 0; }
.trip-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.trip-steps li:last-child { border-bottom: none; }
.trip-steps .step-icon { font-size: 20px; width: 32px; text-align: center; }
.trip-steps .step-done { color: var(--success); }
.trip-steps .step-pending { color: #d1d5db; }

/* ---- Fare Box ---- */
.fare-box {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.fare-box .fare-amount { font-size: 36px; font-weight: 800; }
.fare-box .fare-label  { font-size: 13px; opacity: .85; }

/* ---- Driver Card ---- */
.driver-info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.driver-avatar {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 26px;
  flex-shrink: 0;
}

/* ---- WhatsApp / Call FABs ---- */
.fab-group {
  position: fixed;
  bottom: 90px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 800;
}
.fab {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s;
}
.fab:hover { transform: scale(1.1); color: #fff; }
.fab-wa   { background: #25d366; }
.fab-call { background: var(--primary); }

/* With bottom-nav, shift FABs up */
.has-bottom-nav .fab-group { bottom: 85px; }

/* ---- Utility ---- */
.text-primary-custom { color: var(--primary); }
.rounded-xl { border-radius: var(--radius); }
.shadow-cab { box-shadow: var(--shadow); }
.fw-700 { font-weight: 700; }
.fs-13 { font-size: 13px; }
.gap-8 { gap: 8px; }
