:root {
  --primary: #0077b6;
  --primary-hover: #0096c7;
  --secondary: #00b4d8;
  --accent: #90e0ef;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-border: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header */
.app-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  padding: 0.75rem 1.5rem;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text strong {
  color: var(--secondary);
}

/* Role Selector Tabs */
.role-selector {
  display: flex;
  background-color: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
}

.role-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-btn.active {
  background-color: var(--primary);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.4);
}

/* Main Content Layout */
.main-content {
  flex: 1;
  position: relative;
}

.panel-section {
  display: none;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 60px);
  width: 100%;
}

.panel-section.active {
  display: grid;
}

@media (max-width: 850px) {
  .panel-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
  }
}

/* Sidebar & Cards */
.sidebar {
  background-color: var(--surface);
  border-right: 1px solid var(--surface-border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  z-index: 500;
}

.card {
  background-color: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h2, .card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  border-color: var(--secondary);
}

/* Quote Box */
.quote-box {
  background-color: var(--surface);
  border-left: 4px solid var(--secondary);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.quote-row.fare {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  border-top: 1px dashed var(--surface-border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.primary-btn {
  background-color: var(--primary);
  color: #fff;
}

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

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

.success-btn:hover {
  background-color: #059669;
}

.danger-btn {
  background-color: var(--danger);
  color: #fff;
  margin-top: 0.75rem;
}

/* Badges & Status */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.badge-requested {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.badge-accepted {
  background-color: rgba(0, 180, 216, 0.2);
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

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

.driver-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background-color: var(--surface);
  padding: 0.85rem;
  border-radius: 8px;
}

.driver-avatar {
  font-size: 2rem;
}

.driver-details h4 {
  font-size: 1rem;
  color: var(--text);
}

.driver-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Switch Toggle */
.driver-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--surface-border);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Driver Stats */
.driver-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-box {
  background-color: var(--surface);
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Alerts */
.alert-card {
  border-left: 4px solid var(--warning);
  background-color: #1e1b18;
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--warning);
}

.alert-details {
  font-size: 0.9rem;
  margin: 1rem 0;
}

.alert-fare {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--success);
}

/* Map */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.map {
  width: 100%;
  height: 100%;
  background-color: #1a202c;
}

.hidden {
  display: none !important;
}
