/* ════════════════════════════════════════════════════════════
   Puntuapp Status — styles.css
   ════════════════════════════════════════════════════════════ */

:root {
  --bg:        #0c0c0f;
  --bg-card:   #131318;
  --border:    #1e1e28;
  --text:      #f0f0f5;
  --muted:     #94a3b8;
  --accent:    #0ea5e9;
  --green:     #22c55e;
  --yellow:    #f59e0b;
  --red:       #ef4444;
  --font-mono: 'JetBrains Mono', monospace;
  --radius:    10px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--muted); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: rgba(14,165,233,0.08);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  border-bottom: 1px solid var(--border);
  background: rgba(12,12,15,0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #fff;
}
.logo-text { font-weight: 700; font-size: 0.95rem; }
.logo-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(14,165,233,0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.top-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 0.85rem;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}
.overall-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all .3s;
}
.overall-badge.ok        { border-color: rgba(34,197,94,0.3);  background: rgba(34,197,94,0.06);  color: var(--green);  }
.overall-badge.degraded  { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.06); color: var(--yellow); }
.overall-badge.outage    { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.06);  color: var(--red);    }
.overall-badge.loading   { border-color: var(--border);         background: transparent;            color: var(--muted);  }

.badge-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.overall-badge.ok .badge-dot       { box-shadow: 0 0 0 3px rgba(34,197,94,0.2);  animation: pulse-green 2s infinite; }
.overall-badge.degraded .badge-dot { box-shadow: 0 0 0 3px rgba(245,158,11,0.2); animation: pulse-yellow 2s infinite; }
.overall-badge.outage .badge-dot   { box-shadow: 0 0 0 3px rgba(239,68,68,0.2);  animation: pulse-red 2s infinite; }

@keyframes pulse-green  { 0%,100%{box-shadow:0 0 0 3px rgba(34,197,94,0.2)}  50%{box-shadow:0 0 0 6px rgba(34,197,94,0.05)} }
@keyframes pulse-yellow { 0%,100%{box-shadow:0 0 0 3px rgba(245,158,11,0.2)} 50%{box-shadow:0 0 0 6px rgba(245,158,11,0.05)} }
@keyframes pulse-red    { 0%,100%{box-shadow:0 0 0 3px rgba(239,68,68,0.2)}  50%{box-shadow:0 0 0 6px rgba(239,68,68,0.05)} }

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.hero-sub { font-size: 0.9rem; color: var(--muted); }

/* ── Section ─────────────────────────────────────────────── */
.section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Service cards ───────────────────────────────────────── */
.services-grid { display: flex; flex-direction: column; gap: 10px; }

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.svc-info { display: flex; align-items: center; gap: 14px; }
.svc-icon { font-size: 1.2rem; }
.svc-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.svc-desc { font-size: 0.78rem; color: var(--muted); }

.svc-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.status-dot.operational  { background: var(--green);  box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
.status-dot.degraded     { background: var(--yellow); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.status-dot.outage       { background: var(--red);    box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.status-dot.loading      { background: var(--muted); animation: spin 1s linear infinite; }

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

.svc-status.loading .status-text { color: var(--muted); }
.svc-status.ok      .status-text { color: var(--green); }
.svc-status.degraded .status-text { color: var(--yellow); }
.svc-status.outage  .status-text { color: var(--red); }

/* ── Uptime bars ─────────────────────────────────────────── */
.uptime-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.uptime-label { width: 130px; font-size: 0.83rem; color: var(--muted); flex-shrink: 0; }
.uptime-bars {
  display: flex;
  gap: 2px;
  flex: 1;
}
.uptime-bar {
  flex: 1;
  height: 28px;
  border-radius: 3px;
  background: var(--green);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity .15s;
}
.uptime-bar:hover { opacity: 1; }
.uptime-bar.partial  { background: var(--yellow); }
.uptime-bar.outage   { background: var(--red); }
.uptime-bar.no-data  { background: var(--border); }
.uptime-pct { width: 44px; text-align: right; font-size: 0.82rem; font-weight: 700; font-family: var(--font-mono); flex-shrink: 0; }

/* ── Incidents ───────────────────────────────────────────── */
.incident {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}
.incident.resolved { border-left: 3px solid var(--green); }
.incident.ongoing  { border-left: 3px solid var(--red); animation: border-pulse 2s infinite; }

@keyframes border-pulse {
  0%,100% { border-left-color: var(--red); }
  50% { border-left-color: rgba(239,68,68,0.3); }
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.incident-badge {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.incident-badge.resolved { background: rgba(34,197,94,0.1);  color: var(--green); }
.incident-badge.ongoing  { background: rgba(239,68,68,0.1);  color: var(--red); }
.incident-date { font-size: 0.8rem; color: var(--muted); }
.incident-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; }

.incident-timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.timeline-item.resolved { border-left-color: var(--green); }
.timeline-time { font-family: var(--font-mono); flex-shrink: 0; padding-top: 1px; color: var(--text); font-size: 0.78rem; }

.no-incidents {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Subscribe ───────────────────────────────────────────── */
.section-subscribe { text-align: center; }
.subscribe-desc { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.subscribe-form { display: flex; gap: 10px; max-width: 400px; margin: 0 auto; }
.subscribe-input {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.88rem;
  outline: none; transition: border-color .2s;
}
.subscribe-input:focus { border-color: var(--accent); }
.subscribe-btn {
  padding: 10px 20px; border-radius: 8px;
  background: var(--accent); color: #fff; border: none;
  font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: opacity .2s;
}
.subscribe-btn:hover { opacity: 0.85; }
.subscribe-msg {
  margin-top: 12px; font-size: 0.85rem; font-weight: 600;
}
.subscribe-msg.ok  { color: var(--green); }
.subscribe-msg.err { color: var(--red); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.82rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 20px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .service-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .uptime-label { width: 90px; }
  .subscribe-form { flex-direction: column; }
  .top-nav { display: none; }
}
