/* ============================================================
   AUTH PAGES — Full Background + Centered Card Overlay
   ============================================================ */
:root {
    --auth-accent:  #4f46e5;
    --auth-bright:  #00a3ff;
    --gold:         #f5a623;
    --input-border: #e2e5f0;
    --text-dark:    #1a1a2e;
    --text-muted:   #6b7280;
    --danger:       #ef4444;
    --success:      #10b981;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Full-page background ───────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    background:
        radial-gradient(ellipse 70% 60% at 65% 55%, rgba(109,40,217,0.45) 0%, transparent 65%),
        radial-gradient(ellipse 50% 70% at 8%  18%, rgba(29,78,216,0.5)  0%, transparent 55%),
        radial-gradient(ellipse 45% 45% at 92% 8%,  rgba(124,58,237,0.6) 0%, transparent 50%),
        linear-gradient(140deg, #05041f 0%, #0c1060 35%, #180948 65%, #05041f 100%);
}

/* Top-right large purple orb */
.auth-page::before {
    content: '';
    position: fixed;
    top: -130px; right: -130px;
    width: 460px; height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.65) 0%, transparent 68%);
    pointer-events: none;
    animation: orbFloat 9s ease-in-out infinite alternate;
    z-index: 0;
}
/* Bottom-left soft blue orb */
.auth-page::after {
    content: '';
    position: fixed;
    bottom: -90px; left: -90px;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29,78,216,0.45) 0%, transparent 68%);
    pointer-events: none;
    animation: orbFloat 11s ease-in-out infinite alternate-reverse;
    z-index: 0;
}
@keyframes orbFloat {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(28px,36px) scale(1.1); }
}

/* ── Background decorative elements ────────────────────── */
/* Dot grid — top center */
.bg-dots {
    position: fixed;
    top: 32px; left: 50%; transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}
