﻿html,
body {
    height: 100%;
    margin: 0;
}

.home-wrap {
    display: flex;
    min-height: 100dvh;
    font-family: "Open Sans", sans-serif;
    background: #D7E5D6;
}


/* ============================================================
   LEFT BRAND PANEL
============================================================ */

.home-left {
    width: 52%;
    background: linear-gradient( 160deg, #142520 0%, #203832 45%, #2a4a42 100% );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    position: relative;
    overflow: hidden;
}

    .home-left::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        background: rgba(255,255,255,.03);
        top: -100px;
        right: -140px;
    }

    .home-left::after {
        content: "";
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(170,125,109,.07);
        bottom: 60px;
        left: -80px;
    }


.home-logo {
    position: relative;
    z-index: 1;
}

    .home-logo img {
        height: 140px;
        filter: brightness(0) invert(1);
        opacity: .92;
    }


.home-hero {
    position: relative;
    z-index: 1;
}


.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(170,125,109,.18);
    border: 1px solid rgba(170,125,109,.30);
    border-radius: 999px;
    padding: 5px 14px;
    color: #c9a090;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

    .home-hero-badge i {
        color: #AA7D6D;
        font-size: 12px;
    }


.home-hero h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.5px;
}

    .home-hero h1 span {
        color: #AA7D6D;
    }


.home-hero p {
    max-width: 380px;
    margin: 0;
    color: rgba(255,255,255,.60);
    font-size: 14px;
    line-height: 1.7;
}


/* ============================================================
   FEATURES
============================================================ */

.home-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.home-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}


.home-feature-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(170,125,109,.15);
    border: 1px solid rgba(170,125,109,.20);
    color: #AA7D6D;
    font-size: 15px;
}


.home-feature-text strong {
    display: block;
    margin-bottom: 2px;
    color: rgba(255,255,255,.88);
    font-size: 12px;
    font-weight: 700;
}


.home-feature-text span {
    color: rgba(255,255,255,.45);
    font-size: 11px;
    line-height: 1.4;
}


/* ============================================================
   RIGHT SIDE
============================================================ */

.home-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #D7E5D6;
    position: relative;
}


/* ============================================================
   LANGUAGE
============================================================ */

.home-lang-row {
    position: absolute;
    top: 18px;
    right: 20px;
    display: inline-flex;
    gap: 4px;
    direction: ltr;
    z-index: 10;
}


.home-lang-btn {
    min-width: 42px;
    height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1.5px solid rgba(32,56,50,.22);
    background: transparent;
    color: rgba(32,56,50,.55);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}


    .home-lang-btn:hover {
        background: rgba(32,56,50,.06);
        color: #203832;
        border-color: rgba(32,56,50,.40);
    }


    .home-lang-btn.active {
        background: #203832;
        color: #fff;
        border-color: #203832;
    }


/* ============================================================
   CARD
============================================================ */

.home-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 36px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(32,56,50,.08);
    box-shadow: 0 24px 60px rgba(32,56,50,.12);
}


.home-card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient( 135deg, #203832, #2d5248 );
    box-shadow: 0 7px 18px rgba(32,56,50,.20);
    font-size: 20px;
}


.home-card-title {
    margin: 0 0 5px;
    color: #203832;
    font-size: 20px;
    font-weight: 800;
}


.home-card-sub {
    margin: 0 0 26px;
    color: rgba(32,56,50,.50);
    font-size: 13px;
    line-height: 1.55;
}


/* ============================================================
   FORM
============================================================ */

.home-login-form {
    width: 100%;
}


.home-form-group {
    margin-bottom: 16px;
}


    .home-form-group label {
        display: block;
        margin-bottom: 6px;
        color: #203832;
        font-size: 12px;
        font-weight: 700;
    }


.home-form-control {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid rgba(32,56,50,.16);
    background: #fff;
    color: #203832;
    font-size: 13px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}


    .home-form-control:focus {
        border-color: #AA7D6D;
        box-shadow: 0 0 0 3px rgba(170,125,109,.12);
    }


