:root {
  --bg: #0b0f14;
  --bg-2: #141a22;
  --card: rgba(17, 24, 33, 0.9);
  --card-strong: rgba(22, 31, 42, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4efe8;
  --muted: #aab3bd;
  --accent: #f47c56;
  --accent-2: #35c4b7;
  --accent-3: #f2c46b;
  --accent-4: #7ea2ff;
  --shadow: 0 24px 60px rgba(6, 10, 15, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(52, 70, 90, 0.35), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(244, 124, 86, 0.2), transparent 55%),
    linear-gradient(160deg, #0b0f14 0%, #0f151d 48%, #0b0f14 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  margin: 0 0 0.35em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.55;
  animation: float 12s ease-in-out infinite;
}

.orb-one {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(244, 124, 86, 0.45), transparent 60%);
  top: -100px;
  left: -80px;
}

.orb-two {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(53, 196, 183, 0.42), transparent 60%);
  bottom: 18%;
  right: -90px;
  animation-delay: 2s;
}

.orb-three {
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(242, 196, 107, 0.36), transparent 60%);
  top: 48%;
  left: 35%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-18px);
  }
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 6vw 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0c131a;
  box-shadow: var(--shadow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.top-actions {
  display: flex;
  gap: 14px;
  font-size: 0.95rem;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.page {
  position: relative;
  z-index: 1;
  padding: 10px 6vw 80px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.6s ease forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: center;
  margin-bottom: 40px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  color: var(--accent-3);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-card {
  background: linear-gradient(145deg, rgba(18, 26, 36, 0.95), rgba(12, 18, 26, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.card-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.status-display {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.metric-row {
  display: flex;
  gap: 28px;
  margin-top: 18px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.section {
  margin-bottom: 36px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card,
.incident,
.admin-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.status-pill,
.meta-pill,
.health-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
}

.meta-pill {
  color: var(--muted);
}

.status-operational {
  background: rgba(53, 196, 183, 0.15);
  color: #7fe7e2;
  border-color: rgba(53, 196, 183, 0.35);
}

.status-degraded {
  background: rgba(242, 196, 107, 0.16);
  color: #f2c46b;
  border-color: rgba(242, 196, 107, 0.4);
}

.status-partial_outage,
.status-identified {
  background: rgba(244, 124, 86, 0.2);
  color: #ffb089;
  border-color: rgba(244, 124, 86, 0.4);
}

.status-major_outage {
  background: rgba(230, 84, 84, 0.2);
  color: #ff8b8b;
  border-color: rgba(230, 84, 84, 0.45);
}

.status-maintenance,
.status-monitoring {
  background: rgba(126, 162, 255, 0.18);
  color: #9fc0ff;
  border-color: rgba(126, 162, 255, 0.4);
}

.status-investigating {
  background: rgba(255, 255, 255, 0.1);
  color: #f7f3ee;
  border-color: rgba(255, 255, 255, 0.2);
}

.status-resolved {
  background: rgba(53, 196, 183, 0.2);
  color: #7fe7e2;
  border-color: rgba(53, 196, 183, 0.4);
}

.health-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.health-pill {
  font-size: 0.75rem;
}

.health-ok {
  background: rgba(53, 196, 183, 0.2);
  color: #7fe7e2;
  border-color: rgba(53, 196, 183, 0.4);
}

.health-fail {
  background: rgba(230, 84, 84, 0.2);
  color: #ffb2b2;
  border-color: rgba(230, 84, 84, 0.4);
}

.health-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.health-url {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: rgba(244, 239, 232, 0.7);
  word-break: break-all;
}

.health-error {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #ffb2b2;
}

.incident-list {
  display: grid;
  gap: 18px;
}

.incident-muted {
  background: var(--card-strong);
  opacity: 0.9;
}

.incident-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

.timeline {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
}

.timeline-status {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.timeline-message {
  margin-bottom: 4px;
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.empty {
  padding: 24px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  text-align: center;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 6vw 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.toast {
  background: rgba(53, 196, 183, 0.12);
  border: 1px solid rgba(53, 196, 183, 0.3);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.admin-panel {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px;
}

.panel-head {
  margin-bottom: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.admin-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stack {
  display: grid;
  gap: 16px;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 22, 0.9);
  color: var(--text);
  font-size: 0.95rem;
  font-family: "Bricolage Grotesque", sans-serif;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid rgba(53, 196, 183, 0.45);
  border-color: transparent;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn.primary {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: #0b1016;
  border: none;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.btn.danger {
  background: rgba(230, 84, 84, 0.2);
  color: #ffb2b2;
  border-color: rgba(230, 84, 84, 0.4);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .metric-row {
    flex-direction: column;
  }
}
