:root {
  --bg: #07080d;
  --panel: rgba(18, 20, 31, 0.84);
  --panel2: rgba(30, 33, 48, 0.92);
  --text: #f7f7fb;
  --muted: #a2a7bd;
  --accent: #ff4fa3;
  --accent2: #7c3aed;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --border: rgba(255,255,255,0.1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,79,163,.20), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(124,58,237,.18), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .panel, .card, .table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
  border-radius: 22px;
}
.login-card { width: min(420px, 100%); padding: 32px; display: grid; gap: 16px; }
.login-card h1 { margin: 0; }
.login-card p { margin-top: -8px; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
}
input:focus, select:focus { border-color: rgba(255,79,163,.7); }
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-weight: 800;
  cursor: pointer;
}
button.ghost { background: rgba(255,255,255,.08); color: var(--text); }
button.danger { background: rgba(239,68,68,.85); }
button.small { padding: 7px 10px; border-radius: 10px; font-size: 12px; }
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--border);
  background: rgba(9,10,16,.75);
  padding: 20px;
  display: flex; flex-direction: column; gap: 24px;
}
.brand { font-weight: 900; font-size: 18px; }
nav { display: grid; gap: 8px; }
nav button { text-align: left; background: transparent; color: var(--muted); }
nav button.active, nav button:hover { background: rgba(255,255,255,.08); color: var(--text); }
main { padding: 28px; overflow: auto; }
.page { display: none; }
.page.active { display: block; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
h1 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 42px); }
h2 { margin-top: 28px; }
p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.card { padding: 18px; }
.card strong { display:block; font-size: 28px; margin-top: 6px; }
.panel { padding: 20px; margin-bottom: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.check { display: inline-flex; align-items: center; grid-auto-flow: column; margin: 14px 18px 0 0; }
.check input { width: auto; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.table-wrap { overflow: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.08); }
.badge.good { background: rgba(34,197,94,.18); color: #86efac; }
.badge.warn { background: rgba(245,158,11,.16); color: #fcd34d; }
.badge.bad { background: rgba(239,68,68,.18); color: #fca5a5; }
.toast { position: fixed; right: 18px; bottom: 18px; padding: 14px 18px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--border); }

/* Discord OAuth login styles */
.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: #5865F2;
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 14px;
}
.discord-btn:hover { background: #4752C4; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.hint { font-size: 13px; color: var(--muted); margin-top: -6px; }
.actions-inline { display: flex; align-items: flex-end; gap: 10px; }
.discover-results { margin-top: 16px; display: grid; gap: 14px; }
.discover-results label { color: var(--text); }
select[multiple] { min-height: 120px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid2 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
}
