/* ============================================
   无忧传媒 · KOC项目管理看板
   样式文件 — 高级暖色主题 v3（精致干净版）
   设计理念：暖色但干净 · 克制高级 · 排版精致
   所有 class 名保持与 app.js 引用一致
   ============================================ */

:root {
  /* ===== 色彩系统（高级暖色 — 干净、克制、有层次）===== */
  --bg: #faf6f1;
  --bg-2: #fefaf7;
  --card-bg: #ffffff;
  --card-bg-soft: #fffdfb;
  --primary: #c9513e;
  --primary-2: #d46a4a;
  --primary-light: #fdf0eb;
  --primary-dark: #a33f2e;
  --accent-gradient: linear-gradient(135deg, #e07850 0%, #c9513e 55%, #b83d3d 100%);
  --accent-gradient-soft: linear-gradient(135deg, #fef5f0 0%, #fce8e0 100%);
  --success: #2d9d6e;
  --success-light: #edfaf4;
  --warning: #d4940a;
  --warning-light: #fef8ec;
  --danger: #dc4545;
  --danger-light: #fef2f1;
  --text-primary: #2c2420;
  --text-secondary: #7a6d66;
  --text-tertiary: #b0a199;
  --border: #ede4db;
  --border-light: #f7f0ea;
  --sidebar-bg: rgba(255,252,249,0.88);
  --hover-bg: #fef3ed;

  /* ===== 字体系统（精致层级）===== */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* ===== 圆角（统一柔和）===== */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  /* ===== 阴影（分层、干净、不脏）===== */
  --shadow-sm: 0 1px 2px rgba(44,36,32,0.03);
  --shadow: 0 2px 12px rgba(44,36,32,0.05), 0 1px 3px rgba(44,36,32,0.03);
  --shadow-lg: 0 12px 40px rgba(201,81,62,0.12), 0 4px 12px rgba(44,36,32,0.04);
  --shadow-card: 0 1px 6px rgba(44,36,32,0.04), 0 4px 16px rgba(44,36,32,0.03);
  --ring: 0 0 0 3px rgba(201,81,62,0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 15px; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1000px 500px at 85% -5%, rgba(232,120,80,0.07), transparent 58%),
    radial-gradient(800px 450px at -2% 10%, rgba(201,81,62,0.06), transparent 52%),
    linear-gradient(175deg, var(--bg-2) 0%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 0.866rem; /* ~13px body text */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== 布局 ===== */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 228px;
  background: var(--sidebar-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--accent-gradient-soft), transparent);
}

.sidebar-header .logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header .logo .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 3px rgba(201,81,62,0.18);
  animation: breathe 3.5s ease-in-out infinite;
}

.sidebar-header .subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-left: 17px;
}

.nav {
  padding: 12px 10px;
  flex: 1;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  margin-bottom: 2px;
  user-select: none;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--accent-gradient);
  transform: translateY(-50%);
  transition: height 0.25s cubic-bezier(.21,.61,.35,1);
}

.nav-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--accent-gradient-soft);
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active::before { height: 56%; }

.nav-item .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item .nav-icon .ico-svg { width: 18px; height: 18px; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 11.5px;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.6);
}

.sidebar-footer .btn-sm {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  padding: 24px 32px 40px;
  max-width: 100%;
  overflow-x: hidden;
}

.page-header {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease both;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  line-height: 1.3;
}

.page-header .breadcrumb {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-gradient-soft);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

