/* =========================================================
   ===== GLOBAL LAYOUT SYSTEM (HEADER.PHP) =====
   ========================================================= */

:root {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg-main: #0f172a;
  --bg-card: #020617;
  --border: rgba(255,255,255,0.08);
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg-main);
  color: #e5e7eb;
  line-height: 1.5;
}

/* APP LAYOUT */
.app {
  display: flex;
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR (PREMIUM REFINED)
========================================================= */

.sidebar {
  width: 280px;
  background:
    radial-gradient(circle at 20% 0%, rgba(236,72,153,0.12), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(2,6,23,0.99) 100%);
  border-right: 1px solid rgba(148,163,184,0.14);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.03),
    16px 0 42px rgba(0,0,0,0.18);
}

/* BRAND */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 16px 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
}

.sidebar-brand .logo {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  padding: 0;
  background: #ffffff;
  object-fit: cover;
  display: block;
  box-shadow:
    0 16px 34px rgba(0,0,0,0.34),
    0 0 0 1px rgba(255,255,255,0.12);
}

.sidebar-brand span {
  font-size: 21px;
  font-weight: 850;
  color: #f8fafc;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

/* NAV */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 16px;
  color: #aeb7c7;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.sidebar-nav a::before {
  width: 22px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  opacity: .9;
}

.sidebar-nav a:nth-child(1)::before { content: "▣"; }
.sidebar-nav a:nth-child(2)::before { content: "◈"; }
.sidebar-nav a:nth-child(3)::before { content: "●"; }
.sidebar-nav a:nth-child(4)::before { content: "◆"; }
.sidebar-nav a:nth-child(5)::before { content: "◇"; }
.sidebar-nav a:nth-child(6)::before { content: "⌖"; }
.sidebar-nav a:nth-child(7)::before { content: "↗"; }
.sidebar-nav a:nth-child(8)::before { content: "⚙"; }

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.055);
  color: #ffffff;
  border-color: rgba(148,163,184,0.14);
  transform: translateX(3px);
}

.sidebar-nav a.active {
  color: #ff5aa5;
  font-weight: 850;
  background:
    linear-gradient(90deg, rgba(236,72,153,0.22), rgba(236,72,153,0.08) 52%, rgba(14,165,233,0.05));
  border-color: rgba(236,72,153,0.30);
  box-shadow:
    inset 3px 0 0 #ec4899,
    0 12px 28px rgba(236,72,153,0.08);
}

.sidebar-nav a.active::before {
  color: #f472b6;
  opacity: 1;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
  margin-top: 24px;
  padding: 18px 16px 0;
  border-top: 1px solid rgba(148,163,184,0.13);
}

.user-info {
  font-size: 13.5px;
  color: #aeb7c7;
  margin-bottom: 12px;
  word-break: break-all;
  font-weight: 650;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(239,68,68,0.18), rgba(236,72,153,0.13));
  color: #fee2e2;
  text-decoration: none;
  font-weight: 820;
  border: 1px solid rgba(248,113,113,0.18);
  transition: .18s ease;
}

.logout-btn:hover {
  background:
    linear-gradient(135deg, rgba(239,68,68,0.26), rgba(236,72,153,0.18));
  transform: translateY(-1px);
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.main {
  flex: 1;
  padding: 28px 32px;
  background: var(--bg-main);
  overflow-x: auto;
}

/* CONTENT WRAPPER */
.main > * {
  max-width: 1400px;
  margin: 0 auto;
}

/* PAGE TITLE */
.main h1,
.main h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.main h1 {
  font-size: 28px;
}

.main h2 {
  font-size: 22px;
}
/* =========================
   SIDEBAR FOOTER
========================= */

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 10px;
  word-break: break-all;
}

.logout-btn {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(239,68,68,0.15);
  color: #fecaca;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.logout-btn:hover {
  background: rgba(239,68,68,0.25);
}
/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .sidebar {
    width: 220px;
    padding: 20px 12px;
  }

  .sidebar-nav a {
    padding: 10px 12px;
    font-size: 13px;
  }

  .main {
    padding: 20px;
  }

  .main h1 {
    font-size: 24px;
  }

  .main h2 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 16px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav a {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }

  .main {
    padding: 20px 16px;
  }
}

/* =========================================================
   ===== BOOKINGS FINAL POLISH =====
   ========================================================= */

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

/* KPI CARD - PREMIUM GRADIENT */
.kpi-card {
  background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #030712 100%);
  padding: 20px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--success), var(--primary), var(--success));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--success), 0.3);
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.5);
}

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

.kpi-label {
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--success);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 12px;
  color: #6b7280;
}

/* DASHBOARD CONTAINER */
.dashboard {
  max-width: 1400px;
}

/* TABLE WRAPPER */
.table-wrapper {
  background: rgba(2, 6, 23, 0.6);
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
  margin-top: 20px;
}

/* TABLE CARD */
.table-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* HEADER */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.table-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #f3f4f6;
}

/* CLICKABLE BOOKING ID */
.booking-link {
  color: var(--primary-light);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.booking-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}
/* =========================================================
   LOGIN PAGE
========================================================= */

.login-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(17,24,39,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  color: #e5e7eb;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.login-card .muted {
  color: #94a3b8;
  margin-bottom: 18px;
}

.login-card label {
  display: block;
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0b1220;
  color: #fff;
}

.login-card input:focus {
  border-color: #2563eb;
  outline: none;
}

.login-card button {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.login-error {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(239,68,68,0.15);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,0.4);
}
/* =========================================================
   ===== DRIVERS PAGE FIX =====
   ========================================================= */
#addDriverForm {
  opacity: 1;
  transition: all 0.25s ease;
}

#addDriverForm.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}
/* FORM BOX */
.form-box {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 60%, var(--bg-card) 100%);
  border-radius: 20px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
/* =========================================================
   ===== PREMIUM FORM INPUTS (DRIVER PAGE FIX) =====
   ========================================================= */

/* GRID IMPROVEMENT */
.form-grid {
  gap: 20px 24px;
}

/* FIELD WRAPPER (each input box) */
.form-grid > div {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  transition: all 0.25s ease;
  position: relative;
}

