﻿/* ─────────────────────────────
   GOOGLE FONT
───────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&family=Cormorant+Garamond:wght@600;700&display=swap');

/* ─────────────────────────────
   RESET
───────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─────────────────────────────
   BODY
───────────────────────────── */
body {
    font-family: 'Tajawal', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #eceef0;
    direction: rtl;
}

/* ─────────────────────────────
   MAIN CONTAINER
───────────────────────────── */
.container {
    width: 1080px;
    max-width: 96%;
    min-height: 460px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

/* ─────────────────────────────
   LEFT SIDE (visually stays on the right in RTL flow,
   kept as "left-section" to match the markup/class names)
───────────────────────────── */
.left-section {
    width: 560px;
    flex-shrink: 0;
    background: #8ca4bb;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
}

    .left-section img {
        width: 200px;
        margin-bottom: 20px;
        margin-top: -38px;
    }

    .left-section h2 {
        font-size: 38px;
        margin-bottom: 12px;
    }

    .left-section p {
        font-size: 18px;
        line-height: 1.4;
        white-space: normal; /* Arabic string is longer than the English one */
        opacity: .92;
    }

/* ─────────────────────────────
   CONTACT US — LEFT SIDE
───────────────────────────── */
.contact-us {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.35);
    width: 100%;
    text-align: center;
}

    .contact-us h3 {
        font-size: 16px;
        font-weight: 700;
        letter-spacing: .5px;
        margin-bottom: 10px;
        opacity: .95;
    }

    .contact-us p {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        font-size: 15px;
        opacity: .92;
        margin-bottom: 6px;
        direction: ltr; /* keep phone number / email left-to-right */
        white-space: nowrap;
    }

    .contact-us svg {
        flex-shrink: 0;
        opacity: .9;
    }

/* ─────────────────────────────
   FOOTER NOTE (new — bureau/year line)
───────────────────────────── */
.footer-note {
    margin-top: 18px;
    width: 100%;
    text-align: center;
}

    .footer-note p {
        font-size: 13px;
        opacity: .85;
    }

/* ─────────────────────────────
   RIGHT SIDE
───────────────────────────── */
.right-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 50px;
}

/* ─────────────────────────────
   LOGIN BOX
───────────────────────────── */
.login-box {
    width: 100%;
    max-width: 400px;
}

/* ─────────────────────────────
   TITLE
───────────────────────────── */
.login-title {
    font-family: 'Tajawal', serif;
    font-size: 46px;
    color: #032f5e;
    text-align: center;
    margin-top: -20px;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

    .login-title::after {
        content: '';
        width: 54px;
        height: 3px;
        background: #8ca4bb;
        border-radius: 20px;
        display: block;
        margin: 10px auto 0;
    }

/* ─────────────────────────────
   FIELD ROW
   (in RTL, flex row order mirrors automatically — label
   renders on the right, input on the left, which matches
   natural Arabic reading order)
───────────────────────────── */
.field-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

    .field-row label {
        width: auto;
        min-width: 118px;
        font-size: 14px;
        font-weight: 600;
        color: #444;
        white-space: nowrap;
    }

/* ─────────────────────────────
   INPUT
───────────────────────────── */
.field-input {
    flex: 1;
    height: 40px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    transition: .2s;
    outline: none;
}

    .field-input:focus {
        border-color: #8ca4bb;
        box-shadow: 0 0 0 3px rgba(140,164,187,.18);
    }

/* ─────────────────────────────
   PASSWORD WRAPPER
   (icon sits on the left edge of the field — the far edge
   from the label — so it doesn't crowd the Arabic label)
───────────────────────────── */
.password-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

    .password-wrapper .field-input {
        width: 100%;
        padding-left: 42px;
    }

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    line-height: 0;
}

    .toggle-password svg {
        transition: stroke .2s;
        display: block;
    }

    .toggle-password:hover svg {
        stroke: #032f5e;
    }

/* ─────────────────────────────
   ERROR
   (indent flipped from margin-left to margin-right so the
   message still lines up under the input, not the label)
───────────────────────────── */
.error-msg {
    display: block;
    color: #dc2626;
    font-size: 15px;
    margin: -4px 94px 16px 0;
    font-weight: 600;
}

/* ─────────────────────────────
   BUTTON
───────────────────────────── */
.button-wrapper {
    text-align: center;
    margin-top: 50px;
}

.button {
    background: #032f5e;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 30px;
    font-size: 16px;
    font-weight: 500;
    min-width: 100px;
    cursor: pointer;
    transition: background .2s, transform .2s;
    font-family: 'Tajawal', sans-serif;
}

    .button:hover {
        background: #043b75;
        transform: translateY(-1px);
    }

/* ─────────────────────────────
   OTP PANEL
───────────────────────────── */
.otp-info {
    text-align: center;
    font-size: 14px;
    color: #444;
    margin-bottom: 22px;
}

.otp-input {
    letter-spacing: 6px;
    font-weight: 700;
    text-align: center;
}

.otp-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

a.otp-link,
a.otp-link:link,
a.otp-link:visited {
    display: inline-block;
    color: #032f5e !important;
    text-decoration: none !important;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1.5px solid #032f5e;
    border-radius: 20px;
    padding: 7px 18px;
    transition: background .2s, color .2s;
}

    a.otp-link:hover {
        background: #032f5e;
        color: #fff !important;
    }

    a.otp-link.otp-link-secondary,
    a.otp-link.otp-link-secondary:link,
    a.otp-link.otp-link-secondary:visited {
        border-color: #cfcfcf;
        color: #666 !important;
    }

        a.otp-link.otp-link-secondary:hover {
            background: #666;
            border-color: #666;
            color: #fff !important;
        }

/* ─────────────────────────────
   RESPONSIVE
───────────────────────────── */
@media (max-width: 1060px) {
    .container {
        flex-direction: column;
        width: 95%;
        min-height: unset;
    }

    .left-section {
        width: 100%;
        padding: 28px 20px;
    }

        .left-section img {
            margin-top: 0;
        }

        .left-section h2 {
            font-size: 32px;
        }

        .left-section p {
            font-size: 15px;
            white-space: normal;
        }

    .right-section {
        padding: 30px 28px;
    }

    .login-title {
        font-size: 40px;
        margin-top: -10px;
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

        .field-row label {
            width: auto;
        }

    .password-wrapper,
    .field-input {
        width: 100%;
    }

    .error-msg {
        margin-right: 0;
    }

    .login-title {
        font-size: 34px;
    }

    .left-section p {
        font-size: 13.5px;
    }

    .contact-us p {
        font-size: 12px;
        white-space: normal;
    }
}