/* ===== 卡片通用 ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.05s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201,81,62,0.12);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.15px;
}

.card-title::before {
  content: "";
  width: 4px;
  height: 15px;
  background: var(--accent-gradient);
  border-radius: 3px;
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  gap: 8px;
}

/* ===== 指标卡片（核心重设计：紧凑、精致、对齐）===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(.21,.61,.35,1), box-shadow 0.28s ease;
  border: 1px solid var(--border-light);
  animation: fadeInUp 0.55s cubic-bezier(.21,.61,.35,1) both;
  display: flex;
  flex-direction: column;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -30%; right: -25%;
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(201,81,62,0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover::after { opacity: 1; }

.metric-card .metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(201,81,62,0.14);
  flex-shrink: 0;
}
.metric-card .metric-icon .ico-svg { width: 18px; height: 18px; }

.metric-card .metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.metric-card .metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.metric-card .metric-sub {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 6px;
  line-height: 1.45;
}

.metric-card .metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

.metric-trend.up { color: var(--success); background: var(--success-light); }
.metric-trend.down { color: var(--danger); background: var(--danger-light); }

/* 指标卡片颜色变体 */
.metric-card.blue .metric-icon { background: linear-gradient(135deg, #e8f4f8, #cce5ee); color: #1a7a8a; }
.metric-card.green .metric-icon { background: linear-gradient(135deg, #eaf5ef, #cde8da); color: #238a4a; }
.metric-card.orange .metric-icon { background: linear-gradient(135deg, #fef3e6, #fce0c8); color: #b5631a; }
.metric-card.purple .metric-icon { background: linear-gradient(135deg, #fef0f3, #fad8e0); color: #bf3555; }

.metric-card.blue:hover { border-color: rgba(26,122,138,0.28); }
.metric-card.green:hover { border-color: rgba(35,138,74,0.28); }
.metric-card.orange:hover { border-color: rgba(181,99,26,0.28); }
.metric-card.purple:hover { border-color: rgba(191,53,85,0.28); }

/* ===== 图表区（修复空白 + 精致化）===== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.chart-container {
  background: var(--card-bg);
  border-radius: 13px;
  box-shadow:
    0 1px 3px rgba(44,36,32,0.04),
    0 4px 16px rgba(44,36,32,0.06);
  padding: 22px 20px 18px;
  border: 1px solid var(--border-light);
  animation: chartRiseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
  overflow: hidden;
}

.chart-container:nth-child(2) { animation-delay: 0.12s; }

@keyframes chartRiseIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 图表容器 idle 呼吸光晕 */
@keyframes chartGlowPulse {
  0%, 100% { box-shadow: 0 1px 3px rgba(44,36,32,0.04), 0 4px 16px rgba(44,36,32,0.06); }
  50%      { box-shadow: 0 1px 3px rgba(44,36,32,0.04), 0 4px 24px rgba(201,81,62,0.08), 0 0 0 1px rgba(201,81,62,0.05); }
}
@media (prefers-reduced-motion: no-preference) {
  .chart-container { animation: chartRiseIn 0.6s cubic-bezier(0.22,1,0.36,1) both, chartGlowPulse 5s ease-in-out 0.8s infinite; }
  .chart-container:nth-child(2) { animation-delay: 0.12s, 0.92s; }
}
@media (prefers-reduced-motion: reduce) {
  .chart-container { animation: none; }
}

.chart-container .chart-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.2px;
  color: #3d302a;
}

.chart-container .chart-title::before {
  content: "";
  width: 3.5px;
  height: 15px;
  background: linear-gradient(180deg, #c9513e, #e87a3a);
  border-radius: 2.5px;
  flex-shrink: 0;
}

.chart-wrapper {
  position: relative;
  height: 260px;
  width: 100%;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== 表格 ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.08s;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: var(--card-bg);
}

table thead th {
  background: linear-gradient(180deg, #faf8f5, #f5f0eb);
  color: var(--text-secondary);
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 12px;
  letter-spacing: 0.2px;
}

table thead th:hover {
  background: var(--primary-light);
  color: var(--primary);
}

table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

table tbody tr {
  transition: background 0.18s ease;
}

table tbody tr:hover {
  background: linear-gradient(90deg, rgba(201,81,62,0.04), rgba(212,106,74,0.03));
}

table tbody tr:nth-child(even) { background: rgba(250,246,241,0.5); }
table tbody tr:nth-child(even):hover { background: linear-gradient(90deg, rgba(201,81,62,0.04), rgba(212,106,74,0.03)); }
table tbody tr:last-child td { border-bottom: none; }

table tbody tr.summary-row td {
  background: var(--accent-gradient-soft);
  font-weight: 800;
  color: var(--primary);
}

/* ===== 状态标签 ===== */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(44,36,32,0.03);
}

.status-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px currentColor;
  opacity: 0.4;
}

/* ===== 进度条 ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(44,36,32,0.04);
}

.progress-bar .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px rgba(201,81,62,0.35);
  transition: width 0.6s cubic-bezier(.21,.61,.35,1);
  position: relative;
}

.progress-bar .fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

/* ===== 项目卡片 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(.21,.61,.35,1), box-shadow 0.28s ease, border-color 0.25s ease;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s cubic-bezier(.21,.61,.35,1) both;
}

.project-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201,81,62,0.15);
}

.project-card:hover::before { opacity: 1; }

.project-card .pc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-card .pc-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.project-card .pc-id {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.project-card .pc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.project-card .pc-metric {
  background: linear-gradient(180deg, #fffdfb, #faf6f1);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  border: 1px solid var(--border-light);
}

.project-card .pc-metric .label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.project-card .pc-metric .value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.project-card .pc-progress { margin-top: 12px; }

.project-card .pc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

/* ===== 项目详情 ===== */
.project-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  animation: fadeInUp 0.4s ease both;
}

.back-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.back-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(201,81,62,0.25);
  transform: translateX(-2px);
}

.tabs {
  display: flex;
  gap: 3px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.18s ease;
  white-space: nowrap;
  position: relative;
}

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

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

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

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

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

/* ===== 方案展示 ===== */
.plan-section {
  margin-bottom: 18px;
  animation: fadeInUp 0.45s ease both;
}

.plan-section .plan-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.plan-section .plan-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.8;
  background: linear-gradient(180deg, #fffdfb, #faf6f1);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  border: 1px solid var(--border-light);
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  opacity: 0.25;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
  animation: fadeInLeft 0.5s ease both;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 3px rgba(201,81,62,0.12);
  transition: transform 0.2s ease;
}

.timeline-item:hover::before { transform: scale(1.2); }

.timeline-item.done::before { background: var(--success); box-shadow: 0 0 0 3px rgba(45,157,110,0.18); }
.timeline-item.active::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(201,81,62,0.2); animation: pulse 2s infinite; }
.timeline-item.pending::before { background: var(--text-tertiary); }

.timeline-item .tl-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-item .tl-date {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.timeline-item .tl-status { margin-top: 3px; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-tertiary);
  animation: fadeInUp 0.5s ease both;
}

.empty-state .empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-gradient-soft);
  animation: float 3.2s ease-in-out infinite;
}

.empty-state .empty-text {
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--text-secondary);
  font-weight: 600;
}

.empty-state .empty-hint {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ===== 资源列表 ===== */
.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.45s ease both;
}

.resource-item:hover {
  background: var(--primary-light);
  border-color: rgba(201,81,62,0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.resource-item .res-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.resource-item .res-icon .ico-svg { width: 18px; height: 18px; }

.resource-item .res-info {
  flex: 1;
  min-width: 0;
}

.resource-item .res-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-item .res-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-weight: 500;
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.search-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  width: 200px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-weight: 500;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

/* ===== 模态框 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44,36,32,0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(44,36,32,0.20);
  max-width: 820px;
  width: 92%;
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.7);
  animation: modalIn 0.32s cubic-bezier(.21,.61,.35,1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 2;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: var(--hover-bg);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px 24px;
}

/* ===== 提示信息条（修复对齐）===== */
.info-banner {
  background: linear-gradient(120deg, var(--accent-gradient-soft), #fff8f2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.4s ease both;
  line-height: 1.5;
  border-left: 3px solid var(--primary);
}

.info-banner .banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 3px 10px rgba(201,81,62,0.2);
}
.info-banner .banner-icon .ico-svg { width: 15px; height: 15px; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .sidebar { width: 190px; }
  .main-content { padding: 20px 22px 36px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 16px 14px 32px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

/* ===== 加载 / 错误状态 ===== */
.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.error-banner {
  margin: 36px;
  padding: 22px;
  background: var(--danger-light);
  border: 1px solid #fddddd;
  color: #c43c3c;
  border-radius: var(--radius);
  text-align: center;
  line-height: 1.75;
  animation: fadeInUp 0.4s ease both;
}

/* ===== 录入按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.btn .ico-svg { width: 14px; height: 14px; }
.btn:hover { background: #fafafa; border-color: var(--border); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(201,81,62,0.28); }
.btn-primary:hover { background: linear-gradient(135deg, #d46a4a, #b83d3d); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,81,62,0.38); }
.btn-success { background: linear-gradient(135deg, #3ab568, #2d9d6e); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(45,157,110,0.25); }
.btn-success:hover { background: linear-gradient(135deg, #2d9d6e, #238a4a); transform: translateY(-2px); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fddddd; }
.btn-danger:hover { background: var(--danger-light); color: #c43c3c; }
.btn-sm { padding: 5px 11px; font-size: 11.5px; border-radius: 7px; }
.card-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }

/* ===== 表单样式 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.form-field input, .form-field select, .form-field textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px;
  font-family: inherit; color: var(--text-primary); background: #fff; transition: border-color .18s, box-shadow .18s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.form-field textarea { resize: vertical; min-height: 64px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-hint { font-size: 11.5px; color: var(--text-tertiary); }
.sub-form-section { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.sub-form-section h4 { margin: 0 0 12px; font-size: 13.5px; color: var(--text-primary); font-weight: 700; }

/* 表格内行操作 */
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.icon-btn {
  border: none; background: transparent; cursor: pointer; font-size: 14px; padding: 3px 5px; border-radius: 6px;
  transition: all 0.16s ease;
}
.icon-btn:hover { background: var(--primary-light); transform: scale(1.12); }
.koc-row { cursor: pointer; }
.koc-row:hover { background: var(--primary-light) !important; }

/* ===== Toast 提示 ===== */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-24px);
  padding: 10px 22px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #fff;
  z-index: 9999; opacity: 0; transition: all .35s cubic-bezier(.21,.61,.35,1);
  box-shadow: 0 10px 28px rgba(44,36,32,0.18); pointer-events: none;
  display: flex; align-items: center; gap: 7px;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-ok { background: linear-gradient(135deg, #3ab568, #2d9d6e); }
.toast-err { background: linear-gradient(135deg, #ef6b6b, #dc4545); }

/* ===== 只读模式 ===== */
body.readonly .btn-primary { display: none !important; }
body.readonly .row-actions { display: none !important; }

/* ===== 登录页 ===== */
.login-overlay {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background:
    radial-gradient(850px 480px at 78% 12%, rgba(212,106,74,0.28), transparent 58%),
    radial-gradient(750px 420px at 15% 85%, rgba(201,81,62,0.35), transparent 58%),
    linear-gradient(145deg, #5c2e24 0%, #a34830 50%, #c9513e 100%);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}
.login-card {
  width: 350px; max-width: 92vw; background: rgba(255,255,255,0.97);
  border-radius: 20px; padding: 32px 28px; box-shadow: 0 28px 64px rgba(44,36,32,0.28);
  backdrop-filter: blur(10px);
  animation: modalIn 0.4s cubic-bezier(.21,.61,.35,1);
  border: 1px solid rgba(255,255,255,0.65);
}
.login-brand { font-size: 17px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.login-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-gradient); display: inline-block; box-shadow: 0 0 0 3px rgba(201,81,62,0.18); animation: breathe 3.5s ease-in-out infinite; }
.login-sub { font-size: 11.5px; color: var(--text-tertiary); margin: 4px 0 18px; }
.login-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.login-input {
  width: 100%; padding: 11px 13px; margin-bottom: 11px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13.5px; box-sizing: border-box; font-family: inherit; transition: border-color .18s, box-shadow .18s;
}
.login-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.login-error { color: var(--danger); font-size: 12px; min-height: 17px; margin-bottom: 5px; }
.login-btn {
  width: 100%; padding: 11px; background: var(--accent-gradient); color: #fff; border: none;
  border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(201,81,62,0.30); transition: all .18s ease;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201,81,62,0.40); }
.login-btn:active { transform: translateY(0); }
.login-foot { font-size: 11px; color: var(--text-tertiary); text-align: center; margin-top: 16px; }

/* ===== 侧栏用户区 / 角色标签 ===== */
.sidebar-user { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.user-badge { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.user-name { font-weight: 700; color: var(--text-primary); }
.role-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; color: #fff; font-weight: 600; }
.role-tag.role-super { background: linear-gradient(135deg, #dc4545, #c93c3c); }
.role-tag.role-admin { background: var(--accent-gradient); }

body.role-admin .action-delete { display: none !important; }

/* ===== 账号管理弹窗 ===== */
.um-add { background: #faf8f5; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.um-add-title { font-size: 12.5px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.um-list { display: flex; flex-direction: column; gap: 8px; }
.um-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; transition: all .18s ease; }
.um-row:hover { border-color: rgba(201,81,62,0.25); background: var(--primary-light); }
.um-info { font-size: 12.5px; line-height: 1.45; }
.um-uname { color: var(--text-tertiary); font-size: 11.5px; }
.um-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== 更新提示条 ===== */
#updateBanner {
  background: linear-gradient(135deg, #fef0e6, #fce8dc);
  border: 1px solid #f5d4bc;
  color: #a33f2e;
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  box-shadow: 0 6px 16px rgba(201,81,62,0.12);
  transition: all 0.25s ease;
  animation: slideDown 0.4s cubic-bezier(.21,.61,.35,1), bannerPulse 3.5s ease-in-out infinite 0.4s;
}
#updateBanner:hover {
  background: linear-gradient(135deg, #fce8dc, #fadcc8);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(201,81,62,0.18);
}

/* ============================================================
   动效关键帧
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 3px rgba(201,81,62,0.20); }
  50% { box-shadow: 0 0 0 7px rgba(201,81,62,0); }
  100% { box-shadow: 0 0 0 3px rgba(201,81,62,0.20); }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,81,62,0.16); }
  50% { box-shadow: 0 0 0 6px rgba(201,81,62,0.04); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 指标卡 / 项目卡 / 表格行 交错入场 */
.metrics-grid .metric-card:nth-child(1) { animation-delay: 0.03s; }
.metrics-grid .metric-card:nth-child(2) { animation-delay: 0.07s; }
.metrics-grid .metric-card:nth-child(3) { animation-delay: 0.11s; }
.metrics-grid .metric-card:nth-child(4) { animation-delay: 0.15s; }
.metrics-grid .metric-card:nth-child(5) { animation-delay: 0.19s; }
.metrics-grid .metric-card:nth-child(6) { animation-delay: 0.23s; }
.metrics-grid .metric-card:nth-child(7) { animation-delay: 0.27s; }
.metrics-grid .metric-card:nth-child(8) { animation-delay: 0.31s; }
.project-grid .project-card:nth-child(1) { animation-delay: 0.03s; }
.project-grid .project-card:nth-child(2) { animation-delay: 0.07s; }
.project-grid .project-card:nth-child(3) { animation-delay: 0.11s; }
.project-grid .project-card:nth-child(4) { animation-delay: 0.15s; }
.project-grid .project-card:nth-child(5) { animation-delay: 0.19s; }
.project-grid .project-card:nth-child(6) { animation-delay: 0.23s; }
.project-grid .project-card:nth-child(7) { animation-delay: 0.27s; }
.project-grid .project-card:nth-child(8) { animation-delay: 0.31s; }
.timeline-item:nth-child(1) { animation-delay: 0.04s; }
.timeline-item:nth-child(2) { animation-delay: 0.09s; }
.timeline-item:nth-child(3) { animation-delay: 0.14s; }
.timeline-item:nth-child(4) { animation-delay: 0.19s; }
.timeline-item:nth-child(5) { animation-delay: 0.24s; }
.timeline-item:nth-child(6) { animation-delay: 0.29s; }

/* ============================================================
   高级动效增强层（非破坏性）
   ============================================================ */

/* 鼠标跟随光斑 */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,106,74,0.12), rgba(201,81,62,0.07) 42%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 40;
  mix-blend-mode: screen;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: left, top;
}
.cursor-glow.show { opacity: 1; }

/* 背景极光流动 — 已收敛：原版 blur(24px) 过重导致背景显脏 */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 75% 5%, rgba(212,106,74,0.04), transparent 60%),
    radial-gradient(35% 25% at 10% 90%, rgba(201,81,62,0.03), transparent 55%);
  animation: aurora 28s ease-in-out infinite alternate;
  filter: blur(40px);
}

/* 导航滑动指示条 */
.nav-indicator {
  position: absolute;
  left: 10px; right: 10px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201,81,62,0.10), rgba(212,106,74,0.08));
  box-shadow: inset 0 0 0 1px rgba(201,81,62,0.12);
  transition: transform 0.32s cubic-bezier(.34,1.56,.64,1), height 0.32s cubic-bezier(.34,1.56,.64,1), opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, height;
}
.nav-item { z-index: 1; }

/* 水波纹 */
.btn, .login-btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.45);
  animation: ripple 0.6s cubic-bezier(.4,0,.2,1) forwards;
  pointer-events: none;
  z-index: 2;
}
.login-btn .ripple { background: rgba(255,255,255,0.28); }
@keyframes ripple {
  to { transform: scale(2.4); opacity: 0; }
}

/* 3D 倾斜 */
.tilt {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.22s cubic-bezier(.21,.61,.35,1), box-shadow 0.22s ease, border-color 0.22s ease;
  will-change: transform;
}

/* 视图切入 */
#view-content.view-enter { animation: viewIn 0.5s cubic-bezier(.21,.61,.35,1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px) scale(0.986); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* 统一入场动画（带模糊） */
.card, .chart-container, .table-wrapper, .project-card, .metric-card {
  animation: riseIn 0.5s cubic-bezier(.21,.61,.35,1) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* 表格行逐条滑入 */
table tbody tr { animation: rowIn 0.38s ease both; }
@keyframes rowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

/* 状态标签脉冲环 */
.status-tag::before { animation: tagPulse 2.2s ease-out infinite; box-shadow: 0 0 0 0 currentColor; }
@keyframes tagPulse {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 0.5; }
  70%  { box-shadow: 0 0 0 6px transparent; opacity: 0.16; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 0.42; }
}

/* 指标图标浮动 */
.metric-card .metric-icon { animation: iconFloat 4s ease-in-out infinite; }
@keyframes iconFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}

/* 进度条流动渐变 */
.progress-bar .fill {
  background-image: linear-gradient(90deg, #e07850, #c9513e, #e07850);
  background-size: 200% 100%;
  animation: gradFlow 3.5s linear infinite;
}
@keyframes gradFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* 模态框弹出 */
.modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-overlay.show .modal { animation: modalPop 0.4s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* loading 骨架流光 */
.loading { position: relative; color: var(--text-tertiary); }
.loading::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,81,62,0.4), transparent);
  background-size: 200% 100%;
  animation: gradFlow 1.5s linear infinite;
}

/* 更新提示条入场+呼吸 */
#updateBanner { animation: bannerIn 0.45s ease both, bannerPulse 3.5s ease-in-out infinite 0.45s; }
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bannerPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,81,62,0); }
  50%     { box-shadow: 0 0 0 5px rgba(201,81,62,0.08); }
}