/* HOVER EFFECT */
.form-grid > div:hover {
  border-color: rgba(var(--primary), 0.25);
  background: linear-gradient(135deg, var(--bg-card) 0%, #111827 100%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* LABEL */
.form-grid label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.6px;
}

/* INPUT FIELD */
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #f9fafb;
  font-weight: 500;
  padding: 4px 0;
}

/* PLACEHOLDER */
.form-grid input::placeholder {
  color: #4b5563;
}

/* FOCUS EFFECT (🔥 KEY PART) */
.form-grid > div:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 2px rgba(var(--primary), 0.15),
    0 10px 25px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

/* ACTIVE GLOW LINE */
.form-grid > div::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.form-grid > div:focus-within::after {
  opacity: 1;
}
/* FORM ACTIONS */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* ========================================
   DASHBOARD PREMIUM UI (INDEX)
======================================== */
/* MAIN DASHBOARD CONTAINER */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =========================
   TOP GRID (MAP + SIDE)
========================= */
.top-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

/* =========================
   MAP CARD - PREMIUM
========================= */
.map-card {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.map-card:hover {
  border-color: rgba(var(--success), 0.2);
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
}

.map-header h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #ffffff;
}

/* MAP AREA */
#liveDriversMap {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

/* =========================
   SIDE PANEL
========================= */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* PANEL CARD - PREMIUM */
.panel-card {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.panel-card:hover {
  border-color: rgba(var(--primary), 0.2);
}

.panel-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================
   LIVE RIDES
========================= */
.ride-item {
  background: rgba(2, 6, 23, 0.5);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  border-left: 3px solid var(--success);
  transition: all 0.2s ease;
}

.ride-item:hover {
  background: rgba(var(--success), 0.1);
  transform: translateX(4px);
}

.ride-status {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* STATUS COLORS */
.ride-status.pending {
  color: var(--warning);
}

.ride-status.accepted {
  color: var(--success);
}

.ride-status.ontrip {
  color: var(--primary);
}

.ride-route {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.4;
}

/* =========================
   KPI GRID - UNIVERSAL PREMIUM COMPACT
========================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  min-height: 74px;
  background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(30,41,59,0.9));
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0,0,0,0.20);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label value"
    "sub value";
  align-items: center;
  column-gap: 14px;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96,165,250,0.35);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.kpi-card span,
.kpi-label {
  grid-area: label;
  display: block;
  font-size: 10px;
  line-height: 1.1;
  color: #94a3b8;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 800;
}

.kpi-card strong,
.kpi-value {
  grid-area: value;
  display: block;
  justify-self: end;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1;
  font-weight: 850;
  color: #f8fafc;
  word-break: normal;
  white-space: nowrap;
}

.kpi-sub {
  grid-area: sub;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  color: #94a3b8;
}

/* =========================
   DASHBOARD HOME: FULL MAP + HORIZONTAL ACTIVE RIDES
========================= */
.dashboard .top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.dashboard .map-card {
  width: 100%;
}

.dashboard #liveDriversMap {
  height: min(58vh, 560px);
  min-height: 420px;
}

.dashboard .side-panel {
  width: 100%;
}

.dashboard .panel-card {
  padding: 18px;
}

.dashboard .side-panel .panel-card {
  display: block;
}

.dashboard .ride-item {
  display: inline-flex;
  flex-direction: column;
  vertical-align: top;
  width: min(320px, 86vw);
  min-height: 112px;
  margin: 0 12px 12px 0;
  border-left: 0;
  border-top: 3px solid var(--success);
}

.dashboard .ride-item:hover {
  transform: translateY(-2px);
}

.dashboard .ride-route {
  font-size: 13px;
  line-height: 1.45;
}

/* =========================================
   RESPONSIVE SYSTEM (FINAL CLEAN)
========================================= */

/* TABLET */
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .dashboard #liveDriversMap {
    height: 440px;
    min-height: 380px;
  }
}

/* MOBILE */
@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi-card {
    min-height: 72px;
    padding: 11px 10px;
    border-radius: 15px;
    column-gap: 10px;
  }

  .kpi-card span,
  .kpi-label {
    font-size: 10px;
    letter-spacing: 1.2px;
  }

  .kpi-card strong,
  .kpi-value {
    font-size: 20px;
  }

  .dashboard #liveDriversMap {
    height: 360px;
    min-height: 320px;
  }

  .dashboard .ride-item {
    width: 100%;
    margin-right: 0;
  }
}

/* VERY SMALL DEVICES */
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   ===== TABLE.PHP CSS START (BOOKINGS TABLE PREMIUM) =====
   ========================================================= */

/* TABLE WRAPPER - PREMIUM */
.table-bookings {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
}

/* HEADER */
.table-bookings thead {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.table-bookings th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ROWS */
.table-bookings tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.table-bookings tbody tr:hover {
  background: rgba(var(--success), 0.05);
  cursor: pointer;
}

/* CELLS */
.table-bookings td {
  padding: 16px 20px;
  color: #e5e7eb;
  vertical-align: middle;
}

/* ID COLUMN */
.table-bookings td:first-child {
  font-weight: 700;
  color: var(--primary-light);
  font-family: monospace;
}

/* =========================================================
   BADGES (STATUS) - PREMIUM
========================================================= */
.badge {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* STATUS COLORS */
.badge.pending {
  background: rgba(var(--warning), 0.15);
  color: #fbbf24;
  border: 1px solid rgba(var(--warning), 0.3);
}

.badge.done {
  background: rgba(var(--success), 0.15);
  color: #4ade80;
  border: 1px solid rgba(var(--success), 0.3);
}

.badge.cancel {
  background: rgba(var(--danger), 0.15);
  color: #f87171;
  border: 1px solid rgba(var(--danger), 0.3);
}

.badge.unknown {
  background: rgba(107,114,128,0.2);
  color: #9ca3af;
  border: 1px solid rgba(107,114,128,0.2);
}

/* =========================================================
   ACTION BUTTONS - PREMIUM
========================================================= */

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* BASE BUTTON */
.btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* PRIMARY */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(var(--primary), 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary), 0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));
}

