/* ─────────────────────────────────────────
   MEDROUTE — STYLE.CSS
   Dark premium medical college distance app
───────────────────────────────────────── */

/* ── RESET & TOKENS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg-base:        #0b0e17;
  --bg-surface:     #111827;
  --bg-card:        #161e2e;
  --bg-card-hover:  #1a2440;
  --bg-input:       #0f1623;
  --bg-sidebar:     #0d1420;

  --accent:         #14b8a6;
  --accent-light:   #2dd4bf;
  --accent-glow:    rgba(20, 184, 166, 0.18);
  --accent-grad:    linear-gradient(135deg, #0d9488, #14b8a6, #6366f1);

  --emerald:        #10b981;
  --violet:         #6366f1;
  --amber:          #f59e0b;
  --rose:           #f43f5e;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --border:         rgba(255,255,255,0.07);
  --border-accent:  rgba(20, 184, 166, 0.3);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 20px rgba(20,184,166,0.15);

  --sidebar-w: 260px;
  --topbar-h:  68px;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-w)));
  position: fixed;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sidebar-close {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
}
.btn-sidebar-close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

/* Sidebar Mobile Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.brand-icon {
  width: 38px; height: 38px;
  background: var(--accent-grad);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20,184,166,0.35);
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 18px 20px 8px;
}

.home-locations-list { padding: 0 10px; }

.location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2px;
  position: relative;
  group: true;
}

.location-item:hover { background: rgba(255,255,255,0.05); }

.location-item.active {
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
}

.location-item .loc-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.location-item.active .loc-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.location-item .loc-info { flex: 1; min-width: 0; }
.location-item .loc-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.location-item .loc-addr {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

.location-item .loc-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--rose);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.location-item:hover .loc-delete { opacity: 1; }
.location-item .loc-delete:hover { background: rgba(244,63,94,0.15); }

.btn-add-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 10px 4px;
  padding: 10px 14px;
  background: rgba(20,184,166,0.08);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-add-location:hover {
  background: var(--accent-glow);
  border-style: solid;
}

.sidebar-divider { height: 1px; background: var(--border); margin: 14px 0; }

.sidebar-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px;
}

.stat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 10px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: calc(100% - 20px);
}
.btn-sidebar-action:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

/* ── TOPBAR ── */
.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.topbar-row-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.topbar-row-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-menu-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  padding: 8px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
}
.btn-menu-toggle:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }

.active-location-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-light);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.2s;
}
.active-location-badge:hover {
  background: rgba(20, 184, 166, 0.25);
  border-color: var(--accent);
}

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--border-accent); }
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 0.85rem; font-family: inherit;
  width: 180px;
}
.search-bar input::placeholder { color: var(--text-muted); }

.sort-controls select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.sort-controls select:hover { border-color: rgba(255,255,255,0.15); }

.btn-add-college {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(20,184,166,0.35);
}
.btn-add-college:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(20,184,166,0.45); }
.btn-add-college:active { transform: translateY(0); }

/* ── STATUS BAR ── */
.status-bar {
  background: linear-gradient(90deg, rgba(20,184,166,0.12), rgba(99,102,241,0.08));
  border-bottom: 1px solid var(--border-accent);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--accent-light);
}

.status-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(20,184,166,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── CONTENT AREA ── */
.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── COLLEGES PANEL ── */
.colleges-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.colleges-panel::-webkit-scrollbar { width: 5px; }
.colleges-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.colleges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── COLLEGE CARD ── */
.college-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.college-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity 0.25s;
}

.college-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.college-card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.card-photo-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: var(--bg-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card-top:hover .card-photo-thumb {
  transform: scale(1.05);
  border-color: #38bdf8;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
}

.card-top:hover .card-photo-thumb img {
  transform: scale(1.12);
}

.thumb-photo-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 1px 3px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(20,184,166,0.2), rgba(99,102,241,0.15));
  border: 1px solid rgba(20,184,166,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.card-info { flex: 1; min-width: 0; }

.card-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.3;
  transition: color 0.18s;
}

