/* Driver Hiring Platform - Standalone CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #FF6B35;
  --stat-blue: #4285F4;
  --stat-orange: #FFA500;
  --stat-green: #10B981;
  --stat-cyan: #06B6D4;
  --success: #10B981;
  --warning: #FFA500;
  --info: #4285F4;
  --background: #FAFAFA;
  --foreground: #1A1A1A;
  --card: #FFFFFF;
  --muted: #F5F5F5;
  --muted-foreground: #737373;
  --border: #E5E5E5;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  padding-bottom: 80px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.header-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-title p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.help-dropdown {
  position: relative;
}

.help-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.help-btn:hover {
  background: var(--muted);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: none;
  z-index: 100;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: var(--muted);
}

/* Location Selector */
.location-selector {
  background: var(--card);
  padding: 1.5rem;
  /* border-radius: 0.75rem;
  box-shadow: var(--shadow-lg); */
  margin: 1.5rem 0;
}

.location-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.location-row:last-child {
  margin-bottom: 0;
}

.location-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location-icon.blue {
  background: rgba(66, 133, 244, 0.1);
  color: var(--stat-blue);
}

.location-icon.orange {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
}

.location-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
}

.location-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  border-left: 4px solid;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
}

.stat-card.blue {
  border-left-color: var(--stat-blue);
}

.stat-card.orange {
  border-left-color: var(--stat-orange);
}

.stat-card.green {
  border-left-color: var(--stat-green);
}

.stat-card.cyan {
  border-left-color: var(--stat-cyan);
}

.stat-info p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-info span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon.blue {
  background: var(--stat-blue);
}

.stat-icon.orange {
  background: var(--stat-orange);
}

.stat-icon.green {
  background: var(--stat-green);
}

.stat-icon.cyan {
  background: var(--stat-cyan);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: var(--muted);
}

/* Booking Card */
.booking-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.booking-card:hover {
  box-shadow: var(--shadow-lg);
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.booking-customer h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.booking-customer p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.badge.pending {
  background: var(--warning);
}

.badge.accepted {
  background: var(--info);
}

.badge.completed {
  background: var(--success);
}

.badge.in-progress {
  background: var(--info);
}

.booking-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  gap: 0.5rem;
}

.detail-icon {
  color: var(--muted-foreground);
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.detail-content p:first-child {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.125rem;
}

.detail-content p:last-child {
  font-size: 0.875rem;
  font-weight: 500;
}

.fare {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  margin-top: 0.25rem;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: all 0.3s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tab-btn:hover:not(.active) {
  background: var(--muted);
}

/* Search Bar */
.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.search-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Profile Page */
.profile-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.profile-section-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
}

.avatar-section p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.form-group input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.stats-grid-profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  gap: 0.75rem;
}

.stat-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-item-icon.blue {
  background: rgba(66, 133, 244, 0.1);
  color: var(--stat-blue);
}

.stat-item-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-item-icon.orange {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
}

.stat-item-icon.warning {
  background: rgba(255, 165, 0, 0.1);
  color: var(--warning);
}

.stat-item-content p:first-child {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.stat-item-content p:last-child {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-content {
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--muted-foreground);
  transition: all 0.3s;
  border-radius: 0.5rem;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item:hover {
  color: var(--foreground);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item.active svg {
  fill: var(--primary);
}

.nav-item span {
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-item.active span {
  font-weight: 700;
}

/* Icons (using simple SVG paths) */
.icon {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-title h1 {
    font-size: 1.25rem;
  }

  /* Keep two primary stat cards side-by-side on tablet/mobile while making content responsive */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-details {
    grid-template-columns: 1fr;
  }

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Extra small screens: keep two columns but make cards more compact and text responsive */
@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
    min-height: 64px;
  }

  .stat-info p {
    font-size: 0.75rem;
  }

  .stat-info h3 {
    font-size: clamp(1rem, 6vw, 1.5rem);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }
}

/* Ensure numeric values and labels scale smoothly */
.stat-info h3 {
  font-size: clamp(1.25rem, 3.5vw, 2rem);
}

/* Utility Classes */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
}