/* SUCCESS */
.btn-success {
  background: linear-gradient(135deg, var(--success), #16a34a);
  color: white;
  box-shadow: 0 2px 8px rgba(var(--success), 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--success), 0.4);
  background: linear-gradient(135deg, #16a34a, #15803d);
}

/* DANGER */
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(var(--danger), 0.3);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--danger), 0.4);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* WARNING */
.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: #111827;
  box-shadow: 0 2px 8px rgba(var(--warning), 0.3);
}

.btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--warning), 0.4);
}

/* SECONDARY */
.btn-secondary {
  background: rgba(55,65,81,0.8);
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .table-bookings {
    font-size: 13px;
  }

  .table-bookings td,
  .table-bookings th {
    padding: 12px 16px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* =========================================================
   ===== CUSTOMERS-TABLE.VIEW.PHP CSS START =====
   ========================================================= */

/* SUBTEXT */
.table-customers + .muted,
p.muted {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 13px;
}

/* WRAPPER SCROLL */
.table-customers {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
}

/* HEADER */
.table-customers thead {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.table-customers th {
  text-align: left;
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ROW */
.table-customers tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.table-customers tbody tr:hover {
  background: rgba(var(--primary), 0.05);
}

/* CELLS */
.table-customers td {
  padding: 16px 18px;
  color: #e5e7eb;
}

/* NAME */
.col-name {
  font-weight: 600;
  color: #f3f4f6;
}

/* PHONE */
.col-phone {
  color: var(--primary-light);
  font-weight: 500;
  font-family: monospace;
}

/* EMAIL */
.col-email {
  color: #9ca3af;
  font-size: 13px;
}

/* TOTAL BOOKINGS */
.col-total {
  font-weight: 700;
  color: var(--success);
  font-size: 15px;
}

/* LAST SEEN */
.col-last {
  color: #d1d5db;
  font-size: 13px;
}

/* =========================================================
   ===== DRIVERS-TABLE.VIEW.PHP CSS START =====
   ========================================================= */

/* TABLE */
.table-drivers {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
  font-size: 14px;
}

/* HEADER */
.table-drivers thead {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.table-drivers th {
  text-align: left;
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ROW */
.table-drivers tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.table-drivers tbody tr:hover {
  background: rgba(var(--success), 0.05);
}

/* CELLS */
.table-drivers td {
  padding: 16px 18px;
  color: #e5e7eb;
  vertical-align: middle;
}

/* ID */
.table-drivers td:first-child {
  font-weight: 700;
  color: var(--primary-light);
  font-family: monospace;
}

/* NAME */
.table-drivers td:nth-child(2) {
  font-weight: 600;
  color: #f3f4f6;
}

/* PHONE */
.table-drivers td:nth-child(3) {
  color: #93c5fd;
  font-weight: 500;
  font-family: monospace;
}

/* EMAIL */
.table-drivers td:nth-child(7) {
  color: #9ca3af;
  font-size: 13px;
}

/* SCHEDULED COLUMN */
.table-drivers td:nth-child(6) {
  font-weight: 600;
  color: #facc15;
}

/* BADGES EXTENSION */
.badge.info {
  background: rgba(var(--primary), 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(var(--primary), 0.3);
}

.badge.active {
  background: rgba(var(--success), 0.15);
  color: #4ade80;
  border: 1px solid rgba(var(--success), 0.3);
}

/* ACTION BUTTON GROUP */
.table-drivers .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* TEXT BUTTON */
.btn-text {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
}

.btn-text:hover {
  background: rgba(255,255,255,0.05);
  color: #e5e7eb;
  transform: translateY(-1px);
}

/* SMALLER BUTTONS */
.table-drivers .btn {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 8px;
}

/* DRIVER MODAL */
#driverDetailsModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#driverDetailsModal.hidden {
  display: none;
}

/* =========================================================
   ===== FINANCE-TABLE.VIEW.PHP CSS START =====
   ========================================================= */

/* SECTION TITLE */
.sub {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 8px;
}

/* TABLE - FINANCE */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
}

/* HEADER */
table thead {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

table th {
  text-align: left;
  padding: 16px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ROW */
table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

table tbody tr:hover {
  background: rgba(var(--success), 0.05);
}

/* CELLS */
table td {
  padding: 16px 18px;
  color: #e5e7eb;
  vertical-align: middle;
}

/* DATE */
table td:nth-child(1) {
  font-weight: 600;
  color: #93c5fd;
  font-family: monospace;
}

/* PLATFORM */
table td:nth-child(2) {
  font-weight: 600;
  color: #facc15;
}

/* DRIVER */
table td:nth-child(3) {
  color: #f3f4f6;
}

/* TRIPS */
table td:nth-child(4) {
  font-weight: 700;
  color: var(--primary-light);
}

/* GROSS */
table td:nth-child(5) {
  color: var(--success);
  font-weight: 700;
}

/* COMMISSION */
table td:nth-child(6) {
  color: var(--warning);
  font-weight: 600;
}

/* NET */
table td:nth-child(7) {
  color: #4ade80;
  font-weight: 800;
  font-size: 15px;
}

/* =========================================================
   ===== ACTION-MODAL.PHP CSS START (GLOBAL MODAL) =====
   ========================================================= */

/* BACKDROP */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

/* HIDDEN STATE */
.modal-backdrop.hidden {
  display: none;
}

/* CARD */
.modal-card {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(135deg, var(--bg-main) 0%, #030712 100%);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: scaleIn 0.25s ease;
  border: 1px solid var(--border);
}

/* HEADER */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--success), 0.05);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

/* CLOSE BUTTON */
.modal-close {
  background: rgba(255,255,255,0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(var(--danger), 0.2);
  color: #f87171;
  transform: scale(1.05);
}

/* BODY */
.modal-body {
  padding: 24px;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
}

/* FOOTER */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0,0,0,0.2);
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* MOBILE FRIENDLY */
@media (max-width: 600px) {
  .modal-card {
    width: 92%;
    border-radius: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* =========================================================
   ===== CUSTOMER-DETAILS.MODAL CSS START =====
   ========================================================= */

/* GRID LAYOUT */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

/* EACH FIELD BLOCK */
.form-grid > div {
  background: rgba(255,255,255,0.03);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.form-grid > div:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(var(--success), 0.2);
}

/* LABEL */
.form-grid label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* VALUE */
.form-grid div > div {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  word-break: break-word;
}

/* SPECIAL HIGHLIGHTS */
#cd-name {
  color: #ffffff;
  font-size: 16px;
}

#cd-phone {
  color: var(--primary-light);
}

#cd-email {
  color: #9ca3af;
  font-weight: 500;
}

#cd-total {
  color: var(--success);
  font-size: 16px;
  font-weight: 800;
}

#cd-id {
  color: #93c5fd;
  font-family: monospace;
}

#cd-created,
#cd-first,
#cd-last {
  color: #d1d5db;
  font-weight: 500;
}

/* MOBILE */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* =========================================================
   ===== DRIVER-DETAILS.MODAL CSS START =====
   ========================================================= */

/* PERFORMANCE BLOCK HIGHLIGHTS */
#dd-total {
  color: var(--primary-light);
  font-size: 18px;
  font-weight: 800;
}

#dd-completed {
  color: var(--success);
  font-size: 16px;
  font-weight: 800;
}

