:root {
  --bg0: #07060c;
  --bg1: #12101a;
  --bg2: #1a1624;
  --line: #ffffff14;
  --text: #f4f0fa;
  --muted: #a89bb8;
  --accent: #f427a1;
  --accent-dim: #f427a133;
  --ok: #2fd67b;
  --warn: #f0b429;
  --bad: #ff4d6d;
  --maint: #6aa8ff;
  --radius: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% -10%, #f427a122, transparent 55%),
    radial-gradient(700px 380px at 90% 0%, #3a1a5522, transparent 50%),
    linear-gradient(180deg, #0c0a12 0%, var(--bg0) 40%, #09080f 100%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand .mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 800;
  background: linear-gradient(145deg, var(--accent), #9b1468);
  box-shadow: 0 0 0 1px #ffffff22, 0 10px 28px var(--accent-dim);
}
.brand .name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}
.top-nav { display: flex; gap: 16px; font-size: 0.92rem; }
.top-nav a { color: var(--muted); }
.top-nav a:hover { color: var(--text); }

.hero {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 26px;
  background:
    linear-gradient(135deg, #ffffff08, transparent 40%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 180px;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.hero p { margin: 0; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #0006;
  margin-bottom: 14px;
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.st-operational { color: var(--ok); }
.st-degraded, .st-unknown { color: var(--warn); }
.st-partial { color: #ff8a4c; }
.st-major { color: var(--bad); }
.st-maintenance { color: var(--maint); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #14121c, #100e16);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.card-head h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.card-head .meta { color: var(--muted); font-size: 0.85rem; }

.svc {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.svc:first-child { border-top: 0; }
.svc-name { font-weight: 650; }
.svc-desc { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.svc-meta { color: var(--muted); font-size: 0.8rem; text-align: right; }
.svc-status {
  font-weight: 650;
  font-size: 0.9rem;
  text-align: right;
}

.incident {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}
.incident:first-of-type { border-top: 0; }
.incident h3 { margin: 0 0 6px; font-size: 1.05rem; }
.incident .when { color: var(--muted); font-size: 0.82rem; margin-bottom: 8px; }
.incident-update {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 12px;
  margin: 10px 0;
  color: #ddd5e8;
  font-size: 0.92rem;
}
.incident-update .u-meta { color: var(--muted); font-size: 0.78rem; margin-bottom: 4px; }

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.flash-ok { background: #2fd67b18; color: #baf5d2; }
.flash-err { background: #ff4d6d18; color: #ffc0cb; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #12101a;
  padding: 20px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; font-family: var(--display); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .svc-status, .svc-meta { text-align: left; }
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
}
input[type="text"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a0910;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #1c1828;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { border-color: #ffffff33; }
.btn-primary {
  background: linear-gradient(145deg, var(--accent), #b01674);
  border-color: transparent;
}
.btn-danger { background: #3a1018; color: #ffb3c1; }
.btn-sm { padding: 6px 10px; font-size: 0.82rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

.login-box {
  width: min(400px, 100%);
  margin: 48px auto;
}

.foot {
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.hint { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
