/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4a90e2;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --gray-100: #fafafa;
    --gray-200: #f0f0f0;
    --gray-300: #d9d9d9;
    --gray-400: #bfbfbf;
    --gray-500: #8c8c8c;
    --gray-600: #595959;
    --gray-700: #434343;
    --gray-800: #262626;
    --gray-900: #141414;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--light-bg);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ===== 顶部导航栏 ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-right {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

/* ===== 导航标签页 ===== */
.nav-tabs {
    background: var(--white);
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 64px;
    z-index: 99;
}

.nav-tabs::-webkit-scrollbar {
    height: 0;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--gray-200);
    color: var(--primary-color);
}

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

/* ===== 主内容区 ===== */
.main-content {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

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

/* ===== 区域头部 ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--gray-800);
}

/* ===== 按钮样式 ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--info-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

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

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

/* ===== 统计卡片 ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card.blue {
    border-top: 4px solid var(--info-color);
}

.stat-card.green {
    border-top: 4px solid var(--success-color);
}

.stat-card.red {
    border-top: 4px solid var(--danger-color);
}

.stat-card.orange {
    border-top: 4px solid var(--warning-color);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card.blue .stat-number {
    color: var(--info-color);
}

.stat-card.green .stat-number {
    color: var(--success-color);
}

.stat-card.red .stat-number {
    color: var(--danger-color);
}

.stat-card.orange .stat-number {
    color: var(--warning-color);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== 卡片样式 ===== */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--gray-700);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    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);
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

/* ===== 模态框样式 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-close:hover {
    color: var(--gray-800);
}

.modal-content h2 {
    margin-bottom: 24px;
    color: var(--gray-800);
}

/* ===== 项目网格 ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.project-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--gray-800);
}

.project-card .project-meta {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.project-card .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.project-card .progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s;
}

.project-card .project-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ===== 人员列表 ===== */
.personnel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.personnel-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--info-color);
}

.personnel-card.watch {
    border-left-color: var(--danger-color);
}

.personnel-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.personnel-card .personnel-role {
    display: inline-block;
    padding: 4px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.personnel-card .personnel-meta {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.personnel-card .warning-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--danger-color);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
}

/* ===== 过滤栏 ===== */
.filter-bar,
.personnel-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-btn,
.personnel-tab-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover,
.personnel-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* ===== 任务列表 ===== */
.task-list,
.update-list,
.records-list,
.tech-list,
.warnings-list {
    list-style: none;
}

.task-item,
.update-item,
.record-item,
.tech-item,
.warning-item {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-item:last-child,
.update-item:last-child,
.record-item:last-child,
.tech-item:last-child,
.warning-item:last-child {
    border-bottom: none;
}

.task-item .task-priority {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.task-priority.high {
    background: var(--danger-color);
}

.task-priority.medium {
    background: var(--warning-color);
}

.task-priority.low {
    background: var(--success-color);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-content {
    text-decoration: line-through;
}

/* ===== 平台统计 ===== */
.platform-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.platform-card {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius);
}

.platform-card h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--gray-700);
}

.platform-metric {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.platform-metric span {
    color: var(--gray-500);
}

.platform-metric strong {
    color: var(--gray-800);
}

/* ===== 外包团队卡片 ===== */
.outsource-teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.team-card {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius);
}

.team-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.team-card p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

/* ===== 合作方列表 ===== */
.collaboration-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.collaboration-item {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius);
}

.collaboration-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.collaboration-item p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

/* ===== 预警样式 ===== */
.warning-item {
    border-left: 4px solid var(--gray-300);
}

.warning-item.red {
    border-left-color: var(--danger-color);
    background: #fff2f0;
}

.warning-item.yellow {
    border-left-color: var(--warning-color);
    background: #fffbe6;
}

.warning-item.green {
    border-left-color: var(--success-color);
    background: #f6ffed;
}

.warning-icon {
    font-size: 24px;
    margin-right: 12px;
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.warning-content p {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== 空状态提示 ===== */
.empty-hint {
    text-align: center;
    color: var(--gray-400);
    padding: 24px;
    font-size: 14px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .header h1 {
        font-size: 20px;
    }

    .nav-tabs {
        padding: 8px 16px;
        top: 96px;
    }

    .main-content {
        padding: 0 16px;
        margin: 16px auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid,
    .personnel-list,
    .platform-stats,
    .outsource-teams,
    .collaboration-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

// ===== 客户接待相关样式 =====

.customer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.stat-number-small {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label-small {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== 日报功能样式 ===== */

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-item {
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.report-date {
    color: var(--gray-500);
    font-size: 12px;
}

.report-content {
    font-size: 14px;
    line-height: 1.6;
}

.report-content div {
    margin-bottom: 4px;
}

.report-content strong {
    color: var(--gray-700);
}

/* ===== 响应式设计：客户统计 ===== */

@media (max-width: 768px) {
    .customer-stats {
        grid-template-columns: 1fr;
    }
}