#dd-cancelled {
  color: #f87171;
  font-size: 16px;
  font-weight: 800;
}

#dd-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

#dd-phone {
  color: var(--primary-light);
  font-weight: 600;
  font-family: monospace;
}

#dd-email {
  color: #9ca3af;
  font-weight: 500;
}

#dd-vehicle {
  color: #facc15;
  font-weight: 600;
}

#dd-license {
  color: #d1d5db;
  font-weight: 500;
  font-family: monospace;
}

#dd-status {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

#dd-id {
  color: #93c5fd;
  font-weight: 600;
  font-family: monospace;
}

/* VISUAL GROUPING */
#driverDetailsModal .form-grid > div:nth-child(-n+4) {
  background: rgba(var(--success), 0.05);
  border-color: rgba(var(--success), 0.15);
}

/* =========================================================
   ===== DRIVER-EDIT.MODAL CSS START =====
   ========================================================= */

/* SECTION HEADINGS */
.modal-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* INPUT + TEXTAREA BASE */
.modal-body input,
.modal-body textarea,
.modal-body select {
  width: 100%;
  background: #030712;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #f9fafb;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* INPUT FOCUS */
.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(var(--success), 0.15);
}

/* LABEL */
.modal-body label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* GRID SPACING */
.modal-body .form-grid {
  margin-bottom: 16px;
}

/* TEXTAREA */
#drv_vehicle,
#drv_address {
  resize: vertical;
  min-height: 80px;
}

/* BUTTON POLISH */
.modal-footer .btn-primary {
  padding: 10px 20px;
  font-size: 13px;
}

.modal-footer .btn-secondary {
  padding: 10px 18px;
  font-size: 13px;
}

/* =========================================================
   ===== DRIVER-TRACK.MODAL CSS START =====
   ========================================================= */

/* META BAR */
.assign-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* CHIP */
.chip {
  background: rgba(var(--primary), 0.15);
  color: var(--primary-light);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(var(--primary), 0.3);
}

/* MAP CONTAINER */
#driverTrackMap {
  width: 100%;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  background: #030712 !important;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(var(--success), 0.1), inset 0 0 20px rgba(0,0,0,0.3);
  margin-bottom: 16px;
}

/* ETA INPUTS */
#etaPickup,
#etaDropoff {
  width: 100%;
  background: #030712;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: #f9fafb;
  text-align: center;
  font-weight: 600;
  font-family: monospace;
}

/* ETA COLORS */
#etaPickup {
  color: var(--primary-light);
}

#etaDropoff {
  color: var(--success);
}

/* META TEXT */
#driverTrackMeta {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
}

/* MAP LOADING EFFECT */
#driverTrackMap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  animation: shimmer 2s infinite;
  pointer-events: none;
  border-radius: 20px;
}

@keyframes shimmer {
  0% { opacity: 0.2; }
  50% { opacity: 0.5; }
  100% { opacity: 0.2; }
}

/* RESPONSIVE */
@media (max-width: 700px) {
  #driverTrackMap {
    height: 280px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ===== PREMIUM GRADIENT CARD (LIKE BOOKING UI) =====
   ========================================================= */
.gradient-hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 40%, #030712 100%);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

.gradient-hero:hover {
  border-color: rgba(var(--success), 0.3);
  transform: translateY(-2px);
}

/* =========================================================
   ===== UTILITY CLASSES =====
   ========================================================= */
.muted {
  color: #6b7280;
  font-size: 12px;
}

.empty {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 40px;
  background: rgba(0,0,0,0.2);
  border-radius: 16px;
}

/* SCROLLBAR STYLING */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--success);
}

/* =========================================================
   ===== END OF ALL STYLES =====
   ========================================================= */


/* =========================================================

   DRIVER TODAY BOOKING LINKS
========================================================= */

.driver-today-cell {
  line-height: 1.2;
}

.driver-booking-link {
  display: block;
  width: fit-content;
  color: #facc15;
  font-weight: 900;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 2px 0;
}

.driver-booking-link:hover {
  color: #fde68a;
  text-decoration: underline;
}

.table-bookings tr:target {
  outline: 2px solid rgba(236,72,153,0.75);
  outline-offset: -2px;
  background: rgba(236,72,153,0.10) !important;
}


/* =========================================================
   GLOBAL SCROLLABLE MODALS
   Works on desktop and mobile
========================================================= */

.modal-backdrop {
  padding: 24px;
  overflow-y: auto;
  align-items: flex-start !important;
}

.modal-card {
  margin: auto;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.modal-body {
  overflow-y: auto;
  min-height: 0;
}

.modal-header,
.modal-footer {
  flex: 0 0 auto;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

@media (max-width: 640px) {
  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
  }
}

/* =========================================================
   PREMIUM DRIVER EDIT MODAL
========================================================= */

#editDriverModal .driver-edit-card {
  max-width: 820px !important;
  width: min(820px, 94vw);
}

