/* STYLE.CSS - EFB Tekever AR3 Navigation Support App */
/* Aeronautical Design System (Dark/Light Modes & Top Navigation) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
  /* Default: Dark Mode Theme Tokens */
  --bg-primary: #0a0f1d;
  --bg-secondary: #121829;
  --bg-card: #182239;
  --bg-card-hover: #202d4a;
  
  --border-color: #263554;
  --border-hover: #3d527e;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Aviation Colors */
  --color-go: #4ade80;        /* Green - Safe / GO */
  --color-caution: #fb923c;   /* Amber - Caution */
  --color-warning: #f87171;   /* Red - Danger / NO-GO */
  --color-info: #38bdf8;      /* Blue - Info / Active */
  --color-primary: var(--color-info);
  --color-magenta: #e879f9;   /* Magenta - Flight Path / Guidance */
  
  /* Color Glows */
  --glow-go: rgba(74, 222, 128, 0.15);
  --glow-caution: rgba(251, 146, 60, 0.15);
  --glow-warning: rgba(248, 113, 113, 0.15);
  --glow-info: rgba(56, 189, 248, 0.15);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  
  /* Radii & Transitions */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --header-height: 120px; /* Top Bar + Tab Navigation */
}

/* Light Mode Theme Overrides (High Visibility / Sunlight Mode) */
body.light-theme {
  --bg-primary: #f4f7fa; /* Clean, slightly cool/aviation background tint */
  --bg-secondary: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  
  --border-color: #cbd5e1;
  --border-hover: #94a3b8;
  
  --text-primary: #0f172a;
  --text-secondary: #334155; /* Deeper slate for superior legibility */
  --text-muted: #64748b;
  
  /* Aviation adjustments for light theme contrast */
  --color-go: #16a34a;        /* Deeper Green */
  --color-caution: #ea580c;   /* Deeper Orange */
  --color-warning: #dc2626;   /* Deeper Red */
  --color-info: #0284c7;      /* Deeper Blue */
  --color-primary: var(--color-info);
  --color-magenta: #b000b5;   /* Rich magenta */
  
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.012) 1px, transparent 1px);
  background-size: 24px 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* TOP STATUS BAR & HEADER */
.app-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.top-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(38, 53, 84, 0.3);
}

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

.app-logo {
  width: 28px;
  height: 28px;
  color: var(--color-info);
}

.app-title-container {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.app-subtitle {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Sunlight / Theme Toggle Switch */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card);
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
}

.offline-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--color-go);
  font-family: var(--font-mono);
  background-color: rgba(74, 222, 128, 0.05);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 222, 128, 0.15);
}

.global-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.global-status-badge.status-go {
  background-color: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--color-go);
}

.global-status-badge.status-nogo {
  background-color: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--color-warning);
}

.status-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.status-go .status-badge-dot {
  background-color: var(--color-go);
  box-shadow: 0 0 8px var(--color-go);
}

.status-nogo .status-badge-dot {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* HORIZONTAL NAVIGATION TABS */
.nav-tabs {
  height: 56px;
  display: flex;
  padding: 0 32px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.nav-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.tab-btn {
  background: none;
  border: none;
  padding: 0 20px;
  height: 100%;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--color-info);
  border-bottom-color: var(--color-info);
}

.tab-btn-icon {
  width: 16px;
  height: 16px;
}

/* MAIN MODULE WORKSPACE */
.main-workspace {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.module-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px;
  animation: tabFadeIn 0.2s ease-out;
}

.module-panel.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }

/* Cards & Panels */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon {
  width: 16px;
  height: 16px;
  color: var(--color-info);
}

/* Numeric readouts */
.display-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 30px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.display-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
}

.input-container {
  position: relative;
}

.input-control {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  outline: none;
}

