/*==================================================
                AUTHENTICATION DESIGN
==================================================*/

:root {

    --auth-primary: #6366f1;
    --auth-primary-dark: #4f46e5;
    --auth-secondary: #8b5cf6;

    --auth-bg: #080b14;
    --auth-bg-secondary: #0d1220;

    --auth-card: rgba(17, 24, 39, 0.88);
    --auth-card-border: rgba(255, 255, 255, 0.08);

    --auth-text: #f8fafc;
    --auth-text-secondary: #cbd5e1;
    --auth-text-muted: #94a3b8;

    --auth-input-bg: rgba(255, 255, 255, 0.045);
    --auth-input-border: rgba(255, 255, 255, 0.10);

    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-warning: #f59e0b;

    --auth-radius: 20px;

    --auth-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);

}


/*==================================================
                RESET
==================================================*/

.auth-page,
.auth-page * {

    box-sizing: border-box;

}


/*==================================================
                PAGE
==================================================*/

.auth-page {

    min-height: 100vh;

    width: 100%;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 40px 20px;

    background:

        radial-gradient(
            circle at 15% 20%,
            rgba(99, 102, 241, 0.16),
            transparent 32%
        ),

        radial-gradient(
            circle at 85% 80%,
            rgba(139, 92, 246, 0.13),
            transparent 30%
        ),

        linear-gradient(
            135deg,
            var(--auth-bg),
            var(--auth-bg-secondary)
        );

    overflow: hidden;

}


/*==================================================
                BACKGROUND GLOW
==================================================*/

.auth-page::before {

    content: "";

    position: absolute;

    width: 500px;

    height: 500px;

    border-radius: 50%;

    background: rgba(99, 102, 241, 0.08);

    filter: blur(100px);

    top: -180px;

    left: -150px;

    pointer-events: none;

}


.auth-page::after {

    content: "";

    position: absolute;

    width: 450px;

    height: 450px;

    border-radius: 50%;

    background: rgba(139, 92, 246, 0.08);

    filter: blur(100px);

    bottom: -180px;

    right: -150px;

    pointer-events: none;

}


/*==================================================
                AUTH CONTAINER
==================================================*/

.auth-container {

    width: 100%;

    max-width: 470px;

    position: relative;

    z-index: 5;

}


/*==================================================
                AUTH CARD
==================================================*/

.auth-card {

    width: 100%;

    padding: 42px;

    border-radius: var(--auth-radius);

    border: 1px solid var(--auth-card-border);

    background: var(--auth-card);

    backdrop-filter: blur(22px);

    -webkit-backdrop-filter: blur(22px);

    box-shadow: var(--auth-shadow);

}


/*==================================================
                LOGO
==================================================*/

.auth-logo {

    display: flex;

    justify-content: center;

    align-items: center;

    margin-bottom: 28px;

}


.auth-logo a {

    display: flex;

    align-items: center;

    gap: 12px;

    text-decoration: none;

}


.auth-logo img {

    width: 52px;

    height: 52px;

    object-fit: contain;

}


.auth-logo-icon {

    width: 52px;

    height: 52px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--auth-primary),
            var(--auth-secondary)
        );

    color: #fff;

    font-size: 22px;

    box-shadow:
        0 10px 30px rgba(99, 102, 241, 0.25);

}


.auth-logo-text {

    display: flex;

    flex-direction: column;

    line-height: 1.1;

}


.auth-logo-name {

    color: var(--auth-text);

    font-size: 19px;

    font-weight: 800;

}


.auth-logo-subtitle {

    color: var(--auth-text-muted);

    font-size: 11px;

    margin-top: 5px;

}


/*==================================================
                HEADER
==================================================*/

.auth-header {

    text-align: center;

    margin-bottom: 30px;

}


.auth-header h1 {

    margin: 0 0 10px;

    color: var(--auth-text);

    font-size: 30px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.5px;

}


.auth-header p {

    margin: 0;

    color: var(--auth-text-muted);

    font-size: 14px;

    line-height: 1.7;

}


/*==================================================
                FORM
==================================================*/

.auth-form {

    width: 100%;

}


.auth-field {

    margin-bottom: 20px;

}


.auth-field label {

    display: block;

    margin-bottom: 8px;

    color: var(--auth-text-secondary);

    font-size: 13px;

    font-weight: 600;

}


.auth-input-wrapper {

    position: relative;

    width: 100%;

}


.auth-input-icon {

    position: absolute;

    left: 16px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--auth-text-muted);

    font-size: 15px;

    pointer-events: none;

    transition: 0.25s ease;

}