#editDriverModal .modal-header {
  padding: 22px 26px;
  background:
    radial-gradient(circle at top left, rgba(236,72,153,0.14), transparent 36%),
    linear-gradient(135deg, rgba(15,23,42,0.98), rgba(2,6,23,0.96));
}

#editDriverModal .modal-header h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

#editDriverModal .modal-body {
  padding: 24px 26px;
}

.driver-edit-section {
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15,23,42,0.70), rgba(30,41,59,0.38));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.driver-edit-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.driver-edit-section h4::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ec4899;
  box-shadow: 0 0 0 4px rgba(236,72,153,0.13);
}

.driver-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.driver-edit-wide {
  grid-column: span 2;
}

#editDriverModal label {
  margin-bottom: 7px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.25px;
}

#editDriverModal input,
#editDriverModal textarea {
  background: rgba(2,6,23,0.88);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 14px;
  min-height: 44px;
  padding: 12px 14px;
  color: #f8fafc;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

#editDriverModal textarea {
  min-height: 72px !important;
  resize: vertical;
}

#editDriverModal input:focus,
#editDriverModal textarea:focus {
  border-color: rgba(236,72,153,0.65);
  box-shadow:
    0 0 0 3px rgba(236,72,153,0.14),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

#editDriverModal .modal-footer {
  padding: 16px 26px;
  background: linear-gradient(180deg, rgba(2,6,23,0.90), rgba(2,6,23,0.98));
  border-top: 1px solid rgba(148,163,184,0.12);
}

#editDriverModal .modal-footer .btn {
  min-width: 110px;
  min-height: 42px;
  border-radius: 12px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .driver-edit-grid {
    grid-template-columns: 1fr;
  }

  .driver-edit-wide {
    grid-column: span 1;
  }

  #editDriverModal .modal-body {
    padding: 18px;
  }

  .driver-edit-section {
    padding: 15px;
  }
}


/* =========================================================
   EDIT DRIVER MODAL MATCHES DRIVER DETAILS MODAL
========================================================= */

#editDriverModal .driver-edit-card {
  max-width: 560px !important;
  width: min(560px, 94vw);
}

#editDriverModal .modal-body {
  padding: 26px;
}

#editDriverModal .driver-edit-details-grid {
  margin-bottom: 0;
}

#editDriverModal .driver-edit-details-grid > div {
  background: rgba(255,255,255,0.03);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

#editDriverModal .driver-edit-details-grid > div:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(var(--success), 0.2);
}

#editDriverModal .driver-edit-details-grid > div:nth-child(-n+2) {
  background: rgba(var(--success), 0.05);
  border-color: rgba(var(--success), 0.15);
}

#editDriverModal .driver-edit-details-grid label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#editDriverModal .driver-edit-details-grid input,
#editDriverModal .driver-edit-details-grid textarea {
  width: 100%;
  min-height: 38px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #f3f4f6;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

#editDriverModal .driver-edit-details-grid textarea {
  min-height: 42px !important;
  resize: vertical;
}

#editDriverModal .driver-edit-details-grid input:focus,
#editDriverModal .driver-edit-details-grid textarea:focus {
  outline: none;
  box-shadow: none;
  color: #ffffff;
}

#editDriverModal #drv_name {
  color: #ffffff;
  font-size: 16px;
}

#editDriverModal #drv_phone {
  color: var(--primary-light);
  font-family: monospace;
}

#editDriverModal #drv_email {
  color: #d1d5db;
}

#editDriverModal #drv_vehicle {
  color: #facc15;
}

#editDriverModal #drv_license {
  color: #d1d5db;
  font-family: monospace;
}

#editDriverModal .modal-footer {
  padding: 16px 26px;
}

@media (max-width: 600px) {
  #editDriverModal .modal-body {
    padding: 20px;
  }
}


/* =========================================================
   EDIT DRIVER VEHICLE FIELD REFINEMENT
========================================================= */

#editDriverModal #drv_vehicle {
  color: #facc15;
}

#editDriverModal #drv_vehicle_year,
#editDriverModal #drv_vehicle_color {
  color: #f3f4f6;
  font-family: inherit;
}


/* =========================================================
   PREMIUM CUSTOMERS TABLE + PAGINATION
========================================================= */

.table-customers {
  width: 100% !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(17,24,39,0.96));
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 35px -15px rgba(0,0,0,0.42);
}