/* toast 弹入 */
.toast { animation: toastIn 0.32s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* logo 光点 */
.sidebar-header .logo .dot {
  animation: breathe 3.5s ease-in-out infinite, logoHalo 3.5s ease-in-out infinite;
}
@keyframes logoHalo {
  0%,100% { box-shadow: 0 0 0 3px rgba(201,81,62,0.16); }
  50%     { box-shadow: 0 0 0 7px rgba(201,81,62,0.04); }
}

/* 全局光标 —— 全部用炫酷剑（热点在剑尖），!important 覆盖内联小手 */
:root {
  --sword: url('/assets/cursor-sword.svg?v=20260811f') 7 5, auto;
  --sword-hover: url('/assets/cursor-sword-hover.svg?v=20260811f') 9 7, auto;
}
* { cursor: var(--sword) !important; }
/* 文本输入区保留 I-beam，便于编辑定位 */
input, textarea, select, [contenteditable="true"] { cursor: text !important; }
/* 悬停可点击元素：剑身放大且变亮 */
a:hover, button:hover, .btn:hover, .login-btn:hover, .nav-item:hover,
.status-tag:hover, .tab:hover, [role="button"]:hover, .clickable:hover,
tr[onclick]:hover, [onclick]:hover {
  cursor: var(--sword-hover) !important;
}

/* ============================================================
   精致化增强（SVG 图标适配 + 微交互）
   ============================================================ */

/* SVG 图标尺寸规范 */
.ico-svg { display: block; flex-shrink: 0; }

.card-title .ico-svg { width: 16px; height: 16px; }

/* 标题装饰下划线 */
.page-header { position: relative; }
.page-header h1::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 56px; height: 3px;
  border-radius: 3px;
  background: var(--accent-gradient);
  box-shadow: 0 1px 8px rgba(201,81,62,0.35);
}