.auth-input {

    width: 100%;

    height: 52px;

    padding: 0 16px 0 46px;

    border-radius: 13px;

    border: 1px solid var(--auth-input-border);

    outline: none;

    background: var(--auth-input-bg);

    color: var(--auth-text);

    font-size: 14px;

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;

}


.auth-input::placeholder {

    color: #64748b;

}


.auth-input:hover {

    border-color: rgba(255, 255, 255, 0.16);

}


.auth-input:focus {

    border-color: rgba(99, 102, 241, 0.8);

    background: rgba(255, 255, 255, 0.06);

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.10);

}


.auth-input:focus + .auth-input-icon {

    color: var(--auth-primary);

}


/*==================================================
                PASSWORD TOGGLE
==================================================*/

.auth-password-wrapper {

    position: relative;

}


.auth-password-toggle {

    position: absolute;

    right: 15px;

    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: var(--auth-text-muted);

    cursor: pointer;

    padding: 5px;

    font-size: 14px;

    transition: 0.2s ease;

}


.auth-password-toggle:hover {

    color: var(--auth-text);

}


/*==================================================
                CHECKBOX
==================================================*/

.auth-checkbox-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin: 4px 0 22px;

}


.auth-checkbox {

    display: flex;

    align-items: center;

    gap: 8px;

}


.auth-checkbox input {

    width: 16px;

    height: 16px;

    accent-color: var(--auth-primary);

    cursor: pointer;

}


.auth-checkbox label {

    margin: 0;

    color: var(--auth-text-muted);

    font-size: 12px;

    cursor: pointer;

}


.auth-link {

    color: #a5b4fc;

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;

    transition: 0.2s ease;

}


.auth-link:hover {

    color: #c4b5fd;

}


/*==================================================
                PRIMARY BUTTON
==================================================*/

.auth-submit {

    width: 100%;

    height: 52px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border: none;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--auth-primary),
            var(--auth-secondary)
        );

    color: #fff;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(99, 102, 241, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease;

}


.auth-submit:hover {

    transform: translateY(-2px);

    box-shadow:
        0 16px 35px rgba(99, 102, 241, 0.32);

}


.auth-submit:active {

    transform: translateY(0);

}


.auth-submit:disabled {

    opacity: 0.65;

    cursor: not-allowed;

    transform: none;

}


/*==================================================
                DIVIDER
==================================================*/

.auth-divider {

    display: flex;

    align-items: center;

    gap: 15px;

    margin: 28px 0;

}


.auth-divider::before,
.auth-divider::after {

    content: "";

    flex: 1;

    height: 1px;

    background: rgba(255, 255, 255, 0.08);

}


.auth-divider span {

    color: #64748b;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;

}


/*==================================================
                FOOTER
==================================================*/

.auth-footer {

    text-align: center;

    margin-top: 25px;

    padding-top: 22px;

    border-top: 1px solid rgba(255, 255, 255, 0.07);

}


.auth-footer p {

    margin: 0;

    color: var(--auth-text-muted);

    font-size: 13px;

}


.auth-footer a {

    color: #a5b4fc;

    font-weight: 700;

    text-decoration: none;

}


.auth-footer a:hover {

    color: #c4b5fd;

}


/*==================================================
                VALIDATION ERRORS
==================================================*/

.auth-error {

    margin-top: 7px;

    color: #fca5a5;

    font-size: 12px;

    line-height: 1.5;

}


.auth-input.is-invalid {

    border-color: rgba(239, 68, 68, 0.7);

}


.auth-input.is-invalid:focus {

    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.10);

}


/*==================================================
                SUCCESS MESSAGE
==================================================*/

.auth-success {

    padding: 13px 15px;

    margin-bottom: 20px;

    border-radius: 12px;

    border: 1px solid rgba(16, 185, 129, 0.20);

    background: rgba(16, 185, 129, 0.08);

    color: #6ee7b7;

    font-size: 13px;

    line-height: 1.6;

}


/*==================================================
                GENERAL ERROR
==================================================*/

.auth-alert {

    padding: 13px 15px;

    margin-bottom: 20px;

    border-radius: 12px;

    border: 1px solid rgba(239, 68, 68, 0.20);

    background: rgba(239, 68, 68, 0.08);

    color: #fca5a5;

    font-size: 13px;

    line-height: 1.6;

}


/*==================================================
                REGISTER
==================================================*/

.auth-register-card {

    max-width: 520px;

}


.auth-register-grid {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0 15px;

}


.auth-register-grid .auth-field-full {

    grid-column: 1 / -1;

}