.input-control:focus {
  border-color: var(--color-info);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.input-control[readonly] {
  background-color: rgba(120, 120, 120, 0.08);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.select-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 36px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background-color: var(--color-info);
  color: #fff;
}

.btn-primary:hover {
  background-color: #2ea6db;
}

.btn-success {
  background-color: var(--color-go);
  color: #064e3b;
  border-color: rgba(74, 222, 128, 0.4);
}

.btn-success:hover {
  background-color: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background-color: var(--color-warning);
  color: #fff;
  border-color: rgba(248, 113, 113, 0.4);
}

.btn-danger:hover {
  background-color: #ef4444;
  border-color: #ef4444;
}

.toggle-group {
  display: flex;
  background-color: var(--bg-primary);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.toggle-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 6px 10px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-btn.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* MÓDULO 1: RESUMEN */
.go-nogo-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 250px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: all var(--transition-normal);
}

.go-nogo-panel.state-go {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, rgba(10, 15, 29, 0.1) 100%);
  border-color: rgba(74, 222, 128, 0.2);
}

.go-nogo-panel.state-nogo {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.05) 0%, rgba(10, 15, 29, 0.1) 100%);
  border-color: rgba(248, 113, 113, 0.2);
}

.go-nogo-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.go-nogo-text {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 1px;
}

.state-go .go-nogo-text {
  color: var(--color-go);
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.state-nogo .go-nogo-text {
  color: var(--color-warning);
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.3);
}

.go-nogo-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 14px;
  text-align: center;
  max-width: 80%;
  line-height: 1.5;
}

.go-nogo-desc ul {
  margin: 8px 0 0;
  padding-left: 18px;
  text-align: left;
}

.mission-readiness-card {
  margin-top: 20px;
}

.mission-readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mission-readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: rgba(120, 120, 120, 0.025);
  min-height: 68px;
  transition: all var(--transition-fast);
}

.mission-readiness-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 12px;
  margin-bottom: 3px;
}

.mission-readiness-item span:last-child {
  display: block;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.35;
}

.mission-ready-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background-color: var(--color-caution);
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.3);
}

.mission-readiness-item.ready {
  border-color: rgba(74, 222, 128, 0.24);
  background-color: rgba(74, 222, 128, 0.035);
}

.mission-readiness-item.ready .mission-ready-dot {
  background-color: var(--color-go);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.35);
}

.mission-readiness-item.blocked {
  border-color: rgba(248, 113, 113, 0.28);
  background-color: rgba(248, 113, 113, 0.04);
}

.mission-readiness-item.blocked .mission-ready-dot {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.35);
}

@media (max-width: 900px) {
  .mission-readiness-grid {
    grid-template-columns: 1fr;
  }
}

/* MÓDULO 2: GEOGRAFÍA */
.map-container {
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

#map {
  height: 100%;
  width: 100%;
}

.elevation-container {
  width: 100%;
  height: 220px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.elevation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.05);
}

.elevation-alert {
  background-color: rgba(248, 113, 113, 0.08);
  border: 1px dashed var(--color-warning);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--color-warning);
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.notam-list-card {
  max-height: 380px;
  overflow-y: auto;
}

.notam-item {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.02);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notam-item:hover {
  background-color: rgba(120, 120, 120, 0.05);
  border-color: var(--color-info);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-delete-notam {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-delete-notam:hover {
  color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1) !important;
}


.notam-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.notam-item-badge {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 700;
}

.notam-item-badge.danger { background-color: rgba(248, 113, 113, 0.1); color: var(--color-warning); border: 1px solid rgba(248, 113, 113, 0.2); }
.notam-item-badge.warning { background-color: rgba(251, 146, 60, 0.1); color: var(--color-caution); border: 1px solid rgba(251, 146, 60, 0.2); }
.notam-item-badge.info { background-color: rgba(56, 189, 248, 0.1); color: var(--color-info); border: 1px solid rgba(56, 189, 248, 0.2); }

/* MÓDULO 3: METEOROLOGÍA */
.metar-decoded-panel {
  background-color: rgba(120, 120, 120, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
}

.metar-raw-string {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-info);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
  font-weight: 500;
}

.decoded-row {
  display: flex;
  margin-bottom: 5px;
}

.decoded-lbl {
  font-weight: 600;
  width: 130px;
  color: var(--text-secondary);
}

.decoded-val {
  color: var(--text-primary);
}

.winds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.winds-table th {
  padding: 10px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 10px;
}

.winds-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(38, 53, 84, 0.2);
  font-family: var(--font-mono);
}

