/* 顶部登录控件 */
.auth-widget {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 9999;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-widget * {
    box-sizing: border-box;
}

.auth-login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 22px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(118, 75, 162, 0.35);
}

.auth-user-box {
    display: flex;
    align-items: center;
    background: rgba(18, 18, 38, 0.85);
    border-radius: 28px;
    padding: 4px 12px;
    border: 1px solid rgba(102, 126, 234, 0.25);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #cad2ff;
    overflow: hidden;
    margin-right: 10px;
}

.auth-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-identity {
    display: flex;
    flex-direction: column;
    margin-right: 12px;
}

.auth-identity .name {
    color: #e0e3ff;
    font-size: 13px;
    font-weight: 600;
}

.auth-identity .role {
    color: #9095c9;
    font-size: 11px;
}

.auth-menu-toggle {
    background: transparent;
    border: none;
    color: #cfd2ff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 4px;
    transition: transform 0.2s ease;
}

.auth-menu-toggle.open {
    transform: rotate(180deg);
}

.auth-dropdown {
    position: absolute;
    top: 52px;
    right: 0;
    background: rgba(14, 16, 32, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 14px;
    min-width: 200px;
    padding: 10px 0;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    display: none;
}

.auth-dropdown.open {
    display: block;
}

.auth-dropdown button,
.auth-dropdown a {
    width: 100%;
    background: transparent;
    border: none;
    color: #d3d6ff;
    text-align: left;
    padding: 10px 18px;
    font-size: 13px;
    display: block;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.auth-dropdown button:hover,
.auth-dropdown a:hover {
    background: rgba(99, 120, 234, 0.18);
    color: #fff;
}

.auth-divider {
    height: 1px;
    background: rgba(102, 126, 234, 0.15);
    margin: 8px 12px;
}

@media (max-width: 640px) {
    .auth-widget {
        top: 10px;
        right: 10px;
    }

    .auth-user-box {
        padding: 4px 10px;
    }

    .auth-identity {
        display: none;
    }
}

