/* =========================================================================
   login.css — صفحه‌ی ورود
   -------------------------------------------------------------------------
   فقط در Login.cshtml لود می‌شود. یک کارت دو-پنلی (معرفی مدرسه + فرم ورود)
   روی زمینه‌ی گرادیان برند؛ روی موبایل تک‌ستونه و تمام‌عرض می‌شود.
   ========================================================================= */

:root {
    --lg-brand-100: #D2F2F9;
    --lg-brand-200: #A6E6F3;
    --lg-brand-300: #6FD5E9;
    --lg-brand-400: #33C2DC;
    --lg-brand-500: #14B9D6;
    --lg-brand-600: #0E97B2;
    --lg-brand-700: #0D7A8F;
    --lg-brand-800: #115F6E;
    --lg-brand-900: #134E59;

    --lg-ink: #17323B;
    --lg-ink-2: #3C5A63;
    --lg-muted: #6B858D;
    --lg-line: #DFE9EC;
    --lg-bad: #C8433A;
    --lg-bad-bg: #FBE9E7;
}

/* ---------- زمینه‌ی صفحه ---------- */

.authincation {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 28px 0;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(111,213,233,.35), transparent 60%),
        radial-gradient(700px 460px at 0% 110%, rgba(19,78,89,.55), transparent 55%),
        linear-gradient(160deg, var(--lg-brand-800), var(--lg-brand-600) 55%, var(--lg-brand-400));
}

    /* بلندی اجباری قالب قدیمی را خنثی می‌کنیم تا کارت بلند از صفحه بیرون نزند */
    .authincation .container,
    .authincation .container > .row {
        height: auto !important;
    }

.login-col {
    direction: rtl;
}

/* ---------- کارت اصلی ---------- */

.login-card {
    display: grid;
    grid-template-columns: 5fr 6fr;
    background-color: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(9,44,52,.25), 0 30px 70px rgba(9,44,52,.35);
}

/* ---------- پنل برند (سمت راست) ---------- */

.login-brand {
    position: relative;
    background: linear-gradient(165deg, var(--lg-brand-900), var(--lg-brand-700) 60%, var(--lg-brand-600));
    color: #fff;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    overflow: hidden;
}

    /* حلقه‌های تزئینی کم‌رنگ */
    .login-brand::before,
    .login-brand::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        border: 1.5px solid rgba(255,255,255,.14);
        pointer-events: none;
    }

    .login-brand::before {
        width: 260px;
        height: 260px;
        top: -90px;
        left: -70px;
    }

    .login-brand::after {
        width: 380px;
        height: 380px;
        bottom: -150px;
        right: -120px;
        border-width: 28px;
        border-color: rgba(255,255,255,.05);
    }

.login-brand-head {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.login-brand-logo {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 18px;
    background-color: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

    .login-brand-logo img {
        width: 46px;
        height: 46px;
        object-fit: contain;
    }

.login-brand-name b {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.6;
}

.login-brand-name small {
    display: block;
    font-size: 13px;
    color: var(--lg-brand-100);
    font-weight: 500;
}

.login-brand-text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 2;
    color: #E9F7FA;
    margin: 0;
}

.login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
    position: relative;
    z-index: 1;
    margin-top: auto;
}

    .login-features li {
        display: flex;
        align-items: center;
        gap: 11px;
        font-size: 13.5px;
        font-weight: 600;
    }

    .login-features .tick {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
        border-radius: 50%;
        background-color: rgba(255,255,255,.16);
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .login-features .tick svg {
            width: 13px;
            height: 13px;
        }

/* ---------- پنل فرم (سمت چپ) ---------- */

.login-pane {
    padding: 44px 42px 34px;
    display: flex;
    flex-direction: column;
    color: var(--lg-ink);
}

.login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--lg-ink);
    margin: 0 0 6px;
    line-height: 1.7;
}

.login-sub {
    color: var(--lg-muted);
    font-size: 13.5px;
    margin: 0 0 28px;
    line-height: 1.9;
}

/* فیلدها */

.login-field {
    margin-bottom: 18px;
}

    .login-field > label {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: var(--lg-ink-2);
        margin-bottom: 7px;
    }

.login-input-wrap {
    position: relative;
}

    /* آیکون ابتدای فیلد (سمت راست در RTL) */
    .login-input-wrap > .field-icon {
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        color: var(--lg-muted);
        pointer-events: none;
        display: flex;
    }

        .login-input-wrap > .field-icon svg {
            width: 18px;
            height: 18px;
        }

    .login-input-wrap > input.form-control {
        height: 52px;
        border: 1.5px solid var(--lg-line);
        border-radius: 13px !important;
        background-color: #F8FBFC;
        color: var(--lg-ink);
        font-size: 16px;
        padding-right: 44px;
        padding-left: 44px;
        transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    }

        .login-input-wrap > input.form-control:focus {
            background-color: #fff;
            border-color: var(--lg-brand-400);
            box-shadow: 0 0 0 4px rgba(20,185,214,.16);
            outline: none;
        }

        .login-input-wrap > input.form-control::placeholder {
            color: #A7BCC2;
            font-size: 14px;
        }

