/* ==========================================================
   V DRIVER - PROFESSIONAL EXECUTIVE STYLING & DISTINCT HEADLINE PALETTE
   ================================================---------- */

:root {
  --bg-main: #070b14;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --border: #3b82f6;
  --gold: #f59e0b;
  --gold-hover: #d97706;
  --cta-orange: #ff6a00;
  --cta-orange-hover: #e55f00;
  --text-main: #f8fafc;
  --text-sub: #cbd5e1;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --header-bg: linear-gradient(135deg, #090d16, #0f172a);
  --nav-bg: linear-gradient(135deg, #090d16, #0f172a);

  /* Distinct Unique Headline Background Colors */
  --headline-hero: linear-gradient(135deg, #1e3a8a, #1e1b4b);
  --headline-drivers: linear-gradient(135deg, #065f46, #064e3b);
  --headline-emergency: linear-gradient(135deg, #7f1d1d, #450a0a);
  --headline-profile: linear-gradient(135deg, #78350f, #451a03);
  --headline-admin: linear-gradient(135deg, #312e81, #1e1b4b);
}

body.light-theme {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --border: #cbd5e1;
  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  --header-bg: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --nav-bg: linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%);

  --headline-hero: linear-gradient(135deg, #dbeafe, #eff6ff);
  --headline-drivers: linear-gradient(135deg, #d1fae5, #ecfdf5);
  --headline-emergency: linear-gradient(135deg, #fee2e2, #fef2f2);
  --headline-profile: linear-gradient(135deg, #fef3c7, #fffbeb);
  --headline-admin: linear-gradient(135deg, #e0e7ff, #ede9fe);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 85px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* TOP HEADER */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #ffffff;
  padding: 2px;
  border: 1px solid var(--border);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

body.light-theme .brand-title {
  color: var(--text-main);
}

.badge-gold {
  font-size: 0.6rem;
  padding: 2px 6px;
  background-color: var(--gold);
  color: #000000;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-icons-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icons-right button, 
.header-icons-right div {
  color: var(--text-main) !important;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
}

/* MAIN CONTAINER */
.main-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* SECTION HEADERS WITH DISTINCT BACKGROUNDS */
.section-header {
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#home .section-header {
  background: var(--headline-hero);
}

#drivers .section-header {
  background: var(--headline-drivers);
}

#emergency .section-header {
  background: var(--headline-emergency);
}

#profile .section-header {
  background: var(--headline-profile);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.section-header p {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-top: 4px;
}

/* HERO SECTION */
.hero-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.hero-banner h2 {
  font-size: 1.7rem;
  font-weight: 900;
  text-align: center;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.25;
}

.hero-quote {
  text-align: center;
  font-style: italic;
  color: var(--text-sub);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.hero-img-container {
  width: 100%;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}

.hero-img-container img {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: cover;
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 16px 0;
  text-align: center;
}

.info-bullet-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
}

.media-video-container {
  width: 100%;
  margin: 18px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.media-video-container video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* CARDS */
.card, .stat-card, .driver-card, .form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.gold-text {
  color: var(--gold);
}

/* INPUTS */
.search-box {
  margin-bottom: 18px;
}

.input-field, .search-box input, select.input-field {
  width: 100%;
  padding: 13px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus, .search-box input:focus {
  border-color: var(--cta-orange);
}

/* FORMS & CHECKBOXES */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.checkbox-group label {
  font-size: 0.85rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-input);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-gold {
  background-color: var(--gold);
  color: #000000;
}

.btn-gold:hover {
  background-color: var(--gold-hover);
}

.btn-connect {
  background-color: var(--cta-orange);
  color: #ffffff;
}

.btn-connect:hover {
  background-color: var(--cta-orange-hover);
}

.btn-view, .btn-primary, .btn-secondary {
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.stat-card {
  text-align: center;
  padding: 14px 10px;
  margin-bottom: 0;
}

.stat-card h3 {
  font-size: 1.6rem;
  color: var(--cta-orange);
  margin-bottom: 4px;
  font-weight: 800;
}

.stat-card p {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* BADGES */
.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.badge-ready {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-booked {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* BOTTOM NAVIGATION */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  padding: 6px 0;
  flex: 1;
  transition: color 0.2s ease;
}

.nav-btn.active {
  color: var(--cta-orange);
}

.nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
  position: relative;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background-color: var(--cta-orange);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  padding: 14px;
}

.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* INSTALL / UPDATE BANNER */
.install-banner {
  position: fixed;
  bottom: 75px;
  left: 14px;
  right: 14px;
  max-width: 612px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  font-size: 0.85rem;
  color: var(--text-sub);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-close-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  margin-left: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.hidden {
  display: none !important;
}
