﻿:root {
    --login-bg: #eef4ff;
    --login-panel: #ffffff;
    --login-primary: #101828;
    --login-primary-hover: #1d2939;
    --login-accent: #2563eb;
    --login-accent-soft: #dbeafe;
    --login-text: #101828;
    --login-muted: #667085;
    --login-border: #d0d5dd;
    --login-input-bg: #f8faff;
    --login-error-bg: #fef3f2;
    --login-error-border: #fecdca;
    --login-error-text: #b42318;
    --login-shadow: 0 28px 90px rgba(15, 23, 42, 0.16);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

.login-page {
    position: relative;
    min-height: 100vh;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--login-text);
    background: radial-gradient( circle at 12% 12%, rgba(37, 99, 235, 0.16), transparent 28% ), radial-gradient( circle at 88% 85%, rgba(14, 165, 233, 0.12), transparent 27% ), linear-gradient(145deg, #f8fbff 0%, #eef4ff 48%, #f8fafc 100%);
    font-family: var(--wm-font-ui, "Segoe UI", Tahoma, Arial, "Segoe UI Emoji", sans-serif);
    box-sizing: border-box;
}

.login-page[dir="rtl"] {
    font-family: var(--wm-font-arabic, "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif);
}

    .login-page::before,
    .login-page::after {
        content: "";
        position: fixed;
        z-index: 0;
        border-radius: 50%;
        pointer-events: none;
        filter: blur(2px);
    }

    .login-page::before {
        width: 360px;
        height: 360px;
        top: -180px;
        left: -140px;
        border: 1px solid rgba(37, 99, 235, 0.14);
    }

    .login-page::after {
        width: 440px;
        height: 440px;
        right: -230px;
        bottom: -230px;
        border: 1px solid rgba(14, 165, 233, 0.14);
    }

    .login-page *,
    .login-page *::before,
    .login-page *::after {
        box-sizing: border-box;
    }

.login-language-button {
    position: fixed;
    z-index: 20;
    top: 22px;
    right: 24px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid rgba(16, 24, 40, 0.13);
    border-radius: 12px;
    color: #344054;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

[dir="rtl"] .login-language-button {
    right: auto;
    left: 24px;
}

.login-language-button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.13);
}

.language-globe {
    font-size: 1rem;
}

.login-container {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    min-height: 690px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 30px;
    background: var(--login-panel);
    box-shadow: var(--login-shadow);
}

.login-brand-panel {
    position: relative;
    display: flex;
    padding: 68px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient( circle at 18% 18%, rgba(59, 130, 246, 0.20), transparent 28% ), linear-gradient(145deg, #0b1324 0%, #111c31 50%, #18253a 100%);
}

    .login-brand-panel::before {
        content: "";
        position: absolute;
        width: 430px;
        height: 430px;
        right: -190px;
        top: -190px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 50%;
    }

    .login-brand-panel::after {
        content: "";
        position: absolute;
        width: 310px;
        height: 310px;
        left: -150px;
        bottom: -170px;
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 50%;
    }

[dir="rtl"] .login-brand-panel::before {
    right: auto;
    left: -190px;
}

[dir="rtl"] .login-brand-panel::after {
    left: auto;
    right: -150px;
}

.brand-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.brand-glow-one {
    width: 180px;
    height: 180px;
    top: 60px;
    left: -90px;
    background: rgba(37, 99, 235, 0.13);
}

.brand-glow-two {
    width: 130px;
    height: 130px;
    right: 54px;
    bottom: 58px;
    background: rgba(14, 165, 233, 0.09);
}

.brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.brand-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 34px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 21px;
    color: #ffffff;
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

    .brand-icon svg {
        width: 38px;
        height: 38px;
        display: block;
    }

.brand-text {
    max-width: 520px;
}

.brand-label {
    display: inline-block;
    margin-bottom: 15px;
    color: #93c5fd;
    font-size: 0.79rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.brand-text h1 {
    margin: 0;
    max-width: 510px;
    font-size: clamp(2.25rem, 4vw, 3.65rem);
    line-height: 1.07;
    letter-spacing: -0.04em;
}

[dir="rtl"] .brand-text h1 {
    letter-spacing: normal;
    line-height: 1.28;
}

.brand-text p {
    max-width: 510px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 1.02rem;
    line-height: 1.75;
}

.brand-features {
    display: grid;
    gap: 18px;
    margin-top: auto;
    padding-top: 54px;
}

.brand-feature {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: start;
}

[dir="rtl"] .brand-feature {
    grid-template-columns: 1fr 34px;
}

    [dir="rtl"] .brand-feature .feature-check {
        grid-column: 2;
        grid-row: 1;
    }

    [dir="rtl"] .brand-feature > div {
        grid-column: 1;
        grid-row: 1;
    }

.feature-check {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(145deg, #1d4ed8, #2563eb);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    font-size: 0.9rem;
    font-weight: 900;
}

.brand-feature strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
    font-size: 0.97rem;
}

.brand-feature small {
    color: #9fb0c7;
    font-size: 0.86rem;
    line-height: 1.5;
}

.login-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 64px;
    background: linear-gradient( 180deg, #ffffff 0%, #ffffff 70%, #fbfdff 100% );
}

    .login-form-panel::before {
        content: "";
        position: absolute;
        width: 170px;
        height: 170px;
        right: -85px;
        top: -85px;
        border: 1px solid rgba(37, 99, 235, 0.08);
        border-radius: 50%;
    }

[dir="rtl"] .login-form-panel::before {
    right: auto;
    left: -85px;
}

.login-form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.mobile-brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(145deg, #111827, #1f2937);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.15);
    font-weight: 800;
}

.mobile-brand strong,
.mobile-brand span {
    display: block;
}

.mobile-brand strong {
    font-size: 0.95rem;
}

.mobile-brand span {
    margin-top: 2px;
    color: var(--login-muted);
    font-size: 0.77rem;
}

.login-header {
    margin-bottom: 31px;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    margin-bottom: 12px;
    padding: 0 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: var(--login-accent-soft);
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

[dir="rtl"] .login-eyebrow {
    letter-spacing: normal;
}

.login-header h2 {
    margin: 0;
    color: var(--login-text);
    font-size: 2.05rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

[dir="rtl"] .login-header h2 {
    letter-spacing: normal;
}

.login-header p {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

.login-alert {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 22px;
    padding: 14px 15px;
    border: 1px solid;
    border-radius: 13px;
}

[dir="rtl"] .login-alert {
    grid-template-columns: 1fr 30px;
}

    [dir="rtl"] .login-alert .alert-icon {
        grid-column: 2;
        grid-row: 1;
    }

    [dir="rtl"] .login-alert > div {
        grid-column: 1;
        grid-row: 1;
    }

.login-alert-error {
    border-color: var(--login-error-border);
    color: var(--login-error-text);
    background: var(--login-error-bg);
}

.alert-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--login-error-text);
    font-size: 0.8rem;
    font-weight: 900;
}

.login-alert strong {
    display: block;
    font-size: 0.9rem;
}

.login-alert p {
    margin: 3px 0 0;
    font-size: 0.84rem;
}

.login-form {
    display: grid;
    gap: 21px;
}

.form-field {
    display: grid;
    gap: 8px;
}

    .form-field label {
        color: #344054;
        font-size: 0.88rem;
        font-weight: 700;
    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    z-index: 2;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #7b8ba3;
    pointer-events: none;
}

.input-leading-icon {
    left: 16px;
}

[dir="rtl"] .input-leading-icon {
    left: auto;
    right: 16px;
}

.input-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

.form-control {
    width: 100%;
    height: 54px;
    padding: 0 52px;
    border: 1px solid var(--login-border);
    border-radius: 13px;
    outline: none;
    color: var(--login-text);
    background: var(--login-input-bg);
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.025);
    font: inherit;
    font-size: 0.94rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

    .form-control::placeholder {
        color: #98a2b3;
    }

    .form-control:hover {
        border-color: #b8c2d0;
        background: #ffffff;
    }

    .form-control:focus {
        border-color: var(--login-accent);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 22px rgba(37, 99, 235, 0.06);
    }

.password-input {
    padding-right: 54px;
}

[dir="rtl"] .password-input {
    padding-right: 52px;
    padding-left: 54px;
}

.password-toggle {
    position: absolute;
    z-index: 3;
    right: 9px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #667085;
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 9px;
}

.password-toggle:hover {
    color: #1d4ed8;
    background: #eaf2ff;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #475467;
    font-size: 0.87rem;
    cursor: pointer;
    user-select: none;
}

    .remember-me input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--login-accent);
        cursor: pointer;
    }

.login-button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 20px;
    border: 1px solid #0f172a;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient( 135deg, #111827 0%, #172033 48%, #1f2d44 100% );
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 780;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

    .login-button:hover {
        color: #ffffff;
        transform: translateY(-1px);
        filter: brightness(1.08);
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    }

    .login-button:active {
        transform: translateY(0);
    }

.button-arrow {
    font-size: 1.05rem;
    transition: transform 0.16s ease;
}

.login-button:hover .button-arrow {
    transform: translateX(3px);
}

[dir="rtl"] .login-button:hover .button-arrow {
    transform: translateX(-3px);
}

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
    color: #98a2b3;
    font-size: 0.76rem;
    text-align: center;
}

@media (max-width: 920px) {
    .login-page {
        padding: 72px 22px 22px;
    }

    .login-container {
        width: min(520px, 100%);
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 48px 40px;
    }

    .mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .login-page {
        min-height: 100dvh;
        padding: 68px 0 0;
        align-items: stretch;
        background: #ffffff;
    }

    .login-language-button {
        top: 14px;
        right: 14px;
    }

    [dir="rtl"] .login-language-button {
        right: auto;
        left: 14px;
    }

    .login-container {
        min-height: calc(100dvh - 68px);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-form-panel {
        align-items: flex-start;
        padding: 34px 24px 40px;
    }

    .login-form-wrapper {
        max-width: none;
    }

    .login-header h2 {
        font-size: 1.78rem;
    }

    .form-control {
        height: 52px;
    }
}

/* =========================================================
   Input icon spacing fix
   Keeps username/password text away from the leading icons.
   ========================================================= */

.login-page[dir="ltr"] .form-control {
    padding-left: 62px !important;
    padding-right: 18px !important;
    text-align: left;
}

.login-page[dir="ltr"] .password-input {
    padding-left: 62px !important;
    padding-right: 58px !important;
}

.login-page[dir="rtl"] .form-control {
    padding-right: 62px !important;
    padding-left: 18px !important;
    text-align: right;
}

.login-page[dir="rtl"] .password-input {
    padding-right: 62px !important;
    padding-left: 58px !important;
}

.login-page .input-leading-icon {
    width: 22px;
    height: 22px;
}

.login-page[dir="ltr"] .input-leading-icon {
    left: 18px !important;
    right: auto !important;
}

.login-page[dir="rtl"] .input-leading-icon {
    right: 18px !important;
    left: auto !important;
}

.login-page .input-leading-icon svg {
    width: 20px;
    height: 20px;
}