/* 卡片顶部高光 — 已收敛：原版在白卡上造成顶部雾蒙蒙感 */
.card::before, .chart-container::before {
  content: none;
}

/* Tab 激活态 */
.tab.active {
  background: var(--accent-gradient-soft);
  border-radius: 8px 8px 0 0;
}
.tab-indicator {
  position: absolute;
  bottom: -2px; left: 0;
  height: 2.5px;
  border-radius: 3px;
  background: var(--accent-gradient);
  box-shadow: 0 1px 8px rgba(201,81,62,0.45);
  transition: transform .32s cubic-bezier(.34,1.56,.64,1), width .32s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  z-index: 3;
}

/* 时间线流光 */
.timeline::before {
  background: linear-gradient(180deg, var(--primary), var(--primary-2), var(--primary));
  background-size: 100% 200%;
  opacity: .3;
  animation: gradFlow 5s linear infinite;
}

/* 表格首列强调 */
table tbody tr { border-left: 2px solid transparent; transition: background .18s ease, border-color .18s ease; }
table tbody tr:hover { border-left-color: rgba(201,81,62,0.4); }
table tbody tr:hover td:first-child { color: var(--primary); font-weight: 700; }
table thead th {
  background: linear-gradient(180deg, #faf8f5, #f3ece4);
  box-shadow: inset 0 -1.5px 0 rgba(201,81,62,0.10);
}

/* 模态框渐变顶条 */
.modal-header { position: relative; overflow: hidden; }
.modal-header::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--accent-gradient);
  background-size: 200% 100%;
  animation: gradFlow 4.5s linear infinite;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* 按钮光泽扫过 */
