/* ============================================================
   PDX Launch — Mission Control (light mode)
   ============================================================ */

:root {
  /* Paleta */
  --bg:             #f5f7fa;
  --panel:          #ffffff;
  --border:         #e1e4e8;
  --text:           #1a202c;
  --text-muted:     #6b7280;
  --text-label:     #94a3b8;
  --accent:         #1e40af;

  --go:             #059669;
  --hold:           #d97706;
  --fail:           #dc2626;
  --pending:        #9ca3af;

  --go-bg:          #ecfdf5;
  --hold-bg:        #fffbeb;
  --fail-bg:        #fef2f2;
  --pending-bg:     #f3f4f6;

  /* Tipografía */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Espaciados */
  --radius:         8px;
  --radius-sm:      4px;
  --gap:            16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

/* ── Layout global ─────────────────────────────────────────── */
.mission {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100vh;
  gap: 0;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

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

.logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-text {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text);
}

.brand-text .divider {
  color: var(--text-label);
  margin: 0 10px;
  font-weight: 400;
}

.brand-text .subtitle {
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.audio-toggle:hover { background: #fde68a; }
.audio-toggle.is-enabled {
  background: var(--go-bg);
  color: var(--go);
  border-color: #a7f3d0;
}
.audio-toggle .icon { font-size: 12px; }

.now-playing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.now-playing .icon {
  color: var(--accent);
}

.now-playing .live {
  color: var(--go);
  font-weight: 600;
}

.now-playing .live::before {
  content: "●";
  margin-right: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ── Grid principal ─────────────────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: var(--gap);
  padding: var(--gap);
  overflow: hidden;
  min-height: 0;
}

/* ── Panel base ─────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

/* ── Systems Check (columna izquierda) ─────────────────────── */
.checks-group {
  margin-bottom: 16px;
}

.checks-group:last-child { margin-bottom: 0; }

.checks-group-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text);
}

.check-row .label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--pending);
  flex-shrink: 0;
}

.check-row[data-status="GO"]      .dot { background: var(--go); box-shadow: 0 0 6px rgba(5,150,105,0.4); }
.check-row[data-status="HOLD"]    .dot { background: var(--hold); box-shadow: 0 0 6px rgba(217,119,6,0.4); }
.check-row[data-status="FAIL"]    .dot { background: var(--fail); box-shadow: 0 0 6px rgba(220,38,38,0.4); }
.check-row[data-status="PENDING"] .dot { background: var(--pending); }
.check-row[data-status="STANDBY"] .dot { background: #d1d5db; box-shadow: none; }
.check-row[data-status="STANDBY"] { opacity: 0.7; }
.check-row[data-status="STANDBY"] .label { color: var(--text-label); }

/* transición suave cuando STANDBY → GO */
.check-row .dot,
.check-row .status { transition: background-color .25s ease, color .25s ease, opacity .25s ease; }
.check-row { transition: opacity .25s ease; }

@keyframes checkGoFlash {
  0%   { background-color: var(--go-bg); }
  100% { background-color: transparent; }
}
.check-row.just-go { animation: checkGoFlash 1.2s ease-out; }

.check-row .status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--pending-bg);
  color: var(--text-muted);
}

.check-row[data-status="GO"]      .status { background: var(--go-bg);      color: var(--go); }
.check-row[data-status="HOLD"]    .status { background: var(--hold-bg);    color: var(--hold); }
.check-row[data-status="FAIL"]    .status { background: var(--fail-bg);    color: var(--fail); }
.check-row[data-status="PENDING"] .status { background: var(--pending-bg); color: var(--text-muted); }
.check-row[data-status="STANDBY"] .status { background: var(--pending-bg); color: var(--text-label); }

/* ── Centro: video + countdown ──────────────────────────────── */
.center-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
  min-height: 0;
}

.video-panel {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.countdown-panel {
  flex: 0 0 auto;
}

.video-panel iframe,
.video-panel #yt-player,
.video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0f172a;
  color: #64748b;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Intro overlay (fotos + Avanzar) ──────────────────────────── */
.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #0a0e1a;
  display: block;
}
.intro-overlay[hidden] { display: none; }

.intro-step {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  background: #0a0e1a;
}
.intro-step[hidden] { display: none; }

.intro-img {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  position: relative;
}
.intro-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  position: relative;
}

/* ── Step con 3 columnas (cohete + foto + caption) ──────────── */
.intro-step--three {
  grid-template-columns: 1fr 1fr 1.2fr;
}