/* MÓDULO 4: CONOP */
.steps-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.steps-container::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 5%;
  right: 5%;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 2;
  transition: all var(--transition-fast);
}

.step-dot.active {
  border-color: var(--color-info);
  color: var(--color-info);
  background-color: var(--bg-primary);
}

.step-dot.done {
  background-color: var(--color-info);
  border-color: var(--color-info);
  color: #fff;
}

.q-panel {
  display: none;
  animation: tabFadeIn 0.2s ease-out;
}

.q-panel.active {
  display: block;
}

.q-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.02);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
}

.opt-card:hover {
  background-color: var(--bg-card);
  border-color: var(--border-hover);
}

.opt-card.selected {
  border-color: var(--color-info);
  background-color: rgba(56, 189, 248, 0.04);
}

.radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.opt-card.selected .radio-circle {
  border-color: var(--color-info);
}

.opt-card.selected .radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-info);
}

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

.igrc-box {
  background-color: rgba(56, 189, 248, 0.03);
  border: 1px solid rgba(56, 189, 248, 0.15);
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.igrc-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.igrc-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-info);
  font-family: var(--font-mono);
}

/* MÓDULO 5: CALCULADORA (E6B VECTOR GRAPHIC) */
.compass-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.compass-svg {
  width: 160px;
  height: 160px;
}

.tool-mode-tab:hover {
  background-color: rgba(120, 120, 120, 0.05) !important;
  color: var(--text-primary) !important;
}

