:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --panel: #151515;
  --control: #0f0f0f;
  --border: #2b2b2b;
  --border-soft: #222;
  --text: #949494;
  --bright: #e1e1e1;
  --dim: #666;
  --accent: #ff0044;
  --accent-soft: rgba(255,0,68,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 80% -10%, rgba(255,0,68,.07), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
}

body { min-height: 100vh; }
button, input { font: inherit; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

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

.logo {
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  background: var(--panel);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  border-radius: 4px;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 2px;
  color: var(--bright);
  font-size: 17px;
}

h1 span { color: var(--accent); }

.brand p,
.table-head p {
  margin-bottom: 0;
  font-size: 10px;
  color: var(--dim);
}

.panel {
  background: rgba(21,21,21,.97);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.relay-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 4px;
  font-size: 10px;
}

.relay-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555;
}

.relay-status.online {
  border-color: rgba(255,0,68,.4);
}

.relay-status.online .dot {
  background: var(--accent);
  box-shadow: 0 0 9px rgba(255,0,68,.5);
}

.toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px;
}

.field {
  display: grid;
  gap: 5px;
  font-size: 9px;
}

.field input { min-width: 260px; }

input {
  min-height: 31px;
  border: 1px solid #343434;
  background: var(--control);
  color: var(--bright);
  border-radius: 3px;
  outline: none;
  padding: 7px 9px;
}

input:focus { border-color: var(--accent); }

button {
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid #343434;
  background: var(--control);
  color: var(--text);
  border-radius: 3px;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  font-size: 9px;
}

.check input {
  min-height: auto;
  accent-color: var(--accent);
}

.message {
  margin-left: auto;
  font-size: 9px;
  color: var(--dim);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin: 10px 0;
}

.metric {
  padding: 12px 13px;
}

.metric span {
  display: block;
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 9px;
}

.metric strong {
  color: var(--accent);
  font-size: 19px;
}

.metric .metric-text {
  color: var(--bright);
  font-size: 12px;
}

.table-panel { overflow: hidden; }

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--border-soft);
}

.table-head h2 {
  margin-bottom: 3px;
  color: var(--bright);
  font-size: 12px;
}

.table-head input { width: 220px; }
.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th, td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  white-space: nowrap;
  font-size: 9px;
}

th {
  background: #111;
  color: #717171;
  font-weight: 400;
}

tbody tr:hover td { background: #171717; }

.user-name {
  color: var(--bright);
  font-size: 10px;
}

.sub {
  margin-top: 2px;
  color: var(--dim);
  font-size: 8px;
}

.game-name { color: #c8c8c8; }

.tag {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid rgba(255,0,68,.28);
  background: var(--accent-soft);
  color: #ff557e;
  border-radius: 3px;
}

.muted { color: var(--dim); }
.action { text-align: right; }

.action button {
  min-height: 23px;
  padding: 3px 7px;
  font-size: 8px;
}

.empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--dim);
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 18px, 1180px); }
  .topbar, .table-head { display: grid; }
  .metrics { grid-template-columns: 1fr; }
  .field, .field input, .table-head input { width: 100%; min-width: 0; }
  .message { width: 100%; margin-left: 0; }
}