/* ===================================================================
   navgraph dsa - OutletBuddy-Style Dark-Matte Stylesheet
   Experiment 14 & 15: Intelligent Map Routing & Algorithmic Visualizer
   =================================================================== */

/* ---------- CSS Reset & Custom Properties ---------- */
:root {
  color-scheme: dark;

  /* Graphite Dark Theme Palette */
  --bg-sidebar: #0f0f10;
  --bg-sidebar-alt: #141415;
  --bg-pill: #19191b;
  --bg-card: #19191b;
  --bg-card-hover: #232325;
  --bg-modal: #141415;
  --bg-glass-card: rgba(20, 20, 21, 0.96);

  /* Primary Theme Accent (Warm Amber & Radiant Gold by default) */
  --accent-primary: #f59e0b;
  --accent-primary-light: #fbbf24;
  --accent-primary-core: #fef08a;
  --accent-primary-dark: #d97706;
  --accent-primary-glow: rgba(245, 158, 11, 0.35);
  --accent-primary-subtle: rgba(245, 158, 11, 0.14);

  /* Legacy & Semantic Aliases (seamless compatibility across UI) */
  --accent-mint: var(--accent-primary);
  --accent-mint-light: var(--accent-primary-light);
  --accent-mint-dark: var(--accent-primary-dark);
  --accent-mint-glow: var(--accent-primary-glow);
  --accent-mint-subtle: var(--accent-primary-subtle);

  /* Secondary Accents */
  --accent-sky: #38bdf8;
  --accent-periwinkle: #a5b4fc;
  --accent-indigo: #818cf8;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-orange: #f97316;
  --accent-rose: #f43f5e;

  /* Typography Colors */
  --text-white: #ededed;
  --text-primary: #ededed;
  --text-secondary: #a1a1a6;
  --text-muted: #85858b;
  --text-dark: #111111;

  /* Borders & Dividers */
  --border-subtle: rgba(237, 237, 237, 0.08);
  --border-default: rgba(237, 237, 237, 0.12);
  --border-active: var(--accent-primary);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, "Fira Code", monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.65);
  --shadow-floating: 0 24px 48px rgba(0, 0, 0, 0.75);
  --shadow-mint-glow: 0 0 24px var(--accent-primary-glow);
}

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

