/* ==========================================================================
   AERO PASSPORT - MODERN LUXURY AIRPORT TRACKER DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: #0e131f;
  --bg-surface-elevated: #151d2f;
  --bg-surface-translucent: rgba(14, 19, 31, 0.75);
  --bg-glass-card: rgba(21, 29, 47, 0.7);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --bg-glass-hover: rgba(255, 255, 255, 0.04);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #07090e;

  /* Accent & Status Colors */
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.35);
  --accent-rose: #f43f5e;
  
  /* Status Specifics */
  --status-visited: #10b981;
  --status-visited-bg: rgba(16, 185, 129, 0.15);
  --status-transit: #06b6d4;
  --status-transit-bg: rgba(6, 182, 212, 0.15);
  --status-wishlist: #a855f7;
  --status-wishlist-bg: rgba(168, 85, 247, 0.15);
  --status-home: #f59e0b;
  --status-home-bg: rgba(245, 158, 11, 0.18);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Elevations */
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Layout dimensions */
  --sidebar-width: 440px;
  --header-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* App Container Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR / DASHBOARD PANEL
   ========================================================================== */
/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--bg-glass-border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Shared Mode Banner */
.shared-banner {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-bottom: 1px solid rgba(129, 140, 248, 0.3);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.shared-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d2fe;
}

.btn-banner-action {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-banner-action:hover {
  background: #ffffff;
  color: #1e1b4b;
}

/* Sidebar Header */
.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--bg-glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

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

/* Traveler Profile Card */
.profile-section {
  padding: 16px 24px;
  border-bottom: 1px solid var(--bg-glass-border);
  background: rgba(255, 255, 255, 0.015);
}

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

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.profile-meta h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-meta .profile-rank {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.btn-profile-edit {
  background: transparent;
  border: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-profile-edit:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* URL Sync Status Pill */
.url-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 5px 12px 5px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-size: 0.74rem;
  color: #a7f3d0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  width: fit-content;
}

.url-sync-pill:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.url-sync-pill.sync-saved-pulse {
  animation: syncSavedFlash 0.7s ease;
}

@keyframes syncSavedFlash {
  0% {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
    transform: scale(1.02);
  }
  100% {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    transform: scale(1);
  }
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  position: relative;
  flex-shrink: 0;
}

.sync-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-emerald);
  opacity: 0.75;
  animation: pulseDot 2s infinite ease-out;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.sync-text {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-copy-sync-url {
  background: transparent;
  border: none;
  color: #6ee7b7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 2px;
  transition: all 0.15s;
}

.btn-copy-sync-url:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* Stats Overview Grid */
.stats-container {
  padding: 16px 24px;
  border-bottom: 1px solid var(--bg-glass-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}

.stat-card.stat-airports::before { background: var(--accent-gold); }
.stat-card.stat-countries::before { background: var(--accent-emerald); }
.stat-card.stat-continents::before { background: var(--accent-cyan); }
.stat-card.stat-transit::before { background: var(--accent-purple); }

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 0.85rem;
  opacity: 0.7;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.stat-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Continent Badges Pills */
.continents-row {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.continent-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--bg-glass-border);
  transition: all 0.2s;
  cursor: pointer;
}

.continent-pill.unlocked {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.continent-pill.unlocked:hover {
  background: rgba(6, 182, 212, 0.22);
}

/* Quick Filter & Search Section */
.list-controls {
  padding: 16px 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

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

.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.filter-tab:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.filter-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-tab .badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

/* Airport List Scroll Area */
.airport-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 6px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Custom Scrollbar */
.airport-list-container::-webkit-scrollbar {
  width: 6px;
}
.airport-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.airport-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.airport-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Airport Card Item */
.airport-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.airport-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.airport-card.is-home {
  border-left: 3px solid var(--accent-gold);
}

.airport-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.airport-iata-badge {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  width: 52px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-glass-border);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.airport-card.status-visited .airport-iata-badge {
  color: var(--status-visited);
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--status-visited-bg);
}

.airport-card.status-transit .airport-iata-badge {
  color: var(--status-transit);
  border-color: rgba(6, 182, 212, 0.3);
  background: var(--status-transit-bg);
}

.airport-card.status-wishlist .airport-iata-badge {
  color: var(--status-wishlist);
  border-color: rgba(168, 85, 247, 0.3);
  background: var(--status-wishlist-bg);
}

.airport-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.airport-city-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-badge-icon {
  color: var(--accent-gold);
  font-size: 0.8rem;
}

.airport-full-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.airport-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.airport-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot.visited { background: var(--status-visited); box-shadow: 0 0 6px var(--status-visited); }
.status-dot.transit { background: var(--status-transit); box-shadow: 0 0 6px var(--status-transit); }
.status-dot.wishlist { background: var(--status-wishlist); box-shadow: 0 0 6px var(--status-wishlist); }

.airport-date-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

.airport-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.airport-card:hover .airport-card-actions {
  opacity: 1;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-card-action.btn-delete:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}
.empty-state h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 0.8rem;
  margin-bottom: 16px;
}

/* Sidebar Footer Actions */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--bg-glass-border);
  display: flex;
  gap: 10px;
  background: rgba(7, 9, 14, 0.4);
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #07090e;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--accent-gold-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MAP CONTAINER & CONTROLS
   ========================================================================== */
.map-viewport {
  flex: 1;
  height: 100vh;
  position: relative;
  background: #06080d;
}

#map {
  width: 100%;
  height: 100%;
  background: #06080d;
}