/* Variante: cohete a color, sin filtro */
.intro-img--rocket {
  background: #050810;
}
.intro-img--rocket img {
  filter: none;
  transform: rotate(-8deg);
}

/* Variante: foto principal en B&N */
.intro-img--photo {
  background: #0a0e1a;
}

.intro-caption {
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  color: #e5e7eb;
  font-family: var(--font-sans);
  min-height: 0;
}
.intro-caption > :first-child { margin-top: auto; }
.intro-caption > .progress-wrap { margin-top: auto; margin-bottom: 0; }
.intro-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 8px;
}
.intro-sub {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 12px;
}
.intro-source {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 22px;
}

.intro-sub--alt {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 8px;
}

.intro-quote {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  line-height: 1.2;
  color: #fbbf24;
  font-weight: 700;
  margin: 4px 0 12px;
  padding: 0;
  border: 0;
}

.btn-advance {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  transition: background .15s, transform .08s;
}
.btn-advance:hover  { background: #1d3a99; }
.btn-advance:active { transform: scale(0.98); }

/* Progress bar dentro de cada intro-step. Animada vía @keyframes para que
   funcione siempre, incluso cuando el step pasa de hidden→visible. */
.progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  overflow: hidden;
  flex: 0 0 auto;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}
@keyframes introBarFill {
  from { width: 0%; }
  to   { width: 100%; }
}
.intro-step.is-active .progress-bar {
  animation: introBarFill var(--bar-dur, 30s) linear forwards;
}

/* ── JFK overlay (video Kennedy + texto ES) ───────────────────── */
.jfk-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: #000;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 1;
  transition: opacity 2s ease-out, visibility 0s linear;
}
.jfk-overlay[hidden] { display: none; }
.jfk-overlay.is-fading-out {
  opacity: 0;
  pointer-events: none;
}

/* ── Apollo gallery (entre JFK y video de lanzamiento) ───────── */
.apollo-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #000;
  opacity: 1;
  transition: opacity 1s ease-out;
}
.apollo-overlay[hidden] { display: none; }
.apollo-overlay.is-fading-out {
  opacity: 0;
  pointer-events: none;
}
.apollo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.apollo-img.is-active { opacity: 1; }

.jfk-video-area {
  position: relative;
  background: #000;
  overflow: hidden;
}
.jfk-video-area iframe,
.jfk-video-area #jfk-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.jfk-text-area {
  background: #000;
  color: #d4d4d8;
  padding: 24px 28px;
  overflow-y: auto;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
}
.jfk-text-area p {
  margin: 0 0 14px;
}
.jfk-text-area .jfk-source {
  color: #6b7280;
  font-size: 11px;
  margin-top: 18px;
  font-style: italic;
}

.countdown-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  padding: 0;
  flex: 0 0 320px;
  height: 320px;
  overflow: hidden;
  position: relative;
}

.countdown-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 26px;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--text-label);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.countdown-digits {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown-unit .value {
  font-size: 60px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.countdown-unit .unit {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-label);
  margin-top: 10px;
  text-transform: uppercase;
}

/* ── Terminal CRT verde fósforo ──────────────────────────────── */
.mission-terminal {
  background: #050a05;
  color: #33ff33;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.35;
  padding: 14px 18px;
  overflow: hidden;
  position: relative;
  border-left: 1px solid #1a2e1a;
  text-shadow: 0 0 2px #33ff33, 0 0 6px rgba(51, 255, 51, 0.35);
  white-space: pre-wrap;
  word-break: break-all;
}

.mission-terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
}

