/*
    Màn đăng nhập Tenant — dựng lại theo thiết kế XD "login new".
    Panel trái marketing (nền network nhạt) + card phải form đăng nhập.
    Giữ hook chức năng của LoginOtp.js: #hostLoginForm, .host-field, .host-field-error.is-visible,
    .host-input-invalid, #togglePassword + .host-eye-show/.host-eye-hide.is-hidden, captcha ids, toast.
*/

:root {
    --lg2-navy: #00446d;
    --lg2-navy-dark: #003a5c;
    --lg2-orange: #ff9900;
    --lg2-hotline: #f49d12;
    --lg2-ink: #1f2d3a;
    --lg2-muted: #5b6b7a;
    --lg2-line: #d9e1e8;
    --lg2-icon-bg: #dcecf8;
    --lg2-bg-1: #ecf5fd;
    --lg2-bg-2: #d8eaf7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
    color: var(--lg2-ink);
}

.lg2-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    /* Nền theo thiết kế (Group 89690): gradient xanh nhạt + mạng lưới. Stretch = kéo giãn khít màn hình
       (ảnh JPG 2732x1316; màn khác tỉ lệ thì hình bị méo nhẹ). */
    background: #fff url('/Common/Images/login/login-bg.jpg') center / 100% 100% no-repeat;
}

/* ===================== PANEL TRÁI ===================== */
.lg2-left {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 52px clamp(32px, 5vw, 72px) 128px clamp(40px, 6vw, 88px);
    overflow: hidden;
}

/* branding */
.lg2-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(28px, 5vh, 56px);
}

.lg2-brand-mark {
    width: 80px;
    height: auto;
    flex: 0 0 auto;
}

.lg2-brand-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--lg2-navy);
    line-height: 1.25;
}

.lg2-brand-sub {
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--lg2-navy);
    opacity: .82;
}

/* headline + desc */
.lg2-headline {
    margin: 0 0 14px;
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 700;
    color: var(--lg2-navy);
    line-height: 1.18;
}

.lg2-desc {
    margin: 0 0 clamp(24px, 4vh, 40px);
    max-width: 420px;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

/* feature list */
.lg2-features {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.lg2-feature {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
}

.lg2-feature-ico {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--lg2-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lg2-navy);
}

.lg2-feature-ico svg { width: 28px; height: 28px; }

.lg2-feature-body {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
}

.lg2-feature-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--lg2-navy);
    margin-bottom: 3px;
}

.lg2-feature-desc {
    font-size: 16px;
    line-height: 1.5;
    color: #333333;
}

/* illustration */
.lg2-illu {
    position: absolute;
    right: clamp(8px, 3vw, 48px);
    bottom: 60px;
    width: clamp(240px, 27vw, 360px);
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

/* footer công ty + liên hệ */
.lg2-foot {
    position: absolute;
    left: clamp(40px, 6vw, 88px);
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
}

.lg2-foot::before {
    content: "";
    position: absolute;
    left: 0;
    top: -18px;
    width: 100%;
    height: 1px;
    background: rgba(0, 68, 109, .18);
}

.lg2-foot-logo {
    width: 46px;
    height: auto;
    flex: 0 0 auto;
}

.lg2-foot-vn {
    font-size: 14px;
    font-weight: 700;
    color: var(--lg2-navy);
    line-height: 1.3;
}

.lg2-foot-en {
    font-size: 11px;
    font-weight: 500;
    color: #333333;
    letter-spacing: .2px;
}

/* Liên hệ: neo góc dưới-phải TRANG (dưới card), cùng band với footer công ty bên trái */
.lg2-contact {
    position: absolute;
    right: clamp(40px, 6vw, 96px);
    bottom: 30px;
    text-align: right;
    z-index: 3;
}

.lg2-contact-site {
    font-size: 14px;
    font-weight: 500;
    color: var(--lg2-navy);
    margin-bottom: 4px;
}

.lg2-contact-hotline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lg2-navy);
}