.card-top:hover .card-name {
  color: #38bdf8;
}

.card-city {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-delete {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; border-radius: 6px; transition: all 0.2s;
  flex-shrink: 0;
}
.card-delete:hover { color: var(--rose); background: rgba(244,63,94,0.12); }

/* Distance badge */
.distance-section {
  margin-bottom: 12px;
}

.distance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(20,184,166,0.15), rgba(99,102,241,0.1));
  border: 1px solid rgba(20,184,166,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 8px;
}

.distance-pill svg { opacity: 0.8; }

.travel-times {
  display: flex;
  gap: 12px;
}

.travel-time-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.travel-time-item .time-val {
  font-weight: 600;
  color: var(--text-primary);
}

.distance-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-muted); padding: 4px 0;
}

.distance-error {
  font-size: 0.75rem;
  color: var(--amber);
  padding: 4px 0;
}

/* Card actions */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-card-action {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-card-maps {
  background: rgba(20,184,166,0.1);
  border: 1px solid rgba(20,184,166,0.2);
  color: var(--accent-light);
}
.btn-card-maps:hover { background: rgba(20,184,166,0.2); border-color: var(--accent); }

.btn-card-route {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc;
}
.btn-card-route:hover {
  background: rgba(99,102,241,0.2);
  border-color: #6366f1;
}

.btn-card-photo {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
}
.btn-card-photo:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: #f43f5e;
  color: #ffffff;
}

.btn-card-viewmap {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #38bdf8;
}
.btn-card-viewmap:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-card-refresh {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex: 0;
  padding: 7px;
}
.btn-card-refresh:hover { border-color: rgba(255,255,255,0.15); color: var(--text-secondary); }

/* ── MAP PANEL ── */
.map-panel {
  width: 440px;
  min-width: 340px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
}

.map-panel.collapsed { width: 0; min-width: 0; overflow: hidden; }

.map-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  gap: 8px;
}

.map-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
  white-space: nowrap;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}
.map-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-tool {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.btn-tool.active {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.4);
}
.btn-tool:hover {
  color: var(--text-primary);
}

.btn-icon {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 6px; border-radius: 8px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center;
}
.btn-icon:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

#map { flex: 1; min-height: 0; }

/* Polyline & Tooltip Badges */
.dist-polyline-label {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 9999px !important;
  padding: 2px 7px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(56, 189, 248, 0.2) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
}
.dist-polyline-label:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #7dd3fc !important;
  transform: scale(1.15) !important;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.7) !important;
  z-index: 99999 !important;
}
.dist-polyline-label::before {
  display: none !important;
}

.card-highlight {
  box-shadow: 0 0 0 2px #38bdf8, 0 8px 24px rgba(6, 182, 212, 0.35) !important;
  transform: translateY(-2px) !important;
}

/* Leaflet dark overrides */
.leaflet-container { background: #0b0e17 !important; }
.leaflet-tile { filter: brightness(0.75) contrast(1.1) saturate(0.9); }
.leaflet-control-attribution { background: rgba(0,0,0,0.7) !important; color: #666 !important; }
.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; border: 1px solid rgba(56, 189, 248, 0.3); }

/* Rich Map Popup Card */
.map-popup-card {
  width: 250px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
.popup-img-wrap {
  width: 100%;
  height: 110px;
  position: relative;
  background: var(--bg-surface);
  cursor: pointer;
  overflow: hidden;
}
.popup-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.popup-img-wrap:hover .popup-thumb {
  transform: scale(1.08);
}
.popup-photo-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.popup-body {
  padding: 10px 12px;
}
.popup-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
  line-height: 1.25;
}
.popup-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.popup-dist-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.popup-btns {
  display: flex;
  gap: 6px;
}
.popup-btn-detail {
  flex: 1;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.popup-btn-detail:hover {
  background: #06b6d4;
  color: #0f172a;
}
.popup-btn-dir {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.popup-btn-dir:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.4s ease;
}

.empty-icon {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20,184,166,0.1), rgba(99,102,241,0.08));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0,0,0,0.75);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-wide { max-width: 680px; }

