@import url("https://fonts.googleapis.com/css2?family=Almarai:wght@400;600;700;800&display=swap");


:root {

    --brand: #B68A48;

    --brand-dark: #96703B;

    --brand-deeper: #5F4526;

    --brand-light: #F4F4F4;

    --brand-gold: #C9A15A;

    --brand-soft: #E9DCC8;

    --brand-glow: rgba(182, 138, 72, 0.30);

    --text-dark: #24211D;

    --text-muted: #817A70;

    --border: #E4DED5;

    --input-bg: #FAF9F7;

    --white: #FFFFFF;

}


* {

    padding: 0;

    margin: 0;

    box-sizing: border-box;

    font-family: "Almarai", sans-serif;

}


html,
body {

    width: 100%;

    height: 100%;

}


body {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

    overflow: hidden;

    background: #24211D;

}


/* =========================================================
   BACKGROUND
========================================================= */

.bg-layer {

    position: fixed;

    inset: 0;

    width: 100%;

    height: 100%;

    background-size: cover;

    background-position: center;

    opacity: 0;

    transition:
        opacity 1.5s ease-in-out,
        transform 8s ease;

    transform: scale(1.03);

    z-index: 0;

}


.bg-layer[style*="opacity: 1"] {

    transform: scale(1);

}


/* =========================================================
   GOLDEN OVERLAY
========================================================= */

.bg-overlay {

    position: fixed;

    inset: 0;

    width: 100%;

    height: 100%;

    z-index: 1;

    pointer-events: none;

    background:

        linear-gradient(
            135deg,
            rgba(35, 29, 22, 0.82) 0%,
            rgba(56, 42, 27, 0.64) 42%,
            rgba(182, 138, 72, 0.28) 100%
        );

}


/* =========================================================
   DARK VIGNETTE
========================================================= */

.bg-overlay::after {

    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            transparent 20%,
            rgba(0, 0, 0, 0.38) 100%
        );

}


/* =========================================================
   GRID
========================================================= */

.grid-overlay {

    position: fixed;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    opacity: 0.16;

    background-image:

        linear-gradient(
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

}


/* =========================================================
   AMBIENT LIGHT
========================================================= */

.ambient {

    position: fixed;

    border-radius: 50%;

    filter: blur(90px);

    pointer-events: none;

    z-index: 3;

}


.ambient-one {

    width: 350px;

    height: 350px;

    top: -150px;

    left: -120px;

    background: rgba(182, 138, 72, 0.20);

}


.ambient-two {

    width: 400px;

    height: 400px;

    bottom: -220px;

    right: -160px;

    background: rgba(201, 161, 90, 0.14);

}


/* =========================================================
   LANGUAGE
========================================================= */

.language-switcher {

    position: fixed;

    top: 24px;

    inset-inline-end: 24px;

    z-index: 50;

}


.lang-btn {

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 10px 17px;

    border:

        1px solid
        rgba(255, 255, 255, 0.25);

    border-radius: 50px;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    color: #fff;

    background:
        rgba(255, 255, 255, 0.10);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.20);

    transition:
        all 0.3s ease;

}


.lang-btn:hover {

    background:
        rgba(182, 138, 72, 0.25);

    border-color:
        rgba(182, 138, 72, 0.65);

    transform: translateY(-2px);

}


.flag-icon {

    width: 24px;

    height: 17px;

    border-radius: 3px;

    object-fit: cover;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.25);

}


.lang-btn-arrow {

    font-size: 10px;

    opacity: 0.8;

}


/* Language menu */

.lang-menu {

    display: none;

    position: absolute;

    top: calc(100% + 9px);

    inset-inline-end: 0;

    min-width: 185px;

    padding: 8px;

    background:
        rgba(255, 255, 255, 0.97);

    border:

        1px solid
        rgba(182, 138, 72, 0.18);

    border-radius: 15px;

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.25);

    overflow: hidden;

}


.lang-menu.show {

    display: block;

    animation:
        fadeUp 0.2s ease;

}


