/* Lỗi đăng nhập */
.error-message {
    color: #ff4d4d;
    text-align: center;
    font-weight: bold;
}

.nsl-container .nsl-container-buttons {
    margin-top: 10px;
    width: 100% !important;
}

.gg-button-social {
    width: 100% !important;
}

#otpLoginForm,
#otpVerifyForm,
#phoneLoginForm,
#phoneOtpVerifyForm,
#phoneEmailForm,
#forgotPasswordForm,
#forgotOtpForm,
#passwordLoginForm {
    max-width: 420px;
    margin: 10px auto;
    padding: 28px 26px;
    text-align: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 16px 45px rgba(9, 23, 32, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    position: relative;
    overflow: hidden;
}

#otpLoginForm > *,
#otpVerifyForm > *,
#phoneLoginForm > *,
#phoneOtpVerifyForm > *,
#phoneEmailForm > *,
#forgotPasswordForm > *,
#forgotOtpForm > *,
#passwordLoginForm > * {
    position: relative;
    z-index: 1;
}

#otpLoginForm::before,
#otpVerifyForm::before,
#phoneLoginForm::before,
#phoneOtpVerifyForm::before,
#phoneEmailForm::before,
#forgotPasswordForm::before,
#forgotOtpForm::before,
#passwordLoginForm::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 18px;
    opacity: 0.7;
    pointer-events: none;
}

#otpLoginForm h2,
#otpVerifyForm h2 {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 20px;
}

#otpLoginForm input,
#otpVerifyForm input,
#phoneLoginForm input,
#phoneOtpVerifyForm input,
#phoneEmailForm input,
#forgotPasswordForm input,
#forgotOtpForm input,
#passwordLoginForm input {
    width: 100%;
    padding: 12px 14px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.6);
    color: #12362c;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#otpLoginForm input::placeholder,
#otpVerifyForm input::placeholder,
#phoneLoginForm input::placeholder,
#phoneOtpVerifyForm input::placeholder,
#phoneEmailForm input::placeholder,
#forgotPasswordForm input::placeholder,
#forgotOtpForm input::placeholder,
#passwordLoginForm input::placeholder {
    color: rgba(18, 54, 44, 0.55);
}

#requestOTP,
#verifyOTP,
#requestPhoneOTP,
#verifyPhoneOTP,
#completePhoneLogin,
#requestForgotOTP,
#verifyForgotOTP,
#submitLogin {
    width: 100%;
    padding: 12px;
    background: #00a15d;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 120, 76, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#requestOTP:hover,
#verifyOTP:hover,
#requestPhoneOTP:hover,
#verifyPhoneOTP:hover,
#completePhoneLogin:hover,
#requestForgotOTP:hover,
#verifyForgotOTP:hover,
#submitLogin:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(0, 120, 76, 0.3);
    filter: saturate(1.05);
}

#requestOTP:hover,
#verifyOTP:hover {
    background: #0f4d36;
}

#otpLoginForm p,
#otpVerifyForm p {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

#passwordLoginForm {
    text-align: left;
}

#passwordLoginForm label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 6px 0 14px !important;
    width: 100%;
    text-align: left;
}

#passwordLoginForm label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0b7a55;
}

#passwordLoginForm button,
#passwordLoginForm #forgotPassword,
#passwordLoginForm #backToOTP {
    text-align: center;
}

#otpVerifyForm,
#phoneOtpVerifyForm,
#phoneEmailForm,
#forgotPasswordForm,
#forgotOtpForm,
#passwordLoginForm {
    display: none;
}

#otp-inputs,
#forgot-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.otp-field {
    width: 42px;
    height: 44px;
    font-size: 18px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.otp-field:focus {
    border-color: #007bff;
    outline: none;
}