/* ── COLLEGE DETAIL MODAL ── */
.modal-detail {
  max-width: 640px;
  border-color: rgba(56, 189, 248, 0.28);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
  margin-bottom: 2px;
}

.modal-detail .modal-header h2 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.28;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.modal-detail-body {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Media View Tabs */
.detail-media-tabs {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.detail-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-tab-btn.active {
  background: var(--bg-card);
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Hero Campus Photo Wrap */
.detail-hero-wrap {
  width: 100%;
}

.detail-hero-img-container {
  width: 100%;
  height: 250px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.detail-hero-img-container:hover .detail-hero-img {
  transform: scale(1.03);
}

.detail-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(15,23,42,0.85) 100%);
  pointer-events: none;
}

.detail-img-chips {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.img-chip-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.img-chip-action {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  text-decoration: none;
  transition: all 0.2s;
}

.img-chip-action:hover {
  background: #06b6d4;
  color: #0f172a;
}

/* Satellite Aerial View Wrap */
.detail-satellite-wrap {
  width: 100%;
}

.detail-satellite-map {
  width: 100%;
  height: 250px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.satellite-caption {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

/* Google Maps Photos Banner */
.detail-photo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(244, 63, 94, 0.25);
  text-decoration: none;
  color: inherit;
  transition: all 0.22s ease;
}

.detail-photo-banner:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(99, 102, 241, 0.2));
  border-color: #f43f5e;
  transform: translateY(-1px);
}

.photo-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.photo-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-banner-text strong {
  font-size: 0.82rem;
  color: #f8fafc;
}

.photo-banner-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.photo-banner-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.detail-photo-banner:hover .photo-banner-arrow {
  color: #fda4af;
  transform: translateX(3px);
}

/* Detail Distance Box */
.detail-distance-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
}

.detail-dist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-dist-from {
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-dist-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.detail-dist-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: 'Outfit', sans-serif;
}

.detail-dist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.detail-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-stat-card .stat-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.detail-stat-card .stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Detail Info Grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.detail-info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.info-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-val {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.coords-val {
  font-family: monospace;
  color: #38bdf8;
}

/* Detail Modal Footer */
.detail-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.btn-tool-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tool-action:hover {
  background: #06b6d4;
  color: #0f172a;
}

.btn-primary-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-grad);
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-action:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: all 0.2s; line-height: 1;
}
.btn-close:hover { background: rgba(244,63,94,0.12); color: var(--rose); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.required { color: var(--rose); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-row { display: flex; gap: 12px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 12px;
}

code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.78rem;
  color: var(--accent-light);
}

/* File drop zone */
.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--border-accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}
.file-drop-zone p { font-size: 0.85rem; margin: 8px 0 4px; }
.file-label { color: var(--accent); cursor: pointer; text-decoration: underline; }
.file-name { font-size: 0.75rem; color: var(--accent-light); }

/* Parsed preview */
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
}

.btn-sm {
  background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.2);
  border-radius: 6px; color: var(--rose); font-size: 0.75rem; padding: 3px 10px;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-sm:hover { background: rgba(244,63,94,0.2); }

.parsed-list {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 180px;
  overflow-y: auto;
}

.parsed-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.parsed-item:last-child { border-bottom: none; }
.parsed-item-num { color: var(--text-muted); flex-shrink: 0; padding-top: 1px; }
.parsed-item-name { font-weight: 500; color: var(--text-primary); }
.parsed-item-addr { color: var(--text-secondary); font-size: 0.72rem; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-grad);
  border: none; border-radius: var(--radius-md);
  color: white; font-size: 0.875rem; font-weight: 600;
  padding: 10px 22px; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
  box-shadow: 0 4px 14px rgba(20,184,166,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(20,184,166,0.45); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 500;
  padding: 10px 22px; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); color: var(--text-primary); }

