:root {
  color-scheme: dark;
  --bg: #06121a;
  --bg-elevated: #0b1822;
  --panel: rgba(8, 23, 33, 0.92);
  --line: rgba(104, 201, 255, 0.18);
  --text: #eef9ff;
  --muted: #9fbcca;
  --accent: #52d7ff;
  --success: #73f0ad;
  --warning: #ffbb55;
  --danger: #ff7f93;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(32, 110, 156, 0.2), transparent 32%),
    linear-gradient(180deg, #081722 0%, var(--bg) 48%, #07151f 100%);
  color: var(--text);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 18, 26, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(82, 215, 255, 0.95), rgba(9, 191, 255, 0.2)),
    #0a2433;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand h1,
.section-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ghost-link,
.ghost-button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(11, 24, 34, 0.8);
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font: inherit;
}

.ghost-button:hover,
.ghost-link:hover {
  border-color: rgba(82, 215, 255, 0.45);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 187, 85, 0.15);
}

.live-pill.ok::before {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(115, 240, 173, 0.15);
}

.live-pill.error::before {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 127, 147, 0.15);
}

.status-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 22px;
}

.status-banner {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 24, 34, 0.7);
  color: var(--muted);
  font-size: 14px;
}

.status-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 14px;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 18, 26, 0.55);
  padding: 14px;
  display: grid;
  gap: 8px;
  min-height: 96px;
}

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

.card-title {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.card-value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #6b7f8c;
  box-shadow: 0 0 0 4px rgba(107, 127, 140, 0.15);
}

.dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(115, 240, 173, 0.16);
}

.dot.warn {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 187, 85, 0.16);
}

.dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 127, 147, 0.16);
}

.dot.unknown {
  background: #6b7f8c;
}

.level-ok .card-value { color: var(--success); }
.level-warn .card-value { color: var(--warning); }
.level-error .card-value { color: var(--danger); }

.dashboard-footer {
  padding: 18px 28px 28px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

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

  .section-head {
    flex-direction: column;
  }
}
