:root {
  --bg: #0f1220;
  --card: #171a2b;
  --text: #e8eaf5;
  --muted: #8f95b3;
  --border: #2a2f4a;
  --primary: #7c5cff;
  --primary-hover: #5a3fd4;
  --danger: #ff6577;
  --radius: 12px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }

.auth-shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.35);
}

.auth-header { margin-bottom: 24px; text-align: center; }
.auth-header h1 { margin: 0 0 4px; font-size: 1.5rem; }
.auth-subtitle { margin: 0; color: var(--muted); font-size: 0.9rem; }

.auth-form { display: flex; flex-direction: column; gap: var(--gap); }
.auth-form label { font-size: 0.85rem; color: var(--muted); margin-bottom: -8px; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  background: #0d1020;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 120ms;
}
.auth-form input:focus { border-color: var(--primary); }

.auth-primary {
  background: var(--primary);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms;
}
.auth-primary:hover { background: var(--primary-hover); }

.auth-error {
  color: var(--danger);
  background: rgba(255,101,119,0.08);
  border: 1px solid rgba(255,101,119,0.25);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 18px;
  font-size: 0.9rem;
}

.auth-toggle {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-toggle label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 0; }

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}
.auth-footer a { color: var(--muted); text-decoration: none; }
.auth-footer a:hover { color: var(--primary); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ---- Google / social login ---- */
.auth-social { margin-bottom: 20px; }

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 120ms, background 120ms;
}
.auth-google:hover {
  box-shadow: 0 1px 6px rgba(32,33,36,0.28);
  background: #f8f9fa;
}
.auth-google-icon { flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { white-space: nowrap; }