.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2000;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-card);
  animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 360px;
}
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error   { border-color: rgba(244,63,94,0.3); }
.toast.info    { border-color: var(--border-accent); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { color: var(--text-primary); }
.toast-out { animation: slideOutRight 0.3s ease forwards; }

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  to { transform: translateX(120%); opacity: 0; }
}

.card-enter {
  animation: cardEnter 0.35s cubic-bezier(0.4,0,0.2,1);
}

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

/* ── CUSTOM MARKER ── */
.custom-marker {
  background: var(--accent-grad);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 10px rgba(20,184,166,0.5);
}

.home-marker {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 12px rgba(99,102,241,0.5);
}

/* ── MOBILE VIEW SWITCHER (Floating Pill) ── */
.mobile-view-toggle {
  display: none;
}

/* ── RESPONSIVE OVERHAUL ── */
@media (max-width: 960px) {
  :root {
    --sidebar-w: 280px;
  }

  /* Sidebar Drawer on Mobile & Tablet */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 2500 !important;
    width: var(--sidebar-w);
    max-width: 85vw;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    z-index: 2490 !important;
  }
  .btn-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Floating Segmented View Toggle */
  .mobile-view-toggle {
    display: inline-flex;
    position: fixed;
    bottom: max(18px, env(safe-area-inset-bottom, 18px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 15px rgba(20, 184, 166, 0.25);
    z-index: 1500;
  }

  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .mobile-toggle-btn.active {
    background: var(--accent-grad);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(20, 184, 166, 0.45);
  }

  /* View Switching (List vs Map) */
  .content-area {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
  }

  /* Default on mobile: show list, hide map */
  .colleges-panel {
    display: block !important;
    width: 100% !important;
    padding-bottom: 85px !important;
  }
  .map-panel {
    display: none !important;
  }

  /* When view-list active */
  .main-content.view-list .colleges-panel {
    display: block !important;
    width: 100% !important;
    padding-bottom: 85px !important;
  }
  .main-content.view-list .map-panel {
    display: none !important;
  }

  /* When view-map active */
  .main-content.view-map .colleges-panel {
    display: none !important;
  }
  .main-content.view-map .map-panel {
    display: flex !important;
    width: 100% !important;
    min-width: 100% !important;
    border-left: none !important;
    height: 100% !important;
  }
  .main-content.view-map .map-panel.collapsed {
    width: 100% !important;
  }
  .main-content.view-map #map {
    height: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  :root {
    --topbar-h: auto;
  }

  .topbar {
    height: auto;
    padding: 10px 14px;
    flex-direction: column;
    gap: 8px;
  }

  .topbar-row-main {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-row-filters {
    width: 100%;
    gap: 8px;
  }

  .search-bar {
    flex: 1;
    min-width: 0;
    padding: 7px 12px;
  }

  .search-bar input {
    width: 100%;
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  }

  .sort-controls select {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .active-location-badge {
    max-width: 170px;
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  .btn-add-college {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .colleges-panel {
    padding: 12px;
  }

  .colleges-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .college-card {
    padding: 14px;
  }

  /* Modals on Mobile & Tablet */
  .modal {
    width: calc(100% - 24px);
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 16px 18px;
  }
  .modal-footer {
    padding: 14px 18px;
  }
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Prevents mobile browser zoom */
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px;
    gap: 6px;
  }

  .active-location-badge {
    max-width: 130px;
    font-size: 0.74rem;
    padding: 4px 8px;
  }

  .btn-add-college {
    padding: 6px 10px;
  }

  .card-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-card-action {
    min-height: 38px;
    font-size: 0.72rem;
    padding: 6px 8px;
  }

  .travel-times {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-toggle-btn {
    padding: 7px 12px;
    font-size: 0.76rem;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 74px;
  }
  .toast {
    max-width: 100%;
  }

  .detail-hero-img-container,
  .detail-satellite-map {
    height: 190px;
  }
  .detail-dist-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .detail-info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .detail-modal-footer {
    flex-wrap: wrap;
  }
  .detail-modal-footer button,
  .detail-modal-footer a {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .active-location-badge {
    max-width: 105px;
  }
  .btn-add-college .btn-text {
    display: none;
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
