/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #d9d9d9;
    --bg-color: #f0f2f5;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}
.btn-info:hover {
    background: #138496;
}

.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
}

#logout-btn {
    color: #999;
    border-color: #999;
}

#logout-btn:hover {
    color: #666;
    border-color: #666;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* 主应用布局 */
#app-page {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: #001529;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 4px 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav li:hover a,
.sidebar-nav li.active a {
    color: white;
    background: var(--primary-color);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    margin-bottom: 12px;
}

.user-info span {
    display: block;
    font-weight: 500;
}

.user-info small {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-header {
    background: white;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h2 {
    font-size: 20px;
    font-weight: 500;
}

.content-wrapper {
    padding: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.bg-green { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.bg-orange { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.bg-red { background: linear-gradient(135deg, #8b5cf6, #3b82f6); }

.stat-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-color);
}

/* 邀请码横幅 - 玫红色礼包风格 */
.dashboard-gift-banner {
    background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(124,58,237,0.3);
    transition: transform 0.2s;
}
.dashboard-gift-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,58,237,0.4);
}
.gift-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.gift-banner-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gift-banner-label {
    font-size: 13px;
    opacity: 0.9;
}
.gift-banner-code {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.gift-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-gift {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.btn-gift:hover {
    background: rgba(255,255,255,0.4);
}
.btn-gift-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.btn-gift-secondary:hover {
    background: rgba(255,255,255,0.3);
}
.gift-script-banner {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    margin-top: 0;
}
.gift-script-banner .gift-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
}
.gift-script-banner .gift-banner-header:hover {
    opacity: 0.9;
}
.btn-gift-copy {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-gift-copy:hover {
    background: rgba(255,255,255,0.35);
}
.gift-banner-body {
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.95;
}

.chart-container {
    height: 250px;
}

.ranking-list {
    max-height: 250px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
}

.ranking-number.top3 {
    background: #fff2f0;
    color: #ff4d4f;
}

.ranking-info {
    flex: 1;
}

.ranking-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.ranking-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.ranking-amount {
    font-weight: 600;
    color: var(--primary-color);
}

/* 战绩排行榜 */
.leaderboard-card {
    min-height: 320px;
}

.leaderboard-wrap {
    max-height: none;
}

.leaderboard-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.lb-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.lb-tab:hover {
    color: var(--primary-color);
}

.lb-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.lb-tab i {
    margin-right: 4px;
}

.lb-item {
    padding: 10px 0;
}

.lb-empty {
    text-align: center;
    color: #999;
    padding: 30px 20px;
    font-size: 14px;
}

/* 绩效概览卡片 */
.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.perf-overview-card {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.perf-ov-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.perf-ov-icon.bg-blue { background: var(--primary-color); }
.perf-ov-icon.bg-green { background: var(--success-color); }
.perf-ov-icon.bg-orange { background: var(--warning-color); }
.perf-ov-icon.bg-red { background: var(--error-color); }

.perf-ov-info h3 {
    font-size: 20px;
    margin-bottom: 2px;
}

.perf-ov-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 完成率颜色 */
.completion-rate {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.rate-good { background: #f6ffed; color: #52c41a; }
.rate-mid { background: #fff7e6; color: #fa8c16; }
.rate-low { background: #fff2f0; color: #ff4d4f; }

/* 仪表盘绩效汇总卡片 */
.performance-summary-card {
    margin-bottom: 20px;
}

.performance-summary-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.perf-sum-item {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.perf-sum-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.perf-sum-value {
    font-size: 16px;
    font-weight: 600;
}

/* 表格样式 */
.table-responsive {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f5f5f5;
}

.data-table td {
    font-size: 14px;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-pending {
    background: #fff7e6;
    color: #fa8c16;
}

.status-captain_approved {
    background: #e6f7ff;
    color: var(--primary-color, #6366f1);
}

.status-manager_approved {
    background: #f6ffed;
    color: #52c41a;
}

/* 开发类型标签 */
.dev-type-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
}

.dev-solo {
    background: #e6f7ff;
    color: var(--primary-color, #6366f1);
    border: 1px solid #91d5ff;
}

.dev-joint {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.status-rejected {
    background: #fff1f0;
    color: #ff4d4f;
}

/* 页面操作栏 */
.page-actions {
    margin-bottom: 16px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* 薪资汇总 */
.salary-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.salary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.salary-card h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.salary-card p {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.salary-card.total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.salary-card.total h4,
.salary-card.total p {
    color: white;
}

/* 审核标签页 */
.audit-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: visible;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.required {
    color: var(--error-color);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

/* 确认框 */
.confirm-box {
    margin-top: 16px;
    padding: 12px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .salary-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .salary-summary {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* CRM 样式 */
.crm-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.crm-stats .stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bg-purple {
    background: linear-gradient(135deg, #a855f7, #6366f1);
}

.modal-large {
    max-width: 800px;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.follow-up-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

.follow-up-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.follow-up-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.follow-up-item {
    padding: 12px;
    background: #f6f8fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.follow-up-item .follow-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.follow-up-item .follow-content {
    font-size: 14px;
}

.follow-up-form {
    background: #f6f8fa;
    padding: 16px;
    border-radius: 4px;
}

.import-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.import-tab-content {
    min-height: 200px;
}

.import-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

#import-text {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.import-preview {
    margin-top: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.import-template {
    margin-top: 12px;
}

.import-template a {
    color: var(--primary-color);
    text-decoration: none;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.info-text {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px;
    background: #f6f8fa;
    border-radius: 4px;
}

/* 客户状态标签 */
.status-active {
    background: #e6f7ff;
    color: var(--primary-color, #6366f1);
}

.status-converted {
    background: #f6ffed;
    color: #52c41a;
}

.status-inactive {
    background: #f5f5f5;
    color: #999;
}

/* 员工权限设置 */
.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.permission-item:last-child {
    border-bottom: none;
}

.permission-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* 仪表盘年月选择器 */
.dashboard-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-filter-bar label {
    font-weight: 500;
    color: var(--text-color);
}

.dashboard-filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    min-width: 100px;
}

/* 客户管理标签页 */
.customer-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.customer-tabs .tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.customer-tabs .tab-btn:hover {
    color: var(--primary-color);
}

.customer-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

.customer-panel {
    display: block;
}

.customer-panel.hidden {
    display: none;
}

/* 公海客户信息提示 */
.public-pool-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 8px;
    margin-bottom: 24px;
    color: var(--primary-dark, #4f46e5);
}

.public-pool-info i {
    font-size: 20px;
}

/* 抢客户按钮 */
.btn-grab {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.btn-grab:hover {
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(238, 90, 90, 0.3);
}

.btn-grab i {
    font-size: 12px;
}

/* 订单详情样式 */
.order-detail-info {
    background: #f6f8fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed #e8e8e8;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    flex: 1;
    color: var(--text-color);
}

.screenshot-link {
    color: var(--primary-color);
    text-decoration: none;
}

.screenshot-link:hover {
    text-decoration: underline;
}

/* 修改记录样式 */
.edit-logs-section, .audit-logs-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

.edit-logs-section h4, .audit-logs-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.edit-log-item {
    background: #f6f8fa;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.edit-log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.edit-type {
    font-weight: 500;
    color: var(--primary-color);
}

.edit-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.edit-log-content {
    font-size: 13px;
    margin-bottom: 8px;
}

.old-value {
    color: #999;
    text-decoration: line-through;
}

.new-value {
    color: var(--success-color);
}

.edit-reason {
    color: var(--warning-color);
    margin-top: 4px;
}

.edit-log-footer {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}

.audit-log-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #e8e8e8;
    font-size: 13px;
}

.audit-action {
    font-weight: 500;
    color: var(--primary-color);
}

.audit-operator {
    color: var(--text-secondary);
}

.audit-time {
    color: #999;
}

.audit-remark {
    width: 100%;
    color: var(--text-secondary);
    font-style: italic;
}

/* 权限设置开关样式 */
.switch-label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--primary-color);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.label-text {
    display: flex;
    flex-direction: column;
}

.label-text strong {
    font-size: 14px;
    color: var(--text-color);
}

.label-text small {
    font-size: 12px;
    color: var(--text-secondary);
}

.permission-item {
    padding: 16px;
    background: #f6f8fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
}

.badge-danger {
    background: #fff1f0;
    color: #ff4d4f;
}

.badge-default {
    background: #f5f5f5;
    color: #999;
}

/* ========== 组织架构页面 ========== */
.orgchart-container {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.orgchart-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-secondary, #fff);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color, #e8e8e8);
    overflow-y: auto;
    max-height: 70vh;
}

.orgchart-sidebar h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-primary, #333);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.orgchart-sidebar h4 i {
    margin-right: 6px;
    color: var(--primary-color, var(--primary-color, #6366f1));
}

.orgchart-team-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orgchart-team-item:hover {
    background: var(--bg-hover, #f0f5ff);
}

.orgchart-team-item.active {
    background: var(--primary-color, var(--primary-color, #6366f1));
    color: #fff;
}

.orgchart-team-item .team-member-count {
    font-size: 12px;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.orgchart-team-item.active .team-member-count {
    background: rgba(255,255,255,0.3);
}

.orgchart-unassigned-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

.orgchart-unassigned-section h4 {
    font-size: 13px;
}

.orgchart-unassigned-item {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-secondary, #666);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orgchart-unassigned-item .unassigned-role {
    font-size: 11px;
    color: var(--text-muted, #999);
}

.btn-xs {
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid var(--border-color, #d9d9d9);
    background: var(--bg-secondary, #fff);
    color: var(--text-secondary, #666);
    transition: all 0.2s;
}

.btn-xs:hover {
    background: var(--primary-color, var(--primary-color, #6366f1));
    color: #fff;
    border-color: var(--primary-color, var(--primary-color, #6366f1));
}

.orgchart-main {
    flex: 1;
    background: var(--bg-secondary, #fff);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color, #e8e8e8);
    overflow-y: auto;
    max-height: 70vh;
}

.orgchart-placeholder {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted, #999);
}

.orgchart-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* 组织架构树 */
.org-tree {
    padding: 0;
}

.org-team-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color, var(--primary-color, #6366f1));
}

.org-team-header h3 {
    margin: 0;
    font-size: 18px;
}

.org-team-header .team-stats {
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.org-level {
    margin-left: 0;
    margin-bottom: 12px;
}

.org-node {
    background: var(--bg-secondary, #fff);
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.org-node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.org-node-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-node-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.org-node-avatar.manager { background: #722ed1; }
.org-node-avatar.captain { background: var(--primary-color, #6366f1); }
.org-node-avatar.member { background: #52c41a; }

.org-node-name {
    font-weight: 600;
    font-size: 14px;
}

.org-node-role {
    font-size: 12px;
    color: var(--text-secondary, #666);
}

.org-node-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

.org-children {
    margin-left: 32px;
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid var(--border-color, #e8e8e8);
}

.org-captain-group {
    margin-bottom: 12px;
}

.org-captain-group .org-node {
    background: #f0f5ff;
    border-color: #adc6ff;
}

.org-member-list {
    margin-left: 24px;
    margin-top: 4px;
}

.org-member-list .org-node {
    background: #f6ffed;
    border-color: #b7eb8f;
    padding: 8px 12px;
}

.org-member-list .org-node-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* 暗色模式适配 */
[data-theme="dark"] .orgchart-sidebar,
[data-theme="dark"] .orgchart-main {
    background: var(--bg-secondary, #1f1f1f);
    border-color: var(--border-color, #333);
}

[data-theme="dark"] .org-node {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .org-captain-group .org-node {
    background: #1a2744;
    border-color: #2a4a7f;
}

[data-theme="dark"] .org-member-list .org-node {
    background: #1a3a1a;
    border-color: #3a6a3a;
}

/* ========== 绩效考核页面 ========== */
.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.perf-stat-card {
    background: var(--bg-secondary, #fff);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color, #e8e8e8);
    text-align: center;
}

.perf-stat-card .perf-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
    color: #fff;
}

.perf-stat-card .perf-icon.bg-blue { background: var(--primary-color, #6366f1); }
.perf-stat-card .perf-icon.bg-green { background: #52c41a; }
.perf-stat-card .perf-icon.bg-orange { background: #fa8c16; }
.perf-stat-card .perf-icon.bg-purple { background: #722ed1; }

.perf-stat-card h3 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 600;
}

.perf-stat-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: var(--border-color, #e8e8e8);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.low { background: #ff4d4f; }
.progress-fill.medium { background: #faad14; }
.progress-fill.high { background: #52c41a; }
.progress-fill.complete { background: var(--primary-color, #6366f1); }

/* 仪表盘绩效卡片 */
.performance-summary-card {
    margin-bottom: 20px;
}

.performance-summary-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

/* 饼图行 */
.perf-charts-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.perf-chart-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-primary, #f5f5f5);
    border-radius: 12px;
}

.pie-chart-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.pie-svg {
    width: 100%;
    height: 100%;
}

.pie-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #333);
}

.perf-chart-info {
    flex: 1;
}

.perf-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 4px;
}

.perf-chart-detail {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 6px;
}

.perf-chart-bonus {
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.perf-chart-bonus strong {
    color: #52c41a;
}

/* 薪资明细 */
.salary-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary, #f5f5f5);
    border-radius: 12px;
}

.salary-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 8px;
}

.salary-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-bottom: 4px;
}

.salary-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.salary-total {
    border-left: 2px solid var(--border-color, #e8e8e8);
}

.salary-total .salary-value {
    font-size: 20px;
    color: var(--primary-color, #6366f1);
}

.perf-summary-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary, #f5f5f5);
    border-radius: 8px;
}

.perf-summary-item .perf-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color, var(--primary-color, #6366f1));
}

.perf-summary-item .perf-label {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-top: 4px;
}

.perf-summary-item .perf-sub {
    font-size: 12px;
    color: var(--text-muted, #999);
    margin-top: 2px;
}

/* 绩效表格中的完成率颜色 */
.completion-rate {
    font-weight: 600;
}

.completion-rate.low { color: #ff4d4f; }
.completion-rate.medium { color: #faad14; }
.completion-rate.high { color: #52c41a; }
.completion-rate.complete { color: var(--primary-color, #6366f1); }

/* 暗色模式适配 */
[data-theme="dark"] .perf-stat-card,
[data-theme="dark"] .perf-summary-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .performance-summary-content .perf-summary-item {
    background: #1f1f1f;
}

[data-theme="dark"] .perf-chart-item {
    background: #1f1f1f;
}

[data-theme="dark"] .pie-chart-center {
    color: #e0e0e0;
}

[data-theme="dark"] .perf-chart-title {
    color: #e0e0e0;
}

[data-theme="dark"] .salary-breakdown {
    background: #1f1f1f;
}

[data-theme="dark"] .salary-total {
    border-left-color: #444;
}

[data-theme="dark"] .salary-value {
    color: #e0e0e0;
}
/* ============================================
   创客社区样式
   ============================================ */

/* ---- 分类标签栏 ---- */
#community-cat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

#community-cat-bar .cat-tab {
    padding: 5px 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#community-cat-bar .cat-tab:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

#community-cat-bar .cat-tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* ---- 网格布局 ---- */
.community-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .community-grid {
        grid-template-columns: 1fr;
    }
    .community-sidebar {
        order: -1;
    }
}

/* ---- 帖子列表 ---- */
.post-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---- 帖子卡片 ---- */
.post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.post-card-inner {
    padding: 16px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- 帖子头部 ---- */
.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.post-author {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.post-time {
    color: #94a3b8;
}

.role-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.role-tag.admin {
    background: #fef3c7;
    color: #92400e;
}

.role-tag.captain {
    background: #dbeafe;
    color: #1e40af;
}

.role-tag.member {
    background: #e2e8f0;
    color: #475569;
}

/* ---- 帖子内容 ---- */
.post-body {
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 10px;
    word-break: break-word;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

/* ---- 标签 ---- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.post-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
}

/* ---- 图片网格 ---- */
.post-images {
    display: grid;
    gap: 6px;
    margin: 8px 0;
}

.post-images.col-1 { grid-template-columns: 1fr; }
.post-images.col-2 { grid-template-columns: 1fr 1fr; }
.post-images.col-3 { grid-template-columns: 1fr 1fr 1fr; }
.post-images.col-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.post-images img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-images img:hover {
    transform: scale(1.02);
}

/* ---- 附件 ---- */
.post-attachments {
    margin: 8px 0;
}

.att-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 4px;
}

.att-icon {
    font-size: 16px;
    color: #64748b;
    flex-shrink: 0;
}

.att-info {
    flex: 1;
    min-width: 0;
}

.att-name {
    font-size: 12px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.att-size {
    font-size: 10px;
    color: #94a3b8;
}

.att-download {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.att-download:hover {
    background: #3b82f6;
    color: #fff;
}

/* ---- 帖子底部 ---- */
.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: 6px;
}

.post-action {
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.post-action:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.post-action.liked {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

/* ---- 侧边栏 ---- */
.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.community-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-card-title {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.sidebar-card-body {
    padding: 12px 14px;
}

/* ---- 统计网格 ---- */
.community-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.community-stat-item {
    text-align: center;
    padding: 8px 4px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #3b82f6;
}

.stat-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ---- 热门列表 ---- */
.hot-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item:hover {
    background: #f8fafc;
}

.hot-rank {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.hot-rank.r1 { background: #ef4444; }
.hot-rank.r2 { background: #f59e0b; }
.hot-rank.r3 { background: #3b82f6; }
.hot-rank.rx { background: #94a3b8; }

.hot-title {
    flex: 1;
    font-size: 12px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-views {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* ---- 活跃用户 ---- */
.active-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.au-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.au-name {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.au-posts {
    margin-left: auto;
    font-size: 10px;
    color: #94a3b8;
}

/* ---- 空状态 ---- */
.community-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.community-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ---- 分页 ---- */
.pg-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.pg-btn:hover {
    background: #f1f5f9;
}

.pg-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* ---- 暗色主题 ---- */
[data-theme="dark"] #community-cat-bar .cat-tab {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}

[data-theme="dark"] #community-cat-bar .cat-tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

[data-theme="dark"] .post-card {
    background: #1f1f1f;
    border-color: #333;
}

[data-theme="dark"] .post-author { color: #e0e0e0; }
[data-theme="dark"] .post-body { color: #c0c0c0; }
[data-theme="dark"] .post-title { color: #e0e0e0; }
[data-theme="dark"] .post-tag { background: #1a2f40; color: #60a5fa; border-color: #2a4a6a; }

[data-theme="dark"] .community-sidebar-card {
    background: #1f1f1f;
    border-color: #333;
}

[data-theme="dark"] .sidebar-card-title {
    background: #252525;
    color: #ccc;
    border-color: #333;
}

[data-theme="dark"] .community-stat-item { background: #252525; }
[data-theme="dark"] .stat-label { color: #888; }

[data-theme="dark"] .hot-item:hover { background: #252525; }
[data-theme="dark"] .hot-title { color: #c0c0c0; }

[data-theme="dark"] .au-name { color: #c0c0c0; }
[data-theme="dark"] .att-item { background: #252525; border-color: #444; }
[data-theme="dark"] .att-name { color: #c0c0c0; }
[data-theme="dark"] .att-download { background: #1a2f40; border-color: #2a4a6a; color: #60a5fa; }
[data-theme="dark"] .post-action { background: #1a1a1a; border-color: #444; color: #888; }
[data-theme="dark"] .post-action.liked { background: #1a2f40; border-color: #2a4a6a; color: #60a5fa; }
[data-theme="dark"] .pg-btn { background: #2a2a2a; border-color: #444; color: #ccc; }