.table-customers thead {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.table-customers th,
.table-customers td {
  padding: 13px 11px;
  vertical-align: middle;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.table-customers th {
  font-size: 10.5px;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  font-weight: 800;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table-customers tbody tr {
  border-bottom: 1px solid rgba(148,163,184,0.08);
  transition: background 0.18s ease;
}

.table-customers tbody tr:hover {
  background: rgba(59,130,246,0.05);
}

/* Content-aware customer columns */
.table-customers th:nth-child(1),
.table-customers td:nth-child(1) {
  width: 6%;
  white-space: nowrap;
}

.table-customers th:nth-child(2),
.table-customers td:nth-child(2) {
  width: 17%;
}

.table-customers th:nth-child(3),
.table-customers td:nth-child(3) {
  width: 27%;
}

.table-customers th:nth-child(4),
.table-customers td:nth-child(4) {
  width: 13%;
  white-space: nowrap;
}

.table-customers th:nth-child(5),
.table-customers td:nth-child(5) {
  width: 7%;
  white-space: nowrap;
}

.table-customers th:nth-child(6),
.table-customers td:nth-child(6) {
  width: 13%;
  white-space: nowrap;
}

.table-customers th:nth-child(7),
.table-customers td:nth-child(7) {
  width: 17%;
}

.table-customers .booking-link {
  color: #ff5ca8;
  font-weight: 900;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.customer-name-cell {
  color: #facc15;
  font-weight: 800;
}

.customer-email-cell {
  color: #f8fafc;
  font-weight: 650;
}

.customer-phone-cell {
  color: #ff5ca8;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.customer-total-cell strong {
  color: #22c55e;
  font-weight: 900;
}

.customer-date-cell {
  color: #f59e0b;
  font-weight: 750;
}

.table-customers .action-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 7px;
  align-items: stretch;
}

.table-customers .btn {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px !important;
  border-radius: 10px !important;
  font-size: 10.5px !important;
  line-height: 1.15;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* Customer pagination - same behavior as bookings */
.customers-pagination-wrap {
  margin-top: 18px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.customers-pagination-info {
  color: #94a3b8;
  font-size: 14px;
}

.customers-pagination {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.customers-pagination .analytics-tab-btn {
  min-width: 46px;
  min-height: 44px;
  padding-left: 14px;
  padding-right: 14px;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customers-pagination-ellipsis {
  color: #94a3b8;
  padding: 0 4px;
  font-weight: 700;
  flex: 0 0 auto;
}

.customers-pagination .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 1280px) {
  .table-customers th,
  .table-customers td {
    padding: 12px 8px;
    font-size: 12px;
  }

  .table-customers th:nth-child(3),
  .table-customers td:nth-child(3) {
    width: 24%;
  }

  .table-customers th:nth-child(7),
  .table-customers td:nth-child(7) {
    width: 20%;
  }

  .table-customers .action-row {
    grid-template-columns: repeat(2, minmax(58px, 1fr));
    gap: 6px;
  }

  .table-customers .btn {
    font-size: 10px !important;
    padding: 6px 6px !important;
  }
}

@media (max-width: 860px) {
  .table-customers,
  .table-customers thead,
  .table-customers tbody,
  .table-customers tr,
  .table-customers th,
  .table-customers td {
    display: block;
    width: 100% !important;
  }

  .table-customers thead {
    display: none;
  }

  .table-customers tr {
    margin: 0 0 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15,23,42,0.88);
    border: 1px solid rgba(148,163,184,0.14);
  }

  .table-customers td {
    padding: 8px 0;
  }

  .table-customers td:nth-child(1)::before { content: "ID"; }
  .table-customers td:nth-child(2)::before { content: "Name"; }
  .table-customers td:nth-child(3)::before { content: "Email"; }
  .table-customers td:nth-child(4)::before { content: "Phone"; }
  .table-customers td:nth-child(5)::before { content: "Total"; }
  .table-customers td:nth-child(6)::before { content: "First"; }
  .table-customers td:nth-child(7)::before { content: "Actions"; }

  .table-customers td::before {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 800;
  }

  .table-customers .action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   CUSTOMERS PAGINATION: MATCH BOOKINGS PREMIUM STYLE
========================================================= */

.customers-pagination-wrap {
  margin-top: 18px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.customers-pagination-info {
  color: #94a3b8;
  font-size: 14px;
}

.customers-pagination {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.customers-pagination .analytics-tab-btn {
  min-width: 46px;
  min-height: 44px;
  padding: 0 16px;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.customers-pagination .analytics-tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(30, 41, 59, 0.96);
  color: #f8fafc;
}

.customers-pagination .analytics-tab-btn.is-active {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.75);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.65), rgba(30, 41, 59, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(56,189,248,0.18),
    0 10px 24px rgba(8,47,73,0.35);
}

.customers-pagination .analytics-tab-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.customers-pagination-ellipsis {
  color: #94a3b8;
  padding: 0 4px;
  font-weight: 900;
  flex: 0 0 auto;
}


/* =========================================================
   CUSTOMER NEW BOOKING MODAL
========================================================= */

.customer-booking-grid {
  margin-bottom: 16px;
}

.customer-booking-route-card {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.45);
}

.customer-booking-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.customer-booking-route-head strong {
  color: #facc15;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

#actionModal #modifyRouteMap {
  width: 100%;
  height: 230px;
  border-radius: 16px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.10);
}

.customer-booking-footer {
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 700px) {
  #actionModal #modifyRouteMap {
    height: 260px;
  }

  .customer-booking-route-head {
    align-items: flex-start;
    flex-direction: column;
  }
}



/* CUSTOMER NEW BOOKING AUTO FARE + SELECT POLISH */
#actionModal .customer-booking-grid select,
#actionModal .customer-booking-grid input {
  min-height: 46px;
}

#actionModal .customer-booking-grid select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

#new_booking_fare {
  color: #facc15;
  font-weight: 800;
}


/* BOOKINGS NEW BOOKING TAB + AUTO TYPE */
.booking-new-btn {
  border-color: rgba(236, 72, 153, 0.55) !important;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.28), rgba(14, 165, 233, 0.12)) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.booking-new-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 72, 153, 0.85) !important;
}

.auto-ride-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.14);
}

.auto-ride-type-pill.instant {
  color: #22c55e;
  background: rgba(34, 197, 94, .14);
  border-color: rgba(34, 197, 94, .35);
}

.auto-ride-type-pill.scheduled {
  color: #60a5fa;
  background: rgba(96, 165, 250, .14);
  border-color: rgba(96, 165, 250, .35);
}

.customer-booking-wide {
  grid-column: 1 / -1;
}


/* GOOGLE PLACES AUTOCOMPLETE DROPDOWN ABOVE DASHBOARD MODALS */
.pac-container {
  z-index: 2147483647 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.35) !important;
}

.pac-item {
  padding: 10px 12px !important;
  font-size: 13px !important;
  cursor: pointer !important;
}

.pac-item:hover {
  background: #f3f4f6 !important;
}


/* NEW BOOKING ADMIN FARE OPTION CARDS */
.customer-booking-fare-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, .58);
}

.customer-booking-fare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-booking-fare-head span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #aeb7c7;
}

.customer-booking-fare-head small {
  color: #7f8aa3;
  font-size: 11px;
  font-weight: 800;
}

.customer-booking-fare-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.fare-option-card {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px !important;
  margin: 0 !important;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(2, 6, 23, .62);
  cursor: pointer;
  transition: .18s ease;
}

.fare-option-card:hover {
  border-color: rgba(56,189,248,.45);
  transform: translateY(-1px);
}

.fare-option-card input {
  width: 16px !important;
  min-height: 16px !important;
  height: 16px !important;
  accent-color: #ec4899;
}