.output-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.output-card {
  padding: 12px;
  background-color: rgba(120, 120, 120, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.output-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.output-value.danger { color: var(--color-warning); }
.output-value.success { color: var(--color-go); }

/* MÓDULO 6: NOTAS & MANUAL VISUAL */
.notes-textarea {
  width: 100%;
  height: 180px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  resize: none;
  transition: all var(--transition-fast);
}

.notes-textarea:focus {
  border-color: var(--color-info);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.08);
}

.search-bar-box {
  position: relative;
  width: 100%;
}

.search-bar-input {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 16px 12px 40px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.search-bar-input:focus {
  border-color: var(--color-info);
}

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Airspeed Tape visual */
.airspeed-tape {
  height: 110px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.airspeed-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.airspeed-bar {
  height: 20px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.airspeed-seg {
  height: 100%;
  position: absolute;
  top: 0;
}

.airspeed-seg.stall { background-color: rgba(248, 113, 113, 0.4); border-right: 1px solid var(--color-warning); }
.airspeed-seg.caution-min { background-color: rgba(251, 146, 60, 0.3); border-right: 1px solid var(--color-caution); }
.airspeed-seg.normal { background-color: rgba(74, 222, 128, 0.25); border-right: 1px solid var(--color-go); }
.airspeed-seg.caution-max { background-color: rgba(251, 146, 60, 0.3); border-right: 1px solid var(--color-caution); }
.airspeed-seg.overspeed { background-color: rgba(248, 113, 113, 0.4); }

.airspeed-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background-color: var(--text-primary);
  box-shadow: 0 0 4px #fff;
  z-index: 10;
}

.airspeed-marker::after {
  content: attr(data-label);
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-primary);
}

.airspeed-marker.marker-va { background-color: var(--color-magenta); box-shadow: 0 0 4px var(--color-magenta); }
.airspeed-marker.marker-va::after { color: var(--color-magenta); border-color: rgba(232, 121, 249, 0.3); }

/* Dial gauge card visual limits */
.gauge-card-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  position: relative;
}

.gauge-card-svg {
  width: 120px;
  height: 90px;
}

.gauge-card-display {
  position: absolute;
  bottom: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.gauge-card-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.gauge-card-sub {
  font-size: 9px;
  color: var(--text-secondary);
}

/* Checklists interactivas visual */
.ch-card {
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.01);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.ch-card.active {
  border-color: var(--color-info);
}

.ch-header {
  padding: 12px 16px;
  background-color: rgba(120, 120, 120, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.ch-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ch-title.critical { color: var(--color-warning); }

.ch-bar {
  height: 3px;
  background-color: var(--border-color);
}

.ch-fill {
  height: 100%;
  width: 0%;
  background-color: var(--color-go);
  transition: width 0.3s ease;
}

.ch-title.critical + .ch-bar .ch-fill {
  background-color: var(--color-warning);
}

.ch-steps {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ch-step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.ch-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ch-step-row.checked .ch-box {
  border-color: var(--color-go);
  background-color: var(--color-go);
}

.ch-step-row.checked.critical-step .ch-box {
  border-color: var(--color-warning);
  background-color: var(--color-warning);
}

.ch-box svg {
  width: 10px;
  height: 10px;
  color: var(--bg-primary);
  display: none;
}

.ch-step-row.checked .ch-box svg {
  display: block;
}

.ch-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

.ch-step-row.checked .ch-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* MÓDULO 7: TEMPORIZADORES (Flight tools) */
.timer-giant-display {
  font-family: var(--font-mono);
  font-size: 54px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -1px;
  margin: 10px 0;
}

.timer-giant-display.critical-blink {
  animation: blink-red-text 1s infinite;
}

@keyframes blink-red-text {
  0% { color: var(--text-primary); opacity: 1; }
  50% { color: var(--color-warning); opacity: 0.5; }
  100% { color: var(--text-primary); opacity: 1; }
}

.timer-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.lostlink-interactive-box {
  padding: 16px;
  background-color: rgba(248, 113, 113, 0.03);
  border: 1px dashed rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lostlink-progress-track {
  height: 8px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.lostlink-progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--color-warning);
  transition: width 1s linear;
}

.lostlink-timeline-dots {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.lostlink-live-alert-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  min-height: 60px;
}

/* MISSION START BUTTON AND OPERATIONAL CHECKLIST */
.mission-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid rgba(74, 222, 128, 0.3);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.mission-start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.mission-start-btn:active {
  transform: translateY(0);
}

/* Sunlight mode active overrides for mission start button */
.light-theme .mission-start-btn {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  border-color: #047857;
  color: #ffffff;
}

.checklist-item-row.checked-item {
  background-color: rgba(74, 222, 128, 0.03) !important;
  border-color: rgba(74, 222, 128, 0.2) !important;
}

.checklist-item-row.checked-item .chk-item-title {
  color: var(--text-muted) !important;
  text-decoration: line-through;
}

.checklist-item-row.checked-item .ch-box {
  border-color: var(--color-go) !important;
  background-color: var(--color-go) !important;
}

.checklist-item-row.checked-item .ch-box svg {
  display: block !important;
}

/* FLIGHT INITIALIZATION WIZARD SCREEN OVERLAY */
.init-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wizard-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: slideUpWizard 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.wizard-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(90deg, rgba(56,189,248,0.05) 0%, rgba(10,15,29,0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.wizard-close-btn:hover {
  color: var(--color-warning);
  background-color: rgba(239,68,68,0.1);
}

.wizard-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-intro {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wizard-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.wizard-option-card {
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.02);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: all var(--transition-fast);
}

.wizard-option-card:hover {
  border-color: var(--color-info);
  background-color: rgba(56,189,248,0.03);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.wizard-option-icon {
  width: 32px;
  height: 32px;
  color: var(--color-info);
}

.wizard-option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.wizard-option-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* MANUAL ENVIRONMENT PROCESS BUTTON */
.btn-process-environment {
  background: linear-gradient(135deg, var(--color-info) 0%, #0284c7 100%);
  border: 1px solid rgba(56,189,248,0.4);
  color: #ffffff;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56,189,248,0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  outline: none;
  transition: all var(--transition-fast);
  animation: glowBluePulse 2s infinite alternate;
}

.btn-process-environment:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.btn-process-environment:active {
  transform: translateY(0);
}

@keyframes glowBluePulse {
  from { box-shadow: 0 0 5px rgba(56,189,248,0.2); }
  to { box-shadow: 0 0 15px rgba(56,189,248,0.5); }
}

/* MAINTENANCE VERIFICATION margin colors */
.maint-rem-safe {
  color: var(--color-go) !important;
  font-weight: 700;
}

.maint-rem-danger {
  color: var(--color-warning) !important;
  font-weight: 700;
  animation: blinkRedTextOnly 1s infinite;
}

@keyframes blinkRedTextOnly {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Sunlight mode active overrides for initialization wizard */
.light-theme .init-wizard-overlay {
  background-color: rgba(255, 255, 255, 0.85);
}

.light-theme .wizard-card {
  background-color: var(--bg-card);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.light-theme .wizard-option-card {
  background-color: rgba(0, 0, 0, 0.02);
}

.light-theme .wizard-option-card:hover {
  background-color: rgba(56, 189, 248, 0.05);
}


/* Responsiveness adjustments */
@media (max-width: 900px) {
  .top-bar {
    padding: 0 16px;
  }
  
  .nav-tabs {
    padding: 0 16px;
  }
  
  .tab-btn {
    padding: 0 10px;
    font-size: 11px;
  }
  
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .module-panel {
    padding: 16px;
  }
  
  .timer-giant-display {
    font-size: 40px;
  }
}

/* ==========================================================================
   CONOPS GRAPHICAL HUB & INTERACTIVE STYLES
   ========================================================================== */

/* Sub-navegación CONOPS */
.conops-sub-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.conops-sub-nav::-webkit-scrollbar {
  display: none;
}

.conops-sub-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.conops-sub-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
}

.conops-sub-btn.active {
  background-color: var(--color-info);
  border-color: var(--color-info);
  color: #ffffff;
  box-shadow: 0 0 10px var(--glow-info);
}

.conops-sub-btn.active .card-icon {
  color: #ffffff;
}

/* Sub-paneles */
.conops-sub-panel {
  display: none;
  animation: tabFadeIn 0.25s ease-out;
}

.conops-sub-panel.active {
  display: block;
}

/* Cinta de velocidad estructural (Airspeed structural tape) */
.conops-airspeed-tape {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conops-airspeed-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.conops-airspeed-bar {
  position: relative;
  height: 20px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
}

.conops-airspeed-seg {
  height: 100%;
  position: absolute;
  top: 0;
}

.conops-airspeed-seg.stall {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.45) 0%, rgba(239, 68, 68, 0.2) 100%);
  border-right: 1px dashed rgba(239, 68, 68, 0.6);
}

.conops-airspeed-seg.caution-min {
  background: rgba(251, 146, 60, 0.15);
  border-right: 1px dashed rgba(251, 146, 60, 0.4);
}

.conops-airspeed-seg.normal {
  background: rgba(74, 222, 128, 0.08);
  border-right: 1px dashed rgba(74, 222, 128, 0.4);
}

.conops-airspeed-seg.caution-max {
  background: rgba(251, 146, 60, 0.15);
  border-right: 1px dashed rgba(251, 146, 60, 0.6);
}

.conops-airspeed-seg.overspeed {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.5) 100%);
}

/* Specs details grid */
.conops-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.conops-spec-item {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.015);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conops-spec-item .spec-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conops-spec-item .spec-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Weather limit elements */
.conops-weather-limits {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.conops-weather-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weather-bar-track {
  height: 8px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.weather-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* VTOL Stage interactive profile style */
.conops-stages-svg-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 6px;
}

.vtol-stage-node {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vtol-stage-node:hover circle:first-child {
  r: 9px;
  stroke: var(--text-primary);
  filter: drop-shadow(0 0 4px var(--text-primary));
}

.vtol-stage-node.active circle:first-child {
  r: 9px;
  stroke: var(--color-magenta) !important;
  fill: var(--bg-primary) !important;
  filter: drop-shadow(0 0 6px var(--color-magenta));
}

.vtol-stage-node.active text {
  fill: var(--color-magenta) !important;
  font-weight: 900;
}

.conops-stage-alert-box {
  transition: all var(--transition-fast);
}

/* Lost Link horizontal timeline */
.lostlink-flow-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 30px 10px 10px 10px;
}

.ll-timeline-track {
  position: relative;
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
}

.ll-timeline-dot {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 2;
}

.ll-timeline-dot .dot-inner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 3.5px solid var(--border-color);
  transition: all var(--transition-fast);
}

.ll-timeline-dot:hover .dot-inner {
  border-color: var(--text-primary);
  transform: scale(1.15);
}

.ll-timeline-dot.active .dot-inner {
  border-color: var(--color-info) !important;
  background-color: var(--bg-primary) !important;
  box-shadow: 0 0 8px var(--color-info);
  transform: scale(1.2);
}

.ll-timeline-dot.done .dot-inner {
  border-color: var(--color-info);
  background-color: var(--color-info);
}

.ll-timeline-dot.done:hover .dot-inner {
  border-color: var(--text-primary);
}

.ll-timeline-dot .dot-label {
  position: absolute;
  top: -20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ll-timeline-dot.active .dot-label {
  color: var(--color-info);
}

.ll-timeline-dot .dot-title {
  position: absolute;
  top: 24px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.ll-timeline-dot.active .dot-title {
  color: var(--text-primary);
  font-weight: 700;
}

.conops-ll-desc-box {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(120, 120, 120, 0.015);
  margin-top: 10px;
  min-height: 90px;
  transition: all var(--transition-normal);
}

/* Parachute infographic styles */
.parachute-infographic {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.para-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.para-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-info);
  flex-shrink: 0;
  margin-top: 2px;
}

.para-step:last-child .para-badge {
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.para-info {
  flex: 1;
}

/* Light Theme active overrides for CONOPS Hub */
.light-theme .conops-sub-btn {
  background-color: var(--bg-secondary);
}
.light-theme .conops-sub-btn.active {
  background-color: var(--color-info);
  color: #ffffff;
}
.light-theme .conops-airspeed-bar {
  background-color: #cbd5e1;
}
.light-theme .conops-stages-svg-container {
  background-color: #f1f5f9;
}
.light-theme .vtol-stage-node circle:first-child {
  fill: #ffffff;
}
.light-theme .ll-timeline-dot .dot-inner {
  background-color: #ffffff;
}
.light-theme .para-badge {
  background-color: #f1f5f9;
}

/* ==========================================================================
   UAS OPERATOR CONOPS PREMIUM STYLES
   ========================================================================== */

/* Capas del modelo semántico / Geometría del vuelo */
.volume-layer-box {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.volume-layer-box:hover {
  transform: translateY(-2px);
}

.volume-layer-box.layer-h:hover {
  border-color: var(--color-warning) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.volume-layer-box.layer-e:hover {
  border-color: var(--color-caution) !important;
  box-shadow: 0 0 15px rgba(251, 146, 60, 0.2);
  background: rgba(251, 146, 60, 0.04) !important;
}

.volume-layer-box.layer-b:hover {
  border-color: var(--color-go) !important;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.08) !important;
}

.volume-layer-box.active {
  box-shadow: 0 0 20px currentColor;
}

.volume-layer-box.layer-h.active {
  border-color: var(--color-warning) !important;
  background: rgba(239, 68, 68, 0.04) !important;
  color: var(--color-warning);
}

.volume-layer-box.layer-e.active {
  border-color: var(--color-caution) !important;
  background: rgba(251, 146, 60, 0.06) !important;
  color: var(--color-caution);
}

.volume-layer-box.layer-b.active {
  border-color: var(--color-go) !important;
  background: rgba(74, 222, 128, 0.1) !important;
  color: var(--color-go);
}

/* Tarjetas de tripulación operativa */
.crew-role-card {
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.crew-role-card:hover {
  transform: translateX(4px);
  border-color: var(--color-info) !important;
  background: rgba(56, 189, 248, 0.02) !important;
}

.crew-role-card.active {
  border-color: var(--color-info) !important;
  background: rgba(56, 189, 248, 0.05) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.1);
}

.light-theme .crew-role-card {
  background: #ffffff;
}

.light-theme .crew-role-card.active {
  background: rgba(56, 189, 248, 0.08) !important;
}

.light-theme .volume-layer-box.layer-h {
  border-color: #f87171 !important;
}

.light-theme .volume-layer-box.layer-e {
  border-color: #fb923c !important;
  background: rgba(251, 146, 60, 0.01) !important;
}

.light-theme .volume-layer-box.layer-b {
  border-color: #4ade80 !important;
  background: rgba(74, 222, 128, 0.02) !important;
}

/* VTOL List Item Interactive Styles */
.vtol-list-item {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.vtol-list-item:hover {
  background: rgba(120, 120, 120, 0.05);
}

.vtol-list-item.active {
  background: rgba(56, 189, 248, 0.06) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}

.vtol-list-item.active span {
  color: var(--color-info) !important;
  font-weight: 700;
}

.light-theme .vtol-list-item.active {
  background: rgba(2, 132, 199, 0.06) !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
}

/* ==========================================================================
   Tactical Range Slider Custom Styles (EFB Premium Glass Cockpit Aesthetics)
   ========================================================================== */
input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100%;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 3px !important;
  outline: none !important;
  margin: 6px 0 !important;
  padding: 0 !important;
  border: none !important;
  transition: background var(--transition-fast) !important;
}

.light-theme input[type="range"] {
  background: rgba(0, 0, 0, 0.1) !important;
}

input[type="range"]:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.light-theme input[type="range"]:hover {
  background: rgba(0, 0, 0, 0.15) !important;
}

/* Chrome, Safari, Edge, Opera slider thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: var(--color-info) !important; /* Premium Cyan/Blue matching the active instrumentation */
  cursor: pointer !important;
  border: 2.5px solid #1e293b !important; /* Solid dark slate border for contrast */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease !important;
}

.light-theme input[type="range"]::-webkit-slider-thumb {
  border-color: #ffffff !important;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: #38bdf8 !important; /* Brighter Cyan on hover */
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.4) !important;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.1);
  background: var(--color-caution) !important; /* Turns amber when active/dragging */
}

/* Firefox slider thumb */
input[type="range"]::-moz-range-thumb {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: var(--color-info) !important;
  cursor: pointer !important;
  border: 2.5px solid #1e293b !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease !important;
}

.light-theme input[type="range"]::-moz-range-thumb {
  border-color: #ffffff !important;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.25);
  background: #38bdf8 !important;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.4) !important;
}

input[type="range"]::-moz-range-thumb:active {
  transform: scale(1.1);
  background: var(--color-caution) !important;
}

/* ==========================================================================
   PFD Airspeed Pointer and Service Ceiling Exceeded Visual Feedback
   ========================================================================== */
.airspeed-current-pointer {
  position: absolute;
  top: -11px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--color-magenta) !important;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.airspeed-current-pointer .pointer-value {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--color-magenta) !important;
  font-weight: 800;
  white-space: nowrap;
  background: var(--bg-secondary) !important;
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-magenta);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.light-theme .airspeed-current-pointer .pointer-value {
  background: #ffffff !important;
}

/* Service ceilings vertical bar charts styling */
.alt-bar-fw, .alt-bar-v25, .alt-bar-v28 {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.alt-bar-fw.exceeded, .alt-bar-v25.exceeded, .alt-bar-v28.exceeded {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: var(--color-warning) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.35) !important;
}

.alt-bar-fw.exceeded span, .alt-bar-v25.exceeded span, .alt-bar-v28.exceeded span {
  color: var(--color-warning) !important;
}






/* Guided Mission Wizard Styles */
.guided-wizard-container {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 900px;
  height: 80vh;
  max-height: 600px;
  overflow: hidden;
  animation: modalEnter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.wizard-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.wizard-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-info);
}
.wizard-sidebar-header h2 {
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
}
.wizard-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}
.wizard-step-item {
  padding: 15px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all 0.2s;
  cursor: default;
}
.wizard-step-item.active {
  background: rgba(56, 189, 248, 0.1);
  border-left-color: var(--color-info);
  color: var(--text-primary);
}
.wizard-step-item.completed {
  color: var(--color-go);
}
.wizard-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}
.wizard-content-header {
  padding: 20px;


  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wizard-content-header h3 {
  font-size: 16px;
  margin: 0;
  color: var(--text-primary);
}
.wizard-step-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}
.wizard-step-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.wizard-step-content.active {
  display: block;
}
.wizard-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.wizard-action-card {
  background: rgba(120, 120, 120, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}
.wizard-content-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 15, 29, 0.5);
}
.wizard-step-indicator {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

@keyframes pulseGlow {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 10px rgba(56,189,248,0.2);
  }
  100% {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 20px rgba(56,189,248,0.5);
  }
}

#wizard-minimized-badge:hover {
  background: var(--bg-secondary) !important;
  border-color: var(--color-go) !important;
  transform: translateY(-8px) scale(1.05) !important;
}

/* AEMET Integration Badges */
.global-status-badge.status-offline {
  background-color: rgba(156, 163, 175, 0.08);
  border-color: rgba(156, 163, 175, 0.3);
  color: var(--text-muted);
}
.global-status-badge.status-caution {
  background-color: rgba(251, 146, 60, 0.08);
  border-color: rgba(251, 146, 60, 0.3);
  color: var(--color-caution);
}

/* Segmented Control (Inner Tabs) */
.segmented-control {
  display: flex;
  background-color: rgba(120, 120, 120, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 6px);
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}

.inner-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.inner-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.02);
}

