:root {
  color-scheme: only light;
  --bg: #0b0c0e;
  --bg-alt: #15191d;
  --panel: rgba(16, 20, 24, 0.9);
  --accent: #d6a75e;
  --accent-strong: #e7c57a;
  --muted: #9aa0a6;
  --danger: #c25a3a;
  --ok: #7aa35b;
  --glow: rgba(214, 167, 94, 0.2);
  --border: rgba(214, 167, 94, 0.25);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(214, 167, 94, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(76, 119, 110, 0.12), transparent 45%),
    linear-gradient(140deg, #0b0c0e 0%, #0f1215 60%, #1b2227 100%);
  color: #f4f1e8;
  padding: 48px clamp(20px, 6vw, 72px) 64px;
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 8px
    ),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.03), transparent 40%);
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}

.hero {
  max-width: 880px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.kicker {
  font-family: "Special Elite", "Courier New", monospace;
  color: var(--accent);
  letter-spacing: 0.26em;
  font-size: 0.85rem;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.subtitle {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.5;
}

.timestamp {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 1;
  position: relative;
}

.status-history-grid {
  display: grid;
  gap: 20px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  align-items: stretch;
}

.status-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 22px;
  min-height: 200px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  animation: lift 1s ease forwards;
}

.status-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(214, 167, 94, 0.08) 45%, transparent 90%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.status-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-card h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-detail {
  margin-top: 12px;
  font-size: 0.95rem;
}

.history-header h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.history-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.history-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  min-height: 190px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.history-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.history-card h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.history-total {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
}

.history-chart {
  width: 100%;
  height: 90px;
  margin-top: 12px;
}

.history-chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
}

.history-chart .area {
  fill: rgba(214, 167, 94, 0.15);
}

.history-chart .point {
  fill: var(--accent-strong);
}

.history-labels {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.badge.ok {
  background: rgba(122, 163, 91, 0.18);
  color: #dff1c9;
  border-color: rgba(122, 163, 91, 0.4);
}

.badge.issue {
  background: rgba(194, 90, 58, 0.2);
  color: #ffd4c6;
  border-color: rgba(194, 90, 58, 0.45);
}

.badge.checking {
  background: rgba(214, 167, 94, 0.18);
  color: #f7e5ba;
  border-color: rgba(214, 167, 94, 0.4);
}

.footer {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  z-index: 1;
  position: relative;
}

.legend {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend.good {
  background: var(--ok);
}

.legend.warn {
  background: var(--danger);
}

.legend.checking {
  background: var(--accent);
}

@keyframes lift {
  from {
    transform: translateY(12px);
    opacity: 0.4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 680px) {
  body {
    padding: 32px 18px 48px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge {
    letter-spacing: 0.08em;
  }
}