.fare-option-card strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.fare-option-card small {
  display: block;
  color: #facc15;
  font-size: 12px;
  font-weight: 900;
  margin-top: 4px;
}

.customer-booking-fare-panel #new_booking_fare {
  margin-top: 2px;
  color: #facc15;
  font-weight: 900;
}

.customer-booking-fare-panel #new_booking_fare:not([readonly]) {
  border-color: rgba(250, 204, 21, .55);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .12);
}

@media (max-width: 860px) {
  .customer-booking-fare-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-booking-fare-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   ASSIGNMENT MODAL ONLY — STRUCTURED MOBILE DRIVER CARDS
   Layout:
   Name                         Vehicle
   Device                       Status
   ETA                          Selector
   ========================================================= */

@media (max-width: 640px) {
  #actionModalBody .assign-driver-head {
    display: none !important;
  }

  #actionModalBody .assign-driver-panel {
    margin-top: 14px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #actionModalBody .driver-list-premium {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #actionModalBody .driver-card-premium {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(94px, 0.85fr) !important;
    grid-template-areas:
      "name vehicle"
      "device status"
      "eta selector" !important;
    gap: 10px 12px !important;
    align-items: center !important;

    width: 100% !important;
    min-height: 132px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px !important;

    border-radius: 20px !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(2,6,23,0.96)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;

    overflow: hidden !important;
    pointer-events: auto !important;
    opacity: 1 !important;
  }

  #actionModalBody .driver-card-premium:has(input[name="driver_pick"]:checked) {
    border-color: rgba(236, 72, 153, 0.70) !important;
    background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(15,23,42,0.96)) !important;
    box-shadow:
      inset 4px 0 0 #ec4899,
      inset 0 1px 0 rgba(255,255,255,0.06) !important;
  }

  #actionModalBody .driver-name-cell {
    grid-area: name !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  #actionModalBody .driver-name {
    display: block !important;
    color: #f8fafc !important;
    font-size: 17px !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }

  #actionModalBody .driver-vehicle-cell {
    grid-area: vehicle !important;
    min-width: 0 !important;
    justify-self: end !important;
    text-align: right !important;

    color: #cbd5e1 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
  }

  #actionModalBody .driver-device-cell {
    grid-area: device !important;
    min-width: 0 !important;
    text-align: left !important;

    color: #94a3b8 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
  }

  #actionModalBody .driver-status-cell {
    grid-area: status !important;
    min-width: 0 !important;
    justify-self: end !important;
    text-align: right !important;
  }

  #actionModalBody .driver-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  #actionModalBody .driver-eta-cell {
    grid-area: eta !important;
    justify-self: start !important;
    text-align: left !important;

    color: #fbbf24 !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  #actionModalBody .driver-eta-cell::before {
    content: "ETA ";
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
  }

  #actionModalBody .driver-select-cell {
    grid-area: selector !important;
    justify-self: end !important;
    align-self: center !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  #actionModalBody .driver-select-cell input[name="driver_pick"],
  #actionModalBody input[name="driver_pick"] {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    accent-color: #ec4899 !important;
    pointer-events: auto !important;
  }

  #actionModalBody .assign-modal-footer {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 0 0 calc(14px + env(safe-area-inset-bottom)) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #actionModalBody .assign-modal-footer .btn {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
  }
}

@media (max-width: 360px) {
  #actionModalBody .driver-card-premium {
    grid-template-columns: minmax(0, 1fr) minmax(78px, 0.72fr) !important;
    gap: 9px 10px !important;
    padding: 14px !important;
  }

  #actionModalBody .driver-name {
    font-size: 15px !important;
  }

  #actionModalBody .driver-vehicle-cell,
  #actionModalBody .driver-device-cell {
    font-size: 11px !important;
  }

  #actionModalBody .assign-modal-footer {
    gap: 8px !important;
  }
}


/* =========================================================


/* =========================================================
   UNIVERSAL BOOKING TABLE SYSTEM — DESKTOP + MOBILE
   One rule-set for all booking tabs.
   Keep this as the only final booking table override.
   ========================================================= */