html, body {
  color-scheme: dark;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #0f0f10;
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   GLOBAL SELECT & OPTION STYLING (DARK-MODE CRITICAL FIX)
   Prevents Windows Chromium from drawing blinding white native popups
   =================================================================== */
select,
.origin-select,
.form-select,
.pill-select,
.preset-select,
.algo-select {
  color-scheme: dark;
  background-color: #232325 !important;
  color: #ededed !important;
}

select option,
.origin-select option,
.form-select option,
.pill-select option,
.preset-select option,
.algo-select option {
  background-color: #232325 !important;
  color: #ededed !important;
  padding: 8px 12px;
}

select option:hover,
select option:checked,
select option:focus,
.origin-select option:hover,
.origin-select option:checked,
.form-select option:hover,
.form-select option:checked,
.pill-select option:hover,
.pill-select option:checked {
  background-color: #2d2d30 !important;
  color: #ededed !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Typography Utilities */
.font-mono { font-family: var(--font-mono) !important; }
.text-mint { color: var(--accent-mint-light) !important; }
.text-sky { color: var(--accent-mint-light) !important; }
.text-indigo { color: var(--accent-indigo) !important; }
.text-periwinkle { color: var(--accent-periwinkle) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-rose { color: var(--accent-rose) !important; }
.text-muted { color: var(--text-muted) !important; }
.mint-text { color: var(--accent-mint-light); font-weight: 600; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ===================================================================
   MAIN VIEWPORT LAYOUT
   =================================================================== */
.outlet-app-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  background-color: #0b0b0b;
}

.app-viewport {
  width: 100vw;
  height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* ===================================================================
   LEFT SIDEBAR (OUTLETBUDDY-STYLE #141414)
   =================================================================== */
.sidebar-panel {
  width: 375px;
  min-width: 350px;
  max-width: 420px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  flex-shrink: 0;
  position: relative;
}

/* 1. Top Bar */
.sidebar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px 20px;
  flex-shrink: 0;
}

.btn-circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-circle-icon:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-white);
}

.btn-circle-icon.btn-xs {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.sidebar-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-picker-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 6px;
  height: 28px;
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background-color: var(--dot-color);
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
  position: relative;
}

.theme-dot:hover {
  transform: scale(1.15);
}

.theme-dot.active {
  border-color: #ffffff;
  transform: scale(1.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.brand-squircle {
  width: 38px;
  height: 38px;
  background-color: #ffffff;
  color: #111111;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

/* 2. Search Bar Pill */
.sidebar-search-container {
  padding: 0 16px 12px 16px;
  flex-shrink: 0;
}

.search-pill-wrapper {
  position: relative;
  width: 100%;
  height: 44px;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  transition: border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.search-pill-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.search-pill-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 14px;
  font-family: var(--font-sans);
  padding-right: 64px;
}

.search-pill-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.search-clear-btn.hidden {
  display: none !important;
}

.search-pill-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

/* 3. Control / Filter Row */
.sidebar-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 16px 12px 16px;
  flex-shrink: 0;
}

.filter-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-btn-col {
  flex: 0 0 auto;
}

.filter-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: capitalize;
}

.pill-select-wrapper {
  position: relative;
  width: 100%;
}

.pill-select {
  width: 100%;
  height: 36px;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: #ededed;
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 0 24px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

.pill-select:hover, .pill-select:focus {
  border-color: var(--accent-primary);
  background-color: var(--bg-card-hover);
}

.pill-chevron {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.pill-btn-filter {
  height: 36px;
  background-color: var(--bg-sidebar-alt);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.pill-btn-filter:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

/* 4. Origin Selector Bar */
.sidebar-origin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px 16px;
  flex-shrink: 0;
}

.origin-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.origin-label i {
  color: var(--text-secondary);
}

.origin-select-wrapper {
  position: relative;
  flex: 1;
}

.origin-select {
  width: 100%;
  height: 36px;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #ededed;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 0 24px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

.origin-select:hover {
  border-color: var(--border-default);
  background-color: var(--bg-card-hover);
}

.origin-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-subtle);
}

/* 5. Interactive Location List */
.sidebar-locations-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 12px;
}

.locations-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 10px 6px;
  flex-shrink: 0;
}

.locations-count-badge {
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.locations-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-locations-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Location Item Card (Matching frame_0.jpg) */
.location-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px !important;
  border: 1px solid transparent;
  background-color: transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.location-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Active / Selected Location Card */
.location-row.selected {
  background-color: #232325 !important;
  border: 1px solid var(--accent-primary) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
}

.loc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

.loc-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.loc-sub {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-dist {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.loc-bullet {
  color: var(--text-muted);
}

.loc-status {
  color: var(--text-muted);
}

.loc-status.mint {
  color: var(--accent-mint-light);
  font-weight: 500;
}

.loc-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
}

.loc-badges i {
  transition: color 0.15s ease;
}

.location-row.selected .loc-badges i {
  color: var(--accent-mint-light);
}

/* 6. Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.api-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-mint);
  display: inline-block;
}

.api-status-pill.offline .status-pulse-dot {
  background-color: var(--accent-rose);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-white);
}

/* ===================================================================
   RIGHT MAP SECTION
   =================================================================== */
.map-viewport-section {
  flex: 1;
  height: 100%;
  position: relative;
  background-color: #111111;
  overflow: hidden;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background-color: #111111;
}

/* CARTO tile lock */
.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}

.leaflet-container {
  background-color: #111111 !important;
  font-family: var(--font-sans) !important;
}

/* 1. Map Top-Right Floating Pill Bar */
.map-floating-bar {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: auto;
}

.map-pill-btn {
  height: 36px;
  background-color: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1), transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.map-pill-btn i {
  color: var(--text-secondary);
}

.map-pill-btn:hover {
  background-color: rgba(35, 35, 35, 0.96);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.map-pill-btn.btn-icon-only {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.map-pill-btn.highlight-mint {
  border-color: var(--accent-mint);
  color: var(--accent-mint-light);
}

.map-pill-btn.highlight-mint i {
  color: inherit;
}

.map-pill-btn.highlight-mint:hover {
  background-color: var(--accent-mint-subtle);
  box-shadow: 0 0 16px var(--accent-mint-glow);
}

.map-pill-btn.active {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(45, 45, 45, 0.95);
}

.map-pill-btn.active i {
  color: inherit;
}

/* ===================================================================
   FLOATING DARK DETAIL CARD (MATCHING "ADIDAS" IN frame_0.jpg)
   =================================================================== */
.floating-detail-card {
  position: absolute;
  right: 24px;
  bottom: 24px;
  top: auto;
  width: 350px;
  max-width: calc(100vw - 420px);
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-floating);
  z-index: 950;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.card-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-white);
}

/* Card Header */
.card-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}

.card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

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

.card-node-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-node-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats Pill Bar (Exact match to frame_0.jpg pill bar) */
.card-stats-pill-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 9px 14px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.03);
  font-variant-numeric: tabular-nums;
}

.stat-pill-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-white);
}

.stat-pill-item i {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Card Headline */
.card-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 8px;
}

/* Bullet Description */
.card-bullet-text {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.bullet-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--text-muted);
  margin-top: 6px;
  flex-shrink: 0;
}

