:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #e64a3b;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar h1 { font-size: 16px; margin: 0; }
.topbar form { margin: 0; }

nav {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

nav a.active { color: var(--text); border-bottom-color: var(--accent); }

main { padding: 20px; max-width: 1100px; margin: 0 auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-CONFIRMED { background: #1f3d2a; color: var(--ok); }
.badge-HIGH { background: #1f2f3d; color: #58a6ff; }
.badge-MEDIUM { background: #3d341f; color: var(--warn); }
.badge-LOW { background: #3d1f1f; color: var(--bad); }
.badge-OK { background: #1f3d2a; color: var(--ok); }
.badge-DEGRADED { background: #3d341f; color: var(--warn); }
.badge-DOWN, .badge-FAILED, .badge-UNDELIVERED { background: #3d1f1f; color: var(--bad); }
.badge-DISABLED, .badge-UNKNOWN { background: #262a33; color: var(--muted); }
.badge-DELIVERED, .badge-SENT { background: #1f3d2a; color: var(--ok); }

input, select, button, textarea {
  background: #0d0f13;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}

button { cursor: pointer; background: var(--accent); border-color: var(--accent); color: white; font-weight: 600; }
button.secondary { background: #262a33; border-color: var(--border); color: var(--text); }
button.danger { background: var(--bad); border-color: var(--bad); }

form.inline { display: inline; }

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

.checkgroup { display: flex; flex-wrap: wrap; gap: 10px; }
.checkgroup label { display: flex; align-items: center; gap: 4px; font-size: 13px; }

.message { background: #1f2f3d; color: #58a6ff; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }

.map-container { height: 70vh; border-radius: 8px; overflow: hidden; }

.stat { font-size: 28px; font-weight: 700; }
.muted { color: var(--muted); }
a { color: #58a6ff; }