.btn::after, .login-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
  z-index: 1;
}
.btn:hover::after, .login-btn::after { left: 120%; }
.btn-primary { background-size: 180% 180%; animation: btnGradFlow 6s ease infinite; }
@keyframes btnGradFlow {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 聚光卡片效果 */
.card-glow {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5), rgba(201,81,62,0.08) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
  z-index: -1;
  mix-blend-mode: screen;
}

/* 登录页背景流动 */
.login-overlay {
  background-size: 200% 200%;
  animation: loginAurora 22s ease-in-out infinite alternate;
}
@keyframes loginAurora {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* 侧边栏品牌光晕 */
.sidebar-header { position: relative; overflow: hidden; }
.sidebar-header::after {
  content: "";
  position: absolute; top: -28px; left: 50%;
  transform: translateX(-50%);
  width: 150px; height: 82px;
  background: radial-gradient(circle, rgba(201,81,62,0.22), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

/* 导航激活项微弹跳 */
.nav-item.active { box-shadow: var(--shadow); transform: translateX(2px) scale(1.01); }
.nav-item.active .nav-icon { animation: navIconPop 2.5s ease-in-out infinite; }
@keyframes navIconPop {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* 全局滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(201,81,62,0.20);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(201,81,62,0.35); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 文本选中色 */
::selection { background: rgba(201,81,62,0.14); color: var(--text-primary); }

/* 表单聚焦辉光 */
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201,81,62,0.12), 0 4px 12px rgba(201,81,62,0.12);
}

/* 筛选输入精致化 */
.filter-select, .search-input, .filter-input {
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, #ffffff, #fcfbfa);
  font-weight: 500;
}
.filter-input { padding: 7px 12px; border: 1px solid var(--border); outline: none; color: var(--text-primary); font-size: 12.5px; transition: border-color .18s ease, box-shadow .18s ease; }
.filter-input:focus { border-color: var(--primary); box-shadow: var(--ring); }

/* ============================================================
   静止态（idle）动效增强 — 不交互也持续优雅地动
   ============================================================ */

/* 1) 卡片极缓慢浮动（独立属性，不与 hover 冲突） */
.card, .chart-container, .project-card, .metric-card {
  animation: riseIn 0.5s cubic-bezier(.21,.61,.35,1) both,
             cardIdleFloat 10s ease-in-out infinite 0.8s;
}
@keyframes cardIdleFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2.5px; }
}

