/* ===== 鼎宏丰和·建筑项目管理系统 - 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== CSS变量体系（保留原系统变量，兼容双主题） ===== */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #059669;
    --secondary-light: #10b981;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --dark-bg: #0a0e18;
    --dark-bg-deep: #060910;
    --dark-card: #111b2e;
    --dark-border: #2c3d52;
    --dark-text: #e8edf4;
    --dark-text-secondary: #9db0c4;
    --dark-input: #1a2438;
    --dark-input-border: #3d5370;

    --light-bg: #f1f5f9;
    --light-bg-deep: #e8edf3;
    --light-card: #ffffff;
    --light-border: #e2e8f0;
    --light-text: #0f172a;
    --light-text-secondary: #64748b;
    --light-input: #ffffff;
    --light-input-border: #cbd5e1;

    --glass-bg: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;

    --bg-color: #0a0e18;
    --card-bg: #111b2e;
    --border-color: #2c3d52;
    --text-primary: #e8edf4;
    --text-secondary: #9db0c4;
    --input-bg: #1a2438;
    --input-border: #3d5370;
    --bg-secondary: #1a2438;
    --app-bg: linear-gradient(168deg, #060910 0%, #0a0e18 45%, #0b1222 100%);
    --surface-header: rgba(8,12,20,0.82);
    --table-header-bg: rgba(255,255,255,0.04);
    --focus-ring: rgba(59,130,246,0.25);

    /* 侧边栏 */
    --sidebar-bg: #1e293b;
    --sidebar-text: #e8edf4;
    --sidebar-text-secondary: #94a3b8;
    --sidebar-nav-text: #cbd5e1;
    --sidebar-nav-active-bg: rgba(37,99,235,0.15);
    --sidebar-nav-active-text: #60a5fa;
    --sidebar-nav-hover-bg: rgba(255,255,255,0.06);
    --sidebar-nav-hover-text: #e8edf4;
    --sidebar-divider: rgba(255,255,255,0.06);
    --sidebar-scrollbar: #334155;

    /* 操作色组 */
    --action-edit-color: #3b82f6;
    --action-edit-border: rgba(59,130,246,0.3);
    --action-edit-bg: rgba(59,130,246,0.1);
    --action-edit-hover-bg: rgba(59,130,246,0.2);
    --action-delete-color: #ef4444;
    --action-delete-border: rgba(239,68,68,0.3);
    --action-delete-bg: rgba(239,68,68,0.1);
    --action-delete-hover-bg: rgba(239,68,68,0.2);
    --action-view-color: #10b981;
    --action-view-border: rgba(16,185,129,0.3);
    --action-view-bg: rgba(16,185,129,0.1);
    --action-view-hover-bg: rgba(16,185,129,0.2);
    --action-upload-color: #f59e0b;
    --action-upload-border: rgba(245,158,11,0.3);
    --action-upload-bg: rgba(245,158,11,0.1);
    --action-upload-hover-bg: rgba(245,158,11,0.2);
    --action-download-color: #8b5cf6;
    --action-download-border: rgba(139,92,246,0.3);
    --action-download-bg: rgba(139,92,246,0.1);
    --action-download-hover-bg: rgba(139,92,246,0.2);
}

