/* ── Status Page — Swooosh Design System ── */
:root {
  --primary: #34A953;
  --primary-light: #f0fdf4;
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ── Header ── */
.header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Language selector ── */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  opacity: 0.5;
}

.lang-btn:hover {
  background: var(--border-light);
  opacity: 0.8;
}

.lang-btn.active {
  opacity: 1;
  background: var(--border-light);
}

/* ── Overall status card ── */
.overall-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.overall-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.overall-icon.ok { background: #dcfce7; color: var(--green); }
.overall-icon.degraded { background: #fef3c7; color: var(--yellow); }
.overall-icon.outage { background: #fee2e2; color: var(--red); }

.overall-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 2px;
}

.overall-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Sections ── */
.section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* ── Services list ── */
.services-list {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}

.service-row:last-child { border-bottom: none; }

.service-name {
  font-weight: 500;
  font-size: 14px;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.service-badge.ok { background: #dcfce7; color: #16a34a; }
.service-badge.degraded { background: #fef3c7; color: #d97706; }
.service-badge.outage { background: #fee2e2; color: #dc2626; }

.service-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.service-badge.ok .service-badge-dot { background: #16a34a; }
.service-badge.degraded .service-badge-dot { background: #d97706; }
.service-badge.outage .service-badge-dot { background: #dc2626; }

.service-loading, .empty-text {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Incidents ── */
.incidents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 4px solid var(--border);
}

.incident-card.operational { border-left-color: var(--green); }
.incident-card.degraded { border-left-color: var(--yellow); }
.incident-card.major_outage { border-left-color: var(--red); }
.incident-card.maintenance { border-left-color: var(--blue); }
.incident-card.resolved { border-left-color: var(--text-muted); }

.incident-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.incident-title {
  font-weight: 600;
  font-size: 14px;
}

.incident-severity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.incident-message {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0;
  line-height: 1.5;
}

.incident-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Subscribe ── */
.subscribe-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.subscribe-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.subscribe-form {
  display: flex;
  gap: 8px;
}

.subscribe-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.subscribe-form input:focus {
  border-color: var(--primary);
}

.btn-subscribe {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-subscribe:hover {
  background: #2d9348;
}

.subscribe-msg {
  font-size: 12px;
  margin-top: 8px;
}

.subscribe-msg.success { color: var(--green); }
.subscribe-msg.error { color: var(--red); }

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
  }
  .overall-card {
    padding: 16px;
  }
}