/* 2) 指标数值渐变流光 */
.metric-card .metric-value {
  background: linear-gradient(120deg, var(--text-primary) 0%, var(--primary) 45%, var(--primary-2) 60%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: valueShimmer 7s linear infinite;
}
@keyframes valueShimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* 3) 图表容器描边呼吸辉光 */
.chart-container {
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(201,81,62,0.04);
  animation: chartGlow 8s ease-in-out infinite, riseIn 0.5s cubic-bezier(.21,.61,.35,1) both, cardIdleFloat 10s ease-in-out infinite 0.8s;
}
@keyframes chartGlow {
  0%, 100% { box-shadow: var(--shadow-card), 0 0 0 1px rgba(201,81,62,0.03); }
  50% { box-shadow: var(--shadow-card), 0 0 18px rgba(201,81,62,0.09); }
}

/* 4) 资源项图标脉动 */
.resource-item .res-icon { animation: resIconPulse 3.6s ease-in-out infinite; }
@keyframes resIconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 3px 10px rgba(201,81,62,0.14); }
  50% { transform: scale(1.04); box-shadow: 0 5px 16px rgba(201,81,62,0.24); }
}

/* 5) 空状态图标光环旋转 */
.empty-state .empty-icon { position: relative; }
.empty-state .empty-icon::after {
  content: "";
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 1.5px dashed rgba(201,81,62,0.28);
  animation: emptySpin 16s linear infinite;
  pointer-events: none;
}
@keyframes emptySpin { to { transform: rotate(360deg); } }