[data-theme="light"] {
    color-scheme: light;
    --bg-color: var(--light-bg);
    --card-bg: var(--light-card);
    --border-color: var(--light-border);
    --text-primary: var(--light-text);
    --text-secondary: var(--light-text-secondary);
    --input-bg: var(--light-input);
    --input-border: var(--light-input-border);
    --bg-secondary: var(--light-input);
    --glass-bg: rgba(15,23,42,0.04);
    --glass-border: rgba(15,23,42,0.08);
    --app-bg: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
    --surface-header: rgba(255,255,255,0.88);
    --table-header-bg: rgba(15,23,42,0.04);
    --focus-ring: rgba(59,130,246,0.2);
    --sidebar-bg: #ffffff;
    --sidebar-text: #0f172a;
    --sidebar-text-secondary: #64748b;
    --sidebar-nav-text: #475569;
    --sidebar-nav-active-bg: rgba(37,99,235,0.08);
    --sidebar-nav-active-text: #2563eb;
    --sidebar-nav-hover-bg: rgba(15,23,42,0.04);
    --sidebar-nav-hover-text: #0f172a;
    --sidebar-divider: #e2e8f0;
    --sidebar-scrollbar: #cbd5e1;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-color: var(--dark-bg);
    --card-bg: var(--dark-card);
    --border-color: var(--dark-border);
    --text-primary: var(--dark-text);
    --text-secondary: var(--dark-text-secondary);
    --input-bg: var(--dark-input);
    --input-border: var(--dark-input-border);
    --bg-secondary: var(--dark-input);
    --glass-bg: rgba(255,255,255,0.035);
    --glass-border: rgba(255,255,255,0.1);
    --app-bg: linear-gradient(168deg, #060910 0%, #0a0e18 45%, #0b1222 100%);
    --surface-header: rgba(8,12,20,0.82);
    --table-header-bg: rgba(255,255,255,0.04);
    --focus-ring: rgba(59,130,246,0.25);
    --sidebar-bg: #1e293b;
    --sidebar-text: #e8edf4;
    --sidebar-text-secondary: #94a3b8;
    --sidebar-nav-text: #cbd5e1;
    --sidebar-nav-active-bg: rgba(37,99,235,0.15);
    --sidebar-nav-active-text: #60a5fa;
    --sidebar-nav-hover-bg: rgba(255,255,255,0.06);
    --sidebar-nav-hover-text: #e8edf4;
    --sidebar-divider: rgba(255,255,255,0.06);
    --sidebar-scrollbar: #334155;
}

html { color-scheme: light dark; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--app-bg);
    color: var(--text-primary);
    transition: var(--transition);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===== 认证页面样式（保留原设计） ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 1;
}

.auth-header { text-align: center; margin-bottom: 2.5rem; }
.auth-logo { font-size: 4rem; margin-bottom: 1rem; display: inline-block; }

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.auth-header p { font-size: 1rem; color: rgba(255,255,255,0.8); }

.auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.3s ease; }

.auth-footer { text-align: center; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.auth-footer p { font-size: 0.875rem; color: rgba(255,255,255,0.6); }

.config-status { margin-top: 1rem; padding: 0.75rem; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); border-radius: 8px; display: flex; align-items: center; gap: 0.5rem; color: #ef4444; font-size: 0.875rem; }

/* ===== 应用容器 ===== */
.app-container { display: flex; min-height: 100vh; }

/* ===== 侧边栏（新设计，支持亮色/暗色主题） ===== */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0; top: 0;
    z-index: 100;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-header { padding: 1.2rem; text-align: center; border-bottom: 1px solid var(--sidebar-divider); }
.sidebar-logo {
    width: auto;
    max-width: 74px;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    display: block;
    padding: 0;
    margin: 0 auto 6px;
    box-sizing: border-box;
}
.sidebar-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}
.sidebar-header h2 { display: none; }
.sidebar-header p { font-size: 12px; color: var(--sidebar-text-secondary); margin: 4px 0 0; }

.online-users { padding: 0.5rem 1.5rem; font-size: 13px; color: var(--sidebar-text-secondary); display: flex; align-items: center; gap: 6px; }
.online-indicator { color: var(--success-color); font-size: 10px; }

.sidebar-nav { flex: 1; padding: 0 0.75rem 1rem; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--sidebar-scrollbar); border-radius: 2px; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 0.75rem 1rem;
    color: var(--sidebar-nav-text);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover { background: var(--sidebar-nav-hover-bg); color: var(--sidebar-nav-hover-text); }
.nav-item.active { background: var(--sidebar-nav-active-bg); color: var(--sidebar-nav-active-text); }
.nav-icon { font-size: 18px; min-width: 22px; text-align: center; flex-shrink: 0; }
.nav-text { flex: 1; font-weight: 500; }
.nav-arrow { font-size: 10px; transition: transform 0.25s ease; opacity: 0.6; margin-left: auto; }

.nav-group.expanded .nav-arrow { transform: rotate(180deg); }
.nav-children { display: none; flex-direction: column; padding-left: 8px; }
.nav-group.expanded .nav-children { display: flex; }

.nav-child { padding: 0.6rem 1rem 0.6rem 2.5rem !important; font-size: 13px !important; opacity: 0.8; }
.nav-child:hover { opacity: 1; }
.nav-child.active { opacity: 1; color: var(--sidebar-nav-active-text) !important; }

