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

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #F4EEE0; color: #1B1610; -webkit-font-smoothing: antialiased; }

/* ===== CSS VARIABLES — "Dusk Highway" ===== */
:root {
  --primary: #C68A2E;         /* harvest marigold gold — primary CTA */
  --primary-dark: #A8721F;
  --primary-light: #FBEED9;
  --secondary: #1B1610;       /* soil-dusk ink */
  --indigo: #26344A;          /* dusk highway blue — structural accent */
  --indigo-dark: #1A2534;
  --accent: #B8472B;          /* road-dust rust — alerts/SOS */
  --moss: #3F6B4C;            /* verified/success green */
  --gray-100: #F4EEE0;
  --gray-200: #E9DFC8;
  --gray-300: #D8CBA8;
  --gray-500: #8A7D63;
  --gray-700: #4A4030;
  --white: #FFFDF8;
  --paper: #FBF3E6;
  --shadow-sm: 0 1px 3px rgba(27,22,16,0.08), 0 1px 2px rgba(27,22,16,0.04);
  --shadow-md: 0 4px 16px rgba(27,22,16,0.10), 0 2px 6px rgba(27,22,16,0.05);
  --shadow-lg: 0 10px 40px rgba(27,22,16,0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

h1, h2, h3, .logo, .hero h1, .page-title, .step-num, .stat-num { font-family: 'Baloo 2', 'Inter', sans-serif; }

/* ===== SIGNATURE: ROUTE-LINE DIVIDER ===== */
.route-line {
  position: relative;
  height: 14px;
  margin: 14px auto;
  width: 120px;
  background-image: repeating-linear-gradient(to right, var(--primary) 0, var(--primary) 8px, transparent 8px, transparent 16px);
  background-size: 200% 2px;
  background-position: 0 center;
  background-repeat: repeat-x;
}
.route-line::after {
  content: '📍';
  position: absolute;
  right: -4px;
  top: -9px;
  font-size: 14px;
}
.route-line.animate { background-position: -100% center; animation: route-travel 1.4s ease-out forwards; }
@keyframes route-travel { to { background-position: 0 center; } }
@media (prefers-reduced-motion: reduce) { .route-line.animate { animation: none; background-position: 0 center; } }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--secondary);
  border-bottom: 1px solid var(--indigo);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.navbar .logo span { color: var(--primary); }
.navbar .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.navbar .nav-links a {
  color: var(--gray-200);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar .nav-links a:hover { color: var(--primary); }
.navbar .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.navbar .hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.3s; }
.mobile-menu { display: none; background: var(--secondary); border-bottom: 1px solid var(--indigo); flex-direction: column; }
.mobile-menu a { color: var(--gray-200); text-decoration: none; font-size: 15px; font-weight: 500; padding: 14px 24px; border-bottom: 1px solid var(--indigo); transition: background 0.2s; }
.mobile-menu a:hover { background: var(--indigo-dark); }
.mobile-menu.open { display: flex; }

/* ===== LAYOUT ===== */
.container { max-width: 640px; margin: 24px auto; padding: 0 16px; }
.container-wide { max-width: 900px; margin: 24px auto; padding: 0 16px; }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }

/* ===== HERO (Homepage) ===== */
.hero {
  background: linear-gradient(160deg, var(--indigo) 0%, var(--secondary) 65%, #100D09 100%);
  border-radius: var(--radius-xl);
  padding: 52px 28px 40px;
  text-align: center;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(198,138,46,0.14) 0%, transparent 60%);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background-image: repeating-linear-gradient(to right, var(--primary) 0, var(--primary) 14px, transparent 14px, transparent 28px);
  opacity: 0.7;
}
.hero h1 { font-family: 'Baloo 2', sans-serif; font-size: 34px; font-weight: 700; margin-bottom: 10px; line-height: 1.25; position: relative; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 16px; opacity: 0.75; margin-bottom: 26px; position: relative; }
.hero-search {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--secondary);
  background: var(--white);
  transition: border 0.2s, background 0.2s;
}
.hero-search input:focus { outline: none; border-color: var(--primary); background: var(--white); }
.hero-search button {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
  font-family: 'Inter', sans-serif;
}
.hero-search button:hover { background: var(--primary-dark); color: var(--white); box-shadow: 0 4px 20px rgba(198,138,46,0.35); transform: translateY(-1px); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.stat-num { font-size: 23px; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; font-weight: 500; }

/* ===== HOW IT WORKS ===== */
.steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.step-text h4 { font-size: 15px; font-weight: 600; color: var(--secondary); }
.step-text p { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ===== FORMS ===== */
.field-label { font-size: 13px; font-weight: 600; color: var(--gray-700); display: block; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--secondary);
  background: var(--white);
  transition: all 0.2s;
  margin: 4px 0;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(198,138,46,0.14);
}
input::placeholder { color: var(--gray-500); }

/* ===== BUTTONS ===== */
button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--primary);
  color: var(--secondary);
  margin: 6px 0;
}
button:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(198,138,46,0.3); }
button:active { transform: scale(0.98); }
button.secondary { background: var(--gray-200); color: var(--gray-700); }
button.secondary:hover { background: var(--gray-300); color: var(--secondary); box-shadow: none; }
button.danger { background: var(--accent); color: var(--white); }
button.danger:hover { background: #96391F; box-shadow: 0 4px 16px rgba(184,71,43,0.3); }
button.outline {
  background: transparent;
  border: 2px solid var(--indigo);
  color: var(--indigo);
}
button.outline:hover { background: var(--indigo); color: var(--white); box-shadow: none; }
button.small { padding: 8px 14px; font-size: 13px; width: auto; margin: 2px; }

/* ===== RIDE CARDS ===== */
.ride-card-wrapper {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
  cursor: pointer;
}
.ride-card-wrapper:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-2px); }
.ride-route { font-size: 18px; font-weight: 700; color: var(--secondary); display: flex; align-items: center; gap: 8px; }
.route-arrow { color: var(--primary-dark); font-size: 16px; }
.ride-meta { color: var(--gray-500); font-size: 13px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.ride-price { font-size: 22px; font-weight: 800; color: var(--primary-dark); font-family: 'Baloo 2', sans-serif; }
.ride-price-label { font-size: 12px; color: var(--gray-500); font-weight: 400; }

/* ===== DRIVER AVATAR ===== */
.driver-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px 2px 2px 0;
}
.badge-green { background: #E6F0E9; color: var(--moss); }
.badge-orange { background: #FBEED9; color: var(--primary-dark); }
.badge-blue { background: #E4E9F0; color: var(--indigo); }
.badge-pink { background: #F6E7E3; color: var(--accent); }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* ===== STATUS ===== */
.error { color: #96391F; font-size: 13px; margin: 6px 0; padding: 8px 12px; background: #F6E7E3; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.success { color: var(--moss); font-size: 13px; margin: 6px 0; padding: 8px 12px; background: #E6F0E9; border-radius: var(--radius-sm); border-left: 3px solid var(--moss); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-500); }
.empty-state .icon { font-size: 52px; margin-bottom: 14px; }
.empty-state p { font-size: 16px; font-weight: 500; }

/* ===== PAGE TITLE ===== */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: var(--secondary); }

/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13px;
  margin: 16px 0;
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; border-top: 1px solid var(--gray-200); }

/* ===== CHECKBOX ===== */
.checkbox-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.checkbox-row label { font-size: 14px; color: var(--gray-700); }

/* ===== TABS ===== */
.tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  margin: 0;
  background: transparent;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: none;
}
.tab-btn:hover { transform: none; box-shadow: none; background: var(--gray-200); color: var(--secondary); }
.tab-btn.active { background: var(--white); color: var(--secondary); box-shadow: var(--shadow-sm); }

/* ===== CHAT ===== */
.chat-box { height: 300px; overflow-y: auto; background: var(--gray-100); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; }
.chat-msg { margin-bottom: 10px; padding: 10px 14px; border-radius: 16px; background: var(--white); max-width: 78%; word-break: break-word; box-shadow: var(--shadow-sm); }
.chat-msg.mine { background: var(--indigo); color: var(--white); margin-left: auto; border-bottom-right-radius: 4px; }
.chat-msg:not(.mine) { border-bottom-left-radius: 4px; }
.chat-msg small { display: block; font-size: 11px; opacity: 0.6; margin-top: 4px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { margin: 0; flex: 1; }
.chat-input-row button { width: auto; padding: 12px 20px; margin: 0; }

/* ===== BTN ROW ===== */
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.btn-row button { flex: 1; min-width: 80px; }

/* ===== CONTACT BUTTONS ===== */
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  flex: 1;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin: 2px;
}
.contact-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.contact-btn.call { background: #E6F0E9; color: var(--moss); }
.contact-btn.sms { background: #E4E9F0; color: var(--indigo); }
.contact-btn.wa { background: #E6F0E9; color: var(--moss); }
.contact-btn.chat { background: var(--gray-100); color: var(--gray-700); }

/* ===== VERIFY BADGES ===== */
.verify-badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; margin: 4px 0; }
.badge-verified { background: #E6F0E9; color: var(--moss); }
.badge-pending { background: #FBEED9; color: var(--primary-dark); }
.badge-rejected { background: #F6E7E3; color: var(--accent); }
.badge-not-submitted { background: var(--gray-100); color: var(--gray-500); }

/* ===== SOS ===== */
.sos-btn {
  background: var(--accent);
  color: white;
  font-size: 28px;
  font-weight: 800;
  padding: 0;
  border-radius: 50%;
  width: 130px;
  height: 130px;
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  animation: sos-pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(184,71,43,0.4);
}
@keyframes sos-pulse {
  0% { box-shadow: 0 0 0 0 rgba(184,71,43,0.5); }
  70% { box-shadow: 0 0 0 24px rgba(184,71,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,71,43,0); }
}

/* ===== MAP ===== */
#routeMap { height: 220px; border-radius: var(--radius-md); margin: 8px 0; border: 1.5px solid var(--gray-300); }

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--primary);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.autocomplete-item { padding: 12px 16px; cursor: pointer; font-size: 14px; color: var(--gray-700); display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--gray-100); transition: background 0.15s; }
.autocomplete-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.autocomplete-item:last-child { border-bottom: none; }

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 24px 16px; color: var(--gray-500); font-size: 13px; border-top: 1px solid var(--gray-200); margin-top: 32px; }
.footer a { color: var(--primary-dark); text-decoration: none; margin: 0 10px; font-weight: 500; }

/* ===== ANIMATIONS ===== */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
  .navbar .nav-links { display: none; }
  .navbar .hamburger { display: flex; }
  .container, .container-wide { margin: 12px auto; padding: 0 12px; }
  .hero { padding: 32px 16px 28px; border-radius: var(--radius-lg); }
  .hero h1 { font-size: 26px; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-num { font-size: 18px; }
  .ride-route { font-size: 16px; }
  .btn-row { flex-direction: column; }
  .btn-row button { min-width: unset; }
  .chat-box { height: 240px; }
  input, select { font-size: 16px; } /* iOS zoom fix */
}
