/**
 * Monitor de Retrasos y Cancelaciones de Vuelos - Estilos Canónicos
 * Fijate Tools (fijate.com/tools/monitor-retrasos-cancelaciones-vuelos/)
 */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores tema oscuro (por defecto) */
  --bg-page: #0b0f17;
  --bg-card: #121824;
  --bg-card-subtle: #172033;
  --bg-card-hover: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Estados semánticos y aviación */
  --color-brand: #38bdf8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-accent: #a855f7;
  --color-amber-led: #fbbf24;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Tema claro */
body.theme-light {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --color-amber-led: #d97706;
}

/* Reset y estructura canónica */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.text-mono {
  font-family: var(--font-mono);
}

.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-accent { color: var(--color-accent) !important; }

/* Contenedores canónicos */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Hero card */
.hero-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(168, 85, 247, 0.05) 100%), var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--color-brand);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-brand);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hero-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.hero-content strong {
  color: var(--text-main);
}

/* Banner de Eurocontrol */
.alert-notice-card {
  display: flex;
  gap: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.notice-icon {
  color: var(--color-warning);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.notice-content {
  flex: 1;
}

.notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice-header strong {
  font-size: 0.9375rem;
  color: var(--text-main);
}

.notice-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-warning);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.notice-list {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notice-list li::before {
  content: "•";
  color: var(--color-warning);
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}
.notice-list li {
  padding-left: 1em;
}

/* KPIs de puntualidad */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.kpi-card.highlight-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(56, 189, 248, 0.08) 100%), var(--bg-card);
  border-color: rgba(168, 85, 247, 0.35);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-punctuality {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
}

.icon-delayed {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.icon-cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.icon-compensation {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-accent);
}

.kpi-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.kpi-value-row {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* Panel de control interactivo */
.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.controls-top-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.airport-selector-box {
  flex: 2 1 320px;
  min-width: 0;
}

.direction-toggle-box {
  flex: 1 1 200px;
  min-width: 0;
}

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

.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 40px 0 1rem;
  font-size: 0.9375rem;
  font-family: var(--font-main);
  outline: none;
  appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-select option, .form-select optgroup {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.toggle-group {
  display: flex;
  background: var(--bg-card-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
  height: 44px;
  box-sizing: border-box;
}

.btn-toggle {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle.active {
  background: var(--color-brand);
  color: #0b0f17;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.controls-bottom-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.form-input.search-input {
  width: 100%;
  min-height: 42px;
  height: 42px;
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 40px 0 2.5rem;
  font-size: 0.875rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.btn-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}
.btn-clear:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.filter-pills-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-btn {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pill-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.pill-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--color-brand);
  color: var(--color-brand);
  font-weight: 600;
}

.board-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.board-title-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
}

.board-time-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg-card-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tool-action {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  transition: all 0.2s;
}

.btn-tool-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.auto-refresh-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.1);
  color: var(--color-brand);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pantalla FIDS interactiva */
.fids-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.board-loading-state, .board-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.board-empty-state h3 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.125rem;
}

.btn-primary-small {
  background: var(--color-brand);
  color: #0b0f17;
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 0.5rem;
  min-height: 40px;
}

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

.fids-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.fids-table th {
  background: var(--bg-card-subtle);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.fids-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.fids-table tbody tr {
  transition: background-color 0.15s ease;
}

.fids-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Celdas FIDS */
.cell-time {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.time-scheduled {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
}

.time-estimated {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-warning);
  font-weight: 500;
}

.cell-flight {
  white-space: nowrap;
}

.flight-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-amber-led);
  letter-spacing: 0.03em;
}

.cell-city {
  min-width: 140px;
}

.city-name {
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.city-airport-code {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.cell-airline {
  color: var(--text-muted);
  white-space: nowrap;
}

.cell-terminal {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.terminal-badge {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-main);
}

.gate-code {
  color: var(--color-brand);
  font-weight: 600;
  margin-left: 0.25rem;
}

/* Insignias de estado FIDS */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.status-ontime {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.status-boarding {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
  animation: pulseBoarding 1.8s infinite;
}

@keyframes pulseBoarding {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-pill.status-departed, .status-pill.status-landed, .status-pill.status-gateclosed {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.status-pill.status-delayed {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.indemnity-tag-pill {
  display: inline-block;
  background: rgba(168, 85, 247, 0.18);
  color: var(--color-accent);
  border: 1px solid rgba(168, 85, 247, 0.35);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

.btn-row-action {
  background: var(--bg-card-subtle);
  color: var(--color-brand);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.btn-row-action:hover {
  background: var(--color-brand);
  color: #0b0f17;
}

.btn-row-action.btn-action-claim {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-accent);
  border-color: rgba(168, 85, 247, 0.4);
}

.btn-row-action.btn-action-claim:hover {
  background: var(--color-accent);
  color: #ffffff;
}

/* Sección de guía técnica en acordeón */
.guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.guide-header {
  margin-bottom: 1.25rem;
}

.guide-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.guide-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  overflow: hidden;
  transition: border-color 0.2s;
}

.accordion-item[open] {
  border-color: rgba(56, 189, 248, 0.3);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion-item[open] .chevron {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.accordion-body p {
  margin-bottom: 0.75rem;
}

.accordion-body p:last-child {
  margin-bottom: 0;
}

.accordion-body ul, .accordion-body ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.accordion-body li {
  margin-bottom: 0.35rem;
}

.accordion-body strong {
  color: var(--text-main);
}

.accordion-body a {
  color: var(--color-brand);
  text-decoration: underline;
}

/* Modal de detalle de vuelo */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-flight-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-brand);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-main);
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-close-modal:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Modal route visualizer */
.modal-route-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.route-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.point-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.point-city {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.route-line-box {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.route-distance {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.route-line {
  width: 100%;
  height: 2px;
  background: var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plane-icon {
  position: absolute;
  color: var(--color-brand);
  background: var(--bg-card-subtle);
  padding: 0 4px;
}

.route-plane {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Grid de datos en modal */
.modal-grid-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.info-cell {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.info-cell-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.info-cell-value {
  font-size: 0.9375rem;
  color: var(--text-main);
}

/* Causa del retraso */
.modal-cause-box {
  display: flex;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.875rem;
}

.cause-icon {
  color: var(--color-warning);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.modal-cause-box strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.modal-cause-box p {
  color: var(--text-muted);
  line-height: 1.4;
}

/* Caja de indemnización UE 261/2004 */
.modal-indemnity-box {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(56, 189, 248, 0.05) 100%), var(--bg-card-subtle);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.indemnity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.indemnity-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
}

.indemnity-badge-amount {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-accent);
  background: rgba(168, 85, 247, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.modal-indemnity-box h4 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.modal-indemnity-box p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.rights-list-box {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.rights-list-box strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.modal-rights-list {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.modal-rights-list li::before {
  content: "✓";
  color: var(--color-success);
  margin-right: 0.4rem;
  font-weight: bold;
}

.modal-action-row {
  margin-top: 1rem;
}

.btn-claim-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-claim-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.btn-secondary {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 40px;
}

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

/* Responsividad móvil */
@media (max-width: 768px) {
  .hero-card {
    padding: 1.25rem;
  }
  
  .hero-content h2 {
    font-size: 1.25rem;
  }

  .controls-card {
    padding: 1rem;
  }

  .controls-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .airport-selector-box, .direction-toggle-box {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .kpi-icon {
    width: 36px;
    height: 36px;
  }

  .kpi-value {
    font-size: 1.125rem;
  }

  .modal-grid-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
