:root {
    --bg: #08111f;
    --glass: rgba(12, 18, 32, 0.62);
    --glass-border: rgba(255, 255, 255, 0.14);
    --text: #f8fbff;
    --muted: rgba(232, 238, 248, 0.72);
    --accent: #7dd3fc;
    --accent-strong: #38bdf8;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}


body {
    font-family: Tahoma, "Segoe UI", sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at top right,
            rgba(56, 189, 248, 0.28),
            transparent 30%
        ),
        radial-gradient(
            circle at left center,
            rgba(99, 102, 241, 0.22),
            transparent 24%
        ),
        linear-gradient(
            160deg,
            #050914 0%,
            #09111f 45%,
            #050a12 100%
        );

    overflow-x: hidden;
}


/* پس‌زمینه سایت */
.site-background {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100lvh;

    z-index: -2;
    overflow: hidden;
    pointer-events: none;

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.site-background::after {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    pointer-events: none;
}


.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    position: relative;
    isolation: isolate;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(24px);
    opacity: 0.5;
    z-index: -1;
}

.auth-page::before {
    width: 260px;
    height: 260px;
    background: rgba(56, 189, 248, 0.22);
    top: 10%;
    right: 8%;
}

.auth-page::after {
    width: 180px;
    height: 180px;
    background: rgba(125, 211, 252, 0.16);
    bottom: 10%;
    left: 8%;
}

.auth-shell {
    width: min(100%, 1080px);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 28px;
    align-items: center;
}

.auth-brand {
    padding: 28px;
}

.brand-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 10px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent);
    letter-spacing: 0.12em;
    font-size: 1rem;
    font-weight: 800;
}

.auth-brand h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.2;
}

.auth-brand p {
    margin: 0;
    max-width: 34ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.9;
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
}

.auth-card {
    padding: 30px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 0.95rem;
    color: var(--muted);
}

.field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    outline: none;
    transition: 0.25s ease;
}

.field input::placeholder {
    color: rgba(232, 238, 248, 0.45);
}

.field input:focus {
    border-color: rgba(125, 211, 252, 0.7);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.auth-button {
    width: 100%;
    margin-top: 18px;
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #04111d;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(56, 189, 248, 0.25);
}

.auth-button.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.auth-note {
    margin: 14px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.auth-note a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 0 8px;
    }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }
}




/* =================================
   Form Error Box
================================= */

.alert-error {
    width: 100%;
    box-sizing: border-box;
    margin-top: 18px;
    padding: 16px;

    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-right: 3px solid #ef4444;

    border-radius: 14px;

    color: #e5e7eb;

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

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    animation: errorBoxShow 0.35s ease-out;
}


/* Header */

.error-header {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 13px;
}

.error-icon {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

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

    border-radius: 9px;

    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.18);

    color: #f87171;

    font-size: 15px;
    font-weight: 800;
}


/* Title */

.error-header h6 {
    margin: 0;

    color: #fca5a5;

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

    line-height: 1.5;
}


/* Description */

.error-header p {
    margin: 2px 0 0;

    color: #9ca3af;

    font-size: 11px;
    line-height: 1.6;
}


/* Error list */

.error-list {
    list-style: none;

    margin: 0;
    padding: 12px 0 0;

    border-top: 1px solid rgba(239, 68, 68, 0.12);

    display: flex;
    flex-direction: column;
    gap: 7px;
}


/* Error item */

.error-list li {
    position: relative;

    padding-right: 17px;

    font-size: 12px;
    line-height: 1.8;

    color: #d1d5db;
}

.error-list li::before {
    content: "";

    position: absolute;

    right: 1px;
    top: 10px;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #ef4444;

    box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}


/* Error link */

.error-list a.error {
    color: #d1d5db;

    text-decoration: none;

    transition:
        color 0.2s ease,
        padding-right 0.2s ease;
}

.error-list a.error:hover {
    color: #fca5a5;

    padding-right: 3px;
}


/* Non field error */

.error-list .error {
    color: #d1d5db;
}


/* Focus */

.error-list a.error:focus-visible {
    outline: 2px solid rgba(239, 68, 68, 0.5);
    outline-offset: 3px;

    border-radius: 4px;
}


/* Animation */

@keyframes errorBoxShow {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Mobile */

@media (max-width: 600px) {

    .alert-error {
        margin-top: 14px;
        padding: 14px;
        border-radius: 12px;
    }

    .error-header {
        gap: 9px;
    }

    .error-icon {
        width: 27px;
        height: 27px;

        border-radius: 8px;

        font-size: 13px;
    }

    .error-header h6 {
        font-size: 13px;
    }

    .error-header p {
        font-size: 10px;
    }

    .error-list li {
        font-size: 11px;
    }
}








/* =================================
   Login Captcha Final Equal Width
================================= */


/* Captcha wrapper */

.field:has(.captcha-field) {

    grid-column: 1 / -1;

}


.field:has(.captcha-field) .captcha-field {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    align-items: center;

}



/* Captcha image */

.captcha-field img,
.captcha-field .captcha {

    width: 100%;

    height: 48px;

    object-fit: cover;

    border-radius: 16px;

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

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

    box-shadow:
        0 10px 25px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.05);

    transition: .25s ease;

}



.captcha-field img:hover {

    transform: translateY(-2px);

    border-color: rgba(125,211,252,.55);

    box-shadow:
        0 15px 30px rgba(56,189,248,.18);

}



/* Captcha input */

.captcha-field input[type="text"] {

    width: 100%;

    height: 48px;

    padding: 0 16px;

    border-radius: 16px;

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

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

    color: var(--text);

    outline: none;

    font-size: 15px;

    transition: .25s ease;

}



.captcha-field input[type="text"]::placeholder {

    color:
    rgba(232,238,248,.45);

}



.captcha-field input[type="text"]:focus {

    background:
        rgba(255,255,255,.09);

    border-color:
        rgba(125,211,252,.7);

    box-shadow:
        0 0 0 4px rgba(56,189,248,.16);

}



/* Error */

.captcha-field .errorlist {

    grid-column: 1 / -1;

    list-style: none;

    margin: 8px 0 0;

    padding: 10px 14px;

    border-radius: 12px;

    background: rgba(239,68,68,.08);

    border-right: 3px solid #ef4444;

    color: #fca5a5;

    font-size: 12px;

}



/* Mobile */

@media(max-width:640px) {

    .field:has(.captcha-field) .captcha-field {

        grid-template-columns: 1fr;

    }


    .captcha-field img,
    .captcha-field .captcha {

        height: 60px;

    }

}


.span-email{
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-right: 4px solid #ef4444;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
}