/* Credentik status page (status.credentik.com). Tokens follow credentik.com
   (home.css): slate neutrals, indigo brand, Bricolage Grotesque headings. */

:root {
  --ink: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --faint: #94a3b8;
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --brand: #4f46e5;
  --brand-soft: #eef2ff;
  --ok: #10b981;   --ok-bg: #ecfdf5;   --ok-ink: #066e54;
  --warn: #f59e0b; --warn-bg: #fffbeb; --warn-ink: #92400e;
  --bad: #ef4444;  --bad-bg: #fef2f2;  --bad-ink: #991b1b;
  --info: #3b82f6; --info-bg: #eff6ff; --info-ink: #1e40af;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px -18px rgba(15, 23, 42, .22);
  --r: 14px;
  --f-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f5f9; --body: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
    --bg: #0b1120; --card: #111a2e; --line: #1e293b;
    --brand: #a5b4fc; --brand-soft: rgba(99, 102, 241, .14);
    --ok-bg: rgba(16, 185, 129, .12); --ok-ink: #6ee7b7;
    --warn-bg: rgba(245, 158, 11, .12); --warn-ink: #fcd34d;
    --bad-bg: rgba(239, 68, 68, .12); --bad-ink: #fca5a5;
    --info-bg: rgba(59, 130, 246, .12); --info-ink: #93c5fd;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f1f5f9; --body: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --bg: #0b1120; --card: #111a2e; --line: #1e293b;
  --brand: #a5b4fc; --brand-soft: rgba(99, 102, 241, .14);
  --ok-bg: rgba(16, 185, 129, .12); --ok-ink: #6ee7b7;
  --warn-bg: rgba(245, 158, 11, .12); --warn-ink: #fcd34d;
  --bad-bg: rgba(239, 68, 68, .12); --bad-ink: #fca5a5;
  --info-bg: rgba(59, 130, 246, .12); --info-ink: #93c5fd;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 400 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; color: var(--brand); flex: none; }
.brand-name { font: 700 19px/1 var(--f-display); letter-spacing: -.01em; }
.brand-sub { font: 500 13px/1 var(--f-body); color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line); }
.top-links { display: flex; gap: 16px; font-size: 14px; font-weight: 500; }

main.wrap { padding-top: 32px; padding-bottom: 56px; }
section + section { margin-top: 36px; }
.sec-h { margin: 0 0 12px; font: 700 18px/1.3 var(--f-display); color: var(--ink); }
.sec-note { font: 400 13px var(--f-body); color: var(--muted); margin-left: 6px; }

.overall { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.overall h1 { margin: 0; font: 700 clamp(20px, 4.4vw, 26px)/1.2 var(--f-display); color: var(--ink); }
.overall .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--faint); box-shadow: 0 0 0 6px color-mix(in srgb, var(--faint) 18%, transparent); }
.overall.is-operational { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.overall.is-operational .dot { background: var(--ok); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 20%, transparent); }
.overall.is-degraded { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.overall.is-degraded .dot { background: var(--warn); box-shadow: 0 0 0 6px color-mix(in srgb, var(--warn) 22%, transparent); }
.overall.is-outage { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.overall.is-outage .dot { background: var(--bad); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 22%, transparent); }

.components { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.comp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; min-height: 58px; }
.comp + .comp { border-top: 1px solid var(--line); }
.comp-name { font-weight: 600; color: var(--ink); }
.comp-note { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.skeleton span { display: block; width: 40%; height: 12px; border-radius: 6px; background: var(--line); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: none; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.operational { background: var(--ok-bg); color: var(--ok-ink); }
.pill.degraded { background: var(--warn-bg); color: var(--warn-ink); }
.pill.outage { background: var(--bad-bg); color: var(--bad-ink); }
.pill.investigating { background: var(--bad-bg); color: var(--bad-ink); }
.pill.identified { background: var(--warn-bg); color: var(--warn-ink); }
.pill.monitoring { background: var(--info-bg); color: var(--info-ink); }
.pill.resolved { background: var(--ok-bg); color: var(--ok-ink); }

.incident { padding: 16px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.incident + .incident { margin-top: 10px; }
.active .incident { border-left: 4px solid var(--warn); }
.inc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.inc-title { margin: 0; font: 600 15.5px/1.4 var(--f-body); color: var(--ink); }
.inc-msg { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.inc-meta { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

.history .day { padding: 12px 0; border-top: 1px solid var(--line); }
.history .day:first-child { border-top: 0; padding-top: 0; }
.history .day-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.empty { margin: 0; padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); font-size: 14px; }

.foot { border-top: 1px solid var(--line); background: var(--card); }
.foot-in { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 18px 16px; font-size: 13px; color: var(--muted); }

@media (max-width: 560px) {
  main.wrap { padding-top: 20px; }
  .overall { padding: 18px; gap: 14px; }
  .comp { align-items: flex-start; }
  .top-links { gap: 12px; font-size: 13px; }
}
