/* ═══════════════════════════════════════════════════════════════════
   estado.css — Página pública de estado (/estado, 11-sep-2026)
   Dark, minimal y sin dependencias. CSP-safe (archivo estático, cero
   inline). Cache-buster: ?v=1 (bump en todo cambio de este archivo).
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --est-bg: #001e33;  /* petróleo — el fondo VISIBLE de la LP (Ed 11-sep) */
  --est-panel: rgba(255, 255, 255, 0.035);
  --est-border: rgba(255, 255, 255, 0.09);
  --est-text: #e8edf2;
  --est-muted: #8896a6;
  --est-accent: #7657ff;
  --est-ok: #34d399;
  --est-warn: #fbbf24;
  --est-bad: #f87171;
  --est-sin: #64748b;
  --est-radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.estado-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  /* Fondo igual al de la LP (pedido Ed 11-sep): petróleo #001e33 — el LP
     muestra este color en todo su fondo (las secciones tapan el body #0b0f14) */
  background: var(--est-bg);
  color: var(--est-text);
  line-height: 1.55;
  min-height: 100vh;
  padding: 28px 18px 52px;
}

.estado-wrap { max-width: 720px; margin: 0 auto; }

/* ── Header ─────────────────────────────────────────────── */
.estado-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 26px;
}
.estado-logo { display: inline-flex; }
.estado-logo img { height: 100px; width: auto; display: block; }
.estado-top-links {
  display: flex; gap: 6px; align-items: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
/* Solapas (tabs) — pedido de Ed 11-sep: esquinas redondeadas arriba,
   relieve sutil, hover que levanta el color, rail inferior. */
.estado-top-links a {
  padding: 8px 16px;
  margin-bottom: -1px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid var(--est-bg);
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--est-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.estado-top-links a:hover { background: rgba(255, 255, 255, 0.10); color: var(--est-text); }

/* ── Hero (estado general) — marco completo estilo cards de PLANES (Ed 11-sep) ── */
.estado-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px; margin-bottom: 30px;
  border: 2px solid var(--est-border); border-radius: var(--est-radius);
  background: var(--est-panel);
}
.estado-hero--ok { border-color: #00ff00; }
.estado-hero--warn { border-color: var(--est-warn); }
.estado-hero--bad { border-color: var(--est-bad); }
.estado-hero h1 { font-size: 1.45rem; font-weight: 650; color: #fff; letter-spacing: -0.01em; }
.estado-sub { font-size: 0.84rem; color: var(--est-muted); margin-top: 2px; }

/* ── Punto de estado + pulso ────────────────────────────── */
.estado-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex: none; background: var(--est-sin);
}
.estado-dot--ok { background: var(--est-ok); animation: est-pulse-ok 2.2s ease-out infinite; }
.estado-dot--warn { background: var(--est-warn); animation: est-pulse-warn 2.2s ease-out infinite; }
.estado-dot--bad { background: var(--est-bad); animation: est-pulse-bad 1.6s ease-out infinite; }
@keyframes est-pulse-ok {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@keyframes est-pulse-warn {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
@keyframes est-pulse-bad {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* ── Secciones ──────────────────────────────────────────── */
.estado-section { margin-bottom: 30px; }
.estado-section h2 {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--est-muted); margin-bottom: 12px;
}

/* ── Cards de componentes ───────────────────────────────── */
.estado-cards { display: flex; flex-direction: column; gap: 10px; }
.estado-card {
  border: 1px solid var(--est-border); border-radius: 12px;
  background: var(--est-panel); padding: 14px 16px;
}
.estado-card-row { display: flex; align-items: center; gap: 10px; }
.estado-card-name { font-weight: 600; font-size: 0.98rem; flex: 1; }
.estado-card-detalle {
  margin-top: 6px; padding-left: 22px;
  font-size: 0.83rem; color: var(--est-muted);
}

/* ── Badges ─────────────────────────────────────────────── */
.estado-badge {
  font-size: 0.76rem; font-weight: 600; padding: 3px 11px;
  border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.estado-badge--ok { color: var(--est-ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.estado-badge--warn { color: var(--est-warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.estado-badge--bad { color: var(--est-bad); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.estado-badge--sin { color: var(--est-sin); border-color: rgba(100, 116, 139, 0.35); background: rgba(100, 116, 139, 0.08); }

/* ── Stats de uptime ────────────────────────────────────── */
.estado-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.estado-stat {
  text-align: center; padding: 18px 8px 14px;
  border: 1px solid var(--est-border); border-radius: 12px;
  background: var(--est-panel);
}
.estado-stat-num { display: block; font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.estado-stat-num small { font-size: 0.95rem; font-weight: 600; color: var(--est-muted); margin-left: 1px; }
.estado-stat-label { display: block; font-size: 0.78rem; color: var(--est-muted); margin-top: 4px; }
.estado-note { font-size: 0.8rem; color: var(--est-muted); margin-top: 10px; }

/* ── Tira de 24 horas ───────────────────────────────────── */
.estado-strip { display: flex; gap: 3px; }
.estado-bar {
  flex: 1; height: 26px; border-radius: 4px;
  background: rgba(100, 116, 139, 0.25); min-width: 4px;
}
.estado-bar--ok { background: rgba(52, 211, 153, 0.85); }
.estado-bar--warn { background: rgba(251, 191, 36, 0.85); }
.estado-bar--bad { background: rgba(248, 113, 113, 0.9); }
.estado-bar--sin { background: rgba(100, 116, 139, 0.25); }
.estado-strip-labels {
  display: flex; justify-content: space-between;
  font-size: 0.74rem; color: var(--est-muted); margin-top: 6px;
}

/* ── Footer (estilo del footer de la LP: centrado, links coral, marca naranja) ── */
.estado-foot {
  margin-top: 34px;
  font-size: 0.84rem; color: var(--est-muted);
  text-align: center;
}
.estado-foot p { margin-bottom: 10px; }
.estado-foot a { color: #ff6b6b; text-decoration: none; }
.estado-foot a:hover { color: #ff9a9a; }
.estado-foot .estado-link-brand { color: #ff7a00; }
.estado-foot .estado-link-brand:hover { color: #ffa64d; }
/* Link verde del footer — «página de verificación externa» (mismo #00ff00 del resto — Ed 11-sep) */
.estado-foot a.estado-link-verde { color: #00ff00; }
.estado-foot a.estado-link-verde:hover { color: #66ff66; }
/* Links del copy en verde #00ff00 — igual que el footer de la LP (pedido Ed 11-sep) */
.estado-foot .estado-copy a:not(.estado-link-brand) { color: #00ff00; }
.estado-foot .estado-copy a:not(.estado-link-brand):hover { color: #66ff66; }
.estado-copy { font-size: 0.8rem; margin-top: 10px; }
/* Bloque inferior del footer (nota + ©): la línea horizontal va acá arriba
   (Ed 11-sep), separado del mail y más abajo */
.estado-foot-bottom {
  margin-top: 48px;
  border-top: 1px solid var(--est-border);
  padding-top: 20px;
}
.estado-foot .estado-foot-note { font-size: 0.9rem; margin-bottom: 10px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 560px) {
  .estado-top { justify-content: center; text-align: center; }
  .estado-logo img { height: 56px; }
  .estado-top-links { justify-content: center; }
  .estado-hero { padding: 18px; }
  .estado-hero h1 { font-size: 1.2rem; }
  .estado-stat-num { font-size: 1.4rem; }
  .estado-bar { height: 22px; }
  .estado-card-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .estado-dot--ok, .estado-dot--warn, .estado-dot--bad { animation: none; }
}
