@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

/* =========================
   LOGIN PAGE
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body.login-page {
    min-height: 100vh;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #172033;
    overflow-x: hidden;

    background-image: url("../images/login-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* لایه تیره روی تصویر */

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;

    background:
            linear-gradient(
                    180deg,
                    rgba(7, 20, 40, 0.20) 0%,
                    rgba(7, 20, 40, 0.45) 55%,
                    rgba(7, 20, 40, 0.85) 100%
            );
}

/* ساختار کلی */

.login-layout {
    position: relative;
    z-index: 2;

    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 55px 20px 0;
}

/* عنوان بالای صفحه */

.login-brand {
    color: #fff;
    text-align: center;

    animation: loginFadeDown 0.8s ease both;
}

.brand-logo {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 14px;

    font-size: 38px;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.20);
}

.login-brand h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;

    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.40);
}

.login-brand p {
    margin-top: 8px;

    font-size: 14px;
    font-weight: 400;

    color: rgba(255, 255, 255, 0.88);
}

/* بخش پایین فرم */

.login-panel {
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* کارت ورود */

.login-card {
    width: min(560px, 100%);

    padding: 38px 45px 25px;

    background: rgba(255, 255, 255, 0.96);

    border-radius: 35px 35px 0 0;

    box-shadow:
            0 -10px 60px rgba(5, 17, 36, 0.30),
            inset 0 1px 0 rgba(255, 255, 255, 0.90);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    animation: loginSlideUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card-icon {
    width: 66px;
    height: 66px;

    margin: 0 auto 13px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 34px;

    color: #fff;

    border-radius: 22px;

    background: linear-gradient(135deg, #1e3a5f, #355f8e);

    box-shadow: 0 12px 28px rgba(30, 58, 95, 0.25);
}

.login-card h2 {
    text-align: center;

    color: #172033;

    font-size: 26px;
    font-weight: 800;
}

.login-description {
    margin-top: 6px;
    margin-bottom: 27px;

    text-align: center;

    color: #778196;

    font-size: 14px;
}

/* خطا */

.login-error {
    margin-bottom: 20px;
    padding: 13px 15px;

    color: #b42318;
    background: #fef3f2;

    border: 1px solid #fecdca;
    border-radius: 13px;

    font-size: 13px;
    font-weight: 600;

    text-align: center;
}

/* فرم */

.login-form {
    width: 100%;
}

.login-field {
    margin-bottom: 19px;
}

.login-field label {
    display: block;

    margin-bottom: 8px;

    color: #344054;

    font-size: 13px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;

    width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 58px;

    padding: 0 52px 0 48px;

    direction: rtl;

    color: #1d2939;
    background: #fff;

    border: 1px solid #d7dce5;
    border-radius: 15px;

    outline: none;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    transition:
            border-color 0.25s ease,
            box-shadow 0.25s ease,
            transform 0.25s ease;
}

.input-wrapper input::placeholder {
    color: #a0a8b7;
}

.input-wrapper input:focus {
    border-color: #355f8e;

    box-shadow:
            0 0 0 4px rgba(53, 95, 142, 0.12),
            0 8px 20px rgba(20, 40, 70, 0.07);

    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    right: 17px;
    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    font-size: 20px;

    pointer-events: none;
}

.show-password {
    position: absolute;
    left: 15px;
    top: 50%;

    z-index: 3;

    width: 34px;
    height: 34px;

    display: flex;
    justify-content: center;
    align-items: center;

    transform: translateY(-50%);

    border: none;
    border-radius: 10px;

    background: transparent;

    cursor: pointer;

    font-size: 18px;

    transition: background 0.2s ease;
}

.show-password:hover {
    background: #eef2f7;
}

/* دکمه ورود */

.login-submit {
    width: 100%;
    height: 58px;

    margin-top: 7px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    color: #fff;

    background:
            linear-gradient(
                    135deg,
                    #1e3a5f 0%,
                    #294f79 50%,
                    #355f8e 100%
            );

    border: none;
    border-radius: 15px;

    box-shadow: 0 14px 30px rgba(30, 58, 95, 0.28);

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    transition:
            transform 0.25s ease,
            box-shadow 0.25s ease,
            filter 0.25s ease;
}

.login-submit:hover {
    transform: translateY(-2px);

    box-shadow: 0 18px 35px rgba(30, 58, 95, 0.34);

    filter: brightness(1.05);
}

.login-submit:active {
    transform: translateY(0);
}

.login-arrow {
    font-size: 20px;
}

/* پایین فرم */

.login-footer {
    margin-top: 28px;
    padding-top: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #98a2b3;

    border-top: 1px solid #e8ebf0;

    font-size: 11px;
}

/* انیمیشن ورود فرم */

@keyframes loginSlideUp {

    from {
        opacity: 0;
        transform: translateY(130px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

@keyframes loginFadeDown {

    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =========================
   MOBILE
========================= */

@media screen and (max-width: 600px) {

    body.login-page {
        background-attachment: scroll;
        background-position: center top;
    }

    .login-layout {
        padding: 32px 12px 0;
    }

    .brand-logo {
        width: 58px;
        height: 58px;

        border-radius: 18px;

        font-size: 29px;
    }

    .login-brand h1 {
        font-size: 24px;
    }

    .login-brand p {
        max-width: 290px;

        margin-right: auto;
        margin-left: auto;

        font-size: 12px;
        line-height: 1.8;
    }

    .login-card {
        padding: 27px 20px 20px;

        border-radius: 28px 28px 0 0;
    }

    .login-card-icon {
        width: 55px;
        height: 55px;

        border-radius: 18px;

        font-size: 27px;
    }

    .login-card h2 {
        font-size: 22px;
    }

    .login-description {
        margin-bottom: 22px;

        font-size: 12px;
    }

    .input-wrapper input {
        height: 55px;

        font-size: 13px;
    }

    .login-submit {
        height: 55px;

        font-size: 14px;
    }

    .login-footer {
        gap: 10px;

        font-size: 9px;
    }

}

/* صفحه‌های کوتاه لپ‌تاپ */

@media screen and (max-height: 760px) and (min-width: 601px) {

    .login-layout {
        padding-top: 25px;
    }

    .brand-logo {
        width: 55px;
        height: 55px;

        font-size: 28px;
    }

    .login-brand h1 {
        font-size: 25px;
    }

    .login-card {
        padding-top: 25px;
    }

    .login-card-icon {
        width: 52px;
        height: 52px;

        font-size: 26px;
    }

    .login-description {
        margin-bottom: 18px;
    }

    .login-field {
        margin-bottom: 13px;
    }

    .input-wrapper input,
    .login-submit {
        height: 51px;
    }

}