:root {
  --bg: #0b0d10;
  --bg-elev: #12151a;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --border: #2a2f38;
  --accent: #e8e8e8;
  --error: #f87171;
  --google: #fff;
  --google-text: #3c4043;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2030 0%, var(--bg) 55%);
  color: var(--text);
}

.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-card {
  width: min(100%, 380px);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.25rem 1.75rem 1.75rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.auth-card .logo {
  display: block;
  margin: 0 auto 1rem;
  border-radius: 12px;
  object-fit: contain;
}

.auth-card h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.tagline {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--error) 18%, transparent);
  color: #fecaca;
  font-size: 0.875rem;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--google);
  color: var(--google-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #dadce0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.google-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.shell { min-height: 100vh; }
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.brand img { border-radius: 6px; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 550;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--border);
}

.nav-link.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-color: var(--border);
}

.user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
  justify-self: end;
}

.avatar { border-radius: 999px; }
.email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.link-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font: inherit;
}

.link-btn:hover { border-color: var(--muted); }

.page {
  max-width: 52rem;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.page h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.page .lede { margin: 0; color: var(--muted); line-height: 1.5; }

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .nav { justify-content: flex-start; flex-wrap: wrap; }
  .user { justify-self: start; }
  .email { max-width: 140px; }
}

.table-wrap {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
}

.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.match-table th,
.match-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.match-table th {
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  white-space: nowrap;
}

.match-table td { color: var(--muted); }
.match-table tbody tr:last-child td { border-bottom: none; }
.match-table .empty-row td {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.page .meta { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.85rem; }

.section-title {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.brex-cell div { margin: 0.15rem 0; }
.brex-cell div + div { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding-top: 0.15rem; }
.match-table tr.dim td { opacity: 0.45; }

.page .source { margin: 0.35rem 0 0.75rem; color: var(--muted); font-size: 0.9rem; }
.page .source code { color: var(--text); font-size: 0.88em; }