.inner-tab-btn.active {
  background-color: var(--bg-secondary);
  color: var(--color-info) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Light theme support */
.light-theme .inner-tab-btn.active {
  background-color: var(--bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inner-tab-panel {
  display: none;
}

.inner-tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: innerFadeIn 0.25s ease-out;
}

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

/* Enhanced table readability */
.perf-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.perf-table th {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1.5px solid var(--border-color);
}

.perf-table td {
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.light-theme .perf-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.perf-table tbody tr:hover {
  background-color: rgba(120, 120, 120, 0.02);
}

.perf-table td strong {
  font-family: var(--font-mono);
}

/* ==========================================
   AERONAUTICAL VISUAL UPGRADE - LIGHT/DARK INSTRUMENTS
   ========================================== */

/* Light theme card elevation shadows */
.light-theme .card {
  box-shadow: 0 4px 18px -2px rgba(148, 163, 184, 0.08), 0 2px 8px -1px rgba(148, 163, 184, 0.04);
}

/* Unified Instrument Panel Cards */
.instrument-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  background-color: #0b0f19; /* Deep cockpit instrument black background */
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-normal);
}

.instrument-card .instrument-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instrument-card .instrument-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  margin-top: 12px;
}

/* Light Theme: Crisp daylight readability overrides */
.light-theme .instrument-card {
  background-color: #ffffff; /* pure white inside soft-slate background */
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(148, 163, 184, 0.08), inset 0 1px 2px rgba(148, 163, 184, 0.03);
}

