/* =====================================================
   Zyndhux System Status — Core Stylesheet
   Scope: status.zyndhux.com
   Notes:
   - No reset rules
   - No media queries
   - No frameworks
   - Pure Zyndhux UI system
   ===================================================== */

/* ===================== CSS VARIABLES ===================== */
:root {
  /* Brand */
  --zx-bg: #0b0f14;
  --zx-bg-soft: #111827;
  --zx-bg-card: #0f172a;
  --zx-border: #1f2937;

  --zx-text-primary: #e5e7eb;
  --zx-text-secondary: #9ca3af;
  --zx-text-muted: #6b7280;

  /* Status Colors */
  --zx-operational: #22c55e;
  --zx-degraded: #f59e0b;
  --zx-partial: #fb923c;
  --zx-major: #ef4444;
  --zx-maintenance: #3b82f6;
  --zx-observation: #8b5cf6;

  /* Effects */
  --zx-glow-soft: 0 0 0 0 rgba(0,0,0,0);
  --zx-glow-active: 0 0 0 4px rgba(34,197,94,0.15);

  --zx-radius-sm: 6px;
  --zx-radius-md: 10px;
  --zx-radius-lg: 14px;

  --zx-transition-fast: 120ms ease;
  --zx-transition-base: 220ms ease;
  --zx-transition-slow: 360ms ease;
}

/* ===================== BASE ===================== */
body, html {
  user-select: none; /* Evita que el texto se seleccione */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

body {
  background: linear-gradient(180deg, var(--zx-bg) 0%, #020617 100%);
  color: var(--zx-text-primary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.status-main {
  padding: 48px 0 32px;
}

.status-main > .container > section + section {
  margin-top: 64px;
}

/* ===================== HEADER ===================== */
.status-header {
  background: rgba(2,6,23,0.85); /* muy azul/negro */
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
}

.brand-logo {
  height: 42px;
  width: auto;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-text .subtitle {
  font-size: 0.875rem;
  color: var(--zx-text-secondary);
}

/* ===================== GLOBAL STATUS ===================== */
.global-status {
  padding: 32px 0;
}

.global-status-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: linear-gradient(145deg, var(--zx-bg-card), #020617);
  border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius-lg);
  transition: box-shadow var(--zx-transition-base), border-color var(--zx-transition-base);
}

.global-status-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}

.status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--zx-operational);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: zx-pulse 2s infinite;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--zx-text-muted);
  font-size: 0.875rem;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--zx-text-primary);
  font-weight: 600;
}


@keyframes zx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.global-status[data-status="degraded"] .status-indicator { background: var(--zx-degraded); }
.global-status[data-status="partial"] .status-indicator { background: var(--zx-partial); }
.global-status[data-status="major"] .status-indicator { background: var(--zx-major); }
.global-status[data-status="maintenance"] .status-indicator { background: var(--zx-maintenance); }
.global-status[data-status="observation"] .status-indicator { background: var(--zx-observation); }

.status-content h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.status-content p {
  font-size: 0.875rem;
  color: var(--zx-text-secondary);
}

.status-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--zx-text-muted);
}

/* ===================== PRODUCTS ===================== */
/* Base container */
.product {
  padding: 28px 28px 32px;
  background: linear-gradient(180deg, var(--zx-bg-soft), #020617);
  border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius-lg);
  transition:
    border-color var(--zx-transition-base),
    box-shadow var(--zx-transition-base),
    opacity var(--zx-transition-base);
}

/* Spacing between products */
.product + .product {
  margin-top: 56px;
}

/* ===================== PRODUCT STATES ===================== */
/* Unmonitored / disabled product */
.product[data-status="unmonitored"] {
  opacity: 0.65;
}

.product[data-status="unmonitored"] .product-status-dot {
  background: var(--zx-text-muted);
}

/* Empty uptime state */
.uptime-bar[data-empty="true"] {
  opacity: 0.3;
  filter: grayscale(1);
}

/* ===================== INTERACTION ===================== */
.product:hover {
  border-color: #334155;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

/* ===================== PRODUCT HEADER ===================== */
.product-header {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--zx-border);
}

/* Title + status */
.product-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-title h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* Status indicator */
.product-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--zx-operational);
}

/* ===================== METRICS ===================== */
.product-metrics {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--zx-text-secondary);
}

/* ===================== UPTIME BAR ===================== */
.uptime-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.uptime-bar span {
  width: 5px;
  height: 16px;
  border-radius: 2px;
  background: var(--zx-operational);
  opacity: 0.9;
  transition: opacity var(--zx-transition-fast), transform var(--zx-transition-fast);
}

.uptime-bar span:hover {
  opacity: 1;
  transform: scaleY(1.2);
}

.uptime-bar span.degraded { background: var(--zx-degraded); }
.uptime-bar span.partial { background: var(--zx-partial); }
.uptime-bar span.major { background: var(--zx-major); }
.uptime-bar span.maintenance { background: var(--zx-maintenance); }
.uptime-bar span.observation { background: var(--zx-observation); }
/* ===================== DATA STATUS ===================== */
.product[data-status="operational"] .product-status-dot {
  background: var(--zx-operational);
}

.product[data-status="degraded"] .product-status-dot {
  background: var(--zx-degraded);
}

.product[data-status="partial"] .product-status-dot {
  background: var(--zx-partial);
}

.product[data-status="major"] .product-status-dot {
  background: var(--zx-major);
}

/* ===================== COMPONENTS ===================== */
.component {
  padding: 18px 20px;
  background: var(--zx-bg-soft);
  border-bottom: 1px solid var(--zx-border);
  transition: background var(--zx-transition-fast);
}

.components {
  margin-top: 18px;
  border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius-md);
  overflow: hidden;
  background: #020617;
}

.component:last-child {
  border-bottom: none;
}

.component:hover {
  background: #020617;
}

.component-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.component-header h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--zx-text-primary);
}

.component-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zx-operational);
}

.component-state {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--zx-text-secondary);
}

.component[data-status="degraded"] .component-status { background: var(--zx-degraded); }
.component[data-status="partial"] .component-status { background: var(--zx-partial); }
.component[data-status="major"] .component-status { background: var(--zx-major); }
.component[data-status="maintenance"] .component-status { background: var(--zx-maintenance); }
.component[data-status="observation"] .component-status { background: var(--zx-observation); }

/* ===================== INCIDENTS ===================== */
.incidents {
  margin-top: 56px;
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.section-header p {
  font-size: 0.875rem;
  color: var(--zx-text-secondary);
}

.incident-list {
  margin-top: 16px;
  border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius-md);
  overflow: hidden;
}

/* ===================== FOOTER ===================== */
.status-footer {
  margin-top: 72px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--zx-border);
  background: #020617;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 28px;
}

.powered {
  font-size: 0.75rem;
  color: var(--zx-text-secondary);
}

.footer-legal {
  margin-top: 18px;
  max-width: 760px;
}

.footer-legal p {
  font-size: 0.75rem;
  color: var(--zx-text-muted);
  line-height: 1.6;
}

.footer-meta {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--zx-text-muted);
}