/* ============================================================
   auth.css  –  Sleek modern auth pages
   ============================================================ */

/* ---------- animated gradient background ---------- */
.auth-page {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow-y: auto;
    padding: 2rem 1rem;
    z-index: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* floating orbs */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.auth-page::before {
    width: 450px;
    height: 450px;
    background: #7f5af0;
    top: -60px;
    left: -80px;
    animation: orbFloat 8s ease-in-out infinite alternate;
}

.auth-page::after {
    width: 350px;
    height: 350px;
    background: #2cb67d;
    bottom: -40px;
    right: -60px;
    animation: orbFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, -30px) scale(1.15);
    }
}

/* ---------- glassmorphism card ---------- */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    animation: cardFadeIn 0.7s ease-out both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- logo & headings ---------- */
.auth-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(127, 90, 240, 0.4);
}

.auth-card h2 {
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

/* ---------- input wrappers ---------- */
.input-icon-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-icon-wrapper label {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 42px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 12px 44px 12px 42px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    outline: none;
}

.input-icon-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-icon-wrapper input:focus {
    border-color: #7f5af0;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.25);
}

.input-icon-wrapper input:focus~.input-icon {
    color: #7f5af0;
}

/* password toggle eye */
.pwd-toggle {
    position: absolute;
    right: 14px;
    top: 42px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

.pwd-toggle:hover {
    color: #7f5af0;
}

/* ---------- glow button ---------- */
.btn-glow {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 0.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: #fff;
    background: linear-gradient(135deg, #7f5af0, #2cb67d);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(127, 90, 240, 0.45);
}

.btn-glow:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(127, 90, 240, 0.3);
}

/* sheen animation */
.btn-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: none;
    animation: sheen 3s ease-in-out infinite;
}

@keyframes sheen {
    0% {
        left: -75%;
    }

    100% {
        left: 125%;
    }
}

/* ---------- footer links ---------- */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
}

.auth-footer a {
    color: #7f5af0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #2cb67d;
}

.auth-footer a:hover::after {
    display: none;
    /* override global underline from styles.css */
}

/* divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- alerts ---------- */
.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    animation: alertSlide 0.4s ease-out;
}

.auth-alert.success {
    background: rgba(44, 182, 125, 0.15);
    border: 1px solid rgba(44, 182, 125, 0.4);
    color: #2cb67d;
}

.auth-alert.error {
    background: rgba(232, 65, 65, 0.15);
    border: 1px solid rgba(232, 65, 65, 0.4);
    color: #e84141;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- responsive ---------- */
@media (max-width: 500px) {
    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 16px;
    }

    .auth-logo {
        width: 56px;
        height: 56px;
    }
}

/* ---------- back-to-home link ---------- */
.auth-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 1.25rem;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.auth-home-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.auth-home-link a:hover {
    color: rgba(255, 255, 255, 0.75);
}

.auth-home-link a:hover::after {
    display: none;
}