/* 6) 导航激活项呼吸光环 */
.nav-item.active { animation: navBreathe 3.6s ease-in-out infinite; }
@keyframes navBreathe {
  0%, 100% { box-shadow: var(--shadow), inset 0 0 0 1px rgba(201,81,62,0.12); }
  50% { box-shadow: var(--shadow), inset 0 0 0 1px rgba(201,81,62,0.26), 0 0 12px rgba(201,81,62,0.14); }
}

/* 7) 超管角色标签暖光脉冲 */
.role-tag.role-super { animation: roleTagPulse 3.2s ease-in-out infinite; }
@keyframes roleTagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,69,69,0); }
  50% { box-shadow: 0 0 10px rgba(220,69,69,0.30); }
}

/* 8) 背景漂浮暖球 — 已收敛：原版过重导致背景显脏 */
body::after {
  content: none;
}
@keyframes orbFloat {
  0% { transform: translate3d(-1.5%, -0.8%, 0) scale(1); }
  50% { transform: translate3d(2.5%, 1.5%, 0) scale(1.08); }
  100% { transform: translate3d(-0.8%, 2.5%, 0) scale(1.04); }
}

/* 9) 提示条图标微闪烁 */
.info-banner .banner-icon { animation: bannerIconGlow 4s ease-in-out infinite; }
@keyframes bannerIconGlow {
  0%, 100% { box-shadow: 0 3px 10px rgba(201,81,62,0.2); }
  50% { box-shadow: 0 3px 16px rgba(201,81,62,0.35); }
}

