html, body {
  height: 100%;
  overflow: auto;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--f-ui);
  font-size: 15px;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-hover);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 0.5rem;
  font-family: var(--f-display);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--t1);
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.3;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-codex);
  border: 1px solid var(--bg-hover);
  border-radius: 5px;
  color: var(--t1);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--gold);
  background: var(--bg-surface);
}

/* Chrome autofill overrides the background color — inset shadow trick restores our colors. */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-codex) inset !important;
  -webkit-text-fill-color: var(--t1) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: var(--gold);
  border: none;
  border-radius: 5px;
  color: var(--bg);
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #e0a060;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--t2);
}

.auth-footer a {
  color: var(--gold);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.error-banner {
  background: rgba(192,96,80,0.08);
  border: 1px solid rgba(192,96,80,0.25);
  border-radius: 5px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.25rem;
  color: var(--rose);
  font-size: 0.9rem;
}

/* Language selector — flag-style radio cards (shared with waitlist) */
.lang-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-radio { cursor: pointer; }
.lang-radio-input { position: absolute; opacity: 0; pointer-events: none; }
.lang-radio-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; background: var(--bg-codex);
  border: 1.5px solid rgba(255,255,255,0.06); border-radius: 10px;
  transition: all 0.2s; min-width: 72px;
}
.lang-radio-card:hover { border-color: rgba(208,136,74,0.3); background: var(--bg-hover); }
.lang-radio-input:checked + .lang-radio-card { border-color: var(--gold); background: var(--gold-dd); }
.lang-radio-flag { font-size: 24px; line-height: 1; }
.lang-radio-name { font-family: var(--f-ui); font-size: 10px; font-weight: 600; color: var(--t3); text-align: center; }
.lang-radio-input:checked + .lang-radio-card .lang-radio-name { color: var(--gold); }