/* دکمه‌ی نمایش رمز — انتهای فیلد (سمت چپ در RTL) */
.login-eye {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    border-radius: 10px;
    color: var(--lg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .login-eye:hover,
    .login-eye:focus {
        color: var(--lg-brand-700);
        background-color: rgba(20,185,214,.08);
    }

    .login-eye:focus-visible {
        outline: 3px solid var(--lg-brand-300);
        outline-offset: 1px;
    }

    .login-eye svg {
        width: 19px;
        height: 19px;
    }

    .login-eye .eye-off {
        display: none;
    }

    .login-eye.showing .eye-on {
        display: none;
    }

    .login-eye.showing .eye-off {
        display: block;
    }

/* خطاهای اعتبارسنجی */

.login-pane .text-danger {
    display: block;
    color: var(--lg-bad);
    font-size: 12.5px;
    margin-top: 6px;
}

.login-pane .validation-summary-errors {
    background-color: var(--lg-bad-bg);
    border: 1px solid rgba(200,67,58,.25);
    border-radius: 12px;
    padding: 11px 15px;
    margin-bottom: 18px;
}

    .login-pane .validation-summary-errors ul {
        list-style: none;
        margin: 0;
        padding: 0;
        font-size: 13px;
    }

.login-pane input.input-validation-error {
    border-color: var(--lg-bad) !important;
    background-color: #FFF7F6;
}

/* دکمه‌ی ورود */

.login-submit {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(160deg, var(--lg-brand-400), var(--lg-brand-600));
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 18px rgba(14,151,178,.35);
    transition: box-shadow .15s ease, filter .15s ease, transform .1s ease;
}

    .login-submit:hover {
        filter: brightness(1.06);
        box-shadow: 0 10px 22px rgba(14,151,178,.45);
    }

    .login-submit:active {
        transform: translateY(1px);
    }

    .login-submit:focus-visible {
        outline: 3px solid var(--lg-brand-200);
        outline-offset: 2px;
    }

    /* حالت در حال ارسال */
    .login-submit .spinner {
        display: none;
        width: 20px;
        height: 20px;
        border: 2.5px solid rgba(255,255,255,.4);
        border-top-color: #fff;
        border-radius: 50%;
        animation: login-spin .7s linear infinite;
    }

    .login-submit.loading {
        pointer-events: none;
        filter: saturate(.8) brightness(.95);
    }

        .login-submit.loading .spinner {
            display: block;
        }

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

/* راهنما و کپی‌رایت */

.login-help {
    text-align: center;
    color: var(--lg-muted);
    font-size: 12.5px;
    margin: 22px 0 0;
    line-height: 2;
}

.login-copy {
    text-align: center;
    color: rgba(255,255,255,.75);
    font-size: 12px;
    margin: 18px 0 0;
}

    .login-copy a {
        color: #fff;
        font-weight: 600;
    }

/* =========================================================================
   ریسپانسیو
   ========================================================================= */

/* تبلت و پایین‌تر: تک‌ستونه؛ پنل برند فشرده بالای فرم */
@media (max-width: 991.98px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-brand {
        padding: 24px 22px;
        gap: 14px;
    }

    .login-brand-text,
    .login-features {
        display: none;
    }

    .login-pane {
        padding: 30px 24px 26px;
    }
}

/* موبایل */
@media (max-width: 575.98px) {
    .authincation {
        padding: 14px 0;
        align-items: stretch;
    }

        /* حاشیه‌ی منفی row بوت‌استرپ روی موبایل سرریز افقی می‌ساخت؛
           این‌جا گرید را صاف می‌کنیم و فاصله را خود container می‌دهد */
        .authincation .container {
            padding-left: 16px;
            padding-right: 16px;
        }

        .authincation .container > .row {
            margin-left: 0;
            margin-right: 0;
        }

        .login-col {
            padding-left: 0;
            padding-right: 0;
        }

    .login-card {
        border-radius: 18px;
    }

    .login-brand {
        padding: 20px 18px;
    }

    .login-brand-logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 15px;
    }

        .login-brand-logo img {
            width: 38px;
            height: 38px;
        }

    .login-brand-name b {
        font-size: 17px;
    }

    .login-pane {
        padding: 24px 18px 20px;
    }

    .login-title {
        font-size: 19px;
    }

    .login-sub {
        margin-bottom: 22px;
    }
}

/* کاربرانی که حرکت کمتر می‌خواهند */
@media (prefers-reduced-motion: reduce) {
    .login-submit .spinner {
        animation-duration: 1.5s;
    }
}