.badge { background: var(--danger-color); color: white; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }
.badge-green { background: rgba(16,185,129,0.15); color: var(--success-color); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--danger-color); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--warning-color); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--primary-color); }
.badge-gray { background: rgba(107,114,128,0.15); color: #6b7280; }

.sidebar-footer { padding: 0.8rem 1.2rem; border-top: 1px solid var(--sidebar-divider); text-align: center; }

/* ===== 主要内容区 ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===== 顶部用户栏 ===== */
.top-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    background: var(--surface-header, rgba(8,12,20,0.82));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.user-info-header { display: flex; align-items: center; gap: 0.75rem; }
.user-role-badge { padding: 2px 10px; background: rgba(59,130,246,0.15); color: #60a5fa; border-radius: 12px; font-size: 12px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-sync {
    padding: 6px 14px;
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sync:hover { background: rgba(16,185,129,0.25); }
.sync-info { font-size: 12px; color: var(--text-secondary); }

.btn-logout {
    padding: 6px 14px;
    background: rgba(239,68,68,0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover { background: rgba(239,68,68,0.2); }

/* ===== 内容区域 ===== */
.content-area { flex: 1; padding: 1.5rem 2rem; overflow-y: auto; }

/* ===== Section通用 ===== */
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s ease; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.section-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* ===== 按钮 ===== */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -5px rgba(37,99,235,0.4); }

/* 小号操作按钮（JS渲染用） */
.btn-sm { padding: 4px 10px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--text-primary); white-space: nowrap; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm:hover { transform: translateY(-1px); }
.btn-sm.btn-edit { color: var(--action-edit-color); border-color: var(--action-edit-border); background: var(--action-edit-bg); }
.btn-sm.btn-edit:hover { background: var(--action-edit-hover-bg); }
.btn-sm.btn-delete, .btn-sm.btn-danger { color: var(--action-delete-color); border-color: var(--action-delete-border); background: var(--action-delete-bg); }
.btn-sm.btn-delete:hover, .btn-sm.btn-danger:hover { background: var(--action-delete-hover-bg); }
.btn-sm.btn-view { color: var(--action-view-color); border-color: var(--action-view-border); background: var(--action-view-bg); }
.btn-sm.btn-view:hover { background: var(--action-view-hover-bg); }
.btn-sm.btn-upload { color: var(--action-upload-color); border-color: var(--action-upload-border); background: var(--action-upload-bg); }
.btn-sm.btn-upload:hover { background: var(--action-upload-hover-bg); }
.btn-sm.btn-download { color: var(--action-download-color); border-color: var(--action-download-border); background: var(--action-download-bg); }
.btn-sm.btn-download:hover { background: var(--action-download-hover-bg); }

/* 状态指示器（团队管理用） */
.status-indicator { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-indicator.status-online { background: rgba(16,185,129,0.15); color: #34d399; }
.status-indicator.status-offline { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* 组织架构图样式 */
.org-chart-container { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; margin-bottom: 1.5rem; min-height: 200px; }
.org-level { display: flex; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; position: relative; }
.org-level-title { width: 100%; text-align: center; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.org-node { display: inline-flex; flex-direction: column; align-items: center; padding: 12px 20px; background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: 12px; margin: 6px; min-width: 120px; }
.org-node-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.org-node-role { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.btn-secondary {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border, var(--border-color));
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover { background: var(--border-color); transform: translateY(-1px); }

/* 操作按钮 */
.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-action {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-primary);
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action.btn-edit { color: var(--action-edit-color); border-color: var(--action-edit-border); background: var(--action-edit-bg); }
.btn-action.btn-edit:hover { background: var(--action-edit-hover-bg); }
.btn-action.btn-delete { color: var(--action-delete-color); border-color: var(--action-delete-border); background: var(--action-delete-bg); }
.btn-action.btn-delete:hover { background: var(--action-delete-hover-bg); }
.btn-action.btn-view { color: var(--action-view-color); border-color: var(--action-view-border); background: var(--action-view-bg); }
.btn-action.btn-view:hover { background: var(--action-view-hover-bg); }
.btn-action.btn-upload { color: var(--action-upload-color); border-color: var(--action-upload-border); background: var(--action-upload-bg); }
.btn-action.btn-upload:hover { background: var(--action-upload-hover-bg); }
.btn-action.btn-download { color: var(--action-download-color); border-color: var(--action-download-border); background: var(--action-download-bg); }
.btn-action.btn-download:hover { background: var(--action-download-hover-bg); }

/* ===== 统计卡片 ===== */
.dashboard-stats { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 1.25rem; margin-bottom: 1.5rem; }

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px -5px rgba(0,0,0,0.3); }

.stat-icon {
    font-size: 1.75rem;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--glass-bg);
}

.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

/* ===== 图表卡片 ===== */
.dashboard-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.chart-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; }

.recent-activity {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.recent-activity h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; }

/* ===== 表格 ===== */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    overflow-x: auto;
}

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

.data-table th {
    background: rgba(255,255,255,0.03);
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== 进度条 ===== */
.progress-bar {
    position: relative;
    width: 100%;
    height: 22px;
    background: var(--border-color);
    border-radius: 11px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #059669);
    border-radius: 11px;
    transition: width 0.5s ease;
    min-width: 0;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===== 状态徽章 ===== */
.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

.status-planning, .status-draft { background: rgba(107,114,128,0.15); color: #9ca3af; }
.status-active, .status-signed, .status-online { background: rgba(16,185,129,0.15); color: #34d399; }
.status-completed { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-cancelled, .status-rejected { background: rgba(239,68,68,0.15); color: #f87171; }
.status-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-approved { background: rgba(16,185,129,0.15); color: #34d399; }
.status-todo { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-in_progress { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-sufficient { background: rgba(16,185,129,0.15); color: #34d399; }
.status-low { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-shortage { background: rgba(239,68,68,0.15); color: #f87171; }
.status-offline { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* ===== 筛选栏 ===== */
.filter-bar { margin-bottom: 1rem; }
.filter-bar select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

/* ===== 分类标签 ===== */
.category-tabs { display: flex; gap: 8px; margin-bottom: 1.25rem; flex-wrap: wrap; }

.category-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.category-btn:hover { color: var(--text-primary); border-color: var(--primary-color); }
.category-btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* ===== 文档网格 ===== */
.documents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

.document-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.document-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px -5px rgba(0,0,0,0.3); }
.document-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.document-name { font-size: 0.85rem; color: var(--text-primary); word-break: break-word; margin-bottom: 0.5rem; font-weight: 500; }
.document-size { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }
.document-date { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.document-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* ===== 任务看板 ===== */
.task-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.task-column {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
}

.task-column h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; text-align: center; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); }

.task-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.task-col-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.task-col-count { background: rgba(255,255,255,0.08); padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.task-col-body { display: flex; flex-direction: column; gap: 0.75rem; min-height: 80px; }

.task-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.task-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.task-title { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; font-size: 0.9rem; }
.task-assignee { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }

.task-priority { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 500; margin-bottom: 6px; }
.priority-high { background: rgba(239,68,68,0.15); color: #f87171; }
.priority-medium { background: rgba(245,158,11,0.15); color: #fbbf24; }
.priority-low { background: rgba(16,185,129,0.15); color: #34d399; }

/* 任务优先级标签（JS渲染用task-priority-*前缀） */
.task-priority-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 500; margin-bottom: 6px; }
.task-priority-high { background: rgba(239,68,68,0.15); color: #f87171; }
.task-priority-medium { background: rgba(245,158,11,0.15); color: #fbbf24; }
.task-priority-low { background: rgba(16,185,129,0.15); color: #34d399; }

.task-date { font-size: 11px; color: var(--text-secondary); }
.task-actions { margin-top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active { display: flex; }

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

.image-modal-content { max-width: 800px; }

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 { margin: 0; color: var(--text-primary); font-size: 1.25rem; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.modal-body { padding: 1.5rem; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border, var(--border-color));
    border-radius: 10px;
    font-size: 0.95rem;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--focus-ring); }
select.form-input { cursor: pointer; }

/* ===== 加载覆盖层 ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.loading-content { text-align: center; color: white; }

.loading {
    display: inline-block;
    width: 40px; height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ===== 团队统计 ===== */
.team-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

/* ===== 个人中心 ===== */
.profile-container { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; max-width: 900px; }

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    height: fit-content;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.profile-name { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.profile-role-badge { padding: 4px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; background: rgba(59,130,246,0.15); color: #60a5fa; }
.profile-meta { font-size: 12px; color: var(--text-secondary); }
.profile-form-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; }
.profile-form-card h3 { margin-bottom: 1.5rem; color: var(--text-primary); font-size: 1.1rem; }

/* ===== 组织架构 ===== */
.org-chart-container { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; margin-bottom: 1.5rem; min-height: 200px; }

/* ===== 动画 ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webki