/* ==========================================================================
   ALİAĞA & YENİ ŞAKRAN NÖBETÇİ ECZANELER - MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-light: #ecfdf5;
  --color-primary-border: #a7f3d0;
  
  --color-accent: #dc2626;
  --color-accent-light: #fef2f2;
  --color-accent-border: #fecaca;
  
  --color-warning: #d97706;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fde68a;
  
  --color-info: #0284c7;
  --color-info-light: #f0f9ff;
  
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-overlay: rgba(15, 23, 42, 0.5);
  
  --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.06);
  --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 20px rgba(5, 150, 105, 0.25);
  
  --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: #10b981;
  --color-primary-hover: #34d399;
  --color-primary-light: rgba(16, 185, 129, 0.12);
  --color-primary-border: rgba(16, 185, 129, 0.3);
  
  --color-accent: #ef4444;
  --color-accent-light: rgba(239, 68, 68, 0.12);
  --color-accent-border: rgba(239, 68, 68, 0.3);
  
  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.12);
  --color-warning-border: rgba(245, 158, 11, 0.3);
  
  --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.7);
  
  --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);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* App Container */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Header */
.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: 1000;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo-fallback {
  color: white;
  font-weight: 800;
  font-size: 20px;
}

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

.brand-text .badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.brand-text .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

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

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

.btn-icon:hover {
  background: var(--bg-app);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

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

/* Main Content Area */
.app-content {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Sidebar / Card Panel */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

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

/* Date Info Bar */
.duty-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.duty-date-group {
  display: flex;
  flex-direction: column;
}

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

.duty-date-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-find-nearest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

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

/* Search Box */
.search-wrapper {
  position: relative;
  width: 100%;
}

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

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

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  cursor: pointer;
  display: none;
}

.search-input:not(:placeholder-shown) ~ .search-clear {
  display: block;
}

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

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

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

.filter-chip:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.filter-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

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

/* Scrollbar styling */
.pharmacy-list-wrapper::-webkit-scrollbar {
  width: 6px;
}
.pharmacy-list-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.pharmacy-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

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

.pharmacy-card:hover {
  border-color: var(--color-primary-border);
  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-light), var(--shadow-lg);
  background: var(--bg-surface-elevated);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

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

.badge-region {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-app);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

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

[data-theme="dark"] .badge-nearest {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.distance-tag {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

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

/* Notice for İcap Nöbeti */
.icap-alert {
  background: var(--color-warning-light);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.icap-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Info Details */
.card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

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

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

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

/* Action Buttons */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-call {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.btn-call:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-route {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}

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

.card-sub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

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

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

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

.footer-credits a {
  color: var(--color-primary);
  font-weight: 600;
}
.footer-credits a:hover {
  text-decoration: underline;
}

/* Map Section */
.map-container {
  flex: 1;
  height: 100%;
  position: relative;
  background: #e5e7eb;
}

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

/* Dark mode Leaflet tile adjustment - Handled by native CartoDB Dark Matter tiles */
[data-theme="dark"] .leaflet-tile-pane {
  /* Native dark map tiles used */
}

/* Custom Marker Styling */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  border: 2px solid white;
  transition: transform var(--transition-fast);
}

.custom-pin:hover {
  transform: rotate(-45deg) scale(1.15);
}

.custom-pin.selected {
  background: #dc2626;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.25); }
}

.custom-pin span {
  transform: rotate(45deg);
  font-weight: 800;
  font-size: 16px;
  font-family: var(--font-sans);
}

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

.leaflet-popup-content {
  margin: 0;
  line-height: 1.5;
  width: 280px !important;
}

.popup-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.popup-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* Floating Controls on Map */
.map-floating-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 8px;
}

.map-control-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

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

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

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

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

@keyframes dropdown-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.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 6px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.layer-option-btn:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.layer-option-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.layer-thumb {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-sm);
  display: block;
}

.layer-thumb-street {
  background: linear-gradient(135deg, #a7f3d0 0%, #bae6fd 100%);
  border: 1px solid #6ee7b7;
}

.layer-thumb-satellite {
  background: linear-gradient(135deg, #064e3b 0%, #1e3a8a 50%, #15803d 100%);
  border: 1px solid #047857;
}

.layer-thumb-dark {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
}

.layer-thumb-topo {
  background: linear-gradient(135deg, #fef3c7 0%, #d97706 50%, #92400e 100%);
  border: 1px solid #f59e0b;
}

.layer-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
}

.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;
  user-select: none;
}

.layer-switch-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}

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

.switch-ui {
  width: 36px;
  height: 20px;
  background: var(--border-medium);
  border-radius: 9999px;
  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);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.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;
  left: 16px;
  width: 290px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slide-in-top 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

@keyframes slide-in-top {
  from { transform: translateY(-15px); 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;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

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

.route-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
  animation: pulse-ring 2s infinite;
}

.btn-close-route {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--bg-app);
  transition: all var(--transition-fast);
}

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

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

.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;
}

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

.route-meta-item .meta-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.route-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.btn-nav-gps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  background: #2563eb;
  color: white;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
  transition: all var(--transition-fast);
}

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

@media (max-width: 900px) {
  .route-panel {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* Mobile View Switcher */
.mobile-view-nav {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  z-index: 1100;
  gap: 4px;
}

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

.view-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Mobile Floating Bottom Sheet for Map */
.mobile-sheet-preview {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
  z-index: 1050;
  animation: slide-up 0.25s ease-out;
}

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

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes toast-in {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Skeleton Loading */
.skeleton-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;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--border-subtle) 25%, var(--border-medium) 50%, var(--border-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

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

.empty-state svg {
  color: var(--text-dim);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .app-header {
    padding: 0 16px;
    height: 60px;
  }
  
  .brand-text h1 {
    font-size: 0.98rem;
  }
  
  .brand-logo-wrap {
    width: 38px;
    height: 38px;
  }

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

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

  .map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }

  /* When map view is active on mobile */
  .app-content[data-mobile-view="map"] .sidebar {
    display: none;
  }

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

  .mobile-view-nav {
    display: flex;
  }

  .pharmacy-list-wrapper {
    padding-bottom: 90px; /* Space for mobile nav pill */
  }

  .toast-container {
    bottom: 90px;
    right: 16px;
    left: 16px;
    align-items: center;
  }
}
