/* ==========================================================================
   ALİAĞA TAKSİ DURAKLARI - MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette - Light Mode (Yellow Cab / Amber Theme) */
  --color-primary: #d97706;
  --color-primary-hover: #b45309;
  --color-primary-light: #fef3c7;
  --color-primary-border: #fde68a;
  
  --color-taxi: #f59e0b;
  --color-taxi-dark: #b45309;
  --color-taxi-glow: rgba(245, 158, 11, 0.35);

  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-accent-border: #bfdbfe;

  --color-success: #059669;
  --color-success-light: #ecfdf5;

  --color-warning: #ea580c;
  --color-warning-light: #fff7ed;

  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-overlay: rgba(15, 23, 42, 0.55);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-strong: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.09), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 24px rgba(245, 158, 11, 0.28);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-height: 70px;
  --sidebar-width: 440px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --color-primary: #fbbf24;
  --color-primary-hover: #f59e0b;
  --color-primary-light: rgba(245, 158, 11, 0.14);
  --color-primary-border: rgba(245, 158, 11, 0.35);

  --color-taxi: #fbbf24;
  --color-taxi-dark: #f59e0b;
  --color-taxi-glow: rgba(251, 191, 36, 0.35);

  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-accent-light: rgba(59, 130, 246, 0.15);
  --color-accent-border: rgba(59, 130, 246, 0.35);

  --color-success: #10b981;
  --color-success-light: rgba(16, 185, 129, 0.15);

  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-glass: rgba(17, 24, 39, 0.88);
  --bg-overlay: rgba(0, 0, 0, 0.75);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --border-subtle: #1f2937;
  --border-medium: #374151;
  --border-strong: #4b5563;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button, input, select, textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* App Shell Structure */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Top Navigation Bar */
.app-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.brand-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid #fde68a;
}

[data-theme="dark"] .badge-live {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #d97706;
  border-radius: 50%;
  animation: pulse-animation 1.5s infinite;
}

[data-theme="dark"] .pulse-dot {
  background-color: #fbbf24;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

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

.theme-toggle .moon-icon { display: block; }
.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; color: #fbbf24; }

/* Main Split Layout */
.app-content {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  position: relative;
}

/* Sidebar (Left side) */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: var(--shadow-md);
}

.sidebar-controls {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-shrink: 0;
}

/* Status Card */
.duty-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border: 1px solid var(--color-primary-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  gap: 10px;
}

.duty-date-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-find-nearest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-primary);
  color: #111827;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.btn-find-nearest:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Search Input */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 42px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--color-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.search-clear {
  position: absolute;
  right: 12px;
  color: var(--text-dim);
  font-size: 1.1rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.search-clear.visible { display: flex; }
.search-clear:hover { color: var(--text-main); }

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-app);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

.filter-chip.active {
  background: #111827;
  color: #fbbf24;
  border-color: #111827;
}

[data-theme="dark"] .filter-chip.active {
  background: #fbbf24;
  color: #111827;
  border-color: #fbbf24;
}

/* Pharmacy / Taxi Stand Card List */
.pharmacy-list-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pharmacy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.pharmacy-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pharmacy-card.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-lg);
  background: var(--bg-surface-elevated);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pharmacy-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-region {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

.badge-nearest {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="dark"] .badge-nearest {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.4);
}

.distance-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.pharmacy-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.3;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.info-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-dim);
}

