:root {
    --blue: #1f5fc9;
    --navy: #172554;
    --ink: #182235;
    --muted: #6f7b8e;
    --line: #dfe5ed;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Alexandria", Tahoma, sans-serif;
    color: var(--ink);
    background: #f4f6f8;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 70px 20px 30px;
}

.form-side {
    width: min(100%, 460px);
    padding: 42px;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 9px 26px rgba(20, 37, 63, 0.07);
}

.platform-title {
    padding-bottom: 25px;
    margin-bottom: 31px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.login-card h2 {
    margin: 0 0 11px;
    font-size: 22px;
    font-weight: 700;
}

.login-card > p {
    margin: 0 0 31px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.field {
    margin-bottom: 19px;
}

.field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
    color: #364155;
    font-size: 12px;
    font-weight: 600;
}

.field-label a {
    color: var(--blue);
    text-decoration: none;
    font-size: 11px;
    white-space: nowrap;
}

.field-label a:hover {
    text-decoration: underline;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 18px;
    color: #7d8798;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-wrap button {
    position: absolute;
    top: 50%;
    left: 12px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #61718a;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    transform: translateY(-50%);
}

input {
    width: 100%;
    height: 51px;
    padding: 0 45px 0 60px;
    border: 1px solid #d9e0e9;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    color: var(--ink);
    font: 13px "Alexandria", sans-serif;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}

input::placeholder {
    color: #a5adba;
}

input:focus {
    border-color: #5c8ee1;
    box-shadow: 0 0 0 3px rgba(31, 95, 201, 0.09);
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0 25px;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.remember input {
    width: 15px;
    height: 15px;
    padding: 0;
    accent-color: var(--blue);
}

.submit {
    width: 100%;
    height: 51px;
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font: 600 13px "Alexandria", sans-serif;
    transition: background 0.18s;
}

.submit:hover {
    background: #194fa9;
}

.security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 23px;
    color: #8a95a5;
    font-size: 10px;
}

.security svg {
    width: 13px;
    color: #329160;
}

/* زر تغيير اللغة */

.language-switch {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100;
}

.language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid #d8e2f0;
    border-radius: 9px;
    background: #fff;
    color: var(--blue);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 5px 16px rgba(20, 37, 63, 0.07);
    transition:
        border-color 0.18s,
        background 0.18s,
        transform 0.18s;
}

.language-switch a:hover {
    border-color: #9db9e8;
    background: #f7faff;
    transform: translateY(-1px);
}

/* اللغة الإنجليزية LTR */

html[dir="ltr"] .login-card {
    text-align: left;
}

html[dir="ltr"] .field-label {
    text-align: left;
}

html[dir="ltr"] .input-icon {
    right: auto;
    left: 16px;
}

html[dir="ltr"] .input-wrap button {
    left: auto;
    right: 12px;
}

html[dir="ltr"] input {
    padding-right: 60px;
    padding-left: 45px;
    text-align: left;
}

html[dir="ltr"] .remember {
    justify-content: flex-start;
}

/* اللغة العربية RTL */

html[dir="rtl"] .login-card {
    text-align: right;
}

html[dir="rtl"] input {
    text-align: right;
}

/* الجوال */

@media (max-width: 500px) {
    .login-page {
        align-items: flex-start;
        padding: 75px 18px 18px;
    }

    .form-side {
        width: 100%;
        padding: 30px 23px;
    }

    .platform-title {
        margin-bottom: 26px;
    }

    .login-card h2 {
        font-size: 20px;
    }

    .language-switch {
        top: 14px;
        right: 18px;
    }

    .language-switch a {
        min-width: 80px;
        min-height: 37px;
        padding: 7px 12px;
    }
}