/* ==========================================================================
   ReportPilot — Authentication pages (login, sign-up, forgot / reset password, OTP)
   Load AFTER custom.css (brand colours come from the variables defined there).
   ========================================================================== */

body.auth-page { background: #fff; }

/* ---------- Left brand panel (desktop only) ---------- */
.auth-aside {
  position: sticky; top: 0; height: 100vh;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 500px at -20% 110%, rgba(129, 140, 248, .35), transparent 60%),
    linear-gradient(160deg, #312e81 0%, var(--brand) 55%, #6366f1 100%);
  overflow: hidden;
}
.auth-aside .brand-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.auth-aside .feature-icon { width: 36px; height: 36px; background: rgba(255, 255, 255, .14); flex-shrink: 0; }
.auth-aside .text-white-75 { color: rgba(255, 255, 255, .78); }
.auth-preview { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.auth-preview .bar { background: rgba(255, 255, 255, .85); border-radius: 3px 3px 0 0; width: 100%; }

/* ---------- Right side form ---------- */
.auth-main { min-height: 100vh; }
.auth-card { max-width: 420px; }
.auth-logo-icon { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #4338ca); }
.auth-icon-circle { width: 56px; height: 56px; }
.auth-card .form-control { padding-top: .6rem; padding-bottom: .6rem; }
.auth-card .btn-lg { font-size: 1rem; padding-top: .65rem; padding-bottom: .65rem; }
.btn-password-toggle { border-color: var(--bs-border-color); color: #6b7280; background: #fff; }
.btn-password-toggle:hover { color: var(--brand); background: #f9fafb; }
.input-group .form-control.is-invalid + .btn-password-toggle { border-color: var(--bs-form-invalid-border-color); }

.divider-text { display: flex; align-items: center; gap: .75rem; color: #9ca3af; font-size: .8rem; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }

/* Password strength meter */
.strength-meter { display: flex; gap: 4px; }
.strength-meter span { flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb; transition: background .2s; }
.strength-meter[data-level="1"] span:nth-child(-n+1) { background: #dc2626; }
.strength-meter[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength-meter[data-level="3"] span:nth-child(-n+3) { background: #84cc16; }
.strength-meter[data-level="4"] span:nth-child(-n+4) { background: #16a34a; }
.password-rules li { color: #6b7280; transition: color .15s; }
.password-rules li.is-met { color: #15803d; }

/* OTP inputs */
.otp-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.otp-inputs .form-control { text-align: center; font-size: 1.4rem; font-weight: 600; aspect-ratio: 1 / 1.1; padding: 0; max-height: 64px; }
.otp-inputs .form-control:not(:placeholder-shown) { border-color: rgba(var(--brand-rgb), .5); background: #f5f7ff; }
.otp-inputs.is-invalid .form-control { border-color: var(--bs-form-invalid-border-color); background: #fef2f2; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.auth-step { animation: authFade .25s ease; }
@keyframes authFade { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 575.98px) {
  .otp-inputs { gap: .35rem; }
  .otp-inputs .form-control { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .shake, .auth-step { animation: none; }
}
