﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

    body.f-body {
        padding: 0 !important;
    }

#f_loading_mask, #f_loading, #f_ui_icon {
    display: none !important;
}

.login-wrap {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ===== LEFT ===== */
.login-left {
    flex: 1;
    position: relative;
    background: #111;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

    .slide.active {
        opacity: 1;
    }

.login-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.login-left-caption {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    z-index: 2;
}

    .login-left-caption h2 {
        font-size: 18px;
        font-weight: 600;
        color: rgba(255,255,255,0.95);
        margin-bottom: 4px;
        letter-spacing: 0.04em;
    }

    .login-left-caption p {
        font-size: 11px;
        color: rgba(255,255,255,0.45);
    }

/* ===== RIGHT ===== */
.login-right {
    flex: 0 0 420px;
    width: 420px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-inner {
    width: 100%;
    padding: 0 3rem;
}

/* ===== BRAND ===== */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

    .login-brand img {
        height: 64px;
        width: 64px;
        object-fit: contain;
        margin-bottom: 0.5rem;
    }

.login-brand-name {
    font-size: 11px;
    font-weight: 700;
    color: #007465;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

/* ===== HEADING ===== */
.login-sub {
    font-size: 10px;
    font-weight: 600;
    color: #bbb;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.login-heading {
    font-size: 20px;
    font-weight: 600;
    color: #0a2420;
    margin-bottom: 1.75rem;
}

/* ===== FIELD GROUP ===== */
.field-group {
    margin-bottom: 1rem;
}

    .field-group > label {
        display: block;
        font-size: 10px;
        font-weight: 700;
        color: #bbb;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        margin-bottom: 6px;
    }

/* ===== TEXTBOX ===== */
#tbxUserName_wrapper,
#tbxPassword_wrapper {
    display: block !important;
    width: 100% !important;
}

#tbxUserName,
#tbxPassword {
    display: block !important;
    width: 100% !important;
}

    #tbxUserName .f-field-fieldlabel-cell,
    #tbxPassword .f-field-fieldlabel-cell {
        display: none !important;
    }

    #tbxUserName .f-field-body-cell,
    #tbxPassword .f-field-body-cell,
    #tbxUserName .f-field-body-cell-inner,
    #tbxPassword .f-field-body-cell-inner {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #tbxUserName .f-field-error-cell,
    #tbxPassword .f-field-error-cell {
        display: none !important;
    }

#tbxUserName-inputEl,
#tbxPassword-inputEl {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 14px !important;
    border: 1.5px solid #d0e8e5 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #0a2420 !important;
    background: #f4faf9 !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

    #tbxUserName-inputEl:focus,
    #tbxPassword-inputEl:focus {
        border-color: #007465 !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(0,116,101,0.1) !important;
    }

/* ===== CHECKBOX ===== */
.chk-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
    margin-top: 0.25rem;
}

#chkRemember_wrapper,
#chkKeepLogin_wrapper {
    display: block !important;
}

#chkRemember,
#chkKeepLogin {
    display: block !important;
    width: 100% !important;
}

    #chkRemember .f-field-fieldlabel-cell,
    #chkKeepLogin .f-field-fieldlabel-cell {
        display: none !important;
    }

    #chkRemember .f-field-body-cell,
    #chkKeepLogin .f-field-body-cell {
        display: block !important;
        padding: 0 !important;
    }

    #chkRemember .f-field-body-cell-inner,
    #chkKeepLogin .f-field-body-cell-inner {
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 2px 0 !important;
    }

#chkRemember-inputEl,
#chkKeepLogin-inputEl {
    display: none !important;
}

#chkRemember-inputEl-icon,
#chkKeepLogin-inputEl-icon {
    font-size: 17px !important;
    color: #ccc !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    position: relative !important;
    top: 0 !important;
    transition: color 0.15s !important;
}

    #chkRemember-inputEl-icon.f-checked,
    #chkKeepLogin-inputEl-icon.f-checked {
        color: #007465 !important;
    }

#chkRemember .f-field-error-cell,
#chkKeepLogin .f-field-error-cell {
    display: none !important;
}