@keyframes fadeUp {

    from {

        opacity: 0;

        transform:
            translateY(-8px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


.lang-menu a {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 11px 13px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    border-radius: 10px;

    color: var(--text-dark);

    transition:
        all 0.2s ease;

}


.lang-menu a:hover {

    background: #F4F4F4;

    color: var(--brand-dark);

}


.lang-menu a.is-active {

    background:
        rgba(182, 138, 72, 0.12);

    color:
        var(--brand-dark);

}


.check-icon {

    margin-inline-start: auto;

    color: var(--brand);

}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-card {

    position: relative;

    width: 450px;

    max-width:
        calc(100% - 40px);

    padding:
        46px 42px 30px;

    background:
        rgba(255, 255, 255, 0.96);

    border:

        1px solid
        rgba(255, 255, 255, 0.75);

    border-radius: 26px;

    box-shadow:

        0 35px 100px
        rgba(0, 0, 0, 0.38),

        0 5px 25px
        rgba(182, 138, 72, 0.10);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

    z-index: 10;

    animation:
        cardIn 0.65s ease;

}


@keyframes cardIn {

    from {

        opacity: 0;

        transform:
            translateY(28px)
            scale(0.97);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* Gold top line */

.login-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 50%;

    transform:
        translateX(-50%);

    width: 110px;

    height: 4px;

    border-radius:
        0 0 8px 8px;

    background:
        linear-gradient(
            90deg,
            var(--brand-dark),
            var(--brand),
            var(--brand-gold)
        );

}


/* Decorative corner */

.card-decoration {

    position: absolute;

    width: 130px;

    height: 130px;

    top: -65px;

    left: -65px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(182, 138, 72, 0.10),
            transparent 70%
        );

    pointer-events: none;

}


/* =========================================================
   BRAND
========================================================= */

.brand-wrap {

    text-align: center;

    margin-bottom: 28px;

}


.logo-box {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 90px;

    margin-bottom: 14px;

}


.brand-wrap img.logo {
    mix-blend-mode: difference;
    max-height: 82px;

    max-width: 220px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 5px 14px
            rgba(182, 138, 72, 0.14)
        );

}


.welcome-line {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    margin-bottom: 13px;

}


.welcome-line span {

    width: 38px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--brand)
        );

}


.welcome-line span:last-child {

    background:
        linear-gradient(
            90deg,
            var(--brand),
            transparent
        );

}


.welcome-line i {

    color: var(--brand);

    font-size: 12px;

}


.brand-wrap h1 {

    font-size: 23px;

    font-weight: 800;

    color: var(--text-dark);

    letter-spacing: -0.4px;

}


/* =========================================================
   ERROR
========================================================= */

.alert-error {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 12px 15px;

    margin-bottom: 19px;

    background: #FFF2F0;

    color: #A52A22;

    border:
        1px solid #F0CCC7;

    border-radius: 11px;

    font-size: 12px;

    font-weight: 700;

    text-align: center;

}


/* =========================================================
   FORM
========================================================= */

.form-group {

    display: flex;

    flex-direction: column;

    gap: 19px;

    margin-bottom: 5px;

}


.input-field label {

    display: block;

    margin-bottom: 8px;

    color: var(--text-dark);

    font-weight: 700;

    font-size: 12px;

}


.input-wrapper {

    position: relative;

}


.input-icon {

    position: absolute;

    top: 50%;

    transform:
        translateY(-50%);

    inset-inline-start: 15px;

    color: #9A9389;

    font-size: 14px;

    transition:
        color 0.2s ease;

    pointer-events: none;

}


.input-field input {

    width: 100%;

    height: 51px;

    padding:
        0 16px;

    padding-inline-start: 43px;

    border:
        1.5px solid
        var(--border);

    border-radius: 11px;

    outline: none;

    font-size: 13px;

    background:
        var(--input-bg);

    color: var(--text-dark);

    transition:
        all 0.25s ease;

}


.input-field input::placeholder {

    color: #B1AAA1;

}


.input-field input:hover {

    border-color:
        #D4C2A8;

}


