﻿/* =========================================
   IMPORT FONT
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #0b0f19;
}

/* =========================================
   LOGIN PAGE BACKGROUND
========================================= */

.login-page-bg {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(63,90,243,.12), transparent 30%), radial-gradient(circle at bottom left, rgba(0,255,170,.08), transparent 25%), linear-gradient(135deg,#0b0f19 0%,#111827 100%);
}

    /* Animated Glow */
    .login-page-bg::before,
    .login-page-bg::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(90px);
        animation: floatingGlow 8s ease-in-out infinite alternate;
        z-index: 0;
    }

    .login-page-bg::before {
        width: 450px;
        height: 450px;
        background: rgba(63,90,243,.18);
        top: -150px;
        right: -100px;
    }

    .login-page-bg::after {
        width: 380px;
        height: 380px;
        background: rgba(0,255,170,.10);
        bottom: -120px;
        left: -80px;
    }

@keyframes floatingGlow {
    from {
        transform: translateY(0px) translateX(0px);
    }

    to {
        transform: translateY(30px) translateX(20px);
    }
}


/* =========================================
   LOGIN CARD
========================================= */

.card {
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82) !important;
    border-radius: 32px !important;
    border: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 20px 70px rgba(0,0,0,.65), 0 0 25px rgba(63,90,243,.12);
    transition: all .45s ease;
    z-index: 2;
}

    /* Gradient Border */
    .card::before {
        content: "";
        position: absolute;
        inset: 0;
        padding: 1px;
        border-radius: 32px;
        background: linear-gradient( 145deg, rgba(63,90,243,.65), rgba(255,255,255,.02), rgba(0,255,170,.18) );
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

    /* Shine Effect */
    .card::after {
        content: "";
        position: absolute;
        top: -120%;
        left: -40%;
        width: 220px;
        height: 250%;
        background: linear-gradient( to right, transparent, rgba(255,255,255,.06), transparent );
        transform: rotate(25deg);
        transition: .8s ease;
    }

    .card:hover::after {
        left: 140%;
    }

    .card:hover {
        transform: translateY(-8px) scale(1.015);
        box-shadow: 0 30px 80px rgba(0,0,0,.72), 0 0 40px rgba(63,90,243,.18);
    }


/* =========================================
   TITLE
========================================= */

.login-title {
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 35px;
}


/* =========================================
   INPUT GROUP
========================================= */

.custom-input-group {
    position: relative;
    margin-bottom: 28px;
}



/* =========================================
   LABEL
========================================= */

.custom-label {
    display: block;
    margin-bottom: 12px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: .3s ease;
}

.custom-input-group:focus-within .custom-label {
    color: #fff;
    transform: translateX(-2px);
}


/* =========================================
   INPUTS
========================================= */

.custom-input {
    width: 100%;
    height: 60px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.07) !important;
    background: rgba(255,255,255,.03) !important;
    color: #fff !important;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 500;
    outline: none !important;
    box-shadow: none !important;
    transition: all .35s ease;
}

    /* Hover */
    .custom-input:hover {
        border-color: rgba(63,90,243,.35) !important;
        background: rgba(63,90,243,.04) !important;
    }

    /* Focus */
    .custom-input:focus {
        border-color: rgba(63,90,243,.7) !important;
        background: rgba(63,90,243,.06) !important;
        box-shadow: 0 0 0 4px rgba(63,90,243,.10), 0 0 25px rgba(63,90,243,.18) !important;
        transform: translateY(-2px);
    }

    /* Placeholder */
    .custom-input::placeholder {
        color: #64748b;
        transition: .3s ease;
    }

    .custom-input:focus::placeholder {
        opacity: .5;
        transform: translateX(-4px);
    }

    /* Password */
    .custom-input[type="password"] {
        letter-spacing: 3px;
    }

/* Remove Bootstrap Focus */
.form-control:focus {
    box-shadow: none !important;
    outline: none !important;
}


/* =========================================
   LOGIN BUTTONS
========================================= */

.logfocusfirst,
.logfocustwo {
    position: relative;
    overflow: hidden;
    border: none !important;
    border-radius: 18px !important;
    height: 55px;
    font-weight: 700;
    font-size: 15px;
    transition: all .35s ease;
    z-index: 1;
}

/* Primary Button */
.logfocusfirst {
    background: linear-gradient(135deg,#3f5af3,#5d74ff);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(63,90,243,.35);
}

/* Secondary Button */
.logfocustwo {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06) !important;
    color: #fff !important;
}

    /* Shine Effect */
    .logfocusfirst::before,
    .logfocustwo::before {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 80%;
        height: 100%;
        background: linear-gradient( to right, transparent, rgba(255,255,255,.28), transparent );
        transform: skewX(-25deg);
        transition: .7s;
    }

    .logfocusfirst:hover::before,
    .logfocustwo:hover::before {
        left: 130%;
    }

/* Hover */
.logfocusfirst:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(63,90,243,.45);
}

.logfocustwo:hover {
    background: rgba(255,255,255,.08);
    transform: translateY(-4px);
    border-color: rgba(63,90,243,.4) !important;
}


