:root {
  color-scheme: dark;
  --bg: #070b0a;
  --panel: rgba(15, 24, 20, 0.92);
  --panel-soft: rgba(25, 39, 32, 0.78);
  --text: #eef6ee;
  --muted: #9daf9f;
  --accent: #8dff8d;
  --danger: #ff6b6b;
  --line: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(66, 112, 72, 0.28), transparent 36rem), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0; }
.site-header, .site-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.brand { font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: 40px; object-fit: contain; border-radius: 50%; }
nav { display: flex; gap: 18px; align-items: center; color: var(--muted); }
nav a:hover, .nav-cta { color: var(--text); }
.hero { padding: 74px 0 42px; max-width: 860px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; margin: 0 0 12px; }
h1 { font-size: clamp(2.3rem, 7vw, 5.8rem); line-height: 0.95; margin: 0 0 22px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); margin: 0; }
h3 { margin-top: 0; }
.hero-copy { color: var(--muted); font-size: 1.2rem; max-width: 680px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.button, button { border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; color: var(--text); background: var(--panel-soft); cursor: pointer; font-weight: 700; }
.button.primary { background: var(--accent); color: #081008; border-color: transparent; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.status-card { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: start; }
.status-pill { border-radius: 999px; padding: 8px 14px; font-weight: 900; }
.status-pill.online { background: rgba(141, 255, 141, 0.14); color: var(--accent); }
.status-pill.offline { background: rgba(255, 107, 107, 0.14); color: var(--danger); }
.stats-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: 4px 0 0; font-size: 1.4rem; font-weight: 800; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.page-heading { margin-bottom: 22px; }
.prose { color: var(--muted); line-height: 1.7; }
.prose strong, .prose h2 { color: var(--text); }
.dashboard-header { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; }
.avatar { width: 84px; height: 84px; border-radius: 18px; }
.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin-top: 14px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 14px 8px; }
th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
code { color: var(--accent); }
.site-footer { color: var(--muted); padding: 24px 0 42px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .site-header, nav, .status-card, .feature-grid, .dashboard-header { display: block; }
  nav { margin-top: 14px; }
  nav a { margin-right: 12px; display: inline-block; margin-bottom: 8px; }
  .stats-grid { grid-template-columns: 1fr; }
  .status-pill { display: inline-block; margin-top: 16px; }
}
.flash { border-radius: 14px; padding: 14px 20px; margin-top: 18px; font-weight: 700; }
.flash-success { background: rgba(141,255,141,0.12); color: var(--accent); border: 1px solid rgba(141,255,141,0.25); }
.flash-error { background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.25); }
.store-form { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.text-input { background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; color: var(--text); font-size: 1rem; flex: 1; min-width: 200px; outline: none; }
.text-input:focus { border-color: var(--accent); }
.button.danger { background: rgba(255,107,107,0.15); color: var(--danger); border-color: rgba(255,107,107,0.3); }
.button.danger:hover { background: rgba(255,107,107,0.28); }
.button.small { padding: 7px 14px; font-size: 0.88rem; }
.row-actions { display: flex; gap: 8px; }
.row-actions form { margin: 0; }
.danger-zone { border-color: rgba(255,107,107,0.2); }
.live-badge { display: inline-block; margin: 10px 0 14px; padding: 7px 14px; background: rgba(141,255,141,0.08); border: 1px solid rgba(141,255,141,0.2); border-radius: 999px; font-size: 0.9rem; color: var(--accent); }
.live-badge.muted { background: rgba(255,255,255,0.04); border-color: var(--line); color: var(--muted); }
.live-badge.warn { background: rgba(255,200,80,0.08); border-color: rgba(255,200,80,0.25); color: #ffc850; }
