:root {
  --bg: #09090f;
  --surface: #0f0f1a;
  --surface-2: #141424;
  --border: rgba(255, 255, 255, 0.07);
  --text: #f0eff6;
  --text-muted: #8b8aa8;
  --text-faint: #9695af;
  --amber: #e8a020;
  --amber-hover: #f0b840;
  --amber-glow: rgba(232, 160, 32, 0.18);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}
.auth-brand {
  color: var(--amber);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.auth-brand:hover { color: var(--amber-hover); }
.auth-back {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 180ms var(--ease);
}
.auth-back:hover { color: var(--text); }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-card label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input[type=text] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  margin-bottom: 1rem;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.auth-help {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

.auth-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--amber);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 180ms var(--ease);
}
.auth-btn:hover { background: var(--amber-hover); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Task #86 — "Continue with Google" button. White background per Google's
   branding guidelines for the light/colored G mark on dark surfaces. */
.auth-btn-google {
  background: #ffffff;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  margin-bottom: 0;
}
.auth-btn-google:hover { background: #f1f1f5; }
.auth-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-msg { font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }
.auth-msg.error { color: #fca5a5; }
.auth-msg.success { color: #86efac; }

/* Default link colour inside the auth shell — without this, inline TOS /
 * Privacy links inside <p>/<span> bodies fall back to the user-agent
 * default (#0000ee) which fails WCAG AA contrast on the dark surface.
 * REPORT.md "Discovered a11y gaps" (Task #114). */
.auth-card a, .auth-help a { color: var(--amber); text-decoration: none; font-weight: 500; }
.auth-card a:hover, .auth-help a:hover { color: var(--amber-hover); text-decoration: underline; }

.auth-tos {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  cursor: pointer;
  line-height: 1.4;
}
.auth-tos input[type=checkbox] {
  margin-top: 0.15rem;
  accent-color: var(--amber);
  cursor: pointer;
  flex-shrink: 0;
}
.auth-tos a { color: var(--amber); text-decoration: none; }
.auth-tos a:hover { color: var(--amber-hover); }

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.auth-link {
  color: var(--amber);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 180ms var(--ease);
}
.auth-link:hover { color: var(--amber-hover); }

.auth-footer-line {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-footer-line a { color: var(--amber); text-decoration: none; font-weight: 600; }
.auth-footer-line a:hover { color: var(--amber-hover); }

.auth-pagefoot {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.75rem;
  margin-top: 2rem;
  line-height: 1.5;
}
.auth-pagefoot a { color: var(--text-faint); text-decoration: none; }
.auth-pagefoot a:hover { color: var(--text-muted); }

@media (max-width: 480px) {
  body { padding: 1.5rem 1rem; }
  .auth-card { padding: 1.5rem; }
  .auth-title { font-size: 1.3rem; }
}
