/* ==========================================================================
   Auth 体系样式：登录弹窗 + 导航栏用户菜单
   仅当 Auth:Enabled=true 时相关组件才会渲染，样式常驻不影响其他 UI。
   主题色沿用首页规范：#2F3847 深灰蓝 + #E8A33D 品牌金。
   ========================================================================== */

/* ---------- 登录弹窗遮罩 ---------- */
.hp-login-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: hp-login-fade-in 0.18s ease-out;
}

@keyframes hp-login-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hp-login-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 380px;
    padding: 24px 24px 20px;
    animation: hp-login-slide-up 0.22s ease-out;
}

@keyframes hp-login-slide-up {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.hp-login-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.hp-login-close:hover {
    color: #2F3847;
    background: #f1f5f9;
}

.hp-login-header {
    font-size: 18px;
    font-weight: 600;
    color: #2F3847;
    margin-bottom: 8px;
    text-align: center;
}

.hp-login-header i {
    color: #E8A33D;
}

.hp-login-prompt {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.hp-login-body {
    margin-top: 8px;
}

.hp-login-qr {
    width: 220px;
    height: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    display: block;
    margin: 0 auto 12px;
}

.hp-login-loading {
    padding: 60px 0;
    color: #94a3b8;
    font-size: 14px;
}

.hp-login-hint {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.6;
    margin-top: 8px;
}

/* ---------- 导航栏用户菜单 ---------- */
.hp-user-menu {
    display: flex;
    align-items: center;
}

.hp-login-btn,
.hp-user-btn {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.hp-login-btn:hover,
.hp-user-btn:hover {
    background: rgba(232, 163, 61, 0.15);
    border-color: #E8A33D;
    color: #E8A33D;
}

.hp-user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
}

.hp-user-nickname {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* 下拉菜单微调，贴合深色导航栏 */
.hp-user-menu .dropdown-menu {
    min-width: 180px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 6px;
}

.hp-user-menu .dropdown-item {
    padding: 6px 14px;
    color: #334155;
}

.hp-user-menu .dropdown-item:hover {
    background: #f1f5f9;
    color: #2F3847;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 576px) {
    .hp-login-dialog {
        max-width: 100%;
        padding: 20px 18px 16px;
    }

    .hp-login-qr {
        width: 180px;
        height: 180px;
    }

    .hp-user-nickname {
        max-width: 60px;
    }
}