.card-bullet-text p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Card Buttons */
.card-action-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-pill-outline {
  width: 100%;
  padding: 11px 16px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-white);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: center;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-pill-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-mint);
  color: var(--accent-mint-light);
}

.card-secondary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px 0 2px;
}

.btn-subtle-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease;
}

.btn-subtle-link:hover {
  color: var(--accent-mint-light);
}

/* ===================================================================
   LEAFLET CUSTOM MAP MARKERS (OUTLETBUDDY-STYLE)
   =================================================================== */
.custom-outlet-marker {
  background: none !important;
  border: none !important;
}

.outlet-marker-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.outlet-marker-wrapper:hover {
  z-index: 1000 !important;
}

.outlet-marker-wrapper:hover .outlet-marker-circle,
.marker-hover-active .outlet-marker-circle {
  transform: scale(1.06) !important;
  border-color: var(--accent-mint) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75) !important;
}

.marker-hover-active {
  z-index: 10000 !important;
}

.outlet-marker-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  transition: border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.outlet-marker-wrapper.active .outlet-marker-circle {
  border-color: var(--accent-mint);
  box-shadow: 0 0 20px var(--accent-mint-glow), 0 8px 20px rgba(0, 0, 0, 0.65);
}

.outlet-marker-pill {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  pointer-events: none;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), opacity 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.marker-hover-active .outlet-marker-pill {
  transform: translateX(-50%) translateY(2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
}

/* Inactive marker pill: dark matte */
.outlet-marker-pill.inactive-pill {
  background-color: #161616;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Active marker pill: solid white (frame_0.jpg) */
.outlet-marker-pill.active-pill {
  background-color: #ffffff;
  color: #111111;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

/* Map Interaction Banner */
.map-banner {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(20, 20, 20, 0.95);
  border: 1px solid var(--accent-mint);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  color: var(--text-white);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 990;
}

/* ===================================================================
   LEAFLET TOOLTIP & HOVER POPUP (OUTLETBUDDY DARK MATTE)
   =================================================================== */
.leaflet-tooltip,
.navgraph-dark-tooltip {
  background: rgba(18, 20, 26, 0.96) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  font-family: var(--font-sans) !important;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.leaflet-tooltip-top:before,
.navgraph-dark-tooltip.leaflet-tooltip-top:before {
  border-top-color: rgba(18, 20, 26, 0.96) !important;
}

.leaflet-tooltip-bottom:before,
.navgraph-dark-tooltip.leaflet-tooltip-bottom:before {
  border-bottom-color: rgba(18, 20, 26, 0.96) !important;
}

.leaflet-tooltip-left:before,
.navgraph-dark-tooltip.leaflet-tooltip-left:before {
  border-left-color: rgba(18, 20, 26, 0.96) !important;
}

.leaflet-tooltip-right:before,
.navgraph-dark-tooltip.leaflet-tooltip-right:before {
  border-right-color: rgba(18, 20, 26, 0.96) !important;
}

/* Node Rich Hover Popup Content */
.node-hover-popup {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 175px;
  max-width: 260px;
  text-align: left;
}

.node-hover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.node-hover-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tt-role {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: none;
  flex-shrink: 0;
}

.tt-role.origin {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.tt-role.dest {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.node-hover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.node-hover-cat {
  font-weight: 600;
  color: var(--accent-mint);
}

.node-hover-coords {
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.node-hover-desc {
  font-size: 11px;
  line-height: 1.4;
  color: #cbd5e1;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Edge Hover Popup */
.edge-hover-popup {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-sans);
  min-width: 120px;
}

.edge-hover-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.edge-hover-sub {
  font-size: 11px;
  color: #94a3b8;
}

.edge-hover-traffic {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
}

/* ===================================================================
   SLIDE-OVER DRAWERS (DSA PLAYER & TOOLS)
   =================================================================== */
.dsa-player-drawer, .tools-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 90vw;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-default);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.75);
}

.dsa-player-drawer.open, .tools-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-title-group i {
  color: var(--text-secondary);
}

.drawer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
}

.drawer-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.card-inner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-inner-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-inner-title i {
  color: var(--text-secondary);
}

.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Playback Control Card */
.player-ctrl-card {
  border-color: var(--border-default);
  background-color: #19191b;
}

.player-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.player-step-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  font-variant-numeric: tabular-nums;
}

.player-badge-strip {
  display: flex;
  gap: 6px;
}

.badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.badge-muted { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.badge-mint { background: var(--accent-mint-subtle); color: var(--accent-mint); }
.badge-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.step-narration-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  min-height: 56px;
  margin-bottom: 14px;
}

.step-narration-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.45;
}

.playback-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-player {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-player:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.btn-player-main {
  width: 44px;
  height: 44px;
  background: var(--accent-mint);
  color: #0f172a;
  border: none;
}

.btn-player-main:hover {
  background: var(--accent-mint-light);
  transform: scale(1.08);
}

.speed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.speed-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-mint);
  cursor: pointer;
}