/* 10) 项目卡左侧指示条呼吸 */
.project-card::before {
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-card:hover::before { opacity: 1; }

/* 11) 指标卡 hover 时图标放大旋转 */
.metric-card .metric-icon {
  transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.6);
}
.metric-card:hover .metric-icon {
  animation-play-state: paused;
  transform: scale(1.1) rotate(-3deg);
}

/* 12) 侧边栏底部版本号微发光 */
.sidebar-footer {
  position: relative;
}
.sidebar-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,81,62,0.15), transparent);
}

/* ============================================================
   无障碍降级
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-glow { display: none !important; }
  body::before { animation: none !important; }
  body::after { animation: none !important; }
  .login-overlay { animation: none !important; }
  .page-header h1, .btn-primary, .metric-card .metric-icon, .timeline::before,
  .modal-header::before, .progress-bar .fill, .nav-item.active .nav-icon,
  .metric-card .metric-value, .resource-item .res-icon, .empty-state .empty-icon::after,
  #updateBanner, .tab-indicator, .nav-item.active, .role-tag.role-super,
  .info-banner .banner-icon, .card, .chart-container, .project-card, .metric-card {
    animation: none !important;
  }
  #view-content.view-enter,
  table tbody tr, .status-tag::before,
  .modal-overlay.show .modal, .toast {
    animation: none !important;
  }
  .card-glow { display: none !important; }
}