.lg2-phone-ico { color: var(--lg2-hotline); }
.lg2-phone-num { color: var(--lg2-hotline); font-weight: 700; }

.lg2-contact-site {
    display: block;
    text-decoration: none;
}
.lg2-contact-site:hover { text-decoration: underline; }

/* ===================== PANEL PHẢI (CARD) ===================== */
.lg2-right {
    flex: 0 0 auto;
    width: clamp(420px, 38vw, 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px clamp(24px, 3vw, 56px);
}

.lg2-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 68, 109, .12);
    padding: 40px 36px;
}

.lg2-card-title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

.lg2-card-sub {
    margin: 0 0 28px;
    text-align: center;
    font-size: 14px;
    color: #666666;
}

/* fields */
.lg2-field { margin-bottom: 18px; }

.lg2-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
}

.lg2-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--lg2-line);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--lg2-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.lg2-input::placeholder { color: #999999; }

.lg2-input:focus {
    border-color: var(--lg2-navy);
    box-shadow: 0 0 0 3px rgba(0, 68, 109, .12);
}

.lg2-input.host-input-invalid {
    border-color: #e02d3c;
    box-shadow: 0 0 0 3px rgba(224, 45, 60, .10);
}

/* password wrap + toggle */
.lg2-input-wrap { position: relative; }
.lg2-input-wrap .lg2-input { padding-right: 44px; }

.lg2-pwd-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a97a3;
    cursor: pointer;
}

.lg2-pwd-toggle:hover { color: var(--lg2-navy); }
.host-eye-hide.is-hidden,
.host-eye-show.is-hidden { display: none; }

/* error text */
.lg2-error {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #e02d3c;
}

.lg2-error.is-visible { display: block; }

/* captcha */
.lg2-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lg2-captcha-input { flex: 1 1 auto; }

.lg2-captcha-image {
    height: 46px;
    border: 1px solid var(--lg2-line);
    border-radius: 8px;
    background: #f5f7f9;
}

.lg2-captcha-refresh {
    width: 40px;
    height: 46px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lg2-line);
    border-radius: 8px;
    background: #fff;
    color: var(--lg2-navy);
    cursor: pointer;
}

.lg2-captcha-refresh:hover { background: #f2f7fb; }

/* forgot + submit */
.lg2-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 18px;
}

.lg2-forgot {
    font-size: 14px;
    font-weight: 500;
    color: var(--lg2-navy);
    text-decoration: none;
}

.lg2-forgot:hover { text-decoration: underline; }

.lg2-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--lg2-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

.lg2-submit:hover { background: var(--lg2-navy-dark); }
.lg2-submit:disabled { opacity: .65; cursor: default; }

/* ===================== TOAST ===================== */
.host-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 992px) {
    .lg2-page { flex-direction: column; }
    /* lg2-left "tan" ra để các con thành flex-item của trang -> sắp xếp bằng order:
       brand (logo eBH) lên đầu, rồi card login, rồi phần thông tin còn lại */
    .lg2-left { display: contents; }
    .lg2-brand    { order: 0; margin: 24px 24px 16px; }
    .lg2-right    { order: 1; width: 100%; padding: 8px 20px 40px; }
    .lg2-headline { order: 2; margin: 8px 24px 12px; }
    .lg2-desc     { order: 3; margin: 0 24px 24px; }
    .lg2-features { order: 4; margin: 0 24px; }
    .lg2-foot     { order: 5; }
    .lg2-contact  { order: 6; }

    .lg2-illu { display: none; }
    .lg2-foot, .lg2-contact { position: static; margin: 28px 24px 24px; }
    .lg2-foot::before { display: none; }
    .lg2-contact { text-align: left; }
    .lg2-contact-hotline { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .lg2-left { padding-left: 24px; padding-right: 24px; }
    .lg2-card { padding: 32px 24px; }
}
