/* ============================================
   设置页面 - 现代化重设计 (森林绿主题)
   ============================================ */

:root {
    /* 核心调色板 (森林绿) */
    --primary: #10B981;
    /* Emerald 500 */
    --primary-dark: #059669;
    /* Emerald 600 */
    --primary-light: #D1FAE5;
    /* Emerald 100 */
    --primary-bg: #ECFDF5;
    /* Emerald 50 */

    --text-main: #1F2937;
    /* Gray 800 */
    --text-sub: #6B7280;
    /* Gray 500 */
    --border-color: #E5E7EB;
    /* Gray 200 */

    /* 间距与圆角 */
    --radius-xl: 16px;
    --radius-full: 9999px;
    --space-4: 16px;
    --space-6: 24px;
}

.settings-container-modern {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* ===== 核心网格布局 (左右分栏) ===== */
.settings-grid-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* 强制两列 */
    gap: 24px !important;
    align-items: stretch !important;
}

/* ===== 通用卡片样式 ===== */
.settings-modern-card {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    padding: 32px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 240px !important;
    /* 确保左右高度一致感 */
    transition: all 0.2s ease !important;
}

.settings-modern-card:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1) !important;
    border-color: var(--primary-light) !important;
}

/* ===== 左侧：个人资料 ===== */
.profile-section-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
}

.profile-avatar-large {
    width: 88px !important;
    height: 88px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
}

.profile-avatar-large i {
    width: 40px !important;
    height: 40px !important;
    color: #ffffff !important;
}

.profile-name-large {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.profile-badges {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.badge-pill {
    padding: 4px 12px !important;
    border-radius: var(--radius-full) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* 等级徽章颜色 */
.badge-tier {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
}

/* 默认灰色 */
/* Default Badge Colors */
[data-tier="free"] .badge-tier {
    background: #F3F4F6 !important;
    color: #6B7280 !important;
}

[data-tier="standard"] .badge-tier {
    background: #ECFDF5 !important;
    color: #059669 !important;
}

/* Updated Premium Badge - Matching Sidebar Style via /ui-ux-pro-max */
[data-tier="premium"] .badge-tier {
    background: linear-gradient(135deg, hsl(45, 100%, 55%), hsl(38, 100%, 50%)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3) !important;
}

/* Premium Card Styling - Matching Sidebar Logic */
[data-tier="premium"] .settings-modern-card {
    border: 1px solid hsl(45, 100%, 85%) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-tier="premium"] .settings-modern-card:hover {
    border-color: hsl(45, 100%, 60%) !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Premium Avatar Ring */
[data-tier="premium"] .profile-avatar-large {
    background: linear-gradient(135deg, hsl(45, 100%, 55%), hsl(38, 100%, 50%)) !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4) !important;
}

/* 退出登录按钮 */
.btn-logout-pill {
    margin-top: 16px !important;
    background: transparent !important;
    border: 1px solid #EF4444 !important;
    color: #EF4444 !important;
    padding: 8px 24px !important;
    border-radius: var(--radius-full) !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-logout-pill:hover {
    background: #FEF2F2 !important;
}

/* ===== 右侧：用量统计 ===== */
.usage-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
    color: var(--text-sub) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Premium Header Icon */
[data-tier="premium"] .usage-header i {
    color: hsl(45, 100%, 55%) !important;
}

[data-tier="premium"] .usage-header div {
    background: hsl(45, 100%, 96%) !important;
}

.usage-stats-row {
    display: flex !important;
    justify-content: space-around !important;
    margin-bottom: 28px !important;
}

.usage-stat-item {
    text-align: center !important;
}

.usage-stat-num {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1.2 !important;
    font-family: var(--font-mono, monospace) !important;
}

.usage-stat-num.infinite {
    font-size: 42px !important;
    color: hsl(150, 10%, 15%) !important;
}

/* Premium Card Labels */
[data-tier="premium"] .usage-stat-label {
    color: hsl(45, 100%, 40%) !important;
    font-weight: 500 !important;
}

.usage-stat-label {
    font-size: 12px !important;
    color: var(--text-sub) !important;
    margin-top: 4px !important;
}

.usage-progress-wrapper {
    background: var(--primary-bg) !important;
    padding: 16px !important;
    border-radius: 12px !important;
    display: block !important;
}

.usage-progress-bar {
    height: 8px !important;
    background: #fff !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    margin-top: 8px !important;
}

.usage-progress-fill {
    height: 100% !important;
    background: var(--primary) !important;
    border-radius: 4px !important;
    transition: width 0.5s ease !important;
}

/* Premium 状态下隐藏进度条容器 */
[data-tier="premium"] .usage-progress-wrapper {
    display: none !important;
}

/* Premium Unlimited Message */
[data-tier="premium"] #premium-unlimited-msg {
    background: linear-gradient(135deg, hsl(45, 100%, 95%), hsl(45, 100%, 90%)) !important;
    color: hsl(45, 100%, 40%) !important;
    border: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .settings-grid-layout {
        grid-template-columns: 1fr !important;
    }

    .settings-modern-card {
        min-height: auto !important;
    }
}