:root {
  --bg: #0f1520;
  --panel: #182130;
  --panel-2: #1f2a3c;
  --text: #e8eef7;
  --muted: #8b9bb4;
  --accent: #3b82f6;
  --accent-2: #2563eb;
  --ok: #22c55e;
  --fail: #ef4444;
  --warn: #f59e0b;
  --border: #2a374d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: radial-gradient(1200px 600px at 50% -200px, #1b2a44 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  max-width: 760px;
  margin: 0 auto;
}

.brand { font-weight: 700; letter-spacing: .3px; }

.view { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.auth { max-width: 420px; margin: 8vh auto 0; }

h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

label { display: block; margin: 14px 0; font-size: 14px; color: var(--muted); }

input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
input:focus { border-color: var(--accent); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--panel-2);
  color: var(--text);
  transition: transform .05s ease, background .15s ease;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .6; cursor: default; }

.primary { background: var(--accent); }
.primary:hover { background: var(--accent-2); }
.big { width: 100%; padding: 16px; font-size: 17px; margin: 6px 0 12px; }
.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }

.error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .4);
  color: #fecaca;
  font-size: 14px;
}

.hidden { display: none !important; }

.profile-head { display: flex; justify-content: space-between; align-items: center; }
.profile .name { font-size: 20px; font-weight: 700; }
.profile .group { color: var(--accent); font-size: 15px; margin-top: 2px; }
.badge {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 18px 0 0; }
.facts div { margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.facts dd { margin: 2px 0 0; font-size: 14px; }

.manual { display: flex; gap: 8px; }
.manual input { margin-top: 0; flex: 1; }

.members, .results { list-style: none; margin: 0; padding: 0; }
.members li, .results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.members li:last-child, .results li:last-child { border-bottom: none; }
.mname { flex: 1; }
.members .muted, .results .muted { margin-left: auto; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }

.results li.ok .icon { color: var(--ok); font-weight: 700; }
.results li.fail .icon { color: var(--fail); font-weight: 700; }
.results .icon { width: 18px; text-align: center; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
#video { width: 100%; max-height: 70vh; background: #000; display: block; object-fit: cover; }
.modal-box .muted { padding: 10px 16px 16px; display: block; }