/* ---------- Desktop / tablet booking table ---------- */
@media (min-width: 861px) {
  .table-wrapper {
    overflow-x: auto;
  }

  .table-bookings {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .table-bookings th,
  .table-bookings td {
    vertical-align: middle !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .table-bookings .col-id {
    width: 7% !important;
    white-space: nowrap !important;
  }

  .table-bookings .col-customer {
    width: 10% !important;
  }

  .table-bookings .col-ride-type {
    width: 8% !important;
  }

  .table-bookings .col-pickup,
  .table-bookings .col-dropoff {
    width: 22% !important;
    line-height: 1.35 !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .table-bookings .col-time {
    width: 7% !important;
    white-space: normal !important;
  }

  .table-bookings .col-price {
    width: 6% !important;
    white-space: nowrap !important;
  }

  .table-bookings .col-driver {
    width: 9% !important;
  }

  .table-bookings .col-status {
    width: 8% !important;
  }

  .table-bookings .col-actions {
    width: 18% !important;
  }

  .table-bookings .pickup-date,
  .table-bookings .pickup-clock {
    display: block !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .table-bookings .pickup-clock {
    margin-top: 4px !important;
  }

  .table-bookings .pickup-clock::before {
    content: "" !important;
  }

  .table-bookings .col-actions .action-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(72px, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .table-bookings .col-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* ---------- Mobile booking cards ---------- */
@media (max-width: 860px) {
  .table-wrapper {
    overflow-x: hidden !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  .table-bookings,
  .table-bookings tbody {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .table-bookings thead {
    display: none !important;
  }

  .table-bookings tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    padding: 16px !important;
    border-radius: 20px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    box-sizing: border-box !important;
  }

  .table-bookings td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  .table-bookings td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 7px !important;
    color: #94a3b8 !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.10em !important;
  }

  .table-bookings .col-id {
    color: #f472b6 !important;
    font-weight: 900 !important;
    font-size: 18px !important;
  }

  .table-bookings .col-customer {
    color: #fde047 !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
  }

  .table-bookings .col-pickup {
    color: #f472b6 !important;
    font-weight: 800 !important;
    line-height: 1.32 !important;
    overflow-wrap: anywhere !important;
  }

  .table-bookings .col-dropoff {
    color: #22c55e !important;
    font-weight: 800 !important;
    line-height: 1.32 !important;
    overflow-wrap: anywhere !important;
  }

  .table-bookings .col-time,
  .table-bookings .col-price {
    color: #fbbf24 !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .table-bookings .pickup-date,
  .table-bookings .pickup-clock {
    display: inline !important;
    white-space: nowrap !important;
  }

  .table-bookings .pickup-clock::before {
    content: " · " !important;
  }

  .table-bookings .col-actions {
    grid-column: 1 / -1 !important;
    display: block !important;
    padding-top: 4px !important;
  }

  .table-bookings .col-actions .action-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .table-bookings .col-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 10px 10px !important;
    border-radius: 18px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }
}

@media (max-width: 380px) {
  .table-bookings tr {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .table-bookings .col-actions .action-row {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   UNIVERSAL MODAL WIDTH SYSTEM
   One reusable width rule for dashboard modals.
   Booking/action modals use wider size.
   ========================================================= */

.modal-backdrop .modal-card {
  --dashboard-modal-width: 960px;
  width: min(96vw, var(--dashboard-modal-width)) !important;
  max-width: var(--dashboard-modal-width) !important;
}

#actionModal .modal-card {
  --dashboard-modal-width: 1040px;
}

#editDriverModal .modal-card,
#driverTrackModal .modal-card,
#customerDetailsModal .modal-card,
#driverDetailsModal .modal-card {
  --dashboard-modal-width: 960px;
}

/* Keep mobile modal full-screen */
@media (max-width: 640px) {
  .modal-backdrop .modal-card,
  #actionModal .modal-card,
  #editDriverModal .modal-card,
  #driverTrackModal .modal-card,
  #customerDetailsModal .modal-card,
  #driverDetailsModal .modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}


/* =========================================================
   ASSIGNMENT MODAL ONLY — UNIVERSAL DRIVER CARDS
   Same clean card structure on desktop, tablet, and mobile.
   Layout:
   Name                         Vehicle
   Device                       Status
   ETA                          Selector
   ========================================================= */

#actionModalBody .assign-driver-head {
  display: none !important;
}

#actionModalBody .assign-driver-panel {
  margin-top: 14px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#actionModalBody .driver-list-premium {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 14px !important;
  max-height: min(58vh, 620px) !important;
  overflow-y: auto !important;
  padding: 2px 4px 4px !important;
}

#actionModalBody .driver-card-premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.8fr) !important;
  grid-template-areas:
    "name vehicle"
    "device status"
    "eta selector" !important;
  gap: 10px 14px !important;
  align-items: center !important;

  width: 100% !important;
  min-height: 132px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 18px !important;

  border-radius: 20px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(2,6,23,0.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;

  overflow: hidden !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

#actionModalBody .driver-card-premium:has(input[name="driver_pick"]:checked) {
  border-color: rgba(236, 72, 153, 0.75) !important;
  background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(15,23,42,0.96)) !important;
  box-shadow:
    inset 4px 0 0 #ec4899,
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 14px 32px rgba(0,0,0,0.22) !important;
}

#actionModalBody .driver-name-cell {
  grid-area: name !important;
  min-width: 0 !important;
  text-align: left !important;
}

#actionModalBody .driver-name {
  display: block !important;
  color: #f8fafc !important;
  font-size: 16px !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}

#actionModalBody .driver-vehicle-cell {
  grid-area: vehicle !important;
  min-width: 0 !important;
  justify-self: end !important;
  text-align: right !important;

  color: #cbd5e1 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;

  white-space: normal !important;
  overflow-wrap: break-word !important;
}

#actionModalBody .driver-device-cell {
  grid-area: device !important;
  min-width: 0 !important;
  text-align: left !important;

  color: #94a3b8 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;

  white-space: normal !important;
  overflow-wrap: break-word !important;
}

#actionModalBody .driver-status-cell {
  grid-area: status !important;
  min-width: 0 !important;
  justify-self: end !important;
  text-align: right !important;
}

#actionModalBody .driver-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#actionModalBody .driver-eta-cell {
  grid-area: eta !important;
  justify-self: start !important;
  text-align: left !important;

  color: #fbbf24 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#actionModalBody .driver-eta-cell::before {
  content: "ETA ";
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

#actionModalBody .driver-select-cell {
  grid-area: selector !important;
  justify-self: end !important;
  align-self: center !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;

  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
}

#actionModalBody .driver-select-cell input[name="driver_pick"],
#actionModalBody input[name="driver_pick"] {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  accent-color: #ec4899 !important;
  pointer-events: auto !important;
}

/* Assignment footer: never inherit sticky/global modal footer behavior */
#actionModalBody .assign-modal-footer {
  position: static !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 18px 0 0 !important;
  padding: 0 0 calc(14px + env(safe-area-inset-bottom)) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#actionModalBody .assign-modal-footer .btn {
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  text-align: center !important;
  justify-content: center !important;
  white-space: normal !important;
}

/* Narrow phones: keep one card per row and compact the right column */
@media (max-width: 640px) {
  #actionModalBody .driver-list-premium {
    grid-template-columns: 1fr !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  #actionModalBody .driver-card-premium {
    grid-template-columns: minmax(0, 1.15fr) minmax(94px, 0.85fr) !important;
    padding: 16px !important;
  }
}

@media (max-width: 360px) {
  #actionModalBody .driver-card-premium {
    grid-template-columns: minmax(0, 1fr) minmax(78px, 0.72fr) !important;
    gap: 9px 10px !important;
    padding: 14px !important;
  }

  #actionModalBody .driver-name {
    font-size: 15px !important;
  }

  #actionModalBody .driver-vehicle-cell,
  #actionModalBody .driver-device-cell {
    font-size: 11px !important;
  }

  #actionModalBody .assign-modal-footer {
    gap: 8px !important;
  }
}
