/* ============================================
   Mind The Bug — Auth-page styles
   Extracted from inline <style> blocks and
   style="..." attributes across auth pages.
============================================ */

/* Force no text-decoration on nav-brand anchor (redundant with global but safe) */
a.nav-brand { text-decoration: none; }

/* Small muted hint text in nav (e.g. "New here?") */
.nav-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Form inputs inside .input-wrapper get right-padding for the eye icon */
.input-wrapper .form-input { padding-right: 40px; }

/* Wider auth card variant (register, mfa-setup) */
.auth-card-wide { max-width: 520px; }

/* Lockout / rate-limit warning bar */
.lockout-bar {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255,184,0,0.08);
  border: 1px solid rgba(255,184,0,0.25);
  border-radius: var(--r-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #ffd966;
}

/* Password label row: label left, forgot-link right */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.label-row .form-label { margin-bottom: 0; }
.label-row .auth-link  { font-size: 0.78rem; }

/* Security info box at the foot of login card */
.security-info {
  margin-top: 24px;
  padding: 12px 16px;
  background: rgba(0,229,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.security-info-icon { font-size: 0.9rem; }
.security-info-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}

/* Two-column name grid (register) */
.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Password requirements checklist */
.pass-reqs {
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(0,229,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.pass-reqs-label {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}
.req-row {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  padding: 3px 0;
  transition: color 0.2s;
}
.req-row.ok { color: var(--neon-green); }

/* Auth background glow colour variants */
.auth-bg-glow-amber {
  background: radial-gradient(ellipse at center, rgba(255,184,0,0.05) 0%, transparent 70%);
}
.auth-bg-glow-violet {
  background: radial-gradient(ellipse at center, rgba(180,77,255,0.07) 0%, transparent 70%);
}

/* Centred step heading (forgot-password steps) */
.step-head { text-align: center; margin-bottom: 28px; }
.step-head-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.step-head-icon-lg { font-size: 3rem; margin-bottom: 20px; display: block; }
.step-head-icon-xl { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.glow-amber { filter: drop-shadow(0 0 16px rgba(255,184,0,0.5)); }
.glow-green  { filter: drop-shadow(0 0 20px rgba(0,255,136,0.4)); }
.glow-green-lg { filter: drop-shadow(0 0 24px rgba(0,255,136,0.5)); }

/* Centred step — e-mail sent */
.step-sent-center { text-align: center; }
.step-sent-p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Demo token display box */
.demo-token-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 24px;
}
.demo-token-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.demo-token-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--neon-amber);
  word-break: break-all;
  cursor: pointer;
}

/* btn-ghost with top margin */
.btn-ghost-mt { margin-top: 10px; }

/* "display:block" link styled as btn-primary */
.btn-primary-block {
  display: block;
  text-decoration: none;
  text-align: center;
}

/* ---- MFA Step indicator ---- */
.steps {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 32px;
}
.step {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s;
}
.step.active { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 12px rgba(0,229,255,0.3); }
.step.done   { border-color: var(--neon-green); background: rgba(0,255,136,0.12); color: var(--neon-green); }
.step-line   { flex: 1; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.active { background: var(--neon-cyan); }

/* ---- MFA method cards ---- */
.mfa-methods { display: flex; flex-direction: column; gap: 10px; }
.mfa-method-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  width: 100%;
}
.mfa-method-card:hover  { border-color: var(--border-hover); }
.mfa-method-card.active { border-color: var(--neon-cyan); background: rgba(0,229,255,0.06); }
.method-icon  { font-size: 1.5rem; }
.method-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.method-desc  { font-size: 0.78rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
.method-check { margin-left: auto; color: var(--neon-cyan); font-weight: 700; }

/* ---- OTP digit inputs ---- */
.otp-digit {
  width: 48px; height: 56px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-align: center;
  font-size: 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-cyan);
  font-weight: 700;
  outline: none;
  transition: all 0.2s;
  caret-color: transparent;
}
.otp-digit:focus  { border-color: var(--border-active); box-shadow: 0 0 0 3px rgba(0,229,255,0.15); }
.otp-digit.filled { background: rgba(0,229,255,0.06); }

/* Larger variant used in mfa-verify */
.otp-digit-lg { width: 52px; height: 60px; font-size: 1.5rem; }

/* OTP row */
.otp-group { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.otp-group-lg { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.otp-sep { display: flex; align-items: center; color: var(--text-muted); }

/* OTP error */
.otp-error {
  text-align: center;
  color: var(--neon-red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  min-height: 20px;
  margin-bottom: 12px;
}

/* ---- QR code section ---- */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0;
}
.qr-container {
  background: #fff;
  padding: 16px;
  border-radius: var(--r-md);
  display: inline-block;
}
.qr-manual-wrap { margin-top: 16px; text-align: center; }
.qr-manual-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.secret-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--neon-cyan);
  letter-spacing: 0.2em;
  background: var(--bg-raised);
  padding: 8px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* ---- Backup codes ---- */
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.backup-code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--neon-cyan);
  letter-spacing: 0.1em;
  text-align: center;
}

