/* ------------------------------------------------------------------ */
/* Swiss MaxCloud Corporate Design — Status Page                       */
/* Farben + Typography 1:1 aus Marketing-App (index.css) portiert,     */
/* damit status.swissmax.cloud, swissmax.cloud und CP2 einheitlich     */
/* wirken. Prefix `--swm-` = Swiss Max Corporate Tokens.               */
/* ------------------------------------------------------------------ */
:root {
  /* Brand tokens (Marketing-App SSOT) */
  --swm-primary:      #2563eb;   /* Swiss Blue */
  --swm-primary-dark: #1e40af;
  --swm-secondary:    #dc2626;   /* Swiss Red */

  /* Semantic surface */
  --swm-bg:           #f8fafc;   /* Slate 50 - marketing bg-section-alt */
  --swm-surface:      #ffffff;
  --swm-text:         #0f172a;   /* Slate 900 - marketing text-main */
  --swm-text-2:       #4b5563;
  --swm-muted:        #64748b;
  --swm-border:       #e2e8f0;   /* Slate 200 */

  /* Status */
  --swm-ok:      #16a34a;
  --swm-warn:    #f59e0b;
  --swm-err:     var(--swm-secondary);
  --swm-info:    var(--swm-primary);
  --swm-unknown: #9ca3af;

  --swm-radius:  12px;
  --swm-radius-sm: 8px;
  --swm-shadow:  0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --swm-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);

  --swm-hero-bg:
    radial-gradient(circle at 100% 0%, rgba(220, 38, 38, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--swm-text);
  background: var(--swm-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ */
/* Header + Brand-Mark (Cloud + CH + Swiss-Shield)                     */
/* ------------------------------------------------------------------ */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--swm-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-cloud { display: block; }
.brand-ch {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--swm-primary-dark);
  pointer-events: none;
  letter-spacing: 0.02em;
}
.brand-shield {
  position: absolute;
  right: -2px;
  bottom: -2px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  display: inline-flex;
  line-height: 0;
}
.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-word-1 { font-weight: 800; color: var(--swm-text); }
.brand-word-2 { font-weight: 800; color: var(--swm-primary); }

.site-nav a {
  color: var(--swm-text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--swm-primary); }

/* ------------------------------------------------------------------ */
/* Hero + Main                                                         */
/* ------------------------------------------------------------------ */
.main {
  padding: 48px 24px 64px;
  background: var(--swm-hero-bg);
  flex: 1 0 auto;
}
.hero { margin-bottom: 32px; }
.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--swm-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--swm-text);
}
.lede { margin: 0 0 8px; color: var(--swm-text-2); font-size: 17px; max-width: 640px; }

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */
.overall-card {
  background: var(--swm-surface);
  border: 1px solid var(--swm-border);
  border-radius: var(--swm-radius);
  padding: 24px;
  box-shadow: var(--swm-shadow-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  border-left: 4px solid var(--swm-primary);
}
.overall-inner { display: flex; align-items: center; gap: 16px; }
.overall-label { font-size: 20px; font-weight: 700; color: var(--swm-text); }
.overall-sub { color: var(--swm-muted); font-size: 13px; margin-top: 2px; }
.refresh-info { color: var(--swm-muted); font-size: 13px; display: flex; align-items: center; gap: 12px; }
.refresh-btn {
  background: transparent;
  border: 1px solid var(--swm-border);
  border-radius: var(--swm-radius-sm);
  padding: 8px 14px;
  color: var(--swm-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  font-family: inherit;
}
.refresh-btn:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: var(--swm-primary);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* Status Dots                                                         */
/* ------------------------------------------------------------------ */
.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ok      { background: var(--swm-ok); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15); }
.dot-warn    { background: var(--swm-warn); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
.dot-err     { background: var(--swm-err); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }
.dot-info    { background: var(--swm-info); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.dot-unknown { background: var(--swm-unknown); box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.15); }

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--swm-text);
  letter-spacing: -0.01em;
}

.services-list, .incidents-list { list-style: none; padding: 0; margin: 0; }
.service-item {
  background: var(--swm-surface);
  border: 1px solid var(--swm-border);
  border-radius: var(--swm-radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--swm-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--swm-shadow-lg);
}
.service-name { flex: 1; font-weight: 600; color: var(--swm-text); }
.service-status { color: var(--swm-muted); font-size: 13px; }
.services-empty {
  color: var(--swm-muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
  background: var(--swm-surface);
  border: 1px dashed var(--swm-border);
  border-radius: var(--swm-radius);
}

.incident-item {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--swm-warn);
  border-radius: var(--swm-radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: var(--swm-shadow);
}
.incident-title { font-weight: 700; margin-bottom: 4px; color: var(--swm-text); }
.incident-body { color: #7c2d12; font-size: 14px; margin-bottom: 4px; }
.incident-since { color: var(--swm-muted); font-size: 12px; }

.last-checked {
  color: var(--swm-muted);
  font-size: 12px;
  text-align: center;
  margin-top: 32px;
}

/* ------------------------------------------------------------------ */
/* Footer — kein API-Hinweis mehr (PR-L2c). Nur Copyright + Links.     */
/* ------------------------------------------------------------------ */
.site-footer {
  background: var(--swm-surface);
  border-top: 1px solid var(--swm-border);
  margin-top: auto;
}
.footer-inner {
  min-height: 64px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--swm-muted);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-nav {
  display: inline-flex;
  gap: 20px;
}
.footer-nav a {
  color: var(--swm-text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--swm-primary); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .hero h1 { font-size: 26px; }
  .header-inner { min-height: 60px; padding: 8px 16px; }
  .brand-wordmark { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .main { padding: 32px 16px 48px; }
  .overall-card { flex-direction: column; align-items: flex-start; }
  .refresh-info { width: 100%; justify-content: space-between; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
