/* ==========================================================================
   SSB Soaring Suite - Shared Design System & Theme Variables
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --bg-primary: #07080e;
  --bg-secondary: #0f111e;
  --bg-card: rgba(22, 24, 43, 0.4);
  --bg-card-hover: rgba(26, 29, 54, 0.65);
  --bg-glass: rgba(13, 16, 28, 0.65);
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(0, 242, 254, 0.4);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(0, 242, 254, 0.5);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Accent Colors */
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-blue-rgb: 79, 172, 254;
  --accent-green: #10b981;
  --accent-green-rgb: 16, 185, 129;
  --accent-emerald: #10b981;
  --accent-emerald-rgb: 16, 185, 129;
  --accent-red: #f43f5e;
  --accent-red-rgb: 244, 63, 94;
  --accent-orange: #f59e0b;
  --accent-orange-rgb: 245, 158, 11;
  --accent-purple: #8b5cf6;
  --accent-purple-rgb: 139, 92, 246;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-highlight: linear-gradient(135deg, #4facfe 0%, #8b5cf6 100%);
  --grad-dark: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --grad-active: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-upcoming: linear-gradient(135deg, #475569 0%, #334155 100%);
  
  /* Shadows & Glows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  
  --glow-cyan: 0 0 20px rgba(0, 242, 254, 0.15);
  --glow-cyan-strong: 0 0 25px rgba(0, 242, 254, 0.35);
  
  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
  
  /* Transitions & Blurs */
  --glass-blur: blur(14px);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glow-1 {
  top: -10%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.05) 70%, transparent 100%);
  animation: floatSlow 25s infinite alternate;
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(79, 172, 254, 0.04) 60%, transparent 100%);
  animation: floatSlow 30s infinite alternate-reverse;
}

/* Floating animation keyframes */
@keyframes floatSlow {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* ==========================================================================
   Cross-Application Header Navigation & App Switcher
   ========================================================================== */
.main-header,
.app-header {
  position: relative;
  z-index: 500;
}

.header-actions {
  position: relative;
  z-index: 501;
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-hub-btn,
.app-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  box-sizing: border-box;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.back-hub-btn:hover,
.back-hub-btn:focus {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  text-decoration: none;
  transform: translateX(-3px);
  box-shadow: var(--glow-cyan);
}

.back-hub-btn:visited {
  color: var(--text-primary);
}

.back-hub-btn i,
.back-hub-btn svg,
.app-switcher-btn i,
.app-switcher-btn svg {
  width: 14px;
  height: 14px;
}

.app-switcher {
  position: relative;
  display: inline-block;
  z-index: 502;
}

.app-switcher-btn:hover,
.app-switcher.is-open .app-switcher-btn {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-cyan);
  color: var(--accent-cyan);
}

.app-switcher-btn i {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.app-switcher.is-open .app-switcher-btn .chevron-icon {
  transform: rotate(180deg);
}

.app-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: rgba(13, 16, 28, 0.98);
  border: 1px solid var(--border-color-hover);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), var(--glow-cyan);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px;
  z-index: 99999;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-switcher.is-open .app-switcher-dropdown {
  display: flex;
}

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

.app-switcher-header {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.app-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.app-switcher-item:hover {
  background: rgba(0, 242, 254, 0.1);
  color: var(--text-primary);
  border-color: transparent;
}

.app-switcher-item.is-active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  font-weight: 600;
}

.app-switcher-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==========================================================================
   Flight Category Badges & Telemetry Chips
   ========================================================================== */
.flight-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cat-vfr {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.cat-mvfr {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.cat-ifr {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.cat-lifr {
  background: rgba(217, 70, 239, 0.15);
  border: 1px solid rgba(217, 70, 239, 0.4);
  color: #e879f9;
  text-shadow: 0 0 10px rgba(217, 70, 239, 0.4);
}

.weather-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.weather-chip strong {
  color: var(--text-primary);
}

.weather-chip.da-chip {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
