/* Forgot / reset password pages: a narrow form column with rounded inputs and a full-width
   blue button. Colours follow /assets/css/theme.css: light by default, deep navy under
   <html data-theme="dark">. */

:root {
  --af-text: #111827;
  --af-label: #374151;
  --af-muted: #5b6b82;
  --af-input-bg: #ffffff;
  --af-line: #d1d5db;
  --af-icon: #374151;
  --af-accent: #3b76d6;
  --af-accent-hover: #2f63bb;
  --af-focus: rgba(59, 118, 214, .25);
}
[data-theme="dark"] {
  --af-text: #e6edf7;
  --af-label: #e6edf7;
  --af-muted: #93a7c4;
  --af-input-bg: #0f1e36;
  --af-line: #1d3454;
  --af-icon: #93a7c4;
  --af-accent: #3b82f6;
  --af-accent-hover: #2f6fe0;
  --af-focus: rgba(77, 163, 255, .35);
}

.auth-page {
  display: flex;
  justify-content: center;
  padding: 64px 16px 80px;
}
.auth-form {
  width: 100%;
  max-width: 420px;
}
.auth-form h1 {
  margin: 0 0 18px;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--af-text);
}
.auth-form .auth-lead {
  margin: -6px 0 18px;
  font-size: .95rem;
  color: var(--af-muted);
}
.auth-form .auth-lead strong { color: var(--af-text); }
.auth-form .form-label {
  margin-bottom: 6px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--af-label);
}
.auth-form .auth-field { margin-bottom: 14px; }

/* Rounded input, with room on the right for the eye button inside it. */
.auth-form .auth-input {
  height: 50px;
  padding: 0 14px;
  font-size: 1.05rem;
  color: var(--af-text);
  background-color: var(--af-input-bg);
  border: 1px solid var(--af-line);
  border-radius: 8px;
}
.auth-form .auth-input:focus {
  border-color: var(--af-accent) !important;
  box-shadow: 0 0 0 .2rem var(--af-focus);
}
.auth-form .auth-password { position: relative; }
.auth-form .auth-password .auth-input { padding-right: 48px; }
/* Bootstrap draws its valid/invalid icon where the eye sits; the rules list says it instead. */
.auth-form .auth-password .auth-input.is-invalid,
.auth-form .auth-password .auth-input.is-valid,
.auth-form.was-validated .auth-password .auth-input:invalid,
.auth-form .was-validated .auth-password .auth-input:invalid,
.auth-form .was-validated .auth-password .auth-input:valid { background-image: none; padding-right: 48px; }

/* Label with a link on the right ("Password ... Forgot password?"). */
.auth-form .auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.auth-form .auth-label-row a { font-size: .9rem; text-decoration: none; }
.auth-form .auth-label-row a:hover { text-decoration: underline; }

.auth-form .auth-check { margin: 2px 0 16px; color: var(--af-label); }
.auth-form .auth-check .form-check-input { width: 1.1em; height: 1.1em; }
.auth-form .auth-check .form-check-input:checked {
  background-color: var(--af-accent) !important;
  border-color: var(--af-accent) !important;
}
.auth-form .auth-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.2rem;
  color: var(--af-icon);
  background: none;
  border: 0;
  border-radius: 0 8px 8px 0;
}
.auth-form .auth-eye:hover { color: var(--af-text); }
.auth-form .auth-eye:focus-visible { outline: 2px solid var(--af-accent); outline-offset: -4px; }

/* The verification code: big, spaced digits. */
.auth-form .auth-code {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .45em;
  text-align: center;
  padding-left: calc(14px + .45em);
}

.auth-form .auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--af-accent);
  border: 0;
  border-radius: 6px;
}
.auth-form .auth-submit:hover,
.auth-form .auth-submit:focus-visible { background-color: var(--af-accent-hover); color: #ffffff; }

.auth-form .auth-links {
  margin-top: 18px;
  font-size: .95rem;
  color: var(--af-muted);
}
.auth-form .auth-links .btn-link {
  padding: 0;
  font-size: inherit;
  vertical-align: baseline;
  text-decoration: none;
}
[data-theme="dark"] .auth-form .auth-links .btn-link { color: #4da3ff; }

.auth-form .alert { font-size: .93rem; border-radius: 8px; }
.auth-form #passwordRules { margin-top: 8px; }

@media (max-width: 576px) {
  .auth-page { padding-top: 32px; }
  .auth-form h1 { font-size: 1.75rem; }
}

/* "Keep me signed in" hint and the "Confirm it's you" line (login.html). */
.auth-form .auth-hint { font-size: .82rem; color: var(--af-label); opacity: .8; margin-top: 2px; }
.auth-form .auth-sub { margin: -6px 0 16px; color: var(--af-label); }