/*==================================================
                SOCIAL BUTTONS
==================================================*/

.auth-social-buttons {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

}


.auth-social-btn {

    height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    border-radius: 12px;

    border: 1px solid var(--auth-input-border);

    background: rgba(255, 255, 255, 0.035);

    color: var(--auth-text-secondary);

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition: 0.25s ease;

}


.auth-social-btn:hover {

    background: rgba(255, 255, 255, 0.07);

    border-color: rgba(255, 255, 255, 0.16);

    color: #fff;

    transform: translateY(-1px);

}


/*==================================================
                BACK TO WEBSITE
==================================================*/

.auth-back-home {

    position: absolute;

    top: 25px;

    left: 25px;

    z-index: 10;

}


.auth-back-home a {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 14px;

    border-radius: 10px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    background: rgba(255, 255, 255, 0.035);

    color: var(--auth-text-muted);

    text-decoration: none;

    font-size: 12px;

    transition: 0.25s ease;

}


.auth-back-home a:hover {

    background: rgba(255, 255, 255, 0.07);

    color: #fff;

    transform: translateY(-1px);

}


/*==================================================
                REMEMBER / FORGOT
==================================================*/

.auth-options {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 22px;

}


.auth-remember {

    display: flex;

    align-items: center;

    gap: 8px;

}


.auth-remember input {

    width: 16px;

    height: 16px;

    accent-color: var(--auth-primary);

}


.auth-remember label {

    color: var(--auth-text-muted);

    font-size: 12px;

    cursor: pointer;

}


/*==================================================
                ANIMATION
==================================================*/

@keyframes authFadeUp {

    from {

        opacity: 0;

        transform: translateY(25px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


.auth-card {

    animation: authFadeUp 0.65s ease both;

}


/*==================================================
                RESPONSIVE
==================================================*/

@media (max-width: 768px) {

    .auth-page {

        padding: 30px 16px;

    }


    .auth-card {

        padding: 32px 25px;

    }


    .auth-header h1 {

        font-size: 26px;

    }


    .auth-back-home {

        position: relative;

        top: auto;

        left: auto;

        width: 100%;

        margin-bottom: 20px;

        text-align: center;

    }


    .auth-register-grid {

        grid-template-columns: 1fr;

        gap: 0;

    }


    .auth-register-grid .auth-field-full {

        grid-column: auto;

    }

}


@media (max-width: 480px) {

    .auth-page {

        padding: 20px 12px;

    }


    .auth-card {

        padding: 28px 20px;

        border-radius: 17px;

    }


    .auth-header {

        margin-bottom: 25px;

    }


    .auth-header h1 {

        font-size: 24px;

    }


    .auth-logo {

        margin-bottom: 22px;

    }


    .auth-input {

        height: 50px;

    }


    .auth-submit {

        height: 50px;

    }


    .auth-options {

        align-items: flex-start;

        flex-direction: column;

        gap: 10px;

    }


    .auth-social-buttons {

        grid-template-columns: 1fr;

    }

}


/*==================================================
                LIGHT MODE SUPPORT
==================================================*/

@media (prefers-color-scheme: light) {

    /*
    |--------------------------------------------------------------------------
    | Intentionally kept dark
    |--------------------------------------------------------------------------
    |
    | Authentication pages follow the site's premium dark visual identity.
    |
    */

}


/*==================================================
                ACCESSIBILITY
==================================================*/

.auth-input:focus-visible,
.auth-submit:focus-visible,
.auth-link:focus-visible,
.auth-password-toggle:focus-visible,
.auth-social-btn:focus-visible {

    outline: 2px solid rgba(165, 180, 252, 0.8);

    outline-offset: 3px;

}


/*==================================================
                REDUCED MOTION
==================================================*/

@media (prefers-reduced-motion: reduce) {

    .auth-card {

        animation: none;

    }


    .auth-submit,
    .auth-social-btn,
    .auth-back-home a {

        transition: none;

    }

}


/*==================================================
    AUTH SUCCESS MESSAGE
==================================================*/

.auth-success-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-bottom: 24px;
    padding: 15px 17px;

    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 14px;

    background: rgba(34, 197, 94, 0.08);
}

.auth-success-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(34, 197, 94, 0.12);

    color: #22c55e;

    font-size: 17px;
}

.auth-success-content {
    display: flex;
    flex-direction: column;
    gap: 4px;

    line-height: 1.5;
}

.auth-success-content strong {
    color: #22c55e;

    font-size: 14px;
    font-weight: 700;
}

.auth-success-content span {
    color: rgba(255, 255, 255, 0.75);

    font-size: 13px;
}