.info-row strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Card Actions */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.btn-action {
  height: 40px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-call {
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-call:hover {
  background: #d97706;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-route {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .btn-route {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-route:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

/* Card Sub Actions */
.card-sub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.btn-link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

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

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-footer a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-footer a:hover {
  color: var(--color-primary);
}

/* Interactive Map Container (Right side) */
.map-container {
  flex: 1;
  height: 100%;
  position: relative;
  background: #e2e8f0;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* Floating Map Controls */
.map-floating-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-control-btn {
  height: 40px;
  padding: 0 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.map-control-btn:hover {
  background: var(--bg-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Layer Control Dropdown */
.layer-control-wrap {
  position: relative;
}

.layer-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 40;
}

.layer-dropdown.show {
  display: flex;
}

.layer-dropdown-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layer-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.layer-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-app);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.layer-option-btn:hover {
  border-color: var(--color-primary);
}

.layer-option-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

.layer-thumb {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
}

.layer-thumb-street { background-color: #cbd5e1; }
.layer-thumb-satellite { background-color: #1e293b; }
.layer-thumb-dark { background-color: #0f172a; }
.layer-thumb-topo { background-color: #a7f3d0; }

.layer-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
}

.layer-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.layer-switch-row input {
  display: none;
}

.switch-ui {
  width: 36px;
  height: 20px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.layer-switch-row input:checked + .switch-ui {
  background: var(--color-primary);
}

.layer-switch-row input:checked + .switch-ui::after {
  transform: translateX(16px);
}

/* In-App Route Guidance Panel */
.route-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.route-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

[data-theme="dark"] .route-panel-badge {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.route-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #2563eb;
  border-radius: 50%;
  animation: pulse-blue 1.5s infinite;
}

@keyframes pulse-blue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.btn-close-route {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.btn-close-route:hover {
  background: var(--bg-app);
  color: var(--text-main);
}

.route-pharmacy-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.route-meta-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-app);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.route-meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.meta-value {
  font-size: 1rem;
  font-weight: 800;
  color: #2563eb;
  margin-top: 2px;
}

[data-theme="dark"] .meta-value {
  color: #60a5fa;
}

.btn-nav-gps {
  width: 100%;
  height: 38px;
  background: #2563eb;
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-nav-gps:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Custom Leaflet Map Pin */
.custom-pin-wrap {
  background: transparent;
  border: none;
}

.custom-pin {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 3px solid #111827;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-fast);
}

.custom-pin:hover, .custom-pin.active {
  transform: scale(1.15);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.8);
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 6px !important;
  border: 1px solid var(--border-subtle) !important;
}

.leaflet-popup-tip {
  background: var(--bg-surface) !important;
}

.popup-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  padding: 4px;
}

.popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.popup-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #111827;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .toast {
  background: #1f2937;
  border: 1px solid #374151;
}

@keyframes toastIn {
  from { transform: translateY(12px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Mobile View Switcher (Bottom Center) */
.mobile-view-nav {
  display: none;
}

/* Mobile Bottom Sheet Preview */
.mobile-sheet-preview {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 40;
}

/* Empty State & Skeletons */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  gap: 12px;
}

.empty-state h3 {
  color: var(--text-main);
  font-size: 1rem;
}

.empty-state p {
  font-size: 0.82rem;
  max-width: 260px;
}

.skeleton-card {
  height: 140px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-app) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border: 1px solid var(--border-subtle);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 900px) {
  :root {
    --sidebar-width: 100%;
  }

  .app-header {
    padding: 0 16px;
  }

  .brand-text h1 {
    font-size: 1rem;
  }

  .brand-meta {
    display: none;
  }

  .app-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
  }

  .map-container {
    width: 100%;
    height: 100%;
  }

  /* Controlled by data-mobile-view on .app-content */
  .app-content[data-mobile-view="list"] .sidebar {
    display: flex;
  }

  .app-content[data-mobile-view="list"] .map-container {
    display: none;
  }

  .app-content[data-mobile-view="map"] .sidebar {
    display: none;
  }

  .app-content[data-mobile-view="map"] .map-container {
    display: block;
  }

  .mobile-view-nav {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-xl);
    z-index: 50;
    gap: 4px;
  }

  .view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-fast);
  }

  .view-btn.active {
    background: #111827;
    color: #fbbf24;
  }

  [data-theme="dark"] .view-btn.active {
    background: #fbbf24;
    color: #111827;
  }

  .route-panel {
    top: auto;
    bottom: 80px;
    left: 16px;
    right: 16px;
    width: auto;
  }

  .map-floating-bar {
    top: 12px;
    left: 12px;
    right: 12px;
    overflow-x: auto;
  }
}