/* Leaflet Dark Customizations */
.leaflet-container {
  background: #06080d !important;
  font-family: var(--font-sans) !important;
}

.leaflet-bar {
  border: 1px solid var(--bg-glass-border) !important;
  box-shadow: var(--shadow-glass) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--bg-glass-border) !important;
}

.leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Map Floating Overlays */
.map-top-bar {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 999;
}

.map-search-container {
  pointer-events: auto;
  position: relative;
  width: 480px;
  max-width: calc(100vw - 120px);
}

.map-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 19, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.map-search-bar:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.map-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.92rem;
  width: 100%;
}

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

.quick-status-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-glass-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s;
  flex-shrink: 0;
}

.quick-status-selector:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.search-shortcut-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

/* Autocomplete Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 10000;
}

.search-dropdown.active {
  display: block;
}

.search-result-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-item.search-result-batch {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid var(--accent-gold);
}

.search-result-item.search-result-batch:hover,
.search-result-item.search-result-batch.selected {
  background: rgba(245, 158, 11, 0.22);
}

.search-result-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-left: 8px;
}

.search-result-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-iata {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.result-city {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.result-name {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.result-country {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Map Floating Control Pill */
.map-actions-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 19, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  padding: 6px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
}

.btn-dock {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-dock:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-dock.active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}

