/* ============================================================================
   用户档案下拉面板（首页 + 工作台共用）
   由 style.css 与 app.css 中两份重复定义合并而来；亮色覆盖见 styles/theme.css
   ========================================================================== */

.user-account-panel {
    position: absolute;
    top: 55px;
    right: 0;
    width: 300px;
    background: rgba(18, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96) translateY(-10px);
    transition: all 0.3s var(--td-ease-out);
    transform-origin: top right;
    z-index: var(--td-z-dropdown);
    box-shadow: var(--td-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.user-account-panel.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.user-account-panel * {
    text-align: left;
    line-height: normal;
    letter-spacing: normal;
    box-sizing: border-box;
}

.user-panel-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.user-avatar-large {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 153, 51, 0.15);
    border: 1px solid rgba(255, 153, 51, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-avatar-large svg {
    width: 24px;
    height: 24px;
    stroke: var(--td-primary);
    fill: none;
    margin: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}
.user-email {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.user-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}
.stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}
.stat-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.stat-value { font-size: 18px; font-weight: 700; color: #fff; }
.stat-unit { font-size: 12px; font-weight: normal; color: #666; }

.user-menu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
    width: 100%;
}
.user-account-panel a.user-menu-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #e5e7eb;
    font-size: 14px;
    background: transparent;
    margin: 0;
    border: none;
    transition: background var(--td-dur-fast) var(--td-ease), color var(--td-dur-fast) var(--td-ease);
}
.user-account-panel a.user-menu-item:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.user-account-panel .menu-icon { margin-right: 12px; font-size: 16px; display: inline-flex; align-items: center; }
.user-account-panel .menu-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.user-account-panel .menu-tag {
    margin-left: auto;
    font-size: 11px;
    background: rgba(255, 153, 51, 0.15);
    color: var(--td-primary);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 153, 51, 0.25);
}

.user-panel-footer { display: block; width: 100%; }
.panel-logout-btn {
    width: 100%;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all var(--td-dur-fast) var(--td-ease);
}
.panel-logout-btn:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #ff4d4f; }

/* 禁用菜单项 */
a.disabled-menu { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