/* ---- Timer ring ---- */
.timer-wrap { display: flex; justify-content: center; margin: 16px 0; }
.timer-ring  { transition: stroke-dashoffset 1s linear, stroke 0.5s; }

/* ---- Backup code view ---- */
.backup-input-styled {
  text-transform: lowercase;
  letter-spacing: 0.15em;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}
.backup-error {
  color: var(--neon-red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-bottom: 12px;
  min-height: 20px;
}

/* ---- View heading (mfa-verify) ---- */
.view-center { text-align: center; margin-bottom: 28px; }
.view-icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0,229,255,0.1);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.verify-actions {
  margin-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Utility classes for template-generated HTML ---- */
.c-muted  { color: var(--text-muted)   !important; }
.c-cyan   { color: var(--neon-cyan)    !important; }
.c-red    { color: var(--neon-red)     !important; }
.c-green  { color: var(--neon-green)   !important; }
.c-amber  { color: var(--neon-amber)   !important; }
.c-violet { color: var(--neon-violet)  !important; }
.td-nowrap { white-space: nowrap; }
.td-center { text-align: center; padding: 40px; color: var(--text-muted); }

/* Backup code list item in dashboard security tab */
.bc-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--neon-cyan);
}
.bc-item.used {
  border-color: var(--text-muted);
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Status labels in template HTML */
.status-enabled { color: var(--neon-green); }
.status-disabled { color: var(--neon-red); }

/* MFA toggle area link/button */
.btn-primary-sm {
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.85rem;
}
.btn-ghost-sm  { font-size: 0.85rem; }
.btn-ghost-red { color: var(--neon-red); }

/* Profile display block */
.profile-name-block { text-align: center; margin-top: 12px; }
.profile-name-text  { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.profile-email-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.profile-username-text {
  font-size: 0.82rem;
  color: var(--neon-cyan);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Avatar upload label */
.avatar-upload-label {
  cursor: pointer;
  display: block;
  text-align: center;
  padding: 10px 20px;
}

/* Textarea resize */
.textarea-resizable { resize: vertical; min-height: 80px; }

/* Dashboard security tab helpers */
.backup-section-label { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 10px; }
.backup-code-grid-2   { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.security-title-danger { color: var(--neon-red); }
.security-sub-spaced  { margin: 8px 0 16px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.text-xs  { font-size: 0.82rem; }
.text-center { text-align: center; }
.activity-empty { color: var(--text-muted); padding: 16px; }

/* @keyframes shake — defined here so auth.js no longer needs to inject a <style> */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-8px); }
  40%, 80%  { transform: translateX(8px); }
}
.shake { animation: shake 0.4s ease; }

/* Passkey / divider on login page */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px; color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-passkey {
  width: 100%; justify-content: center; font-size: 0.9rem;
  padding: 10px; border-radius: 8px;
}