.user-info {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.user-avatar img {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    /* Điều chỉnh kích thước tối đa */
    display: block;
}

.user-name {
    margin-left: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.user-not-logged {
    color: red;
    font-style: italic;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#backToEmail {
    border: 1px solid #00a15d;
    padding: 5px 15px;
    background: #61ce700f;
    border-radius: 5px;
}

#resendOTP:disabled {
    cursor: not-allowed;
    background: #ccc;
}

#toggleLoginForm,
#togglePhoneLogin,
#backToEmailOTP,
#backToPasswordLogin,
#forgotPassword,
#backToOTP,
#backToEmail,
#backToPhoneForm,
#backToPhoneEmailLogin,
#backToPassword,
#backToForgotEmail {
    background: none;
    border: none;
    color: #0b7a55;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

#toggleLoginForm::after,
#togglePhoneLogin::after,
#backToEmailOTP::after,
#backToPasswordLogin::after,
#forgotPassword::after,
#backToOTP::after,
#backToEmail::after,
#backToPhoneForm::after,
#backToPhoneEmailLogin::after,
#backToPassword::after,
#backToForgotEmail::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 154, 94, 0), rgba(0, 154, 94, 0.9), rgba(0, 154, 94, 0));
    opacity: 0;
    transition: opacity 0.2s ease;
}

#toggleLoginForm:hover::after,
#togglePhoneLogin:hover::after,
#backToEmailOTP:hover::after,
#backToPasswordLogin:hover::after,
#forgotPassword:hover::after,
#backToOTP:hover::after,
#backToEmail:hover::after,
#backToPhoneForm:hover::after,
#backToPhoneEmailLogin:hover::after,
#backToPassword:hover::after,
#backToForgotEmail:hover::after {
    opacity: 1;
}

#otp-container {
    position: relative;
    padding: 12px 0 24px;
}

.webo-login-page {
    background: radial-gradient(circle at 20% 20%, rgba(204, 255, 236, 0.7), rgba(204, 255, 236, 0) 55%),
        radial-gradient(circle at 80% 10%, rgba(187, 232, 255, 0.65), rgba(187, 232, 255, 0) 60%),
        linear-gradient(160deg, #f5f7f6 0%, #e7f7f0 45%, #f4faf9 100%);
}

@media (max-width: 520px) {
    #otpLoginForm,
    #otpVerifyForm,
    #phoneLoginForm,
    #phoneOtpVerifyForm,
    #phoneEmailForm,
    #forgotPasswordForm,
    #forgotOtpForm,
    #passwordLoginForm {
        margin: 22px 14px;
        padding: 22px 18px;
    }
}





/* ============================
   FIX GRID ASIDE + ARTICLE
   LOGIN PAGE ONLY
============================ */

/* Ẩn sidebar */
.webo-login-page #sidebar {
    display: none !important;
}

/* Ép ct-container trở thành 1 cột */
.webo-login-page .ct-container[data-sidebar] {
    grid-template-columns: 1fr !important;
}

/* Ép article chiếm 100% grid */
.webo-login-page article {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

/* Gỡ padding layout left */
.webo-login-page .ct-container {
    padding-left: 0 !important;
}

/* Reset mọi limit width của article */
.webo-login-page [class*="post-"] {
    max-width: 100% !important;
}

article {
    padding: 0 !important;
}

.ct-container {
    margin: 0 !important;
}

/* ======================
 REMOVE WHITE BORDER
 LOGIN FULL WIDTH
====================== */

.webo-login-page,
.webo-login-page body,
.webo-login-page #main-container,
.webo-login-page main,
.webo-login-page .ct-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

.webo-login-page article {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ép background login phủ full viewport */
.webo-login-page .webo-login-wrapper,
.webo-login-page .webo-login-page {
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Nếu theme còn inset wrapper */
.webo-login-page .site-main,
.webo-login-page .site-content,
.webo-login-page .site {
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Ensure no x-overflow */
html,
body {
    overflow-x: hidden !important;
}

.info-item {
    margin-bottom: 5px !important;
}

.form-container {
    padding: 15px !important;
}