.input-field input:focus {

    border-color:
        var(--brand);

    background:
        #FFFFFF;

    box-shadow:
        0 0 0 4px
        rgba(182, 138, 72, 0.10);

}


.input-field:focus-within .input-icon {

    color:
        var(--brand);

}


/* =========================================================
   REMEMBER
========================================================= */

.check-field {

    margin-top: 15px;

    display: flex;

    align-items: center;

    gap: 8px;

}


.check-field input {

    width: 17px;

    height: 17px;

    appearance: none;

    border:
        1.5px solid
        #D1C9BF;

    border-radius: 5px;

    position: relative;

    cursor: pointer;

    flex-shrink: 0;

    transition:
        all 0.2s ease;

}


.check-field input::after {

    content: "\f00c";

    font-family:
        "Font Awesome 6 Pro";

    font-size: 10px;

    color: #fff;

    position: absolute;

    top: 50%;

    left: 50%;

    transform:
        translate(-50%, -50%)
        scale(0);

    transition:
        transform 0.15s;

}


.check-field input:checked {

    background:
        var(--brand);

    border-color:
        var(--brand);

}


.check-field input:checked::after {

    transform:
        translate(-50%, -50%)
        scale(1);

}


.check-field label {

    font-size: 12px;

    color:
        var(--text-muted);

    cursor: pointer;

    user-select: none;

}


/* =========================================================
   BUTTON
========================================================= */

form button {

    margin-top: 24px;

    width: 100%;

    height: 53px;

    border: none;

    border-radius: 11px;

    cursor: pointer;

    color: #fff;

    font-size: 14px;

    font-weight: 800;

    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--brand-dark) 0%,
            var(--brand) 50%,
            var(--brand-gold) 100%
        );

    box-shadow:
        0 10px 25px
        var(--brand-glow);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

}


form button::before {

    content: "";

    position: absolute;

    top: 0;

    left: -100%;

    width: 70%;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.20),
            transparent
        );

    transform:
        skewX(-20deg);

    transition:
        left 0.6s ease;

}


form button:hover::before {

    left: 140%;

}


form button:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 15px 32px
        rgba(182, 138, 72, 0.40);

}


form button:active {

    transform:
        translateY(0);

    box-shadow:
        0 7px 18px
        var(--brand-glow);

}


form button i {

    font-size: 12px;

}


[dir="rtl"] .margin {

    margin-inline-start: 5px;

}


[dir="ltr"] .margin {

    margin-inline-start: 5px;

}


/* =========================================================
   FOOTER
========================================================= */

.footer {

    margin-top: 25px;

    padding-top: 19px;

    border-top:
        1px solid #EEE9E2;

    text-align: center;

    font-size: 11px;

    color:
        var(--text-muted);

}


.footer-logo {

    height: 17px;

    width: auto;

    margin: 0 4px;

    vertical-align: middle;

}


.footer a {

    color:
        var(--text-dark);

    font-weight: 800;

    text-decoration: none;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .login-card {

        width: 100%;

        max-width:
            calc(100% - 28px);

        padding:
            38px 25px 27px;

        border-radius: 21px;

    }


    .language-switcher {

        top: 15px;

        inset-inline-end: 15px;

    }


    .lang-btn {

        padding:
            8px 13px;

    }


    .brand-wrap h1 {

        font-size: 20px;

    }


    .brand-wrap img.logo {
        mix-blend-mode: difference;

        max-height: 72px;

        max-width: 190px;

    }

}


@media (max-height: 700px) {

    .login-card {

        padding-top: 32px;

        padding-bottom: 22px;

    }


    .brand-wrap {

        margin-bottom: 20px;

    }


    .logo-box {

        min-height: 65px;

        margin-bottom: 8px;

    }


    .brand-wrap img.logo {
        mix-blend-mode: difference;

        max-height: 62px;

    }


    .form-group {

        gap: 14px;

    }


    form button {

        margin-top: 18px;

    }


    .footer {

        margin-top: 18px;

        padding-top: 14px;

    }

}