.f-field-body-checkboxlabel {
    font-size: 13px !important;
    color: #888 !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    line-height: 1 !important;
    user-select: none !important;
}

/* ===== BUTTON ===== */
#btnLogin_wrapper {
    display: block !important;
    width: 100% !important;
    margin-bottom: 1.25rem !important;
}

#btnLogin {
    display: block !important;
    width: 100% !important;
    height: 42px !important;
    line-height: 42px !important;
    padding: 0 !important;
    background: #007465 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.15s !important;
}

    #btnLogin:hover {
        background: #005a4d !important;
    }

    #btnLogin .f-btn-inner {
        display: block !important;
        width: 100% !important;
    }

    #btnLogin .f-btn-text {
        font-size: 12px !important;
        font-weight: 700 !important;
        letter-spacing: 0.12em !important;
        text-transform: uppercase !important;
        color: #fff !important;
        line-height: 42px !important;
    }

/* ===== FORGOT ===== */
.forgot-link {
    display: block;
    font-size: 12px;
    color: #bbb;
    text-decoration: none;
    text-align: center;
    transition: color 0.15s;
}

    .forgot-link:hover {
        color: #007465;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    html, body {
        height: 100%;
        overflow: auto;
    }

    .login-wrap {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
    }

    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
        width: 100%;
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Đẩy lên trên thay vì center */
        align-items: center;
        overflow: visible;
        padding-top: 3rem; /* Khoảng cách từ top */
    }

    .login-inner {
        padding: 0 2rem 3rem; /* Thêm padding bottom */
        width: 100%;
    }

    .login-brand {
        margin-bottom: 1.5rem;
    }

        .login-brand img {
            height: 52px;
            width: 52px;
        }

    #passkeyMode {
        padding: 1rem 0;
    }

    .passkey-name {
        font-size: 18px;
        margin-bottom: 1.5rem;
    }

    .btn-passkey-big {
        height: 48px;
        font-size: 14px;
    }
}
.passkey-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0 0;
}

    .passkey-divider::before,
    .passkey-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #eee;
    }

    .passkey-divider span {
        font-size: 11px;
        color: #bbb;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

#passkeyMode {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.passkey-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e0f2ef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 28px;
    font-weight: 700;
    color: #007465;
}

.passkey-greeting {
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.passkey-name {
    font-size: 22px;
    font-weight: 600;
    color: #0a2420;
    margin-bottom: 2rem;
    text-align: center;
}

.btn-passkey-big {
    width: 100%;
    height: 52px;
    background: #007465;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: background 0.15s;
    margin-bottom: 1.25rem;
}

    .btn-passkey-big:hover {
        background: #005a4d;
    }

    .btn-passkey-big:disabled {
        background: #aaa;
        cursor: not-allowed;
    }

.passkey-switch {
    font-size: 12px;
    color: #bbb;
    text-decoration: none;
    text-align: center;
    display: block;
    transition: color 0.15s;
    cursor: pointer;
}

    .passkey-switch:hover {
        color: #007465;
    }

.faceid-link {
    cursor: pointer;
    color: #007465;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 0.75rem;
    font-size: 12px;
    text-decoration: none;
}

    .faceid-link:hover {
        color: #005a4d;
    }

    .faceid-link.disabled {
        color: #aaa;
        pointer-events: none;
    }
/* ===== COMPANY DROPDOWN ===== */
#dlCompany-inputEl {
    width: 100% !important;
    height: 42px !important;
    border: 1.5px solid #d0e8e5 !important;
    border-radius: 8px !important;
    background: #f4faf9 !important;
    color: #0a2420 !important;
    font-size: 13px !important;
    font-family: inherit !important;
    padding: 0 12px !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

    #dlCompany-inputEl:focus {
        border-color: #007465 !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(0,116,101,0.1) !important;
    }

/* Wrapper FineUI */
#dlCompany-wrap,
[id*="dlCompany"].f-field-triggerbox {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}

/* Ẩn trigger icon mặc định của FineUI */
#dlCompany-trigger-0 {
    background: transparent !important;
    border: none !important;
}
#companyGroup {
    display: none;
}