.light-theme .instrument-card .instrument-value {
  text-shadow: none !important; /* disable tactical glows for sunlight readability */
}

/* Custom premium toggle switch for tactical wind */
.tactical-wind-card {
  transition: all 0.2s ease-in-out;
}
.tactical-wind-card:hover {
  border-color: var(--color-info) !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.08);
}

/* Custom size for tactical toolbar action buttons to keep them uniform */
.tactical-actions-toolbar .btn {
  width: 190px !important;
  height: 38px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* Calculator Toolbox Tab Buttons */
.toolbox-tab-btn {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(120,120,120,0.15); /* More prominent base gray */
  border: 1px solid rgba(120,120,120,0.3);
  color: var(--text-primary);
}

.toolbox-tab-btn:hover {
  background: rgba(120,120,120,0.25);
  border-color: rgba(120,120,120,0.5);
}

.toolbox-tab-btn.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.15) 0%, rgba(2,132,199,0.25) 100%);
  border: 1px solid var(--color-info);
  color: var(--color-info);
  box-shadow: 0 0 12px rgba(56,189,248,0.25);
}


/* === FLIGHT DISPATCH REPORT PRINT STYLES === */
@media print {
  body * {
    visibility: hidden;
  }
  #dispatch-report-container, #dispatch-report-container * {
    visibility: visible;
  }
  #dispatch-report-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-shadow: none;
    border: none;
  }
  .no-print {
    display: none !important;
  }
}
