/* 认证组件统一样式 */

/* 用户菜单弹框样式 */
.user-menu-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden; /* 防止内容溢出 */
}

.user-menu-popup.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.user-menu-popup__item {
    border-bottom: 1px solid #f5f5f5;
    position: relative; /* 确保正确定位 */
}

.user-menu-popup__item:last-child {
    border-bottom: none;
}

.user-menu-popup__item:first-child {
    border-top: none; /* 确保第一个项目没有上边框 */
}

.user-menu-popup__link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.user-menu-popup__link:hover {
    background-color: #f8f9fa;
    color: #015fc9;
}

.user-menu-popup__link i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* 确保菜单容器的唯一性 */
.main-menu__user-container .user-menu-popup {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
}

/* 防止重复显示 */
.user-menu-popup * {
    pointer-events: auto;
}

/* 确保主菜单的唯一性 */
#main-user-menu {
    display: block !important;
    top: 30px !important;
}

/* 隐藏可能的重复菜单 */
.user-menu-popup:not(#main-user-menu) {
    display: none !important;
}

/* 导航栏右侧用户区域样式 */
.main-menu__right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.main-menu__wrapper-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-menu__user {
    color: #333;
    font-size: 24px;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.main-menu__user:hover {
    color: #015fc9;
    background-color: rgba(1, 95, 201, 0.1);
}

.main-menu__user.logged-in {
    color: #015fc9;
}

/* 登录弹框样式 */
.login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.login-popup.active {
    visibility: visible;
    opacity: 1;
}


/* 修复：登录弹框背景点击时出现蓝色遮罩（来自主题 .search-popup__overlay） */
.login-popup .search-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent !important; /* 覆盖主题中的蓝色背景 */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* 移动端去除点击高亮 */
}

.login-popup .search-popup__content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.login-popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.login-popup__header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.login-popup__close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.login-popup__close:hover {
    color: #333;
}

.login-popup__form-group {
    margin-bottom: 20px;
}

.login-popup__form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd !important;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-popup__form-group input:focus {
    outline: none;
    border-color: #015fc9;
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-image {
    height: 40px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* .login-popup__submit {
    width: 100%;
    padding: 12px;
    background-color: #015fc9;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-popup__submit:hover:not(:disabled) {
    background-color: #014ba8;
}

.login-popup__submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
} */

/* 退出登录确认弹框样式 */
.logout-confirm-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.logout-confirm-popup.active {
    visibility: visible;
    opacity: 1;
}

.logout-confirm-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    cursor: pointer;
}

.logout-confirm-popup__content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.logout-confirm__content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
}

.logout-confirm__content p {
    margin: 0 0 25px 0;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.logout-confirm__buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.logout-confirm__btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.logout-confirm__btn--cancel {
    background-color: #6c757d;
    color: #fff;
}

.logout-confirm__btn--cancel:hover {
    background-color: #5a6268;
}

/* .logout-confirm__btn--confirm {
    background-color: #dc3545;
    color: #fff;
}

.logout-confirm__btn--confirm:hover {
    background-color: #c82333;
} */

.logout_btn_cancel {
    color: #696e77;
    background-color: #afc7e7;
    width: 60px;
    height: 40px;
    border: 0;
    border-radius: 4px;
}

.logout_btn {
    color: #fff;
    background-color: #015fc9;
    width: 100px;
    height: 40px;
    border: 0;
    border-radius: 4px;
}

/* 响应式样式 */
@media (max-width: 991px) {
    .main-menu__right {
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .main-menu__wrapper-inner {
        flex-wrap: wrap;
    }

    .main-menu__right {
        margin-left: auto;
        margin-top: 10px;
    }

    .main-menu__user {
        font-size: 20px;
        padding: 8px;
    }

    .user-menu-popup {
        right: -10px;
        min-width: 140px;
    }

    .logout-confirm__buttons {
        flex-direction: column;
        align-items: center;
    }

    .logout-confirm__btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 新增的认证弹框样式 */

/* Tab切换样式 */
.auth-tabs {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
}

.auth-tab.active {
    color: #015fc9;
    background-color: #f8f9fa;
}

.auth-tab:hover {
    color: #015fc9;
    background-color: #f8f9fa;
}

/* 带图标的输入框样式 */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: #666;
    z-index: 1;
    font-size: 16px;
}

.input-with-icon input {
    padding-left: 45px !important;
}

/* 密码输入框样式 */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute !important;
    right: 15px !important;
    left: auto !important;
    cursor: pointer;
    color: #999 !important;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #015fc9 !important;
}

/* 记住我复选框样式 */
.remember-me {
    margin-bottom: 15px;
}

/* 新的简单复选框样式 */
.remember-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    gap: 8px;
}

.remember-checkbox input[type='checkbox'] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #015fc9;
}

.checkbox-text {
    user-select: none;
}

/* 保留旧样式以防其他地方使用 */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-container input[type='checkbox'] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type='checkbox']:checked + .checkmark {
    background-color: #015fc9;
    border-color: #015fc9;
}

.checkbox-container input[type='checkbox']:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 忘记密码链接样式 */
.forgot-password {
    text-align: right;
    margin-top: 15px;
}

.forgot-password a {
    color: #015fc9;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 发送验证码按钮样式 */
.send-code-btn {
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-code-btn:hover {
    background-color: #e9ecef;
    border-color: #015fc9;
    color: #015fc9;
}

.send-code-btn:disabled {
    background-color: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

/* 重置密码容器样式 */
.reset-password-container .login-popup__header h3 {
    text-align: center;
    width: 100%;
}

.reset-password__description {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.reset-password__description p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* 返回登录链接样式 */
.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #015fc9;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 覆盖主题在弹框内对 form 的横向布局，确保纵向排列（优先级提升） */
.login-popup .search-popup__content .login-popup__form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
}
.login-popup .search-popup__content .login-popup__form > * {
    width: 100% !important;
}
.login-popup
    .search-popup__content
    .login-popup__form
    .login-popup__form-group {
    display: block !important;
}
.login-popup .search-popup__content .login-popup__form .input-with-icon {
    width: 100% !important;
}
/* .login-popup .search-popup__content .login-popup__form .login-popup__submit {
    display: block !important;
    width: 100% !important;
    float: none !important;
    align-self: stretch !important;
} */

.login_btn {
    color: #fff;
    background-color: #015fc9;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 4px;
}
