﻿  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); color: #1e293b; line-height: 1.6; }
  .header { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); color: white; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.12); position: sticky; top: 0; z-index: 100; }
  .header h1 { font-size: 22px; font-weight: 600; letter-spacing: 0.5px; }
  .header-actions { display: flex; gap: 12px; align-items: center; }
  .btn { padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 6px; }
  .btn:hover { transform: scale(1.02); }
  .btn-primary { background: #10b981; color: white; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }
  .btn-primary:hover { background: #059669; box-shadow: 0 4px 12px rgba(16,185,129,0.4); }
  .btn-secondary { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
  .btn-secondary:hover { background: rgba(255,255,255,0.25); }
  .btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 6px; }
  .container { max-width: 1480px; margin: 0 auto; padding: 24px; }

  .section-title { font-size: 17px; font-weight: 600; color: #0f172a; margin: 32px 0 16px; display: flex; justify-content: space-between; align-items: center; position: relative; padding-bottom: 8px; cursor: pointer; user-select: none; transition: color 0.2s; }
  .section-title:hover { color: #1e40af; }
  .section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 48px; height: 3px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); border-radius: 2px; }
  .section-title .toggle-btn { font-size: 12px; font-weight: 500; cursor: pointer; color: #3b82f6; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 4px 12px; transition: all 0.2s; }
  .section-title .toggle-btn:hover { background: #dbeafe; transform: translateY(-1px); }
  .section-title .collapse-arrow { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 14px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin-left: 8px; flex-shrink: 0; }
  .section-title:hover .collapse-arrow { background: #e0e7ff; color: #4338ca; }
  .section-title.collapsed .collapse-arrow { transform: rotate(-90deg); }
  .section-title .section-label { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }

  .kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 8px; }
  .kpi-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); opacity: 0; transform: translateY(12px); animation: kpiFadeIn 0.5s ease forwards; }
  .kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
  .kpi-card:nth-child(1) { animation-delay: 0ms; }
  .kpi-card:nth-child(2) { animation-delay: 100ms; }
  .kpi-card:nth-child(3) { animation-delay: 200ms; }
  .kpi-card:nth-child(4) { animation-delay: 300ms; }
  .kpi-card:nth-child(5) { animation-delay: 400ms; }
  .kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
  .kpi-card.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
  .kpi-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
  .kpi-card.orange::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
  .kpi-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
  .kpi-card.cyan::before { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
  .kpi-icon { font-size: 20px; margin-bottom: 6px; }
  .kpi-label { font-size: 12px; color: #64748b; margin-bottom: 6px; font-weight: 500; letter-spacing: 0.3px; }
  .kpi-value { font-size: 26px; font-weight: 700; color: #0f172a; line-height: 1.2; }
  .kpi-unit { font-size: 12px; color: #94a3b8; font-weight: 400; margin-left: 3px; }
  .kpi-sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }

  @keyframes kpiFadeIn { to { opacity: 1; transform: translateY(0); } }

  .charts-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 8px; }
  .charts-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
  .chart-card { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); transition: all 0.3s ease; }
  .chart-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); transform: translateY(-1px); }
  .chart-title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 6px; }
  .chart-title .hint { font-size: 11px; font-weight: 400; color: #94a3b8; margin-left: 4px; }
  .chart-container { width: 100%; height: 300px; cursor: pointer; }

  .winner-panel { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 14px; transition: all 0.3s ease; }
  .winner-panel:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
  .winner-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .winner-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .winner-table th, .winner-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }
  .winner-table th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 11px; }
  .winner-table tr:hover td { background: #f8fafc; }
  .winner-link { color: #3b82f6; cursor: pointer; text-decoration: underline; font-weight: 500; }
  .winner-link:hover { color: #1e40af; }
  .winner-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-right: 4px; margin-bottom: 2px; cursor: pointer; transition: all 0.2s; }
  .winner-tag:hover { opacity: 0.85; transform: translateY(-1px); }
  .winner-tag-blue { background: #dbeafe; color: #1e40af; }
  .winner-tag-green { background: #d1fae5; color: #065f46; }
  .winner-tag-orange { background: #fef3c7; color: #92400e; }
  .winner-tag-red { background: #fee2e2; color: #991b1b; }
  .collapse-content { overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); max-height: 6000px; }
  .collapse-content.collapsed { max-height: 0; padding: 0; margin: 0; overflow: hidden; }

  .filter-card { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 14px; transition: all 0.3s ease; }
  .filter-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
  .filter-title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 12px; }
  .filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
  .filter-group { display: flex; flex-direction: column; gap: 4px; }
  .filter-group label { font-size: 12px; font-weight: 500; color: #475569; }
  .filter-group select, .filter-group input { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; background: white; transition: all 0.2s; }
  .filter-group select:focus, .filter-group input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
  .checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
  .checkbox-group label { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; padding: 3px 8px; border-radius: 4px; transition: all 0.2s; }
  .checkbox-group label:hover { background: #f1f5f9; }
  .checkbox-group input { width: 14px; height: 14px; accent-color: #3b82f6; }

  .table-card { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); transition: all 0.3s ease; }
  .table-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
  .table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .table-title { font-size: 14px; font-weight: 600; color: #334155; }
  .table-info { font-size: 12px; color: #64748b; }
  .table-wrap { overflow-x: auto; border-radius: 8px; }
  table { width: 100%; border-collapse: collapse; font-size: 12px; }
  th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }
  th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 11px; cursor: pointer; user-select: none; }
  th:hover { background: #f1f5f9; }
  tr:hover td { background: #f8fafc; }
  .tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500; margin-right: 3px; margin-bottom: 2px; cursor: pointer; transition: all 0.2s; }
  .tag:hover { opacity: 0.85; transform: translateY(-1px); }
  .tag-blue { background: #dbeafe; color: #1e40af; }
  .tag-green { background: #d1fae5; color: #065f46; }
  .tag-orange { background: #fef3c7; color: #92400e; }
  .tag-purple { background: #ede9fe; color: #5b21b6; }
  .tag-gray { background: #f1f5f9; color: #475569; }
  .tag-red { background: #fee2e2; color: #991b1b; }
  .tag-cyan { background: #cffafe; color: #155e75; }

  .pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
  .pagination button { padding: 5px 10px; border: 1px solid #e2e8f0; background: white; border-radius: 6px; cursor: pointer; font-size: 12px; color: #475569; transition: all 0.2s; }
  .pagination button:hover:not(:disabled) { background: #f1f5f9; transform: translateY(-1px); }
  .pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
  .pagination button.active { background: #3b82f6; color: white; border-color: #3b82f6; }
  .pagination .page-info { font-size: 12px; color: #64748b; margin: 0 8px; }

  .upload-overlay, .detail-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.55); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s ease; }
  .upload-overlay.active, .detail-overlay.active { display: flex; opacity: 1; }
  .upload-box { background: white; padding: 32px; border-radius: 16px; text-align: center; max-width: 380px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
  .upload-overlay.active .upload-box { transform: scale(1); }
  .upload-box h3 { margin-bottom: 12px; color: #0f172a; font-size: 18px; }
  .upload-box p { color: #64748b; margin-bottom: 20px; font-size: 13px; }
  .file-input-wrapper { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 24px; cursor: pointer; transition: all 0.25s; }
  .file-input-wrapper:hover { border-color: #3b82f6; background: #f8fafc; }
  .file-input-wrapper input { display: none; }
  .detail-box { background: white; border-radius: 16px; width: 90%; max-width: 1000px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2); transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
  .detail-overlay.active .detail-box { transform: scale(1); }
  .detail-header { padding: 18px 24px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
  .detail-header h3 { font-size: 16px; color: #0f172a; font-weight: 600; }
  .detail-close { background: #f1f5f9; border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 20px; color: #64748b; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
  .detail-close:hover { background: #e2e8f0; color: #334155; transform: rotate(90deg); }
  .detail-body { padding: 18px 24px; overflow-y: auto; flex: 1; }
  .detail-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
  .detail-kpi-item { background: #f8fafc; border-radius: 8px; padding: 12px; text-align: center; transition: all 0.2s; }
  .detail-kpi-item:hover { background: #f1f5f9; transform: translateY(-1px); }
  .detail-kpi-value { font-size: 18px; font-weight: 700; color: #1e40af; }
  .detail-kpi-label { font-size: 11px; color: #64748b; margin-top: 3px; }
  .detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .detail-table th { background: #f8fafc; padding: 10px; font-size: 11px; font-weight: 600; color: #475569; }
  .detail-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }
  .detail-table tr:hover td { background: #f8fafc; }
  .detail-info-row { display: flex; gap: 16px; margin-bottom: 10px; font-size: 13px; }
  .detail-info-row .label { color: #64748b; min-width: 80px; font-weight: 500; }
  .detail-info-row .value { color: #0f172a; font-weight: 500; }
  .external-link { color: #3b82f6; text-decoration: underline; cursor: pointer; font-weight: 500; }
  .external-link:hover { color: #1e40af; }

  @media (prefers-reduced-motion: reduce) {
    .kpi-card, .chart-card, .winner-panel, .filter-card, .table-card, .btn, .tag, .winner-tag, .pagination button, .detail-close, .detail-kpi-item { transition: none !important; animation: none !important; }
    .kpi-card { opacity: 1; transform: none; }
  }
  /* 平板 768px - 1024px */
  @media (max-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .charts-grid-2 { grid-template-columns: 1fr; }
    .charts-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .winner-grid { grid-template-columns: 1fr; }
    .detail-kpi { grid-template-columns: repeat(2, 1fr); }
    .container { padding: 18px; }
    .header { padding: 16px 20px; }
    .header h1 { font-size: 18px; }
    .chart-container { height: 260px; }
    #chart-client.chart-container { height: 380px; }
    .section-title { font-size: 15px; margin: 24px 0 12px; }
    .winner-table th, .winner-table td { padding: 8px 10px; font-size: 11px; }
  }
  /* 手机 < 768px */
  @media (max-width: 767px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .charts-grid-3 { grid-template-columns: 1fr; }
    .kpi-card { padding: 14px; border-radius: 10px; }
    .kpi-icon { font-size: 18px; }
    .kpi-label { font-size: 11px; }
    .kpi-value { font-size: 20px; }
    .header { flex-direction: column; gap: 10px; text-align: center; padding: 14px 16px; }
    .header h1 { font-size: 16px; }
    .header-actions { gap: 8px; flex-wrap: wrap; justify-content: center; }
    .btn { padding: 7px 14px; font-size: 12px; min-height: 36px; }
    .container { padding: 12px; }
    .chart-container { height: 220px; }
    #chart-client.chart-container { height: 320px; }
    #chart-scale.chart-container { height: 220px; }
    .chart-card { padding: 12px; border-radius: 10px; }
    .chart-title { font-size: 13px; }
    .section-title { font-size: 14px; margin: 20px 0 10px; }
    .filter-card { padding: 12px; }
    .filter-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .filter-group select, .filter-group input { padding: 8px 10px; font-size: 13px; min-height: 40px; border-radius: 8px; }
    .checkbox-group { gap: 8px; }
    .checkbox-group label { font-size: 11px; padding: 4px 8px; }
    .checkbox-group input { width: 16px; height: 16px; }
    .winner-panel { padding: 14px; }
    .winner-table th, .winner-table td { padding: 8px; font-size: 11px; }
    .table-wrap { -webkit-overflow-scrolling: touch; }
    table { font-size: 11px; }
    th, td { padding: 8px 10px; }
    .pagination { gap: 4px; }
    .pagination button { padding: 6px 10px; font-size: 11px; min-height: 36px; min-width: 36px; }
    .upload-box { padding: 24px; max-width: 340px; }
    .detail-box { width: 95%; max-height: 90vh; }
    .detail-header { padding: 14px 16px; }
    .detail-body { padding: 14px 16px; }
    .detail-kpi { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .detail-info-row { flex-direction: column; gap: 4px; font-size: 12px; }
    .detail-info-row .label { min-width: auto; }
  }
  /* 小手机 < 480px */
  @media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr; }
    .chart-container { height: 200px; }
    #chart-client.chart-container { height: 280px; }
    .header-actions { width: 100%; }
    .btn { flex: 1; justify-content: center; }
    .checkbox-group label { font-size: 10px; }
    .winner-table { font-size: 10px; }
    .winner-table th, .winner-table td { padding: 6px 8px; }
  }
  /* iOS 安全区域适配 */
  @supports (padding-top: env(safe-area-inset-top)) {
    .header { padding-top: calc(14px + env(safe-area-inset-top)); padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
    .container { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:0.5; } 50% { opacity:1; } }
.sort-icon { font-size:10px; color:#3b82f6; }
.sort-icon::after { content: '⇅'; opacity:0.3; }
.sort-icon.asc::after { content: '↑'; opacity:1; }
.sort-icon.desc::after { content: '↓'; opacity:1; }

/* 导航栏 */
.nav-bar { display: flex; gap: 0; background: rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; margin-left: 16px; }
.nav-item { padding: 7px 16px; font-size: 13px; color: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.2s; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.15); border-bottom-color: #10b981; font-weight: 500; }
.header { flex-wrap: wrap; }
.header-nav { display: flex; align-items: center; flex: 1; min-width: 0; }

@media (max-width: 767px) {
  .nav-bar { margin-left: 0; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-item { padding: 6px 12px; font-size: 12px; }
}
@media (max-width: 480px) {
  .header { flex-direction: column; }
  .header-nav { width: 100%; }
  .nav-bar { width: 100%; }
}

/* 有前景项目管理表格 */
#promising-table { font-size: 12px; }
#promising-table th { white-space: nowrap; }
#promising-table input[type="email"], #promising-table input[type="text"] { font-size: 11px; }
#promising-table td { vertical-align: top; }

/* 进度日志弹窗 */
#progress-modal .detail-box, #progress-view-modal .detail-box { max-height: 80vh; }
#progress-view-body { max-height: 60vh; overflow-y: auto; }
textarea { font-family: inherit; }