.bg-dots span {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

/* Left-side dot grid */
.bg-dots-left {
    position: fixed;
    left: 28px; top: 50%; transform: translateY(-50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.bg-dots-left span {
    width: 4px; height: 4px;
    border-radius: 50%; background: #fff; display: block;
}

/* Floating feature badges (right side) */
.bg-badges {
    position: fixed;
    right: clamp(16px, 5vw, 80px);
    top: 50%; transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1;
    pointer-events: none;
}
.bg-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    animation: badgeSlide 0.7s cubic-bezier(.22,.68,0,1.2) both;
}
.bg-badge i { font-size: 19px; color: var(--auth-bright); }
.bg-badge:nth-child(1) { animation-delay: 0.1s; }
.bg-badge:nth-child(2) { animation-delay: 0.2s; margin-right: 32px; }
.bg-badge:nth-child(3) { animation-delay: 0.3s; }
.bg-badge:nth-child(4) { animation-delay: 0.4s; margin-right: 24px; }
.bg-badge:nth-child(5) { animation-delay: 0.5s; }
@keyframes badgeSlide {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Left branding text (only on large screens) */
.bg-branding {
    position: fixed;
    left: clamp(32px, 5vw, 80px);
    top: 50%; transform: translateY(-50%);
    max-width: 340px;
    z-index: 1;
    pointer-events: none;
}
.bg-branding .tagline-main {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.22;
    color: #fff;
}
.bg-branding .tagline-main .gold { color: var(--gold); }
.bg-branding .tagline-divider {
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
    margin: 14px 0 16px;
}
.bg-branding .tagline-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.75;
    margin-bottom: 28px;
}
.bg-features { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.bg-features li { display: flex; align-items: flex-start; gap: 12px; }
.bg-feat-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--auth-bright);
}
.bg-feat-text strong { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.bg-feat-text span   { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5; }

/* Bottom stats bar */
.bg-bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    padding: 14px 24px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 1;
    pointer-events: none;
}
.bg-stat { text-align: center; }
.bg-stat i  { font-size: 17px; color: var(--auth-bright); display: block; margin: 0 auto 3px; }
.bg-stat strong { display: block; font-size: 12px; font-weight: 600; color: #fff; }
.bg-stat span   { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ── Centered Auth Card ──────────────────────────────────── */
.auth-card {
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 24px 64px rgba(0,0,0,0.45),
        0 8px 24px rgba(79,70,229,0.2);
    text-align: center;
    animation: cardIn 0.5s cubic-bezier(.22,.68,0,1.1) both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo + branding inside card */
.card-logo { margin-bottom: 16px; }
.card-logo .logo-img { height: 48px; width: auto; }
.card-brand-name {
    font-size: 20px; font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin: 6px 0 2px;
}
.card-brand-sub {
    font-size: 12px; color: var(--text-muted);
    margin-bottom: 16px;
}

.card-heading {
    font-size: 18px; font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.card-sub {
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 20px;
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form { text-align: left; }
.auth-form .form-row { margin-bottom: 14px; position: relative; }

.auth-form .form-control {
    width: 100%;
    padding: 12px 40px 12px 42px;
    background: #f8f9ff;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form .form-control::placeholder { color: #b0b8cc; }
.auth-form .form-control:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
    background: #fff;
}

/* Input icon (left) */
.input-icon {
    position: absolute;
    left: 14px; top: 50%; transform: translateY(-50%);
    color: #b0b8cc; font-size: 15px; pointer-events: none;
}

/* Password toggle */
.pwd-toggle {
    position: absolute;
    right: 13px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none;
    color: #b0b8cc; cursor: pointer;
    font-size: 15px; padding: 0; line-height: 1;
    transition: color 0.2s;
}
.pwd-toggle:hover { color: var(--auth-accent); }

/* Remember me + forgot row */
.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
}
.remember-label {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-muted); cursor: pointer;
}
.remember-label input[type="checkbox"] { accent-color: var(--auth-accent); width: 14px; height: 14px; }
.forgot-link { color: var(--auth-accent); text-decoration: none; font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

/* Submit button */
.auth-btn {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    font-size: 15px; font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none; color: #fff; cursor: pointer;
    box-shadow: 0 8px 24px rgba(79,70,229,0.3);
    transition: transform 0.18s, box-shadow 0.18s;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79,70,229,0.4); }
.auth-btn:active { transform: translateY(0); }

/* Footer links */
.auth-footer-links {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer-links a { color: var(--auth-accent); text-decoration: none; font-weight: 600; }
.auth-footer-links a:hover { text-decoration: underline; }

/* Alert boxes */
.alert {
    padding: 10px 14px; border-radius: 8px;
    font-size: 13px; margin-bottom: 14px;
    border: 1px solid transparent; text-align: left;
}
.alert-danger  { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* ── Recovery tabs ───────────────────────────────────────── */
.recovery-tabs {
    display: flex; gap: 5px;
    margin-bottom: 18px;
    background: #f3f4f6;
    border-radius: 10px; padding: 4px;
}
.recovery-tab {
    flex: 1; padding: 8px 6px;
    border-radius: 7px;
    text-align: center; cursor: pointer;
    font-size: 12px; font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    border: 1px solid transparent;
}
.recovery-tab:hover { color: var(--text-dark); }
.recovery-tab.active {
    background: #fff;
    border-color: #e0e3f5;
    color: var(--auth-accent); font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.recovery-step { display: none; }
.recovery-step.active { display: block; }

.info-box {
    background: #eff6ff;
    border-left: 3px solid var(--auth-accent);
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 13px; color: #374151;
    margin-bottom: 14px; text-align: left;
}

/* OTP inputs */
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.otp-input {
    width: 44px; height: 50px;
    text-align: center; font-size: 20px; font-weight: 700;
    background: #f8f9ff;
    border: 1.5px solid var(--input-border);
    border-radius: 10px; color: var(--text-dark);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-input:focus {
    outline: none; border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.timer { color: var(--text-muted); font-size: 13px; text-align: center; margin-top: 6px; }
.resend-link { color: var(--auth-accent); cursor: pointer; text-decoration: underline; }
.resend-link.disabled { color: #b0b8cc; cursor: not-allowed; text-decoration: none; }

.success-icon { font-size: 48px; text-align: center; margin-bottom: 10px; }

/* ── Responsive ──────────────────────────────────────────── */

/* Hide left branding + badges below 1100px so card isn't cramped */
@media (max-width: 1100px) {
    .bg-branding { display: none; }
    .bg-badges   { display: none; }
}

/* Hide bottom bar on small screens */
@media (max-width: 640px) {
    .bg-bottom-bar { display: none; }
    .auth-page { padding: 16px; }
    .auth-card { padding: 28px 20px 22px; border-radius: 16px; }
}

@media (max-width: 420px) {
    .otp-input { width: 38px; height: 44px; font-size: 18px; }
    .auth-btn { font-size: 14px; padding: 12px; }
    .auth-card { max-width: 100%; }
}