/* =========================================
   VALIDATOR
========================================= */

.validator {
    display: block;
    margin-top: 10px;
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 500;
    padding-right: 4px;
}


/* =========================================
   CHECKBOX / EXTRA TEXT
========================================= */

.login-extra {
    color: #94a3b8;
    font-size: 13px;
}

    .login-extra a {
        color: #7c8fff;
        text-decoration: none;
        transition: .3s;
    }

        .login-extra a:hover {
            color: #fff;
        }


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

@media(max-width:768px) {

    .card {
        border-radius: 24px !important;
        padding: 10px;
    }

    .login-title {
        font-size: 26px;
    }

    .custom-input {
        height: 55px;
        font-size: 14px;
    }

    .logfocusfirst,
    .logfocustwo {
        height: 52px;
    }
}




/* ==============================
   Password Input
   ============================== */

.password-input-wrapper {
    position: relative;
    width: 100%;
}


    /* فضای مناسب برای آیکون */

    .password-input-wrapper .password-input {
        padding-right: 50px !important;
    }


/* ==============================
   دکمه نمایش رمز
   ============================== */

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    outline: none;
    background: transparent;
    color: #7d8cff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
    z-index: 5;
}


    /* ==============================
   آیکون چشم
   ============================== */

    .password-toggle i {
        position: relative;
        font-size: 19px;
        transition: color .25s ease, transform .25s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }


    /* ==============================
   Hover
   ============================== */

    .password-toggle:hover {
        color: #ffffff;
        transform: translateY(-50%) scale(1.08);
    }


    /* ==============================
   حالت رمز قابل مشاهده
   خط روی چشم
   ============================== */

    .password-toggle.active i::after {
        content: "";
        position: absolute;
        width: 23px;
        height: 2px;
        background: currentColor;
        border-radius: 10px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        pointer-events: none;
    }


    /* رنگ حالت فعال */

    .password-toggle.active {
        color: #5865f2;
    }


/* ==============================
   موبایل
   ============================== */

@media (max-width: 576px) {

    .password-toggle {
        right: 12px;
    }

    .password-input-wrapper .password-input {
        padding-right: 45px !important;
    }
}


/* Password Wrapper */
.login-password-wrapper {
    position: relative;
    width: 100%;
}

    /* Password Input */
    .login-password-wrapper .login-password-input {
        padding-right: 50px !important;
    }

/* Eye Button */
.login-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    outline: none;
    background: transparent;
    color: #7d8cff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    transition: all 0.25s ease;
}

    /* Eye Icon */
    .login-password-toggle i {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
        transition: color 0.25s ease, transform 0.25s ease;
    }

    /* Hover */
    .login-password-toggle:hover {
        color: #ffffff;
        transform: translateY(-50%) scale(1.08);
    }

    /* Active - خط روی چشم */
    .login-password-toggle.active i::after {
        content: "";
        position: absolute;
        width: 23px;
        height: 2px;
        background: currentColor;
        border-radius: 10px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        pointer-events: none;
    }

    /* Active Color */
    .login-password-toggle.active {
        color: #5865f2;
    }

/* Mobile */
@media (max-width: 576px) {

    .login-password-toggle {
        right: 12px;
    }

    .login-password-wrapper .login-password-input {
        padding-right: 45px !important;
    }
}


/* ==========================================
   رفع رنگ مشکی Password هنگام Autofill
   ========================================== */

.login-password-input:-webkit-autofill,
.login-password-input:-webkit-autofill:hover,
.login-password-input:-webkit-autofill:focus,
.login-password-input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    caret-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
}


/* برای فیلدهای Autofill در مرورگرهای جدید */

.login-password-input:autofill {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


/* ==========================================
   Login Password - Autofill
   ========================================== */

.login-password-input,
.login-password-input:-webkit-autofill,
.login-password-input:-webkit-autofill:hover,
.login-password-input:-webkit-autofill:focus,
.login-password-input:-webkit-autofill:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}


    /* جلوگیری از رنگ پیش‌فرض Autofill کروم */

    .login-password-input:-webkit-autofill,
    .login-password-input:-webkit-autofill:hover,
    .login-password-input:-webkit-autofill:focus,
    .login-password-input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 1000px #15171c inset !important;
        box-shadow: 0 0 0 1000px #15171c inset !important;
        transition: background-color 9999s ease-in-out 0s;
    }


/* ==========================================
   Autofill - Phone Number
   ========================================== */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #0d1424 inset !important;
    box-shadow: 0 0 0 1000px #0d1424 inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* ==========================================
   Login Autofill Fix
   ========================================== */

.login-phone-input:-webkit-autofill,
.login-phone-input:-webkit-autofill:hover,
.login-phone-input:-webkit-autofill:focus,
.login-phone-input:-webkit-autofill:active,
.login-password-input:-webkit-autofill,
.login-password-input:-webkit-autofill:hover,
.login-password-input:-webkit-autofill:focus,
.login-password-input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #0d1424 inset !important;
    box-shadow: 0 0 0 1000px #0d1424 inset !important;
    transition: background-color 9999s ease-in-out 0s;
}
