/* ============================================================
   Host login — CSS riêng, cô lập. Bám sát Figma 3324:4 / 3324:792.
   - Trang nền trắng (1366x768).
   - Panel trái: bg xanh navy + circuit, logo eBH + slogan giữa.
   - Panel phải: nền trắng, form Đăng nhập căn giữa dọc.
   - Footer www.ebh.vn + Hotline neo góc dưới phải.
   ============================================================ */

.host-login-page,
.host-login-page * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.host-login-page {
    --host-navy: #003a5d;
    --host-navy-dark: #00446d;
    --host-cyan: #2ba0d4;
    --host-orange: #f7941d;
    --host-required: #d20000;
    --host-title: #333333;
    --host-text: #333333;
    --host-border: #d4d4d4;
    --host-placeholder: #b5b5b5;

    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    color: var(--host-text);
    overflow: auto;
}

/* ----- Bố cục 2 panel ----- */
.host-login-body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding: 0;
}

/* ----- Panel trái (branding) ----- */
.host-login-illustration {
    flex: 0 0 auto;
    width: calc(100% - 456px);
    min-height: 628px;
    background-color: var(--host-navy);
    background-image: url('/Common/Images/host-login/bg-illustration.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.host-brand {
    text-align: center;
    padding: 0 24px;
    color: #ffffff;
}

.host-brand-logo {
    width: 192px;
    height: auto;
    margin-bottom: 22px;
}

.host-brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.host-brand-sub {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
}

/* ----- Panel phải (form) ----- */
.host-login-card {
    flex: 0 0 456px;
    width: 456px;
    background: #ffffff;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.host-login-form-wrap {
    width: 280px;
}

.host-login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--host-title);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.17;
    white-space: nowrap;
    width: max-content;
    max-width: 90vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.host-field {
    margin-bottom: 14px;
}

.host-label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--host-text);
    margin-bottom: 6px;
}

.host-required {
    color: var(--host-required);
    margin-left: 2px;
}

.host-input {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--host-text);
    background: #ffffff;
    border: 1px solid var(--host-border);
    border-radius: 3px;
    outline: none;
}

.host-input:focus {
    border-color: var(--host-navy-dark);
}

.host-input.host-input-invalid {
    border-color: var(--host-required);
}

/* ô mật khẩu + nút ẩn/hiện */
.host-input-wrap {
    position: relative;
}

.host-input-wrap .host-input {
    padding-right: 32px;
}

.host-pwd-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #8a8a8a;
    cursor: pointer;
}

.host-pwd-toggle:hover {
    color: var(--host-navy-dark);
}

.host-pwd-toggle[hidden],
.host-login-page [hidden] {
    display: none !important;
}

.host-pwd-toggle .host-eye-show,
.host-pwd-toggle .host-eye-hide {
    display: block;
}

.host-pwd-toggle .host-eye-show.is-hidden,
.host-pwd-toggle .host-eye-hide.is-hidden {
    display: none;
}

/* mã bảo mật */
.host-captcha-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.host-captcha-input {
    flex: 1 1 auto;
    text-transform: uppercase;
}

.host-captcha-image {
    flex: 0 0 auto;
    width: 90px;
    height: 30px;
    border: 1px solid var(--host-border);
    border-radius: 3px;
    background: #ffffff;
}

.host-captcha-refresh {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--host-navy-dark);
    cursor: pointer;
}

.host-captcha-refresh:hover {
    opacity: 0.7;
}

/* lỗi field */
.host-field-error {
    display: none;
    margin-top: 4px;
    font-size: 12px;
    color: var(--host-required);
}

.host-field-error.is-visible {
    display: block;
}

/* button Đăng nhập */
.host-login-button {
    width: 100%;
    height: 36px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background: var(--host-navy-dark);
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.host-login-button:hover {
    background: #00567f;
}

.host-login-button:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Quên mật khẩu — dưới button, căn giữa */
.host-actions {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.host-forgot-link {
    font-size: 14px;
    color: var(--host-navy-dark);
    text-decoration: none;
}

.host-forgot-link:hover {
    text-decoration: underline;
}

/* ----- Footer góc dưới phải panel phải ----- */
.host-card-footer {
    position: absolute;
    right: 24px;
    bottom: 24px;
    text-align: right;
    line-height: 1.6;
}

.host-footer-site {
    font-size: 13px;
    color: var(--host-navy-dark);
}

.host-footer-hotline {
    margin-top: 2px;
    font-size: 13px;
    color: var(--host-navy-dark);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.host-footer-hotline .host-phone-icon {
    color: var(--host-orange);
    font-size: 14px;
}

.host-footer-hotline .host-phone-number {
    color: var(--host-orange);
    font-weight: 700;
}

/* ----- Toast ----- */
.host-toast-container {
    position: fixed;
    top: 24px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.host-toast {
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.host-toast.is-shown {
    opacity: 1;
    transform: translateX(0);
}

.host-toast-error { background: #d9534f; }
.host-toast-success { background: #28a745; }
.host-toast-warning { background: #e0a800; }

/* ----- Quên / Đặt lại mật khẩu Host ----- */
.host-forgot-desc {
    font-size: 14px;
    color: var(--host-text);
    text-align: center;
    line-height: 1.4;
    margin: 0 0 16px;
    width: 320px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
.host-otp-info {
    color: #0078d7;
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 96px;     /* sát ngay trên khối footer (footer bottom 24px + ~70px chiều cao footer) */
    margin: 0;
    padding: 0 24px;
}
.host-pwd-rules {
    color: var(--host-text);
    font-size: 12px;
    line-height: 1.5;
    margin: 8px 0 12px;
}
.host-actions-center { justify-content: center; margin-top: 18px; }
.host-actions-split { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* Background ảnh theo từng màn — forgot/reset dùng ảnh riêng */
.host-forgot-page .host-login-illustration {
    background-image: url('/Common/Images/host-login/confirm-bg.png');
}
.host-reset-page .host-login-illustration {
    background-image: url('/Common/Images/host-login/reset-bg.png');
}

/* Bỏ logo + brand text trên 2 màn forgot/reset (bg ảnh đã có branding) */
.host-forgot-page .host-brand,
.host-reset-page .host-brand {
    display: none;
}

/* Mỗi field info trên màn reset 1 dòng */
.host-reset-page .host-forgot-desc .host-reset-info-line {
    display: block;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .host-login-body { padding: 32px 0; }
    .host-login-illustration { width: calc(100% - 380px); }
    .host-login-card { flex-basis: 380px; width: 380px; }
}

@media (max-width: 768px) {
    .host-login-body { flex-direction: column; padding: 0; }
    .host-login-illustration {
        width: 100%;
        min-height: 220px;
        padding: 24px;
    }
    .host-brand-logo { width: 140px; margin-bottom: 12px; }
    .host-brand-title { font-size: 16px; }
    .host-brand-sub { font-size: 13px; }
    .host-login-card {
        flex-basis: auto;
        width: 100%;
        min-height: calc(100vh - 220px);
        padding: 32px 16px 80px;
    }
    .host-card-footer { right: 16px; bottom: 16px; }
}
