/* ============================================================
   SFCG Wayfinder — Global Stylesheet
   ============================================================ */

:root {
    --primary: #4a0e0e;
    --primary-dark: #350a0a;
    --accent: #f0c070;
    --sidebar-width: 240px;
    --topbar-height: 58px;
    --bg: #f4f6f9;
    --text: #2d2d2d;
    --card-radius: 12px;
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--role-color, var(--primary));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.25s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-title,
.sidebar.collapsed .brand-role,
.sidebar.collapsed span { display: none; }
.sidebar.collapsed .sidebar-nav a { justify-content: center; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-icon img {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.sidebar-brand-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 16px 8px;
}

.sidebar.collapsed .sidebar-brand-img {
    margin: 0 auto;
}

.brand-title { font-size: 0.95rem; font-weight: 700; color: white; }
.brand-role  { font-size: 0.72rem; color: var(--accent); margin-top: 1px; }

.sidebar-nav {
    list-style: none;
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-nav li a.active {
    background: rgba(255,255,255,0.12);
    color: white;
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-nav li a i { width: 18px; text-align: center; font-size: 0.95rem; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.15s;
}

.sidebar-logout:hover { background: rgba(255,255,255,0.08); color: #ff9999; }

/* ---- Main Wrapper ---- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 0.25s;
}

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sidebar-toggle {
    background: none;
    border: 1px solid #ddd;
    color: #555;
    padding: 6px 10px;
    border-radius: 6px;
}

.topbar-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    flex: 1;
}

.topbar-user {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    align-items: center;
}

/* ---- Page Content ---- */
.page-content {
    padding: 24px;
    flex: 1;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-body { padding: 20px; }

/* ---- Stat Cards ---- */
.stat-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    transition: transform 0.15s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.maroon  { background: #fdecea; color: #4a0e0e; }
.stat-icon.blue    { background: #e8f4fd; color: #0d3b6e; }
.stat-icon.green   { background: #e9f7ef; color: #0a5c0a; }
.stat-icon.gold    { background: #fdf8e7; color: #856404; }

.stat-info .stat-num  { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-info .stat-label { font-size: 0.8rem; color: #888; margin-top: 4px; }

/* ---- Tables ---- */
.table { font-size: 0.875rem; }
.table th { font-weight: 600; color: #555; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.table td { vertical-align: middle; }

/* ---- Buttons ---- */
.btn-primary   { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-action {
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
}

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(74,14,14,0.15);
}

.form-label { font-weight: 500; font-size: 0.875rem; color: #444; }

/* ---- Map (Leaflet) ---- */
#map {
    width: 100%;
    height: 480px;
    border-radius: var(--card-radius);
    z-index: 1;
}

#map-full {
    width: 100%;
    height: calc(100vh - var(--topbar-height) - 48px);
    border-radius: var(--card-radius);
    z-index: 1;
}

/* ---- Public Map Page ---- */
.public-header {
    background: var(--primary);
    color: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 200;
}

.public-nav {
    background: #6b1a1a;
    display: flex;
    gap: 4px;
    padding: 0 20px;
    position: sticky;
    top: 64px;
    z-index: 199;
}

.public-nav a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 10px 16px;
    font-size: 0.85rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.public-nav a:hover, .public-nav a.active {
    color: white;
    border-bottom-color: var(--accent);
}

.map-layout {
    display: flex;
    height: calc(100vh - 104px);
}

.map-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-sidebar-section {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.map-sidebar-section h6 {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.map-loc-list { flex: 1; overflow-y: auto; padding: 8px; }

.map-loc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.map-loc-item:hover { background: #fdf3e7; border-color: #f0c070; }

.map-loc-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.loc-building  { background: #e8f4fd; }
.loc-office    { background: #fdecea; }
.loc-classroom { background: #e9f7ef; }
.loc-facility  { background: #fff3cd; }
.loc-entrance  { background: #f8d7da; }

.map-loc-name  { font-size: 0.85rem; font-weight: 600; color: #333; }
.map-loc-cat   { font-size: 0.73rem; color: #888; text-transform: capitalize; }

#public-map { flex: 1; z-index: 1; }

.info-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 18px 22px;
    max-width: 290px;
    display: none;
    z-index: 500;
    border-left: 4px solid var(--primary);
}

.info-popup.show { display: block; }
.info-popup .pop-cat  { font-size: 0.72rem; text-transform: uppercase; color: #888; letter-spacing: 0.5px; }
.info-popup .pop-name { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 4px 0 6px; }
.info-popup .pop-desc { font-size: 0.82rem; color: #555; line-height: 1.5; }
.info-popup .pop-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 1.1rem; color: #aaa; cursor: pointer; }

.route-result {
    background: #fdf3e7;
    border: 1px solid #f0c070;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    margin-top: 10px;
    display: none;
}

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at center, #5c1212 0%, #350808 60%, #1c0303 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 24px 16px;
}

.login-bg-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(580px, 85vw);
    height: min(580px, 85vw);
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.login-bg-watermark img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.6));
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    padding: 38px 34px;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(12px);
}

.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .logo-icon { font-size: 2rem; color: var(--primary); }
.login-logo img,
.login-logo-img {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain;
    border-radius: 50%;
    display: inline-block;
}
.login-logo h1 { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-top: 8px; }
.login-logo p  { font-size: 0.78rem; color: #888; }

.hdr-logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .map-sidebar { display: none; }
    .sidebar { position: fixed; z-index: 300; }
    .main-wrapper { margin-left: 0 !important; }
    .page-content { padding: 16px; }
}

/* ============================================================
   Animated & Color-Changing Navigation Route Effects
   ============================================================ */
@keyframes dashFlow {
  to {
    stroke-dashoffset: -44;
  }
}

@keyframes routeColorShift {
  0%   { stroke: #d90429 !important; } /* Vivid Crimson */
  25%  { stroke: #f59e0b !important; } /* Bright Amber Gold */
  50%  { stroke: #10b981 !important; } /* Emerald Green */
  75%  { stroke: #0284c7 !important; } /* Electric Royal Blue */
  100% { stroke: #d90429 !important; }
}

@keyframes glowPulse {
  0%, 100% {
    stroke-opacity: 0.35;
    stroke-width: 9px;
  }
  50% {
    stroke-opacity: 0.8;
    stroke-width: 14px;
  }
}

.animated-route-glow {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.35));
  animation: glowPulse 1.8s ease-in-out infinite, routeColorShift 4s ease-in-out infinite !important;
}

.animated-route-flow {
  stroke-dasharray: 12, 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: dashFlow 0.9s linear infinite, routeColorShift 4s ease-in-out infinite !important;
}

/* Pulsing Start and Destination Radar Rings */
.route-pulse-start, .route-pulse-end {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.route-pulse-start .pulse-ring, .route-pulse-end .pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: radarRipple 1.6s ease-out infinite;
  pointer-events: none;
}
.route-pulse-start .pulse-ring {
  background: rgba(16, 185, 129, 0.35);
  border: 2px solid #10b981;
}
.route-pulse-end .pulse-ring {
  background: rgba(217, 4, 41, 0.35);
  border: 2px solid #d90429;
}
.route-pulse-start .pulse-core, .route-pulse-end .pulse-core {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.route-pulse-start .pulse-core { border: 2px solid #10b981; }
.route-pulse-end .pulse-core { border: 2px solid #d90429; }

@keyframes radarRipple {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ============================================================
   Google Maps-Style Live Navigation & Compass Cone
   ============================================================ */
.live-user-icon-container {
  background: transparent !important;
  border: none !important;
}
.live-user-marker {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.live-user-dot {
  width: 18px;
  height: 18px;
  background: #1a73e8;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
  z-index: 5;
}
.live-user-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  background: rgba(26, 115, 232, 0.35);
  border-radius: 50%;
  animation: radarRipple 1.8s ease-out infinite;
  z-index: 4;
}
.live-nav-cone {
  position: absolute;
  width: 64px;
  height: 64px;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
  transform-origin: 32px 32px;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.cone-beam {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 34px solid rgba(26, 115, 232, 0.38);
  filter: drop-shadow(0 0 6px rgba(26, 115, 232, 0.6));
  border-radius: 4px;
}

/* HUD Top Card */
.live-nav-hud {
  position: fixed;
  top: 68px;
  left: 16px;
  right: 16px;
  max-width: 520px;
  margin: 0 auto;
  z-index: 1200;
  pointer-events: none;
}
.hud-top-card {
  pointer-events: auto;
  background: #0f172a;
  color: #fff;
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  animation: slideDownHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-top-card.arrived-card {
  background: #064e3b;
  border-color: #059669;
}
.hud-icon-box {
  width: 48px;
  height: 48px;
  background: #1e293b;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #38bdf8;
  flex-shrink: 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}
.hud-content {
  flex: 1;
  min-width: 0;
}
.hud-distance {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #38bdf8;
}
.hud-instruction {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-next-step {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.hud-action-btn:hover {
  background: rgba(255,255,255,0.22);
}
.hud-action-btn.muted {
  background: #dc2626;
  color: #fff;
}

/* HUD Bottom Floating Status Bar */
.hud-bottom-bar {
  pointer-events: auto;
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
  border-radius: 24px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22);
  border: 1px solid #e2e8f0;
  animation: slideUpHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-metric {
  display: flex;
  flex-direction: column;
}
.hud-metric-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: #059669 !important;
}
.hud-metric-lbl {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.hud-dest-box {
  flex: 1;
  text-align: center;
  min-width: 0;
  padding: 0 8px;
}
.hud-dest-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-dest-sub {
  font-size: 0.68rem;
  margin-top: 2px;
}
.hud-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.88rem;
}
.hud-ctrl-btn:hover {
  background: #e2e8f0;
}
.hud-ctrl-btn.btn-exit {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
  font-weight: bold;
}
.hud-ctrl-btn.btn-exit:hover {
  background: #ef4444;
  color: #fff;
}

@keyframes slideDownHud {
  from { transform: translateY(-30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes slideUpHud {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   Dynamic "YOU ARE HERE" & Multi-Route Selection Styles
   ============================================================ */

/* ── "YOU ARE HERE" Dynamic Marker ── */
.yah-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 4px 12px rgba(74, 14, 14, 0.45));
  z-index: 9999 !important;
}

.yah-bubble {
  background: linear-gradient(135deg, #4a0e0e 0%, #7f1d1d 100%);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  border: 2px solid #f0c070;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: yahBob 2s infinite ease-in-out;
}

.yah-live-pulse {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: yahPulseRing 1.8s infinite;
}

.yah-pin-icon {
  width: 38px;
  height: 38px;
  background: #ffffff;
  color: #4a0e0e;
  border: 3px solid #4a0e0e;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  margin-top: 2px;
}

.yah-pin-icon i {
  transform: rotate(45deg);
  font-size: 1.15rem;
  color: #4a0e0e;
}

.yah-loc-name {
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

@keyframes yahBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes yahPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── "DESTINATION" Dynamic Marker ── */
.dest-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.4));
  z-index: 9998 !important;
}

.dest-bubble {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dest-pin-icon {
  width: 36px;
  height: 36px;
  background: #dc2626;
  color: #ffffff;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  margin-top: 2px;
}

.dest-pin-icon i {
  transform: rotate(45deg);
  font-size: 1.1rem;
}

.dest-loc-name {
  background: rgba(255, 255, 255, 0.95);
  color: #b91c1c;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 1px solid #fca5a5;
  white-space: nowrap;
}

/* ── Multi-Route Selection Cards ── */
.route-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.route-select-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-select-card:hover {
  border-color: #f0c070;
  background: #fffdfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.route-select-card.active {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.15);
}

.rsc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rsc-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
}

.rsc-badge.badge-shortest {
  background: #1d4ed8;
  color: #ffffff;
}

.rsc-badge.badge-alt {
  background: #f59e0b;
  color: #ffffff;
}

.route-select-card.active .rsc-badge.badge-alt {
  background: #d97706;
}

.rsc-time {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}

.rsc-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rsc-dist {
  font-size: 0.80rem;
  font-weight: 700;
  color: #475569;
}

.rsc-via {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.route-select-card.active .rsc-via {
  color: #1e40af;
  font-weight: 600;
}

/* Map Polyline Styles */
.route-poly-inactive {
  cursor: pointer;
  transition: all 0.2s ease;
}
.route-poly-inactive:hover {
  stroke-width: 8 !important;
  stroke-opacity: 0.9 !important;
}

/* Same Location & No Route Banner */
.nav-alert-box {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  animation: fadeIn 0.3s;
}
.nav-alert-same {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}
.nav-alert-none {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}