.mission-terminal::-webkit-scrollbar { width: 4px; }
.mission-terminal::-webkit-scrollbar-track { background: transparent; }
.mission-terminal::-webkit-scrollbar-thumb { background: #1f4a1f; border-radius: 2px; }

.terminal-entry { margin-bottom: 10px; }
.terminal-title {
  color: #9fffb4;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}
.terminal-cmd { color: #ccffcc; }
.terminal-cmd::before { content: ''; }
.terminal-out { color: #33ff33; opacity: 0.88; }
.terminal-ok  { color: #5dff5d; font-weight: 600; }

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 11px;
  background: #33ff33;
  vertical-align: -1px;
  animation: blink 0.8s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Overlay de liftoff ─────────────────────────────────────── */
.liftoff-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 124px;
  letter-spacing: 2px;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  text-shadow: 0 2px 20px rgba(30, 64, 175, 0.18);
}

.liftoff-overlay span {
  transform: scale(0.9);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.liftoff-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease-out;
}
.liftoff-overlay.is-visible span { transform: scale(1); }

.liftoff-overlay.is-dissolving {
  opacity: 0;
  transition: opacity 2.5s ease-out, visibility 0s linear 2.5s;
  visibility: hidden;
}
.liftoff-overlay.is-dissolving span {
  transform: scale(1.12);
  transition: transform 2.5s ease-out;
}

/* ── Country display (en grilla, sobre el terminal) ──────────── */
.country-display {
  grid-column: 2;
  grid-row: 1;
  z-index: 5;
  background: var(--panel);
  border-left: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  animation: countryFadeIn .35s ease-out;
}
.country-display[hidden] { display: none; }
.country-display.is-fullwidth {
  grid-column: 1 / -1;
  border-left: none;
}

/* Después de Liftoff: el panel completo es blanco, sin terminal verde. */
.countdown-panel.is-launched {
  background: var(--panel);
  grid-template-columns: 1fr;
}
.countdown-panel.is-launched .country-display {
  grid-column: 1 / -1;
  border-left: none;
  padding: 16px 28px;
}

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

.country-progress {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-label);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.country-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.country-flag {
  display: inline-block;
  line-height: 1;
}
.country-flag .fi {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.country-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.1;
}
.country-capital {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.country-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 0;
}
.country-stats .stat {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
  padding-left: 10px;
}
.country-stats .stat-label {
  font-size: 10px;
  color: var(--text-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.country-stats .stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.country-tag {
  font-size: 32px;
  font-weight: 700;
  color: var(--go);
  text-align: center;
  margin-top: 6px;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

/* ── Panel "Potencial Total Latinoamérica" ──────────────────── */
.latam-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.latam-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--border);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .35s ease-out, transform .35s ease-out;
}
.latam-row.is-shown {
  opacity: 1;
  transform: translateX(0);
}
.latam-row:last-child { border-bottom: 0; }

.latam-flag {
  width: 28px;
  height: 21px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.latam-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.latam-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.latam-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

/* ── Summary card (al final, post-DO) ──────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 8px 0;
  flex: 1;
}
.summary-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--bg) 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.summary-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-label);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.summary-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Charts en country card ──────────────────────────────────── */
.country-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 2px;
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--text-label);
  text-transform: uppercase;
}

.chart-svg {
  width: 100%;
  height: 40px;
  display: block;
}

.chart-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.chart-arrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.chart-arrow.pos { color: var(--go); }
.chart-arrow.neg { color: var(--fail); }
.chart-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.chart-period {
  color: var(--text-label);
  font-size: 10px;
  margin-left: auto;
}

/* Sparkline */
.spark-zero {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1);
}
.spark-end {
  fill: var(--accent);
  opacity: 0;
  transition: opacity .35s ease-out 1s;
}
.is-shown .spark-line { stroke-dashoffset: 0; }
.is-shown .spark-end  { opacity: 1; }

/* Bars */
.bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}
.bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 38px;
  align-items: center;
  gap: 6px;
}
.bar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-label);
}
.bar-track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  transition: width 1s cubic-bezier(.2,.8,.2,1);
  border-radius: 2px;
}
.bar-exp { background: var(--go); }
.bar-imp { background: var(--accent); }
.bar-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  text-align: right;
  font-weight: 600;
}
.is-shown .bar-fill { width: var(--w); }

/* Donut */
.donut .donut-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 5;
}
.donut .donut-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
  stroke-dasharray: var(--circ);
  stroke-dashoffset: var(--circ);
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1);
}
.donut .donut-text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  fill: var(--text);
}
.is-shown .donut .donut-fg {
  stroke-dashoffset: var(--offset);
}