/* Map Legend Overlay (Positioned bottom-left away from zoom control & toasts) */
.map-legend {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(14, 19, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  z-index: 999;
  box-shadow: var(--shadow-subtle);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.label-short {
  display: none;
}

.label-full {
  display: inline;
}

/* Close Sidebar button for mobile */
.btn-close-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-close-sidebar:hover {
  color: #fff;
}

.btn-banner-clone {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
}

.btn-banner-clone:hover {
  background: #10b981 !important;
  color: #07090e !important;
}

/* Toggle Sidebar Button for Mobile/Collapsed */
.btn-toggle-sidebar {
  display: none;
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1001;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  cursor: pointer;
}

/* ==========================================================================
   CUSTOM LEAFLET MARKERS & POPUPS
   ========================================================================== */
.custom-airport-pin {
  background: transparent;
  border: none;
}

.pin-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.pin-bubble:hover {
  transform: scale(1.35);
  z-index: 9999 !important;
}

.pin-bubble.status-visited {
  background: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.6);
  border: 2px solid #ffffff;
}

.pin-bubble.status-transit {
  background: #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.6);
  border: 2px solid #ffffff;
}

.pin-bubble.status-wishlist {
  background: #a855f7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.6);
  border: 2px solid #ffffff;
}

.pin-bubble.is-home {
  background: #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 1), 0 0 0 4px rgba(245, 158, 11, 0.3);
  border: 2px solid #ffffff;
  width: 32px;
  height: 32px;
}

.pin-bubble .radar-pulse {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.6);
  animation: radar-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes radar-ping {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.pin-iata-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  color: #07090e;
  letter-spacing: -0.02em;
}

/* Custom Popup Styles */
.leaflet-popup-content-wrapper {
  background: rgba(14, 19, 31, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--bg-glass-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-elevated) !important;
  color: var(--text-primary) !important;
  padding: 0 !important;
  overflow: hidden;
}

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

.leaflet-popup-tip {
  background: rgba(14, 19, 31, 0.95) !important;
  border: 1px solid var(--bg-glass-border) !important;
}

.popup-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--bg-glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popup-iata {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.popup-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.popup-status-badge.visited { background: var(--status-visited-bg); color: var(--status-visited); }
.popup-status-badge.transit { background: var(--status-transit-bg); color: var(--status-transit); }
.popup-status-badge.wishlist { background: var(--status-wishlist-bg); color: var(--status-wishlist); }

.popup-body {
  padding: 14px 18px;
}

.popup-city {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.popup-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.popup-meta-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.popup-meta-item span.label {
  color: var(--text-muted);
}

.popup-notes {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--bg-glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 8px;
}

.popup-actions {
  padding: 10px 18px 14px;
  display: flex;
  gap: 8px;
}

.popup-btn {
  flex: 1;
  padding: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.popup-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.popup-btn.btn-delete-popup:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}

/* Commercial Airports on Map Layer & Popups */
.catalog-dot-sample {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  display: inline-block;
  flex-shrink: 0;
}

.catalog-airport-tooltip {
  background: rgba(14, 19, 31, 0.94) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65) !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(12px) !important;
  pointer-events: none;
}

.catalog-airport-tooltip::before {
  border-top-color: rgba(56, 189, 248, 0.4) !important;
}

.cat-tip-container {
  font-family: var(--font-sans);
  min-width: 150px;
}

.cat-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.cat-tip-iata {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.92rem;
  color: #38bdf8;
  letter-spacing: 0.04em;
}

.cat-tip-links {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.cat-tip-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

.cat-tip-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.cat-tip-cta {
  font-size: 0.68rem;
  color: #34d399;
  margin-top: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.popup-catalog-tag {
  font-size: 0.68rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.popup-routes-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.popup-coords {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 5px;
}

.catalog-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 18px 14px;
}

.catalog-actions .btn-more-log {
  grid-column: span 3;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  margin-top: 2px;
}

.catalog-actions .btn-more-log:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ==========================================================================
   MODALS (Add Airport, Share Passport, Edit Profile)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 8, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-window.modal-wide {
  max-width: 960px;
  max-height: 94vh;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-close-modal:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Form Controls in Modal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-gold);
}

/* Status Radio Pill Selector */
.status-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.status-pill-option {
  position: relative;
}

.status-pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.status-pill-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.status-pill-option input[type="radio"]:checked + .status-pill-label.option-visited {
  border-color: var(--status-visited);
  background: var(--status-visited-bg);
  color: var(--status-visited);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.status-pill-option input[type="radio"]:checked + .status-pill-label.option-transit {
  border-color: var(--status-transit);
  background: var(--status-transit-bg);
  color: var(--status-transit);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.status-pill-option input[type="radio"]:checked + .status-pill-label.option-wishlist {
  border-color: var(--status-wishlist);
  background: var(--status-wishlist-bg);
  color: var(--status-wishlist);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--bg-glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(7, 9, 14, 0.3);
}

/* ==========================================================================
   SHARE MODAL & SOCIAL CARD PREVIEW
   ========================================================================== */
.share-tabs {
  display: flex;
  gap: 10px;
  background: rgba(10, 15, 27, 0.95);
  border-bottom: 1px solid var(--bg-glass-border);
  padding: 10px 24px;
  flex-shrink: 0;
}

.share-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.share-tab-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}

.share-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.share-pane.active {
  display: flex;
}

.share-link-box {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Link Sharing Options inside Share Modal */
.link-card-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.link-option-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-option-card.highlighted {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(14, 19, 31, 0.85));
}

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

.link-option-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.link-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.link-badge.info {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.link-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.link-desc kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Card Preview Canvas Layout */
.card-canvas-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

@media (min-width: 820px) {
  .card-canvas-container {
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
  }

  .card-controls-panel {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 18px;
  }

  .canvas-wrapper {
    flex: 1;
    min-width: 0;
    max-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background: #090d16;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
  }

  #socialCardCanvas {
    max-height: 72vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
}

.card-control-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-options-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-format-toggle,
.card-style-toggle {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-elevated);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-glass-border);
  gap: 5px;
  width: 100%;
}

.btn-format,
.btn-card-style {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.btn-format:hover,
.btn-card-style:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-format.active,
.btn-card-style.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.card-actions-group {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-share-native {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  background: linear-gradient(135deg, #e1306c 0%, #f77737 50%, #fcaf45 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(225, 48, 108, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-share-native:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(225, 48, 108, 0.5);
  filter: brightness(1.08);
}

.btn-share-native:active {
  transform: translateY(1px);
}

@media (max-width: 819px) {
  .card-canvas-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .card-controls-panel {
    display: contents;
  }

  .card-control-section:nth-of-type(1) {
    order: 1;
  }

  .card-control-section:nth-of-type(2) {
    order: 2;
  }

  .canvas-wrapper {
    order: 3;
    max-width: 100%;
    max-height: 44vh;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #070a12;
    padding: 10px;
  }

  #socialCardCanvas {
    display: block;
    max-height: 42vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .card-actions-group {
    order: 4;
    padding-top: 6px;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .card-format-toggle,
  .card-style-toggle {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-format,
  .btn-card-style {
    flex: 1 1 calc(50% - 6px);
    font-size: 0.76rem;
    padding: 8px 10px;
    justify-content: center;
    text-align: center;
  }

  .btn-card-style#btnStyleRare {
    flex: 1 1 100%;
  }
}

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

.toast {
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 0.88rem;
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success { border-left-color: var(--accent-emerald); }
.toast.toast-info { border-left-color: var(--accent-cyan); }

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

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 86vw;
    max-width: 390px;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    z-index: 2500;
    background: #0b111e;
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.85);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .btn-close-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bg-glass-border);
  }

  .btn-close-sidebar:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .sidebar-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    top: 12px;
    left: 12px;
    padding: 0;
    z-index: 1001;
    background: rgba(14, 19, 31, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  }

  .map-viewport {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
  }

  .map-top-bar {
    top: 12px;
    left: 64px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .map-search-container {
    width: 100%;
    max-width: 100%;
  }

  .map-search-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .map-search-bar input {
    font-size: 0.86rem;
  }

  .map-actions-dock {
    display: none;
  }

  .label-short {
    display: inline;
  }
  .label-full {
    display: none;
  }

  .map-legend {
    bottom: 22px;
    left: 8px;
    gap: 7px;
    font-size: 0.63rem;
    padding: 5px 8px;
    max-width: calc(100vw - 72px);
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 990;
  }
  .map-legend::-webkit-scrollbar {
    display: none;
  }

  .map-legend .legend-item {
    gap: 4px;
    flex-shrink: 0;
  }

  .leaflet-bottom.leaflet-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 4px;
    margin-right: 6px;
  }

  .leaflet-right .leaflet-control-zoom {
    margin-bottom: 4px !important;
    margin-right: 2px !important;
  }

  .leaflet-control-attribution {
    font-size: 8px !important;
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    background: rgba(10, 15, 29, 0.75) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 600px) {
  .search-shortcut-badge {
    display: none;
  }

  .quick-status-selector {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal-window {
    max-height: 94dvh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-footer .btn-primary,
  .modal-footer .btn-secondary {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  .modal-footer #btnSaveAirport {
    flex: 1 1 100%;
    order: -1;
  }

  .share-tabs {
    padding: 8px 14px;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(10, 15, 27, 0.98);
  }
  .share-tabs::-webkit-scrollbar {
    display: none;
  }

  .share-tab-btn {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 6px 10px;
    flex-shrink: 0;
  }

  .welcome-body {
    padding: 24px 18px 20px;
    gap: 16px;
  }

  .welcome-title {
    font-size: 1.25rem;
  }

  .welcome-emblem {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   WELCOME ONBOARDING MODAL STYLES
   ========================================================================== */
.modal-welcome {
  max-width: 480px;
  background: linear-gradient(180deg, #121929 0%, #0a0f1b 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 32px rgba(245, 158, 11, 0.15);
}

.welcome-body {
  padding: 34px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-emblem {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07090e;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
  margin-bottom: 14px;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 6px;
}

.welcome-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 360px;
}

.welcome-input {
  font-size: 0.95rem;
  padding: 11px 14px;
}

.required-tag {
  font-size: 0.68rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.optional-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.welcome-rank-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.rank-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.rank-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.rank-pill-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.welcome-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.btn-welcome-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: center;
  border-radius: var(--radius-md);
}

.btn-welcome-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px;
  text-align: center;
  transition: color 0.15s;
}

.btn-welcome-skip:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}
