/* ============================================================
   TFA — Two-Factor Authentication styles
   ============================================================ */

:root {
  --tfa-brand: #6e7d6b;
  --tfa-brand-dark: #5b6758;
  --tfa-brand-soft: rgba(110, 125, 107, 0.14);
}

/* Auth pages (login, reset, verify) */
.tfa-auth-page {
  padding: 4rem 1rem 2rem;
}

.tfa-auth-panel {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid #d8e2ee;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top right, var(--tfa-brand-soft), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.tfa-auth-panel::after {
  content: "";
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: 10rem;
  height: 10rem;
  border-radius: 999px;
  background: rgba(110, 125, 107, 0.08);
  filter: blur(4px);
}

.tfa-auth-panel > * {
  position: relative;
  z-index: 1;
}

.tfa-auth-eyebrow {
  margin-bottom: 0.5rem;
  color: var(--tfa-brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tfa-auth-title {
  margin-bottom: 0.35rem;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 700;
}

.tfa-auth-subtitle,
.tfa-auth-note {
  color: #5b6472;
}

.tfa-auth-note {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.tfa-auth-form .form-group {
  margin-bottom: 1rem;
}

.tfa-auth-form label {
  margin-bottom: 0.45rem;
  color: #172033;
  font-weight: 600;
}

.tfa-auth-form .form-control {
  min-height: 3.2rem;
  border: 1px solid #c8d5e3;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tfa-auth-form .form-control:focus {
  border-color: var(--tfa-brand);
  box-shadow: 0 0 0 0.2rem var(--tfa-brand-soft);
}

.tfa-auth-submit,
.tfa-auth-secondary {
  min-height: 3.15rem;
  border-radius: 999px;
  font-weight: 600;
}

.tfa-auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8d5e3;
  color: #172033;
  background: #fff;
}

.tfa-auth-panel .btn-primary {
  border-color: var(--tfa-brand);
  background-color: var(--tfa-brand);
}

.tfa-auth-panel .btn-primary:hover,
.tfa-auth-panel .btn-primary:focus,
.tfa-auth-panel .btn-primary:active {
  border-color: var(--tfa-brand-dark) !important;
  background-color: var(--tfa-brand-dark) !important;
  box-shadow: 0 0 0 0.2rem var(--tfa-brand-soft) !important;
}

.tfa-auth-panel .btn-outline-primary {
  border-color: var(--tfa-brand);
  color: var(--tfa-brand);
}

.tfa-auth-panel .btn-outline-primary:hover,
.tfa-auth-panel .btn-outline-primary:focus,
.tfa-auth-panel .btn-outline-primary:active {
  border-color: var(--tfa-brand);
  background-color: var(--tfa-brand);
  color: #fff;
  box-shadow: 0 0 0 0.2rem var(--tfa-brand-soft);
}

.tfa-auth-links {
  margin-top: 1rem;
  text-align: center;
}

.tfa-auth-link {
  color: #5b6472;
  font-weight: 500;
}

.tfa-auth-link:hover,
.tfa-auth-link:focus {
  color: var(--tfa-brand);
  text-decoration: none;
}

/* TOTP setup page */
.tfa-totp-page {
  padding-top: 3em;
}

/* QR code image */
.tfa-qr-img {
  max-width: 220px;
}

/* Manual TOTP secret text */
.tfa-totp-secret {
  letter-spacing: 0.15em;
  font-size: 1.1em;
}

/* OTP digit boxes */
.otp-boxes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.otp-box {
  width: 3rem;
  height: 3.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  border: 2px solid #ced4da;
  border-radius: 0.375rem;
  background: #fff;
  caret-color: transparent;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.otp-box:focus {
  outline: none;
  border-color: var(--tfa-brand);
  box-shadow: 0 0 0 0.2rem var(--tfa-brand-soft);
}

.otp-box.otp-filled {
  border-color: #6c757d;
}

@media (max-width: 575.98px) {
  .tfa-auth-page {
    padding: 2rem 0.75rem 1.5rem;
  }

  .tfa-auth-panel {
    padding: 1.5rem;
    border-radius: 1.25rem;
  }

  .tfa-auth-title {
    font-size: 1.7rem;
  }
}
