/* ======================================================
   Status Page — Imperium Classic
   Reusa variables de landing.css. Soporta tema Inframundo.
   ====================================================== */

#status {
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  padding: 90px 0 60px;
}

#status .container {
  width: 92%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ----- Banner global ----- */
.status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark-surface);
  margin-bottom: 28px;
}

.status-banner__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}

.status-banner__title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

.status-banner__meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  font-family: var(--font-sans);
}

.status-banner--operational    { border-color: rgba(76,175,80,0.4); }
.status-banner--operational .status-banner__dot { background: #4caf50; }
.status-banner--partial_outage { border-color: rgba(255,180,0,0.5); }
.status-banner--partial_outage .status-banner__dot { background: #ffb400; }
.status-banner--major_outage   { border-color: rgba(232,63,63,0.55); }
.status-banner--major_outage   .status-banner__dot { background: #e83f3f; }
.status-banner--maintenance    { border-color: rgba(116,180,255,0.5); }
.status-banner--maintenance    .status-banner__dot { background: #74b4ff; }
.status-banner--unknown        { border-color: var(--border); }
.status-banner--unknown        .status-banner__dot { background: #6b6b6b; }

/* ----- Lista de componentes ----- */
.status-list {
  list-style: none;
  padding: 0;
  margin: 0 0 36px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark-surface);
  overflow: hidden;
}

.status-row {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.status-row:last-child { border-bottom: 0; }

.status-row__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.status-row__name {
  flex: 1;
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 15px;
}

.status-row__state {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--operational  { background: #4caf50; }
.status-dot--degraded     { background: #ffb400; }
.status-dot--down         { background: #e83f3f; }
.status-dot--maintenance  { background: #74b4ff; }
.status-dot--unknown      { background: #6b6b6b; }
.status-dot--no_data      { background: #2b2b35; }

.status-row__state--operational  { color: #4caf50; }
.status-row__state--degraded     { color: #ffb400; }
.status-row__state--down         { color: #e83f3f; }
.status-row__state--maintenance  { color: #74b4ff; }
.status-row__state--unknown      { color: var(--muted-foreground); }

/* Grilla de uptime de 90 dias */
.uptime-grid {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}

.uptime-cell {
  flex: 1 1 auto;
  height: 26px;
  border-radius: 1.5px;
  background: #2b2b35;
  cursor: default;
  transition: transform 0.08s;
}
.uptime-cell:hover { transform: scaleY(1.15); }

.uptime-cell--operational { background: #4caf50; }
.uptime-cell--degraded    { background: #ffb400; }
.uptime-cell--down        { background: #e83f3f; }
.uptime-cell--no_data     { background: #2b2b35; }

.uptime-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 6px;
  font-family: var(--font-sans);
}

.uptime-meta__percent {
  font-weight: 600;
  color: var(--foreground);
}

/* ----- Tooltip ----- */
.status-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  background: #07070c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 11px;
  font-size: 12px;
  color: var(--foreground);
  font-family: var(--font-sans);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-width: 240px;
  display: none;
}

/* ----- Incidentes ----- */
.status-section-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 36px 0 14px;
}

.incident {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark-surface);
  padding: 18px 22px;
  margin-bottom: 12px;
}

.incident__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.incident__title {
  flex: 1;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
}

.incident__badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.incident__badge--minor       { background: rgba(116,180,255,0.15); color: #74b4ff; }
.incident__badge--major       { background: rgba(255,180,0,0.18);   color: #ffb400; }
.incident__badge--critical    { background: rgba(232,63,63,0.18);   color: #e83f3f; }
.incident__badge--maintenance { background: rgba(116,180,255,0.15); color: #74b4ff; }

.incident__meta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}

.incident__updates {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--border);
}

.incident__update {
  padding: 8px 14px;
  position: relative;
}
.incident__update::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  position: absolute;
  left: -5px; top: 14px;
  background: var(--muted-foreground);
}
.incident__update--investigating::before { background: #ffb400; }
.incident__update--identified::before    { background: #c9a84c; }
.incident__update--monitoring::before    { background: #74b4ff; }
.incident__update--resolved::before      { background: #4caf50; }

.incident__update-status {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  margin-right: 8px;
}

.incident__update-time {
  font-size: 11.5px;
  color: var(--muted-foreground);
}

.incident__update-body {
  font-size: 13.5px;
  margin: 4px 0 0;
  line-height: 1.5;
}

.status-empty {
  text-align: center;
  padding: 30px;
  color: var(--muted-foreground);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--dark-surface);
}

.status-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 40px;
}

/* ----- Tema Inframundo (verde) ----- */
html.infra-corrupted .status-banner--operational    { border-color: rgba(59,239,59,0.4); }
html.infra-corrupted .status-banner--operational .status-banner__dot,
html.infra-corrupted .status-dot--operational,
html.infra-corrupted .uptime-cell--operational,
html.infra-corrupted .incident__update--resolved::before { background: #3bef3b; }
html.infra-corrupted .status-row__state--operational { color: #3bef3b; }

/* ----- Responsive ----- */
@media (max-width: 640px) {
  #status { padding-top: 70px; }
  .status-banner { padding: 16px 18px; flex-direction: row; }
  .status-banner__title { font-size: 1.15rem; }
  .status-row { padding: 14px 16px; }
  .uptime-cell { height: 22px; }
  .incident { padding: 14px 16px; }
}