.step-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  cursor: pointer;
}

.step-progress-fill {
  height: 100%;
  background: var(--accent-mint);
  transition: width 0.15s ease;
}

/* Frontier and Visited chips */
.frontier-pills-list, .visited-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 130px;
  overflow-y: auto;
}

.frontier-chip {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.frontier-chip.active-extracted {
  border-color: var(--accent-mint);
  background: var(--accent-mint-subtle);
  box-shadow: 0 0 8px var(--accent-mint-glow);
}

.visited-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.visited-idx {
  color: var(--accent-mint-light);
  font-family: var(--font-mono);
  font-size: 10px;
}

.empty-state {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* Mini table */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.mini-table th, .mini-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.mini-table td {
  font-variant-numeric: tabular-nums;
}

.mini-table th {
  color: var(--text-muted);
  font-weight: 500;
}

/* Directions List */
.directions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.direction-step-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.step-number-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-mint-subtle);
  color: var(--accent-mint-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.direction-instruction {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
}

.direction-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 3px;
  align-items: center;
}

.traffic-pill {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
}
.traffic-pill.clear { background: var(--accent-mint-subtle); color: var(--accent-mint-light); }
.traffic-pill.moderate { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.traffic-pill.heavy { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

/* Complexity Strip */
.complexity-strip {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.complexity-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.cp-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.complexity-pill code {
  font-size: 11px;
  color: var(--accent-mint-light);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ===================================================================
   TOOLS DRAWER & GRAPH EDITOR
   =================================================================== */
.weight-mode-toggle {
  display: flex;
  gap: 8px;
}

.toggle-option {
  flex: 1;
  cursor: pointer;
}

.toggle-option input { display: none; }

.toggle-box {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toggle-option.active .toggle-box {
  border-color: var(--accent-mint);
  background: var(--accent-mint-subtle);
}

.toggle-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-white);
  margin-top: 4px;
}

.toggle-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

/* Form inputs */
.editor-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.form-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.form-input, .form-select {
  width: 100%;
  height: 36px;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: #ededed;
  padding: 0 10px;
  font-size: 12px;
  font-family: var(--font-sans);
  outline: none;
  color-scheme: dark;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-mint);
}

.btn-subtle-square {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--accent-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-subtle-square:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-subtle-xs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-white);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}

.btn-subtle-xs:hover {
  background: rgba(255, 255, 255, 0.14);
}

.align-checkbox {
  display: flex;
  align-items: center;
  height: 36px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Common Buttons */
.btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms cubic-bezier(0.22, 1, 0.36, 1), opacity 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-sm { height: 36px; padding: 0 12px; }
.btn-block { width: 100%; }

.btn-mint, .btn-primary-mint {
  background-color: var(--accent-mint);
  color: #0f172a;
}
.btn-mint:hover, .btn-primary-mint:hover { background-color: var(--accent-mint-light); }

.btn-cyan {
  background-color: var(--accent-cyan);
  color: #111111;
}
.btn-cyan:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-white);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}
.btn-outline-danger:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--accent-rose);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text-white); }

/* ===================================================================
   MODALS
   =================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-modal);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  width: 90%;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box {
  transform: scale(1);
}

.modal-sm { max-width: 420px; }
.modal-md { max-width: 540px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 1080px; }

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-group i {
  color: var(--text-secondary);
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-white);
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* Comparison Table */
.dsa-insight-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-amber);
  margin-bottom: 6px;
}

.insight-text {
  font-size: 12px;
  color: #e5e7eb;
  line-height: 1.5;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.comparison-table th, .comparison-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table td {
  font-variant-numeric: tabular-nums;
}

.comparison-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.comparison-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Graph JSON Tabs */
.graph-json-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.json-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.json-tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  border-color: var(--border-default);
}

.json-code-block {
  background-color: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  color: var(--accent-mint-light);
  font-size: 12px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Edge Inspector Modal */
.edge-info-badge {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.edge-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.traffic-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

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

.toast {
  background-color: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  animation: toastIn 0.25s ease;
}

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

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
}

.toast-msg {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */
@media (max-width: 900px) {
  .app-viewport {
    flex-direction: column;
  }
  .sidebar-panel {
    width: 100%;
    max-width: 100%;
    height: 48vh;
  }
  .map-viewport-section {
    height: 52vh;
  }
  .floating-detail-card {
    right: 14px;
    top: 14px;
    width: calc(100vw - 28px);
  }
  .map-floating-bar {
    top: auto;
    bottom: 14px;
    right: 14px;
  }
  .dsa-player-drawer, .tools-drawer {
    width: 100%;
    max-width: 100%;
  }
}
