/* ═══════════════════════════════════════════════════════════════
   Montreal ESK8 — auth.css (PR-13 Jarvis HUD)
   Login, register, reset-password, account-delete forms.
═══════════════════════════════════════════════════════════════ */

/* ── AUTH LAYOUT ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── LEFT PANEL — branding ─────────────────────────────────── */
.auth-panel-left {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
  border-right: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 35%, rgba(224, 32, 47, 0.07) 0%, transparent 58%),
    radial-gradient(ellipse at 75% 65%, rgba(0, 118, 188, 0.07) 0%, transparent 58%);
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  max-width: 320px;
}

/* Mini radar rings */
.auth-rings {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.a-ring {
  position: absolute;
  border-radius: 50%;
  animation: spin 20s linear infinite;
}
.r1 { width: 190px; height: 190px; border: 1px solid rgba(0, 118, 188, 0.18); }
.r2 { width: 140px; height: 140px; border: 1px dashed rgba(224, 32, 47, 0.18); animation-duration: 12s; animation-direction: reverse; }
.r3 { width: 88px;  height: 88px;  border: 1px solid rgba(0, 118, 188, 0.26); animation-duration: 8s; }

.a-dot {
  position: absolute;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  top: calc(50% - 95px);
  left: 50%;
  transform-origin: 0 95px;
  animation: orbit 20s linear infinite;
}

.a-scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.38;
  animation: scan 3s ease-in-out infinite;
  top: 50%;
}

.a-logo-center {
  width: min(300px, 88vw);
  height: min(150px, 44vw);
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(0, 118, 188, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 8px 12px;
  box-shadow: 0 0 24px rgba(0, 118, 188, 0.10);
}
.a-logo-center img {
  width: min(300px, 82vw);
  height: min(150px, 41vw);
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(224, 32, 47, 0.5));
}

/* Lock icon variant */
.reset-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid rgba(0, 118, 188, 0.28);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  box-shadow: 0 0 24px rgba(0, 118, 188, 0.10);
}

.auth-tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.07em;
  color: var(--white);
  line-height: 1.1;
}

.auth-sub {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.85;
}

.auth-stats {
  display: flex;
  gap: 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: 100%;
  justify-content: center;
}

.auth-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--white);
}

.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── RIGHT PANEL — form ────────────────────────────────────── */
.auth-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--bg);
}

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

.auth-box-header { display: flex; flex-direction: column; gap: 6px; }

.auth-box-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-box-label::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}
.auth-box-label--blue { color: var(--blue); }
.auth-box-label--center {
  justify-content: center;
  margin: 0 auto;
}
.auth-box-label--center::before { display: none; }

.auth-box-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
}

.auth-box-sub {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── GOOGLE BUTTON ─────────────────────────────────────────── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--card);
  border: 1px solid var(--border-mid);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.btn-google:hover {
  border-color: rgba(0, 118, 188, 0.45);
  background: var(--blue-dim);
}

/* ── DIVIDER ───────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── FORM ──────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* PR-43 — shared field chrome (login/register/reset; pairs with support.css) */
.form-input {
  background: var(--card);
  border: 1px solid var(--border-mid);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  padding: 12px 16px;
  outline: none;
  width: 100%;
  border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--muted); opacity: 1; }
.form-input:hover:not(:disabled):not(:focus):not(.error-field):not([aria-invalid="true"]) {
  border-color: var(--border-bright);
}
.form-input:focus {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 0 3px var(--cyan-dim), 0 0 16px rgba(0, 212, 255, 0.12);
}
.form-input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.form-input.error-field,
.form-input[aria-invalid="true"] {
  border-color: rgba(224, 32, 47, 0.55);
  box-shadow: 0 0 0 3px rgba(224, 32, 47, 0.07);
}
.form-input.error-field:focus,
.form-input[aria-invalid="true"]:focus {
  border-color: rgba(224, 32, 47, 0.7);
  box-shadow: 0 0 0 3px rgba(224, 32, 47, 0.12);
}
.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
textarea.form-input {
  resize: vertical;
  min-height: 120px;
}
select.form-input {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

/* Password input wrapper (for eye toggle) */
.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input-wrap .form-input { padding-right: 44px; }

.form-eye {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}
.form-eye:hover { color: var(--text); }

/* Forgot password link */
.form-forgot {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--blue);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.form-forgot:hover { opacity: 1; }

/* Full-width button */
.btn-full { width: 100%; justify-content: center; }
.btn-primary--blue {
  background: linear-gradient(135deg, var(--blue) 0%, #005590 100%);
  box-shadow: 0 4px 24px var(--blue-glow);
}
.btn-primary--blue:hover { box-shadow: 0 6px 32px var(--blue-glow); }

/* ── PASSWORD STRENGTH ─────────────────────────────────────── */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.strength-seg {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
  border-radius: 1px;
}
.strength-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 4px;
}

/* ── TERMS CHECKBOX ────────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.form-check input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.form-check a {
  color: var(--blue);
  text-decoration: none;
}
.form-check a:hover { text-decoration: underline; }

/* ── STATUS MESSAGES ───────────────────────────────────────── */
.auth-status {
  display: none;
  padding: 12px 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  line-height: 1.6;
}
.auth-status.show { display: block; }
/* PR-43 — status panels aligned with support-form-status */
.auth-status.error {
  background: rgba(224, 32, 47, 0.12);
  border: 1px solid rgba(224, 32, 47, 0.45);
  color: var(--error-light);
}
.auth-status.success {
  background: rgba(0, 194, 100, 0.1);
  border: 1px solid rgba(0, 194, 100, 0.4);
  color: #9dffe0;
}

.auth-footer-note {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
.auth-footer-note a {
  color: var(--blue);
  text-decoration: none;
}
.auth-footer-note a:hover { text-decoration: underline; }

/* Back link */
.auth-back-link {
  display: block;
  text-decoration: none;
}
.auth-back-link--full { margin-top: 8px; }
.auth-back-link--full .btn-google { width: 100%; }

/* ── SPINNER (button loading) ──────────────────────────────── */
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── RESET PASSWORD — STEPS ────────────────────────────────── */
.reset-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding-top: 8px;
}
.reset-step {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.reset-step.active { opacity: 1; }
.reset-step.done   { opacity: 0.7; }
.step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  line-height: 1;
  min-width: 32px;
}
.reset-step.active .step-num { color: var(--white); }
.reset-step.done   .step-num { color: var(--blue); }
.step-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text);
  text-transform: uppercase;
}

/* ── RESET — SUCCESS STATE ─────────────────────────────────── */
.success-state {
  display: none;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.4s var(--ease) both;
}
.success-state.show { display: flex; }

.success-icon {
  width: 64px; height: 64px;
  border: 1px solid rgba(0, 198, 100, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 198, 100, 0.06);
}

.success-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
}

.success-sub {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.7;
}

.success-email-display {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  padding: 10px 20px;
  background: var(--blue-dim);
  border: 1px solid rgba(0, 118, 188, 0.25);
  width: 100%;
  word-break: break-all;
}

.resend-note {
  font-size: 0.8rem;
  color: var(--muted);
}
.resend-link {
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.2s;
}
.resend-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: none;
  pointer-events: none;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 800px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 24px; }
  .form-row { grid-template-columns: 1fr; }
}