.btn-marca {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  border-radius: var(--radius);
  cursor: pointer;
  text-transform: uppercase;
  transition: background .15s, transform .08s;
}
.btn-marca:hover  { background: #1d3a99; }
.btn-marca:active { transform: scale(0.98); }

.country-summary pre {
  background: #0f172a;
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  max-height: 140px;
  overflow: auto;
  margin: 0;
}
.country-summary .summary-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.country-summary .summary-actions button {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.country-summary .summary-actions button:hover { background: var(--bg); }

/* ── Audio log (columna derecha) ────────────────────────────── */
.audio-log .track {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.audio-log .track .icon { color: var(--accent); }
.audio-log .track .title { font-weight: 600; }
.audio-log .track .artist { color: var(--text-muted); }

.log-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.log-entries li {
  padding: 2px 0;
  display: grid;
  grid-template-columns: 62px 52px 1fr;
  gap: 6px;
  color: var(--text);
}

.log-entries .t      { color: var(--text-label); }
.log-entries .who    { color: var(--accent); font-weight: 600; }
.log-entries .msg    { color: var(--text); }

.log-entries li[data-speaker="OPS"]   .who { color: var(--go); }
.log-entries li[data-speaker="COMM"]  .who { color: #7c3aed; }
.log-entries li[data-speaker="PILOT"] .who { color: var(--hold); }

/* ── Sync bar ───────────────────────────────────────────────── */
.sync-bar {
  padding: 10px 20px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  overflow-x: auto;
}

.sync-bar .sync-label { flex-shrink: 0; }

.sync-bar .counter {
  color: var(--text);
  font-weight: 600;
}

.sync-bar .dom-list {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.sync-bar .dom {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sync-bar .dom .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pending);
}

.sync-bar .dom .code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sync-bar .dom[data-status="GO"]      .dot { background: var(--go);   box-shadow: 0 0 4px rgba(5,150,105,0.4); }
.sync-bar .dom[data-status="HOLD"]    .dot { background: var(--hold); }
.sync-bar .dom[data-status="FAIL"]    .dot { background: var(--fail); }
.sync-bar .dom[data-status="GO"]      .code { color: var(--text); }

.sync-bar .dom--soon .dot  { background: #d1d5db; }
.sync-bar .dom--soon .code { color: var(--text-label); opacity: 0.7; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 6px 20px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-label);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  line-height: 1.3;
}

.footer .cred { white-space: nowrap; }
.footer .cred-sep { opacity: 0.45; }

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer a:hover { color: var(--accent); }

/* ── Scrollbar suave ────────────────────────────────────────── */
.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.panel-body::-webkit-scrollbar-thumb:hover { background: var(--text-label); }

/* ────────────────────────────────────────────────────────────
   Audio prompt — modal inicial para gesto de unlock
   ──────────────────────────────────────────────────────────── */
.audio-prompt {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20, 22, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.audio-prompt.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.audio-prompt-dialog {
  background: #ffffff;
  border-radius: 18px;
  padding: 44px 48px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.audio-prompt-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
}
.audio-prompt-dialog h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #1a202c;
  letter-spacing: -0.01em;
}
.audio-prompt-dialog p {
  color: #6b7280;
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.55;
}
.audio-prompt-btn {
  background: #1e40af;
  color: #ffffff;
  border: 0;
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, transform 0.06s ease;
  min-width: 220px;
}
.audio-prompt-btn:hover { background: #1e3a8a; }
.audio-prompt-btn:active { transform: translateY(1px); }
.audio-prompt-skip {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.audio-prompt-skip:hover { color: #6b7280; }

/* Spinner del stage "Inicializando contenido…" del audio-prompt */
.audio-prompt-spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: #ff7d00;
  border-radius: 50%;
  animation: pdx-spin 1s linear infinite;
}
@keyframes pdx-spin {
  to { transform: rotate(360deg); }
}

/* ────────────────────────────────────────────────────────────
   News carousel — corre durante el wait largo (4 días → T-200)
   ──────────────────────────────────────────────────────────── */
.video-placeholder {
  /* override del bg #0f172a para que el carousel se vea blanco */
  background: #ffffff;
}
.news-carousel {
  position: absolute;
  inset: 0;
  background: #ffffff;
  overflow: hidden;
  pointer-events: none;
}
.news-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  opacity: 0;
  transition: opacity 1s ease;
}
.news-img.is-active { opacity: 1; }

/* ────────────────────────────────────────────────────────────
   Sello — "cae de frente" sobre cada imagen del carousel
   ──────────────────────────────────────────────────────────── */
.news-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 60%;
  width: auto;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.5) rotate(-12deg);
  z-index: 5;
}
.news-stamp.is-stamping {
  animation: stamp-slam 200ms ease-out forwards;
}
.news-stamp.is-fading {
  animation: none;
  transition: opacity 1s ease;
  opacity: 0;
}
@keyframes stamp-slam {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5) rotate(-12deg);
  }
  15% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-12deg);
  }
}

/* ────────────────────────────────────────────────────────────
   Volume control — debajo de Systems Check (sidebar izquierdo)
   ──────────────────────────────────────────────────────────── */
.vol-control {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-label);
}
.vol-control .vol-icon { font-size: 12px; opacity: 0.7; }
.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #1e40af);
  cursor: pointer;
  border: 0;
}
.vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #1e40af);
  border: 0;
  cursor: pointer;
}
.vol-slider:focus { outline: none; }
