:root {
    --primary-dark: #301c13;
    --primary: #6d412c;
    --primary-hover: #593221;
    --primary-soft: #a67859;

    --gold: #b98a4d;
    --gold-light: #d0ac76;

    --background: #eee6dd;
    --surface: #faf7f3;
    --surface-white: #ffffff;

    --text-dark: #2e211b;
    --text: #554842;
    --text-muted: #968a82;

    --border: #e2d9d1;
    --input-border: #ded6cf;

    --shadow:
        0 25px 65px rgba(50, 30, 20, 0.16);

    --small-shadow:
        0 10px 25px rgba(50, 30, 20, 0.11);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    font-size: 16px;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family:
        Tahoma,
        Arial,
        sans-serif;
    color: var(--text-dark);
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(185, 138, 77, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(109, 65, 44, 0.09),
            transparent 32%
        ),
        var(--background);
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-container {
    position: relative;
    width: min(100%, 1050px);
    min-height: 610px;
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    direction: ltr;
    overflow: hidden;
    border: 1px solid rgba(109, 65, 44, 0.16);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.screen-label {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    direction: ltr;
}

.screen-number {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--gold);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 5px 12px rgba(80, 44, 24, 0.16);
}

.screen-title {
    min-height: 31px;
    display: flex;
    align-items: center;
    margin-left: 7px;
    padding: 0 17px;
    border-radius: 2px;
    color: #ffffff;
    background: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.brand-section {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    padding: 57px 38px 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 48%,
            rgba(185, 138, 77, 0.13),
            transparent 36%
        ),
        linear-gradient(
            160deg,
            #f9f5ef 0%,
            #eee4d8 100%
        );
}

.brand-section::before {
    content: "";
    position: absolute;
    left: -90px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(109, 65, 44, 0.1);
    border-radius: 50%;
}

.brand-section::after {
    content: "";
    position: absolute;
    right: -140px;
    top: -150px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(185, 138, 77, 0.12);
    border-radius: 50%;
}

.brand-heading {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.brand-name {
    margin-bottom: 5px;
    color: #7b4b2d;
    font-family:
        "Times New Roman",
        Tahoma,
        serif;
    font-size: clamp(45px, 5vw, 67px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -3px;
}

.brand-description {
    color: #8a6a55;
    font-size: 13px;
    line-height: 1.8;
}

.brand-illustration {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 395px;
}

.brand-image {
    display: block;
    width: min(100%, 420px);
    max-height: 440px;
    object-fit: contain;
    object-position: bottom center;
    filter:
        drop-shadow(
            0 14px 12px rgba(75, 43, 26, 0.12)
        );
}

.form-section {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    padding: 60px 54px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.96),
            rgba(250, 247, 243, 0.98)
        );
}

.login-box {
    width: min(100%, 405px);
    padding: 38px 34px 34px;
    border: 1px solid #ebe4dd;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--small-shadow);
}

.login-box-heading {
    margin-bottom: 29px;
    text-align: center;
}

.login-box-heading h2 {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 800;
}

.login-box-heading p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    padding-right: 2px;
    color: #55453c;
    font-size: 12px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 49px;
    padding: 0 46px 0 44px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    outline: none;
    color: var(--text-dark);
    background: #ffffff;
    font-size: 13px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #b3aaa4;
}

.input-wrapper input:focus {
    border-color: var(--primary-soft);
    background: #fffdfb;
    box-shadow:
        0 0 0 3px rgba(166, 120, 89, 0.12);
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    z-index: 2;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: #77675d;
    pointer-events: none;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    left: 7px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    color: #86776e;
    background: transparent;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);
    background: #f5efea;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: -1px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #756860;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-password {
    border: 0;
    color: #7d6c61;
    background: transparent;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary);
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 49px;
    margin-top: 3px;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            #85583c 0%,
            #694027 100%
        );
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 9px 20px rgba(70, 39, 23, 0.2);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        0 12px 25px rgba(70, 39, 23, 0.25);
}

.login-button:active {
    transform: translateY(0);
}

.login-error {
    padding: 12px 14px;
    border: 1px solid #e7b9b9;
    border-radius: 4px;
    color: #8c2525;
    background: #fff0f0;
    font-size: 12px;
    line-height: 1.7;
}
/* أجهزة اللابتوب والشاشات المتوسطة */
@media (max-width: 1100px) {
    .login-container {
        width: min(100%, 930px);
        min-height: 570px;
    }

    .brand-section {
        padding-right: 28px;
        padding-left: 28px;
    }

    .form-section {
        padding-right: 38px;
        padding-left: 38px;
    }

    .brand-illustration {
        min-height: 360px;
    }

    .brand-image {
        max-height: 405px;
    }
}

/* التابلت */
@media (max-width: 820px) {
    .login-page {
        padding: 20px;
    }

    .login-container {
        min-height: auto;
        grid-template-columns: 1fr;
        direction: rtl;
    }

    .screen-label {
        top: 14px;
        left: 14px;
    }

    .brand-section {
        min-height: 330px;
        padding: 45px 25px 0;
        order: 1;
    }

    .brand-name {
        font-size: 50px;
    }

    .brand-illustration {
        min-height: 230px;
    }

    .brand-image {
        width: min(100%, 290px);
        max-height: 260px;
    }

    .form-section {
        order: 2;
        padding: 35px 28px 42px;
    }

    .login-box {
        width: min(100%, 460px);
    }
}

/* الموبايل */
@media (max-width: 576px) {
    html {
        font-size: 15px;
    }

    body {
        background: var(--background);
    }

    .login-page {
        display: block;
        min-height: 100vh;
        padding: 0;
    }

    .login-container {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .screen-label {
        top: 12px;
        left: 12px;
        transform: scale(0.9);
        transform-origin: left top;
    }

    .brand-section {
        min-height: 270px;
        padding: 43px 18px 0;
    }

    .brand-name {
        margin-bottom: 4px;
        font-size: 43px;
    }

    .brand-description {
        font-size: 11px;
    }

    .brand-illustration {
        min-height: 180px;
    }

    .brand-image {
        width: min(100%, 235px);
        max-height: 205px;
    }

    .form-section {
        align-items: flex-start;
        padding: 25px 16px 35px;
    }

    .login-box {
        width: 100%;
        padding: 27px 20px 25px;
        border-radius: 6px;
    }

    .login-box-heading {
        margin-bottom: 23px;
    }

    .login-box-heading h2 {
        font-size: 20px;
    }

    .input-wrapper input {
        height: 48px;
        font-size: 16px;
    }

    .login-button {
        height: 50px;
    }
}

/* الموبايلات الصغيرة جدًا */
@media (max-width: 360px) {
    .screen-title {
        padding-right: 12px;
        padding-left: 12px;
    }

    .brand-section {
        min-height: 245px;
    }

    .brand-name {
        font-size: 38px;
    }

    .brand-image {
        max-height: 175px;
    }

    .form-section {
        padding-right: 12px;
        padding-left: 12px;
    }

    .login-box {
        padding-right: 16px;
        padding-left: 16px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* الشاشات القصيرة */
@media (max-height: 700px) and (min-width: 821px) {
    .login-page {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .login-container {
        min-height: 555px;
    }

    .brand-section {
        padding-top: 45px;
    }

    .brand-illustration {
        min-height: 350px;
    }

    .brand-image {
        max-height: 390px;
    }

    .form-section {
        padding-top: 35px;
        padding-bottom: 35px;
    }
}