/* ============================================================
   PRIMARY BUTTON
============================================================ */

.home-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: #203832;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}


    .home-btn-primary:hover {
        background: #2d5248;
        color: #fff;
    }


    .home-btn-primary:active {
        transform: translateY(1px);
    }


/* ============================================================
   BACK LINK
============================================================ */

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    color: #8a6055;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}


    .auth-back-link:hover {
        color: #203832;
        text-decoration: underline;
    }


/* ============================================================
   ALERTS
============================================================ */

.home-login-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff3f2;
    border: 1px solid rgba(192,57,43,.20);
    color: #c0392b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}


.home-login-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef6f2;
    border: 1px solid rgba(32,56,50,.18);
    color: #203832;
    font-size: 11px;
    line-height: 1.5;
}


/* ============================================================
   VALIDATION
============================================================ */

.field-validation-error {
    display: block;
    margin-top: 5px;
    color: #c0392b;
    font-size: 10px;
}


.validation-summary-errors {
    margin-bottom: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff3f2;
    border: 1px solid rgba(192,57,43,.20);
    color: #c0392b;
    font-size: 11px;
}


    .validation-summary-errors ul {
        margin: 0;
        padding-left: 16px;
    }


/* ============================================================
   OTP
============================================================ */

.auth-otp-input {
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 9px;
    font-variant-numeric: tabular-nums;
}


.auth-otp-hint {
    margin-top: 8px;
    color: rgba(32,56,50,.45);
    font-size: 10px;
    line-height: 1.5;
}


.auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 11px;
    border-radius: 9px;
    background: #f6f9f7;
    color: #70807a;
    font-size: 10px;
    line-height: 1.5;
}


    .auth-security-note i {
        color: #AA7D6D;
    }


/* ============================================================
   RTL
============================================================ */

html[dir="rtl"] .home-wrap,
html[dir="rtl"] .home-card {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}


html[dir="rtl"] .home-wrap {
    direction: ltr;
    flex-direction: row-reverse;
}


html[dir="rtl"] .home-left {
    direction: rtl;
    text-align: right;
}


html[dir="rtl"] .home-hero,
html[dir="rtl"] .home-feature-text {
    text-align: right;
}


html[dir="rtl"] .home-feature-item {
    direction: rtl;
}


html[dir="rtl"] .home-right,
html[dir="rtl"] .home-card {
    direction: rtl;
}


html[dir="rtl"] .home-card-title,
html[dir="rtl"] .home-card-sub,
html[dir="rtl"] .home-form-group {
    text-align: right;
}


html[dir="rtl"] .home-lang-row {
    right: auto;
    left: 20px;
}


html[dir="rtl"] .auth-back-link {
    direction: rtl;
}


html[dir="rtl"] .validation-summary-errors ul {
    padding-right: 16px;
    padding-left: 0;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 860px) {

    .home-wrap {
        flex-direction: column;
    }

    .home-left {
        width: 100%;
        min-height: auto;
        box-sizing: border-box;
        padding: 32px 28px;
    }

    .home-logo img {
        height: 95px;
    }

    .home-hero {
        margin-top: 30px;
    }

        .home-hero h1 {
            font-size: 28px;
        }

    .home-features {
        display: none;
    }

    .home-right {
        min-height: 55vh;
        padding: 55px 20px 32px;
    }

    .home-card {
        padding: 28px 22px;
    }


    html[dir="rtl"] .home-wrap {
        direction: ltr;
        flex-direction: column-reverse;
    }

    html[dir="rtl"] .home-lang-row {
        left: 20px;
        right: auto;
    }
}


@media (max-width: 420px) {

    .home-left {
        padding: 26px 20px;
    }

    .home-right {
        padding-left: 15px;
        padding-right: 15px;
    }

    .auth-otp-input {
        letter-spacing: 7px;
        font-size: 20px;
    }
}
