/* ===========================================================
   织流 · 研发协同平台 — 2026 设计系统 (Liquid Glass v2)
   风格：液态玻璃 · 渐变流光 · Bento 2.0 · 弹簧微动效 · 等宽数字 · 深浅双主题
   =========================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 主色：紫靛青渐变，更通透 */
  --primary: #6366F1;
  --primary-2: #8B5CF6;
  --primary-3: #06B6D4;
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #06B6D4 100%);
  --gradient-primary-soft: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.10), rgba(6,182,212,.10));

  --accent: #06B6D4;
  --accent-2: #22D3EE;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --pink: #EC4899;

  /* 语义色渐变 */
  --gradient-success: linear-gradient(135deg, #10B981, #34D399);
  --gradient-danger: linear-gradient(135deg, #EF4444, #F87171);
  --gradient-warn: linear-gradient(135deg, #F59E0B, #FBBF24);
  --gradient-info: linear-gradient(135deg, #3B82F6, #60A5FA);

  /* 背景：多层光晕 radial + subtle grid */
  --bg-grad-1: #EEF2FF;
  --bg-grad-2: #F5F3FF;
  --bg-grad-3: #ECFEFF;
  --bg-grad-4: #FDF2F8;

  /* 玻璃表面：双层透明度 + 内发光 */
  --surface: rgba(255, 255, 255, 0.65);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.45);
  --surface-hover: rgba(255, 255, 255, 0.85);
  --surface-glass: rgba(255,255,255,.35);

  --border: rgba(99, 102, 241, 0.08);
  --border-strong: rgba(99, 102, 241, 0.16);
  --border-glow: rgba(99,102,241,.35);

  --text: #0F172A;
  --text-2: #334155;
  --text-muted: #64748B;
  --text-faint: #94A3B8;
  --text-invert: #fff;

  /* 阴影：多层叠加（接触阴影 + 抬升阴影 + 彩色光晕）*/
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 2px rgba(99,102,241,.04);
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 8px 24px rgba(99,102,241,.08), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.8) inset, 0 24px 60px rgba(99,102,241,.18), 0 8px 20px rgba(15,23,42,.08);
  --shadow-glow: 0 0 0 3px rgba(99,102,241,.18), 0 8px 24px rgba(99,102,241,.20);

  /* 圆角：三级层级 */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* 弹簧动画曲线（2026 流行） */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-w: 256px;
  --topbar-h: 72px;

  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

[data-theme="dark"] {
  --primary: #818CF8;
  --primary-2: #A78BFA;
  --primary-3: #22D3EE;
  --gradient-primary: linear-gradient(135deg, #818CF8 0%, #A78BFA 50%, #22D3EE 100%);
  --gradient-primary-soft: linear-gradient(135deg, rgba(129,140,248,.15), rgba(167,139,250,.12), rgba(34,211,238,.10));

  --accent: #22D3EE;
  --accent-2: #38BDF8;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --info: #60A5FA;
  --pink: #F472B6;

  --gradient-success: linear-gradient(135deg, #34D399, #6EE7B7);
  --gradient-danger: linear-gradient(135deg, #F87171, #FCA5A5);
  --gradient-warn: linear-gradient(135deg, #FBBF24, #FCD34D);
  --gradient-info: linear-gradient(135deg, #60A5FA, #93C5FD);

  --bg-grad-1: #050816;
  --bg-grad-2: #0A0D1E;
  --bg-grad-3: #061220;
  --bg-grad-4: #160A22;

  --surface: rgba(22, 28, 48, 0.55);
  --surface-solid: #0F1525;
  --surface-2: rgba(30, 39, 61, 0.45);
  --surface-hover: rgba(32, 41, 68, 0.80);
  --surface-glass: rgba(30,39,61,.30);

  --border: rgba(129,140,248,.10);
  --border-strong: rgba(129,140,248,.20);
  --border-glow: rgba(129,140,248,.45);

  --text: #EEF2FF;
  --text-2: #C2CBDD;
  --text-muted: #8A97B0;
  --text-faint: #5E6B85;
  --text-invert: #0F1525;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 28px rgba(0,0,0,.40), 0 0 0 1px rgba(129,140,248,.05);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.04) inset, 0 28px 70px rgba(0,0,0,.55), 0 0 30px rgba(129,140,248,.08);
  --shadow-glow: 0 0 0 3px rgba(129,140,248,.22), 0 8px 28px rgba(129,140,248,.25);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 8% -12%, var(--bg-grad-3), transparent 62%),
    radial-gradient(900px 650px at 100% -5%, var(--bg-grad-2), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, var(--bg-grad-4), transparent 60%),
    linear-gradient(160deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 50%, var(--bg-grad-1) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  transition: background .5s var(--ease-smooth), color .3s var(--ease-smooth);
  overflow-x: hidden;
}
/* 噪点纹理叠加（2026 流行的微质感）*/
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: linear-gradient(135deg, rgba(99,102,241,.28), rgba(6,182,212,.22)); color: inherit; }

/* 等宽数字：所有数字/统计自动等宽 */
.bold, .small, .tiny, .card-title, h1, h2, .stat, .v, .pts, .cnt, .bubble, .cnt2, [class*="num"], [class*="count"] { font-variant-numeric: tabular-nums; }

/* 滚动条：更细腻 */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 玻璃面板 ---------- */
.glass {
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
/* ---------- 应用骨架 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px; gap: 6px;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid var(--border);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 10px 18px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 60%, var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-top: -2px; }

.nav-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); padding: 14px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px; color: var(--text-2);
  font-weight: 600; transition: all .18s ease; position: relative; cursor: pointer; border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(139, 92, 246, .12));
  color: var(--primary); border-color: rgba(99, 102, 241, .25);
}
[data-theme="dark"] .nav-item.active { color: var(--primary); }
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item .badge-dot { margin-left: auto; }
.sidebar-foot { margin-top: auto; }

/* 主区域 */
.main { display: flex; flex-direction: column; min-width: 0; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 15; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-size: 18px; font-weight: 800; }
.topbar .search {
  flex: 1; max-width: 460px; margin-left: 8px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 14px; color: var(--text-muted);
  transition: all .2s; cursor: text;
}
.topbar .search:hover { border-color: var(--border-strong); }
.topbar .search input { border: none; background: transparent; outline: none; flex: 1; color: var(--text); font-size: 14px; }
.topbar .search kbd {
  font-size: 11px; background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px; color: var(--text-muted); font-family: var(--font);
}
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); display: grid; place-items: center; color: var(--text-2);
  position: relative; transition: all .18s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(239, 68, 68, .5);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px; flex: none; box-shadow: var(--shadow-sm);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; cursor: pointer; transition: background .18s; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .meta { line-height: 1.15; }
.user-chip .meta .n { font-weight: 700; font-size: 13px; }
.user-chip .meta .r { font-size: 11px; color: var(--text-muted); }

/* 内容区 */
.content { padding: 26px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.3px; }
.page-head p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 13.5px;
  transition: all .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border: none; box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(99, 102, 241, .5); }
.btn-ghost { background: var(--surface-2); border-color: transparent; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-icon { padding: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading svg { animation: wb-spin .9s linear infinite; margin-right: 6px; }
@keyframes wb-spin { to { transform: rotate(360deg); } }

/* ---------- 卡片 / Bento ---------- */
.card {
  background: var(--surface); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  position: relative; overflow: hidden; min-width: 0;
}
.card:hover { box-shadow: var(--shadow); }
.card.glow::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 160px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, .22), transparent);
  pointer-events: none;
}
.card-title { font-weight: 700; font-size: 14px; color: var(--text-2); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-left: auto; }

.grid { display: grid; gap: 18px; }
.grid-bento { grid-template-columns: repeat(12, 1fr); }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }
@media (max-width: 1100px) { .col-3,.col-4 { grid-column: span 6; } .col-5,.col-6,.col-7,.col-8,.col-9 { grid-column: span 12; } }
@media (max-width: 640px) { .col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-12 { grid-column: span 12 !important; } }

/* 指标卡 */
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric .label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.metric .value { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.metric .delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); }
.metric .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.metric .ico svg { width: 18px; height: 18px; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.primary { background: rgba(99,102,241,.14); color: var(--primary); border-color: rgba(99,102,241,.25); }
.badge.accent { background: rgba(6,182,212,.14); color: var(--accent); border-color: rgba(6,182,212,.25); }
.badge.success { background: rgba(16,185,129,.14); color: var(--success); border-color: rgba(16,185,129,.25); }
.badge.warning { background: rgba(245,158,11,.16); color: var(--warning); border-color: rgba(245,158,11,.28); }
.badge.danger { background: rgba(239,68,68,.14); color: var(--danger); border-color: rgba(239,68,68,.25); }
.badge.info { background: rgba(59,130,246,.14); color: var(--info); border-color: rgba(59,130,246,.25); }
.badge.muted { background: var(--surface-2); color: var(--text-muted); }
.badge.trivial { background: var(--surface-2); color: var(--text-faint); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; padding: 12px 14px; color: var(--text-muted); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr { transition: background .15s; }
table.table tbody tr:hover { background: var(--surface-2); }
.table .title-cell { font-weight: 600; color: var(--text); }
.table .sub { font-size: 12px; color: var(--text-muted); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text); font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- 看板 ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.column {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px;
}
.column-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; }
.column-head .cnt { margin-left: auto; color: var(--text-muted); font-size: 12px; background: var(--surface); border-radius: 8px; padding: 1px 8px; }

/* 状态筛选 Tab */
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.stab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
  padding: 9px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: transform .16s, background .16s, color .16s, border-color .16s, box-shadow .16s;
}
.stab:hover { border-color: var(--primary); color: var(--text); transform: translateY(-1px); }
.stab.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 6px 18px rgba(99,102,241,.30);
}
.stab .cnt2 {
  font-size: 11px; line-height: 1; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: rgba(148,163,184,.18); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.stab.active .cnt2 { background: rgba(255,255,255,.22); color: #fff; }
.stab .bubble {
  font-size: 11px; line-height: 1; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 2px 8px rgba(239,68,68,.45); animation: bubble-pop .26s ease;
}
@keyframes bubble-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.column.drop { background: rgba(99,102,241,.1); border-color: var(--primary); }
.column-dim { opacity: .38; filter: grayscale(.35); transition: opacity .2s, filter .2s; }
.column-focus { border-color: var(--primary); box-shadow: 0 8px 26px rgba(99,102,241,.20); }
.column-wip { border-color: #F59E0B; box-shadow: 0 0 0 1px rgba(245,158,11,.3); }
.wip-tip { margin-left: 8px; font-size: 11px; padding: 1px 8px; border-radius: 8px; background: rgba(245,158,11,.15); color: #D97706; font-weight: 600; }
.column-wip .wip-tip { background: rgba(239,68,68,.15); color: var(--danger); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.inline-select { padding: 4px 8px; font-size: 12px; max-width: 110px; }

/* 迭代（Sprint） */
.sprint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sprint-card.active { border-color: var(--primary); box-shadow: 0 10px 30px rgba(99,102,241,.16); }
.mini-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; }
.mini-stat .v { font-weight: 800; font-size: 15px; color: var(--text); }
.mini-stat .l { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tcard {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 14px; padding: 13px;
  box-shadow: var(--shadow-sm); cursor: grab; transition: transform .14s, box-shadow .14s, border-color .14s;
}
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.tcard.dragging { opacity: .5; }
.tcard .t-title { font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.tcard .t-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tcard .t-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tcard .pts { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--surface-2); border-radius: 7px; padding: 1px 7px; }

/* 标签 */
.taglist { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; color: var(--text-muted); background: var(--surface-2); border-radius: 7px; padding: 2px 8px; }

/* ---------- 进度条 ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress.thin { height: 6px; }

/* 环形图 (conic-gradient) */
.donut { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--surface-solid); }
.donut .center { position: relative; z-index: 1; text-align: center; }
.donut .center .v { font-size: 22px; font-weight: 800; } .donut .center .l { font-size: 11px; color: var(--text-muted); }

/* 条形分布 */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 42px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .name { color: var(--text-2); font-weight: 600; }
.bar-track { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-track > span { display: block; height: 100%; border-radius: 999px; }
.bar-row .num { text-align: right; color: var(--text-muted); font-weight: 700; }

/* ---------- 模态框 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 12, 24, .5); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow-y: auto;
}
.modal-overlay.show { display: flex; animation: fade .2s ease; }
.modal {
  width: 100%; max-width: 640px; background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px; animation: pop .25s cubic-bezier(.2,.9,.3,1.2);
}
.modal.wide { max-width: 820px; }
.modal h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.modal .modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  background: var(--surface-solid); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 14px; padding: 13px 18px; box-shadow: var(--shadow-lg); min-width: 240px; max-width: 360px;
  font-size: 13.5px; font-weight: 600; animation: slideUp .3s ease; display: flex; align-items: center; gap: 10px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 下拉菜单 ---------- */
.menu {
  position: absolute; background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; z-index: 120; display: none;
}
.menu.show { display: block; animation: pop .18s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* ---------- 通知面板 ---------- */
.panel-pop {
  position: absolute; top: 56px; right: 0; width: 360px; max-height: 460px; overflow-y: auto;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 130; display: none; animation: pop .18s ease;
}
.panel-pop.show { display: block; }
.notif { display: flex; gap: 10px; padding: 11px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: rgba(99,102,241,.08); }
.notif .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.notif.read .n-dot { background: transparent; }
.notif .n-text { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.notif .n-time { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* ---------- 命令面板 ---------- */
.cmd-overlay {
  position: fixed; inset: 0; background: rgba(8,12,24,.45); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; z-index: 150; padding-top: 12vh;
}
.cmd-overlay.show { display: flex; animation: fade .15s; }
.cmd {
  width: 100%; max-width: 560px; background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s ease;
}
.cmd input { width: 100%; border: none; outline: none; padding: 18px 20px; font-size: 16px; background: transparent; color: var(--text); border-bottom: 1px solid var(--border); }
.cmd-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; cursor: pointer; }
.cmd-item:hover, .cmd-item.active { background: var(--surface-2); }
.cmd-item .ci-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: var(--surface-2); color: var(--text-muted); }
.cmd-item .ci-title { font-weight: 600; }
.cmd-group-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); padding: 10px 14px 4px; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
  position: relative; overflow: hidden; padding: 56px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED 50%, #0891B2);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 10%, rgba(255,255,255,.25), transparent), radial-gradient(500px 400px at 10% 90%, rgba(255,255,255,.18), transparent); }
.login-hero > * { position: relative; z-index: 1; }
.login-hero h1 { font-size: 40px; font-weight: 800; line-height: 1.15; margin: 0 0 16px; }
.login-hero p { font-size: 16px; opacity: .92; max-width: 440px; line-height: 1.7; }
.login-feats { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.login-feat { display: flex; gap: 12px; align-items: flex-start; }
.login-feat .fi { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
.login-feat .ft { font-weight: 700; } .login-feat .fd { font-size: 13px; opacity: .85; }
.login-card { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.login-box .ld { color: var(--text-muted); margin-bottom: 26px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role-opt { border: 1px solid var(--border-strong); border-radius: 13px; padding: 12px; cursor: pointer; transition: all .18s; text-align: center; background: var(--surface-2); }
.role-opt:hover { border-color: var(--primary); }
.role-opt.sel { border-color: var(--primary); background: rgba(99,102,241,.1); box-shadow: 0 0 0 3px rgba(99,102,241,.14); }
.role-opt .rn { font-weight: 700; font-size: 13.5px; } .role-opt .rd { font-size: 11px; color: var(--text-muted); }
.demo-hint { margin-top: 18px; font-size: 12px; color: var(--text-muted); background: var(--surface-2); border-radius: 12px; padding: 12px; line-height: 1.7; }
.demo-hint b { color: var(--primary); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty svg { width: 54px; height: 54px; opacity: .4; margin-bottom: 12px; }

/* ---------- 加载骨架 ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-hover) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 工具类 ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.card.center { display:flex; flex-direction:column; align-items:center; }
.card.center .card-title { width:100%; justify-content:center !important; }

/* 我的当月贡献卡 */
.my-contrib {
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
  border:1px solid #dce4f5;
}
.my-contrib .card-title { color:#0c447c; }
.mc-grid {
  display:grid; grid-template-columns: 120px repeat(4, 1fr); gap:14px; align-items:center;
}
.mc-score {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:10px 4px;
  background:#fff; border-radius:12px; border:1px solid #e6ebf5;
}
.mc-score .mc-num { font-size:32px; font-weight:800; color:#185FA5; line-height:1; font-variant-numeric:tabular-nums; }
.mc-score .mc-lab { font-size:11px; color:#5F5E5A; margin-top:4px; }
.mc-score .mc-sub { font-size:10px; color:#888780; margin-top:2px; }
.mc-item {
  background:#fff; border:1px solid #eef2f7; border-radius:10px; padding:10px 12px;
  display:flex; flex-direction:column; gap:2px; cursor:pointer; transition: all .15s;
}
.mc-item:hover { border-color:#185FA5; box-shadow:0 2px 8px rgba(24,95,165,.08); transform:translateY(-1px); }
.mc-item .mc-v { font-size:20px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; line-height:1.1; }
.mc-item .mc-v small { font-size:12px; font-weight:500; color:var(--text-muted); margin-left:2px; }
.mc-item .mc-l { font-size:11px; color:var(--text-2); display:flex; align-items:center; gap:4px; }
.mc-item.danger .mc-v { color:#a32d2d; }
.mc-item.good .mc-v { color:#1D9E75; }
.mc-item.warn .mc-v { color:#b45309; }
.mc-bar {
  margin-top:6px; height:4px; background:#eef2f7; border-radius:2px; overflow:hidden;
}
.mc-bar > span { display:block; height:100%; border-radius:2px; background: linear-gradient(90deg, #378ADD, #534AB7); }
@media (max-width: 900px) {
  .mc-grid { grid-template-columns: repeat(3, 1fr); }
  .mc-score { grid-column: span 3; flex-direction:row; gap:12px; padding:12px 16px; justify-content:flex-start; }
}
@media (max-width: 560px) {
  .mc-grid { grid-template-columns: repeat(2, 1fr); }
  .mc-score { grid-column: span 2; }
}
/* KR 停滞预警 */
.stagnant-card .card-title { color:#7f1d1d; }
.stagnant-card .card-title .sub { color:#b91c1c; background:#fee2e2; }
.stagnant-list { display:flex; flex-direction:column; gap:6px; }
.stag-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid rgba(0,0,0,.05); background:#fff; transition:all .15s; }
.stag-row:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.06); }
.stag-row.sev-danger { border-color:#fca5a5; background:linear-gradient(90deg,#fff5f5,#fff); }
.stag-row.sev-warn { border-color:#fcd34d; background:linear-gradient(90deg,#fffbeb,#fff); }
.stag-sev { flex:none; font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:8px; border:1px solid; }
.stag-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.stag-title { font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stag-meta { font-size:11px; }
.stag-pct { flex:none; font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--text-muted); }
.stag-row.sev-danger .stag-pct { color:#dc2626; }
.stag-row.sev-warn .stag-pct { color:#d97706; }
.right { text-align: right; }
/* 部门周报聚合 */
.dept-stats { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin:14px 0; }
.ds-card { padding:14px; border-radius:12px; background:#fff; border:1px solid rgba(0,0,0,.06); display:flex; flex-direction:column; gap:4px; }
.ds-card.danger { background:#fff5f5; border-color:#fca5a5; }
.ds-card.warn { background:#fffbeb; border-color:#fcd34d; }
.ds-ic { width:28px;height:28px;border-radius:8px;background:rgba(59,130,246,.08);color:#2563eb;display:grid;place-items:center; }
.ds-card.danger .ds-ic { background:rgba(239,68,68,.1); color:#dc2626; }
.ds-card.warn .ds-ic { background:rgba(217,119,6,.1); color:#d97706; }
.ds-num { font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; }
.dept-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:12px; margin-top:12px; }
.dm-card { padding:14px 16px; border-radius:14px; display:flex; flex-direction:column; gap:10px; }
.dm-head { display:flex; align-items:center; gap:10px; }
.dm-info { flex:1; min-width:0; }
.dm-name { font-size:14px; font-weight:700; }
.dm-badge { font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:8px; flex:none; }
.dm-badge.ok { background:rgba(16,185,129,.12); color:#059669; }
.dm-badge.miss { background:rgba(148,163,184,.15); color:#64748b; }
.dm-rate { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--text-muted); }
.dm-rate-bar { flex:1; height:6px; background:rgba(0,0,0,.06); border-radius:4px; overflow:hidden; }
.dm-rate-fill { height:100%; border-radius:4px; background:#3b82f6; }
.dm-rate-fill.good { background:#10b981; }
.dm-rate-fill.warn { background:#f59e0b; }
.dm-rate-fill.danger { background:#ef4444; }
.dm-rate span { flex:none; }
.dm-sec { padding-top:8px; border-top:1px dashed rgba(0,0,0,.06); }
.dm-sec-h { font-size:11px; font-weight:700; margin-bottom:4px; display:flex; align-items:center; gap:4px; }
.dm-sec-h.good { color:#059669; }
.dm-sec-h.warn { color:#d97706; }
.dm-sec ul { margin:0; padding:0; list-style:none; }
.dm-sec li { font-size:12px; line-height:1.6; padding-left:12px; position:relative; }
.dm-sec li::before { content:''; position:absolute; left:2px; top:9px; width:4px; height:4px; border-radius:50%; background:currentColor; opacity:.4; }
@media (max-width: 900px){ .dept-stats{grid-template-columns:repeat(3,1fr);} }
@media (max-width: 560px){ .dept-stats{grid-template-columns:repeat(2,1fr);} .dept-grid{grid-template-columns:1fr;} }
/* Objective 复盘面板 */
.retro-card .card-title { color:#0c447c; }
.retro-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:10px 0 14px; }
.retro-stat { padding:12px; background:rgba(59,130,246,.04); border-radius:10px; text-align:center; }
.retro-stat.danger { background:rgba(239,68,68,.08); }
.retro-stat.warn { background:rgba(245,158,11,.08); }
.rs-num { font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--primary); }
.rs-num small { font-size:12px; font-weight:600; color:var(--text-muted); }
.retro-stat.danger .rs-num { color:#dc2626; }
.retro-stat.warn .rs-num { color:#d97706; }
.retro-risk, .retro-leaders { margin-top:12px; padding-top:12px; border-top:1px dashed rgba(0,0,0,.08); }
.retro-sec-h { font-size:11px; font-weight:700; margin-bottom:8px; display:flex; align-items:center; gap:4px; }
.retro-sec-h.warn { color:#d97706; }
.retro-risk ul { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px; }
.retro-risk li { font-size:12.5px; padding:6px 10px; background:rgba(245,158,11,.06); border-radius:6px; }
.retro-risk li .bold { color:#d97706; font-weight:800; margin-right:6px; }
.rl-list { display:flex; flex-direction:column; gap:4px; }
.rl-row { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:8px; font-size:12px; }
.rl-row:hover { background:rgba(0,0,0,.03); }
.rl-rk { width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:11px;font-weight:800;color:#fff;flex:none;background:#94a3b8; }
.rl-rk.rk-1 { background:linear-gradient(135deg,#f59e0b,#ef4444); }
.rl-rk.rk-2 { background:linear-gradient(135deg,#94a3b8,#cbd5e1); color:#475569; }
.rl-rk.rk-3 { background:linear-gradient(135deg,#c28650,#d4a574); }
.rl-name { font-weight:600; flex:none; }
.rl-stats { flex:1; text-align:right; }
.rl-pct { flex:0 0 80px; height:6px; background:rgba(0,0,0,.06); border-radius:4px; position:relative; overflow:hidden; }
.rl-pct span { position:absolute; left:0; top:0; bottom:0; background:linear-gradient(90deg,#3b82f6,#60a5fa); border-radius:4px; }
@media (max-width: 700px){ .retro-grid{grid-template-columns:repeat(2,1fr);} }


.bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: .05em; }
.nowrap { white-space: nowrap; }
.flex1 { flex: 1; }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.hr { height: 1px; background: var(--border); margin: 16px 0; border: none; }
.hidden { display: none !important; }

/* 详情抽屉 */
.drawer-overlay { position: fixed; inset: 0; background: rgba(8,12,24,.45); backdrop-filter: blur(6px); display: none; z-index: 110; }
.drawer-overlay.show { display: block; animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 560px; max-width: 94vw;
  background: var(--surface-solid); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); z-index: 111;
  display: flex; flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.drawer-close { margin-left: auto; }

/* 评论 */
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment .c-body .c-text { font-size: 13.5px; line-height: 1.5; }
.comment .c-meta { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* ---------- 时间线 / 甘特 ---------- */
.tl { display: flex; flex-direction: column; gap: 4px; }
.tl-head, .tl-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 12px; }
.tl-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tl-name:hover { color: var(--primary); }
.tl-track { position: relative; height: 34px; background: var(--surface-2); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border-strong); font-size: 10px; color: var(--text-faint); padding: 2px 0 0 4px; pointer-events: none; }
.tl-bar { position: absolute; top: 7px; height: 20px; border-radius: 7px; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .12s; }
.tl-bar:hover { transform: scaleY(1.12); }
.tl-group { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 4px; }
.tl-row { margin: 3px 0; }
/* 抽屉侧栏遮罩：所有断点均 fixed 脱离文档流，不占 grid 格子；默认隐藏，小屏断点内控制显隐 */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh; width: 280px;
    transform: translateX(-105%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 200; padding: 16px 12px;
    box-shadow: 12px 0 40px rgba(0,0,0,.18);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex !important; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .pd-top { grid-template-columns:1fr; }
  .pd-stats { grid-template-columns:repeat(2,1fr); }
}

/* 桌面端（>920px）隐藏汉堡按钮，仅在小屏断点显示 */
#menu-toggle { display: none; }

/* ===========================================================
   2026 Liquid Glass v2 视觉升级覆盖层（后定义优先）
   =========================================================== */

/* ---- 侧栏升级 ---- */
.sidebar {
  padding: 20px 14px; gap: 4px;
  background: var(--surface-2);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(99,102,241,.05), transparent 30%);
  border-radius: inherit;
}
.brand { padding: 6px 10px 20px; position: relative; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--gradient-primary);
  box-shadow: 0 10px 28px rgba(99,102,241,.45), 0 0 0 1px rgba(255,255,255,.25) inset;
  position: relative; font-size: 19px;
}
.brand-logo::after {
  content: ""; position: absolute; inset: -8px; border-radius: 22px;
  background: var(--gradient-primary); filter: blur(20px); opacity: .4; z-index: -1;
}
.brand-name { font-size: 18px; letter-spacing: -0.01em; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { letter-spacing: .02em; }
.nav-group-label { font-size: 10.5px; letter-spacing: .14em; padding: 16px 12px 6px; }
.nav-item {
  gap: 12px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 2px; font-size: 13.5px;
  transition: transform .25s var(--spring), background .2s var(--ease-smooth), color .2s, box-shadow .25s;
}
.nav-item:hover { background: var(--surface); transform: translateX(2px); }
.nav-item.active {
  background: var(--surface-solid);
  border-color: var(--border-glow);
  box-shadow: var(--shadow), 0 0 20px rgba(99,102,241,.10);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -15px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--gradient-primary);
}
.sidebar-foot { padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }

/* ---- 顶栏升级 ---- */
.topbar {
  height: var(--topbar-h); padding: 0 28px;
  background: var(--surface-2);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}
.topbar .page-title { font-size: 19px; letter-spacing: -0.01em; }
.topbar .search {
  max-width: 520px; border-radius: var(--radius-pill); padding: 10px 16px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: all .25s var(--spring);
}
.topbar .search:hover { box-shadow: var(--shadow); }
.topbar .search:focus-within {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  background: var(--surface-solid);
}
.topbar .search kbd { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius); background: var(--surface);
  transition: all .25s var(--spring); box-shadow: var(--shadow-sm);
}
.icon-btn:hover { color: var(--primary); transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow); }
.icon-btn .count {
  background: var(--gradient-danger); font-family: var(--font-mono); font-size: 10.5px;
  box-shadow: 0 3px 10px rgba(239,68,68,.45); border-radius: var(--radius-pill);
}
.avatar {
  width: 38px; height: 38px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12), 0 0 0 2px var(--surface-solid);
  transition: transform .25s var(--spring);
}
.avatar:hover { transform: scale(1.05); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.user-chip { padding: 5px 12px 5px 5px; border-radius: var(--radius-pill); border: 1px solid transparent; transition: all .2s var(--spring); }
.user-chip:hover { background: var(--surface); border-color: var(--border); }

/* ---- 按钮升级 ---- */
.btn {
  border-radius: var(--radius); font-weight: 600; letter-spacing: -.005em;
  transition: all .25s var(--spring); position: relative; overflow: hidden;
}
.btn::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 60%);
  pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .2s;
}
.btn:hover::after { opacity: 1; }
.btn-primary {
  background: var(--gradient-primary); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(99,102,241,.30), 0 2px 4px rgba(99,102,241,.20);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99,102,241,.40), 0 3px 8px rgba(99,102,241,.25);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost:hover { background: var(--surface); color: var(--primary); }

/* ---- 徽章升级（pill 形 + 软色）---- */
.badge {
  border-radius: var(--radius-pill); font-weight: 600; font-size: 11px; padding: 3px 10px;
  letter-spacing: .01em; border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.badge.primary { background: var(--gradient-primary-soft); color: var(--primary); border-color: rgba(99,102,241,.25); }
.badge.success { background: rgba(16,185,129,.12); color: var(--success); border-color: rgba(16,185,129,.25); }
.badge.danger { background: rgba(239,68,68,.12); color: var(--danger); border-color: rgba(239,68,68,.25); }
.badge.warn, .badge.warning { background: rgba(245,158,11,.12); color: var(--warning); border-color: rgba(245,158,11,.25); }
.badge.muted { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.badge.info { background: rgba(59,130,246,.12); color: var(--info); border-color: rgba(59,130,246,.25); }
.badge.accent { background: rgba(6,182,212,.12); color: var(--accent); border-color: rgba(6,182,212,.25); }

/* ---- 卡片升级 ---- */
.card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .3s var(--spring), box-shadow .3s var(--spring), border-color .3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-title .sub { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 8px; letter-spacing: 0; }

/* ---- 输入框升级 ---- */
.input, .select, .textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .2s var(--spring); font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--border-glow);
  box-shadow: var(--shadow-glow); background: var(--surface-solid);
}

/* ---- 表格升级：斑马 + 悬浮发光 ---- */
.table { border-collapse: separate; border-spacing: 0; }
.table thead th { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.table tbody tr { transition: all .2s var(--ease-smooth); }
.table tbody tr:nth-child(even) td { background: rgba(99,102,241,.02); }
.table tbody tr:hover td { background: var(--gradient-primary-soft); }
.inline-select { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-pill); cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface); }
.inline-select:focus { box-shadow: var(--shadow-glow); border-color: var(--border-glow); }

/* ---- 任务卡片升级 ---- */
.tcard {
  border-radius: var(--radius); padding: 14px; background: var(--surface-solid);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all .28s var(--spring); position: relative; overflow: hidden;
}
.tcard::before {
  content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--gradient-primary);
  opacity: 0; transition: opacity .2s;
}
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-glow); }
.tcard:hover::before { opacity: 1; }
.tcard.dragging { opacity: .5; transform: scale(.98) rotate(1deg); }
.t-title { font-weight: 600; font-size: 13.5px; line-height: 1.45; letter-spacing: -.005em; }
.t-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.t-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pts {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--gradient-primary-soft); color: var(--primary); font-family: var(--font-mono);
}
.tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-2);
  color: var(--text-muted); border: 1px solid var(--border);
}

/* ---- 看板列升级 ---- */
.column { border-radius: var(--radius-lg); background: var(--surface-2); border: 1px dashed transparent; padding: 12px; transition: all .25s; min-width: 270px; }
.column-head { font-size: 12.5px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.column.drop { background: var(--gradient-primary-soft); border-color: var(--border-glow); border-style: solid; }
.column-focus { border: 1px solid var(--border-glow); background: var(--surface); box-shadow: 0 12px 32px rgba(99,102,241,.15); }
.column-dim { opacity: .4; filter: grayscale(.4); }
.column-wip { border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.05); }
.column-wip .wip-tip { animation: pulse 1.6s ease-in-out infinite; }
.wip-tip { margin-left: 8px; font-size: 10.5px; padding: 2px 9px; border-radius: var(--radius-pill); background: rgba(245,158,11,.15); color: #D97706; font-weight: 700; font-family: var(--font-mono); }
.column-wip .wip-tip { background: rgba(239,68,68,.12); color: var(--danger); }

/* ---- Bento 统计升级（大数字渐变）---- */
.stat { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.stat .unit { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 4px; -webkit-text-fill-color: var(--text-muted); }
.mini-stat { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--border); transition: all .25s var(--spring); }
.mini-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.mini-stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stat .l { font-size: 11px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.progress { height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; position: relative; }
.progress-bar { height: 100%; background: var(--gradient-primary); border-radius: var(--radius-pill); transition: width .6s var(--spring); position: relative; overflow: hidden; }
.progress-bar::after {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: shimmer 2.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { transform: translateX(-150%); } 100% { transform: translateX(350%); } }

/* ---- 红色气泡升级 ---- */
.bubble {
  background: var(--gradient-danger); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  display: inline-grid; place-items: center; margin-left: 6px;
  box-shadow: 0 3px 10px rgba(239,68,68,.4); font-family: var(--font-mono);
  animation: bubble-pop .35s var(--spring);
}
@keyframes bubble-pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.cnt2 { font-size: 11px; color: var(--text-muted); margin-left: 6px; font-family: var(--font-mono); font-weight: 600; }

/* ---- 状态 Tab 升级 ---- */
.status-tabs { display: flex; gap: 6px; padding: 6px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--border); }
.stab {
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: var(--text-muted); transition: all .25s var(--spring); display: inline-flex; align-items: center; gap: 4px;
}
.stab:hover { color: var(--text); background: var(--surface); }
.stab.active {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.stab.active .bubble { background: rgba(255,255,255,.25); box-shadow: none; }
.stab.active .cnt2 { color: rgba(255,255,255,.8); }

/* ---- Toast 升级 ---- */
.toast {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); padding: 12px 18px; font-weight: 600;
  border-left: 4px solid var(--primary);
  animation: toast-in .35s var(--spring);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.warn { border-left-color: var(--warning); }
@keyframes toast-in { 0% { opacity: 0; transform: translateY(-10px) scale(.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

/* ---- 模态框/抽屉升级 ---- */
.modal-overlay, .drawer-overlay {
  background: rgba(15,23,42,.35); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
.modal, .drawer {
  background: var(--surface-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); border-radius: var(--radius-xl);
  animation: modal-in .35s var(--spring);
}
.drawer { border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
@keyframes modal-in { 0% { opacity: 0; transform: translateY(20px) scale(.97); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- 命令面板升级（毛玻璃+流光）---- */
.cmd-overlay { background: rgba(15,23,42,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cmd {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(99,102,241,.1);
  overflow: hidden; animation: cmd-in .3s var(--spring);
}
@keyframes cmd-in { 0% { opacity: 0; transform: translateY(-10px) scale(.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.cmd input {
  font-size: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border);
  background: transparent;
}
.cmd-group-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); padding: 12px 22px 6px;
}
.cmd-item {
  padding: 11px 22px; transition: background .15s; display: flex; align-items: center; gap: 12px;
}
.cmd-item.active, .cmd-item:hover { background: var(--gradient-primary-soft); }
.cmd-item .ci-type {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--gradient-primary); color: #fff;
}

/* ---- 通知面板升级 ---- */
.panel-pop {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); overflow: hidden;
}
.notif { padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif:hover { background: var(--surface); }
.notif.unread { background: var(--gradient-primary-soft); }
.notif .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient-primary); flex: none; box-shadow: 0 0 8px rgba(99,102,241,.5); }
.notif.read .n-dot { background: transparent; border: 1px solid var(--border-strong); }

/* ---- 页面头升级 ---- */
.page-head { margin-bottom: 24px; }
.page-head h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0;
  background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.page-head p { color: var(--text-muted); margin: 4px 0 0; font-size: 14px; }

/* ---- 空状态升级 ---- */
.empty {
  padding: 60px 30px; text-align: center; color: var(--text-muted);
}
.empty svg { opacity: .35; margin-bottom: 16px; }

/* ---- 评论升级 ---- */
.comment {
  padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius);
  border: 1px solid var(--border); margin-top: 8px; transition: all .2s;
}
.comment:hover { background: var(--surface); border-color: var(--border-strong); }
.c-text { line-height: 1.6; }
.c-meta { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* ---- 登录页升级 ---- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr;
  position: relative;
}
.login-hero {
  background:
    radial-gradient(600px 500px at 20% 30%, rgba(6,182,212,.3), transparent 60%),
    radial-gradient(500px 400px at 80% 70%, rgba(236,72,153,.25), transparent 60%),
    var(--gradient-primary);
  position: relative; overflow: hidden; padding: 60px; color: #fff;
}
.login-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.15) 1px, transparent 0);
  background-size: 24px 24px; opacity: .4;
}
.login-card {
  background: var(--surface); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-lg);
}

/* ---- Bento 网格优化间距 ---- */
.grid-bento { gap: 16px; }
.col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { padding: 0; }

/* ---- Sprint 卡片 ---- */
.sprint-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; transition: all .3s var(--spring); position: relative; overflow: hidden; }
.sprint-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-glow); }
.sprint-card.active-sprint { border-color: var(--border-glow); background: var(--gradient-primary-soft); }
.sprint-card.active-sprint::before {
  content: ""; position: absolute; top: 0; right: 0; width: 80px; height: 80px;
  background: var(--gradient-primary); filter: blur(40px); opacity: .4;
}

/* ---- 时间线 ---- */
.tl-bar {
  height: 22px; border-radius: var(--radius-pill); display: flex; align-items: center; padding: 0 10px;
  color: #fff; font-size: 11px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: transform .25s var(--spring); cursor: pointer;
}
.tl-bar:hover { transform: scaleY(1.15); }

/* ---- hr 分割更柔和 ---- */
.hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---- 菜单（用户下拉）---- */
.menu {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); padding: 6px; min-width: 180px;
  animation: menu-in .25s var(--spring);
}
@keyframes menu-in { 0% { opacity: 0; transform: translateY(-6px) scale(.97); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.menu-item { padding: 9px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; transition: all .15s; cursor: pointer; }
.menu-item:hover { background: var(--gradient-primary-soft); color: var(--primary); }

/* ---- 脉冲动画（通知红点）---- */
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.08); } }

/* ---- 骨架屏呼吸 ---- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, rgba(99,102,241,.08) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- 移动端菜单按钮 ---- */
#menu-toggle {
  width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

/* ===========================================================
   适配修复 · v2.1 —— 解决 KPI/欢迎/侧栏/滚动条/负载条 问题
   =========================================================== */

/* 1) 滚动条主题色（去除橙色） */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99,102,241,.35), rgba(139,92,246,.35));
  border-radius: 999px; border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(99,102,241,.6), rgba(139,92,246,.6));
  background-clip: content-box;
}
html { scrollbar-color: rgba(99,102,241,.4) transparent; scrollbar-width: thin; }

/* 2) 页面欢迎区重构 */
.page-head.welcome { margin-bottom: 22px; }
.welcome-text .welcome-greet {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--primary);
  padding: 4px 10px; border-radius: 999px;
  background: var(--gradient-primary-soft); border: 1px solid rgba(99,102,241,.25);
  margin-bottom: 10px;
}
.welcome-text .welcome-greet svg { width: 13px; height: 13px; }
.welcome-text h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px;
  background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome-text p { margin: 0; color: var(--text-muted); font-size: 13.5px; }

/* 3) KPI 指标卡：value/delta/label 明确样式，避免被渐变污染 */
.metric { gap: 8px; padding: 4px 0; }
.metric .label {
  font-size: 12.5px; color: var(--text-muted); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  -webkit-text-fill-color: var(--text-muted);
}
.metric .label svg { width: 15px; height: 15px; flex: none; }
.metric .value {
  font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .value[style*="--danger"] {
  background: linear-gradient(135deg, var(--danger), #F97316);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .value.value-danger {
  background: linear-gradient(135deg, #EF4444, #F97316);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .value.value-success {
  background: linear-gradient(135deg, #10B981, #06B6D4);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .value.value-warning {
  background: linear-gradient(135deg, #F59E0B, #F97316);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .delta {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  width: fit-content; font-variant-numeric: tabular-nums;
  -webkit-text-fill-color: var(--text-muted);
}
.metric .delta.up { color: var(--success); background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.25); -webkit-text-fill-color: var(--success); }
.metric .delta.down { color: var(--danger); background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); -webkit-text-fill-color: var(--danger); }

/* 4) 团队负载条：名字列/数字列加宽，防截断 */
.bar-row {
  display: grid !important;
  grid-template-columns: 64px 1fr 36px !important;
  align-items: center; gap: 12px !important; font-size: 12.5px;
  margin-bottom: 2px;
}
.bar-row .name {
  color: var(--text-2); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px;
}
.bar-row .bar-track {
  height: 8px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; position: relative;
}
.bar-row .bar-track > span {
  display: block; height: 100%; border-radius: 999px;
  transition: width .6s var(--spring);
  box-shadow: 0 0 8px rgba(99,102,241,.25);
}
.bar-row .num {
  text-align: right; color: var(--text-2); font-weight: 700;
  font-variant-numeric: tabular-nums; font-size: 12.5px;
  min-width: 28px;
}

/* 团队负载若在窄列，改为更紧凑 */
.card.col-4 .bar-row { grid-template-columns: 56px 1fr 30px !important; }

/* 5) 侧栏底部紧凑 tip，不挡内容 */
.sidebar-foot { margin-top: auto; padding-top: 10px; }
.sidebar-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-pill);
  background: var(--gradient-primary-soft);
  border: 1px solid rgba(99,102,241,.20);
  color: var(--primary); font-size: 11.5px; font-weight: 600;
}
.sidebar-tip .kbd-mini {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  background: var(--surface-solid); border: 1px solid rgba(99,102,241,.25);
  color: var(--primary); line-height: 1.3;
}
.sidebar-tip .tip-text { color: var(--text-2); font-weight: 500; font-size: 11.5px; }

/* 6) Bento 间距适配，避免卡片紧贴 */
.grid-bento { gap: 16px !important; }
.grid-bento .card { padding: 18px 20px; }

/* 7) 修复 stat/mini-stat 被 metric value 渐变污染（确保 .stat 自身是渐变） */
.stat, .metric .value { font-feature-settings: "tnum"; }

/* 8) 小屏幕下 metric value 缩小 */
@media (max-width: 1280px) {
  .metric .value { font-size: 28px; }
  .grid-bento .card { padding: 16px; }
}
@media (max-width: 1024px) {
  .metric .value { font-size: 26px; }
  .bar-row { grid-template-columns: 56px 1fr 30px !important; }
}

/* ===========================================================
   OKR 模块样式
   =========================================================== */

/* 周期 chip 切换 */
.cycle-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600;
  transition: all .2s var(--spring); cursor: pointer; font-family: inherit;
}
.chip:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: var(--gradient-primary); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,.30);
}

/* 目标列表 */
.okr-list { display: flex; flex-direction: column; gap: 12px; }
.okr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  cursor: pointer; transition: all .28s var(--spring); position: relative;
  overflow: hidden;
}
.okr-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gradient-primary); opacity: .5; transition: opacity .2s;
}
.okr-card:hover {
  transform: translateY(-2px); border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}
.okr-card:hover::before { opacity: 1; }
.okr-card-bar {
  margin-top: 14px; height: 8px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden; position: relative;
}
.okr-card-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: var(--gradient-primary); transition: width .5s var(--spring);
  box-shadow: 0 0 8px rgba(99,102,241,.25);
}
.okr-prog-num {
  font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  background: var(--gradient-primary); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.avatars-line { flex-wrap:nowrap; min-width:0; }
.avatars-line .avatar.sm { margin-left:-6px; border:2px solid var(--surface-solid, #fff); box-shadow:0 2px 6px rgba(0,0,0,.08); }
.avatars-line .avatar.sm:first-child { margin-left:0; }
.avatars-line .av-sep { width:1px; height:18px; background:rgba(0,0,0,.1); margin:0 4px; align-self:center; }
.avatars-line .kr-count { white-space:nowrap; align-self:center; margin-left:4px; }
.avatars-line .avatar.more { background:rgba(0,0,0,.08); color:var(--text-muted); font-size:10px; font-weight:700; }
.okr-cycle-badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--gradient-primary-soft); color: var(--primary);
  border: 1px solid rgba(99,102,241,.25); font-variant-numeric: tabular-nums;
}
.okr-cycle-badge.lg { font-size: 12px; padding: 5px 12px; }

/* OKR 条（仪表盘嵌入） */
.okr-strip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px;
}
.okr-strip-card {
  display: block; padding: 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: all .25s var(--spring); text-decoration: none; color: inherit;
}
.okr-strip-card:hover {
  transform: translateY(-2px); border-color: var(--border-glow);
  background: var(--surface); box-shadow: var(--shadow);
}
.osc-cycle {
  font-size: 10.5px; font-weight: 700; color: var(--primary);
  padding: 2px 8px; border-radius: 999px; background: var(--gradient-primary-soft);
  letter-spacing: .05em;
}
.osc-title {
  font-size: 13.5px; font-weight: 700; line-height: 1.45; margin: 10px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  letter-spacing: -.005em;
}
.osc-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.osc-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: var(--gradient-primary); transition: width .4s;
}

/* KR 块 */
.kr-list { display: flex; flex-direction: column; gap: 14px; }
.kr-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  transition: all .25s; position: relative;
}
.kr-block:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.kr-weight {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--gradient-primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  font-variant-numeric: tabular-nums; border: 1px solid rgba(99,102,241,.2);
}
.kr-weight .u { font-size: 10px; font-weight: 700; opacity: .7; margin-left: 1px; }
.kr-bar {
  position: relative; height: 10px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden;
}
.kr-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--gradient-primary); border-radius: 999px;
  transition: width .3s; z-index: 1; pointer-events: none;
}
.kr-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; margin: 0; z-index: 2;
}
.kr-range:hover { opacity: 0.0; }
.kr-bar:hover { box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.kr-bar:hover > span { filter: brightness(1.05); }
.kr-tasks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kr-task {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2); cursor: pointer;
  transition: all .18s; max-width: 200px;
}
.kr-task:hover { background: var(--surface); border-color: var(--border-glow); color: var(--primary); }
.kr-task-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
/* KR 贡献墙 */
.kr-wall-toggle { display:inline-flex; align-items:center; gap:6px; margin-top:10px; padding:5px 10px; font-size:11.5px; font-weight:600; color:var(--text-muted); background:rgba(0,0,0,.03); border-radius:8px; cursor:pointer; user-select:none; transition:all .15s; }
.kr-wall-toggle:hover { background:rgba(59,130,246,.08); color:var(--primary); }
.kr-wall-toggle svg:last-child { transition:transform .2s; }
.kr-wall-toggle.open svg:last-child { transform:rotate(180deg); }
.kr-wall { display:none; margin-top:10px; padding:12px; border-radius:12px; background:rgba(59,130,246,.04); border:1px solid rgba(59,130,246,.12); }
.kr-wall.open { display:block; animation:krWallIn .25s var(--ease-spring); }
@keyframes krWallIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:none} }
.kw-h { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; margin-bottom:6px; }
.kw-track { position:relative; height:48px; background:rgba(0,0,0,.04); border-radius:8px; }
.kw-line { position:absolute; left:0; right:0; bottom:50%; height:1px; background:rgba(59,130,246,.3); }
.kw-dot { position:absolute; width:10px; height:10px; border-radius:50%; background:var(--primary); border:2px solid #fff; box-shadow:0 1px 4px rgba(59,130,246,.3); transform:translate(-50%,50%); z-index:1; }
.kw-dot:hover { transform:translate(-50%,50%) scale(1.3); }
.kw-axis { display:flex; justify-content:space-between; margin-top:4px; }
.kw-grid { display:flex; flex-direction:column; gap:4px; }
.kw-row { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:8px; font-size:12px; }
.kw-row:hover { background:rgba(255,255,255,.5); }
.kw-u { display:flex; align-items:center; gap:6px; flex:0 0 180px; min-width:0; }
.kw-name { font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kw-stats { flex:1; display:flex; align-items:center; gap:10px; position:relative; height:18px; font-size:11.5px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.kw-stats b { color:var(--text); font-weight:700; }
.kw-stats .danger { color:var(--danger); }
.kw-pct { position:absolute; left:0; bottom:0; height:3px; background:linear-gradient(90deg,#3b82f6,#60a5fa); border-radius:3px; z-index:0; }

.proj-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--pc) 12%, transparent);
  color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent);
}

/* KR 关联任务弹窗 */
.kr-link-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.kr-link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.kr-link-item:hover { background: var(--surface-2); }
.kr-link-item.linked { background: var(--gradient-primary-soft); }
.kr-link-item input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; }
.kr-link-item .li-title { flex: 1; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-link-item .li-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }

/* 按钮尺寸 */
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.icon-btn.btn-sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.btn-sm svg { width: 14px; height: 14px; }

/* 详情 h1 覆盖 */
h1 { font-variant-numeric: tabular-nums; }

/* ========== 日报 / 周报 ========== */
.filter-bar { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:14px; margin-bottom:14px; }
.filter-bar .seg { display:flex; background:rgba(255,255,255,.5); border-radius:10px; padding:3px; }
.filter-bar .seg button { border:none; background:transparent; padding:6px 14px; border-radius:8px; font-size:12.5px; color:var(--text-muted); cursor:pointer; font-weight:600; transition:.2s; }
.filter-bar .seg button.on { background:var(--primary); color:#fff; box-shadow:0 2px 8px rgba(59,130,246,.3); }
.filter-bar .spacer { flex:1; }
.filter-bar .f-user { display:flex; align-items:center; gap:8px; }
.filter-bar .select.sm { padding:6px 10px; font-size:12px; border-radius:8px; border:1px solid rgba(0,0,0,.08); background:rgba(255,255,255,.6); }
.report-timeline { display:flex; flex-direction:column; gap:12px; }
.report-card { padding:16px 18px; border-radius:16px; cursor:pointer; transition:transform .2s var(--ease-spring), box-shadow .2s; position:relative; }
.report-card:hover { transform:translateY(-2px); box-shadow:0 10px 30px rgba(0,0,0,.08); }
.rc-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.rc-date { flex:1; min-width:0; }
.rc-d { font-size:15px; font-weight:700; color:var(--text); }
.rc-sub { margin-top:2px; }
.rc-mood { font-size:12px; font-weight:600; padding:4px 10px; border-radius:20px; background:rgba(255,255,255,.6); }
.rc-mood.mood-great { background:rgba(34,197,94,.12); color:#16a34a; }
.rc-mood.mood-good { background:rgba(59,130,246,.12); color:#2563eb; }
.rc-mood.mood-tired { background:rgba(245,158,11,.15); color:#d97706; }
.rc-mood.mood-blocked { background:rgba(239,68,68,.12); color:#dc2626; }
.rc-author { display:flex; align-items:center; gap:6px; }
.rc-body { display:flex; flex-direction:column; gap:8px; }
.rc-sec-title { font-size:11.5px; font-weight:700; color:var(--text-muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:.5px; }
.rc-list { margin:0; padding:0; list-style:none; }
.rc-list li { font-size:13.5px; line-height:1.7; padding-left:14px; position:relative; color:var(--text); }
.rc-list li::before { content:''; position:absolute; left:0; top:11px; width:5px; height:5px; border-radius:50%; background:var(--primary); }
.rc-list li.muted { color:var(--text-muted); }
.rc-list li.muted::before { background:var(--text-muted); opacity:.5; }
.danger-text { color:#dc2626 !important; }
.rc-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.rc-foot { margin-top:12px; padding-top:10px; border-top:1px solid rgba(0,0,0,.05); display:flex; align-items:center; gap:6px; color:var(--text-muted); }
.rc-del { position:absolute; top:12px; right:12px; opacity:0; transition:.2s; }
.report-card:hover .rc-del { opacity:1; }

/* 日报/周报表单 */
.mood-picker { display:flex; gap:8px; flex-wrap:wrap; }
.mood-opt { display:flex; align-items:center; gap:6px; padding:8px 14px; border:1.5px solid rgba(0,0,0,.08); background:rgba(255,255,255,.5); border-radius:12px; cursor:pointer; font-size:12.5px; font-weight:600; color:var(--text-muted); transition:.2s; }
.mood-opt:hover { border-color:var(--primary); color:var(--primary); }
.mood-opt.on { border-color:var(--primary); background:rgba(59,130,246,.1); color:var(--primary); }
.mood-emoji { font-size:16px; }
.task-checklist { max-height:200px; overflow-y:auto; display:flex; flex-direction:column; gap:5px; padding:4px; }
.tc-item { display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:10px; background:rgba(255,255,255,.5); font-size:12.5px; cursor:pointer; transition:.15s; }
.tc-item:hover { background:rgba(59,130,246,.08); }
.tc-item input[type=checkbox] { accent-color:var(--primary); width:15px; height:15px; }
.tc-item span { flex:1; }
.tc-item.done { opacity:.6; }
.tc-pill { display:flex; align-items:center; }
.tag-input { display:flex; gap:6px; flex-wrap:wrap; padding:8px 10px; background:rgba(255,255,255,.5); border-radius:10px; border:1px solid rgba(0,0,0,.06); min-height:40px; align-items:center; }
.tag-input .tag { background:var(--primary); color:#fff; font-size:11.5px; padding:3px 8px; border-radius:6px; display:inline-flex; align-items:center; gap:4px; font-weight:600; }
.tag-input .tag button { background:rgba(255,255,255,.3); border:none; color:#fff; width:14px; height:14px; border-radius:50%; font-size:10px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.tag-input-wrap { display:inline-flex; flex:1; min-width:80px; }
.tag-input-wrap input { border:none; outline:none; background:transparent; font-size:12.5px; width:100%; padding:2px 0; }
.tag-sm { font-size:11px !important; padding:2px 7px !important; background:rgba(59,130,246,.1) !important; color:var(--primary) !important; }
.form-grid .tag-input { background:rgba(0,0,0,.02); }

/* 汇报详情 */
.report-detail { display:flex; flex-direction:column; gap:14px; }
.rd-head { display:flex; align-items:flex-start; gap:12px; padding-bottom:12px; border-bottom:1px solid rgba(0,0,0,.06); }
.rd-head > div:first-child { flex:1; }
.rd-title { font-size:17px; font-weight:700; }
.rd-meta { display:flex; align-items:center; gap:6px; margin-top:4px; }
.rd-mood { font-size:12.5px; padding:5px 12px; border-radius:20px; font-weight:600; }
.rd-section .rd-sec-h { font-size:11.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.rd-section ul { margin:0; padding:0; list-style:none; }
.rd-section li { font-size:13.5px; line-height:1.8; padding-left:14px; position:relative; }
.rd-section li::before { content:''; position:absolute; left:2px; top:12px; width:5px; height:5px; border-radius:50%; background:var(--primary); }
.rd-section li.muted { color:var(--text-muted); }
.rd-section li.muted::before { background:var(--text-muted); opacity:.4; }
.rd-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.rd-tags { display:flex; gap:6px; flex-wrap:wrap; }
.rd-tags .tag { background:rgba(59,130,246,.1); color:var(--primary); font-size:11.5px; padding:3px 9px; border-radius:6px; font-weight:600; }
.eval-text { font-size:13.5px; line-height:1.8; white-space:pre-wrap; margin-top:6px; }
.eval-block { padding:16px 18px; border-radius:14px; background:rgba(255,255,255,.5); }
.eval-block.mgr { background:rgba(59,130,246,.06); border-left:3px solid var(--primary); }
.eval-block.empty { text-align:center; padding:30px; }
.eval-h { font-size:13px; font-weight:700; margin-bottom:8px; }
.eval-sub { font-size:12px; font-weight:700; color:var(--text-muted); margin:10px 0 4px; text-transform:uppercase; letter-spacing:.3px; }
.eval-block ul { margin:0; padding:0; list-style:none; }
.eval-block li { font-size:13px; line-height:1.7; padding-left:14px; position:relative; }
.eval-block li::before { content:''; position:absolute; left:2px; top:10px; width:5px; height:5px; border-radius:50%; background:var(--primary); }
.eval-adj { font-size:11.5px; color:var(--text-muted); margin-bottom:6px; }

/* ========== 月度绩效 ========== */
.review-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.review-card { padding:18px; border-radius:18px; cursor:pointer; transition:.2s var(--ease-spring); position:relative; }
.review-card:hover { transform:translateY(-3px); box-shadow:0 14px 36px rgba(0,0,0,.08); }
.review-card.missing { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:30px; border:2px dashed rgba(59,130,246,.3); background:rgba(59,130,246,.04); cursor:default; }
.rv-missing { font-size:14px; font-weight:600; color:var(--text); text-align:center; }
.rv-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.rv-who { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.rv-name { font-size:14px; font-weight:700; }
.rv-grade { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:800; color:#fff; }
.rv-grade.grade-s { background:linear-gradient(135deg,#f59e0b,#ef4444); box-shadow:0 4px 12px rgba(239,68,68,.3); }
.rv-grade.grade-ap { background:linear-gradient(135deg,#8b5cf6,#ec4899); box-shadow:0 4px 12px rgba(139,92,246,.3); }
.rv-grade.grade-a { background:linear-gradient(135deg,#10b981,#22c55e); box-shadow:0 4px 12px rgba(34,197,94,.3); }
.rv-grade.grade-b { background:linear-gradient(135deg,#3b82f6,#60a5fa); box-shadow:0 4px 12px rgba(59,130,246,.3); }
.rv-grade.grade-c { background:linear-gradient(135deg,#94a3b8,#cbd5e1); color:#475569; }
.rv-grade.grade-d { background:linear-gradient(135deg,#64748b,#475569); }
.rv-total { text-align:center; margin-bottom:14px; }
.rv-score { font-size:36px; font-weight:800; background:var(--gradient-primary); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; font-variant-numeric:tabular-nums; }
.rv-dims { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-bottom:12px; }
.rv-dim { text-align:center; padding:8px 4px; background:rgba(255,255,255,.4); border-radius:10px; }
.rv-dim-val { font-size:16px; font-weight:700; color:var(--text); margin-top:2px; font-variant-numeric:tabular-nums; }
.rv-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:10px; border-top:1px solid rgba(0,0,0,.05); }

/* 绩效详情 */
.review-detail { display:flex; flex-direction:column; gap:16px; }
.rd-hero { padding:22px; border-radius:20px; display:flex; align-items:center; gap:22px; }
.grade-circle { width:72px; height:72px; border-radius:20px; display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:800; color:#fff; flex-shrink:0; }
.grade-circle.grade-s { background:linear-gradient(135deg,#f59e0b,#ef4444); }
.grade-circle.grade-ap { background:linear-gradient(135deg,#8b5cf6,#ec4899); }
.grade-circle.grade-a { background:linear-gradient(135deg,#10b981,#22c55e); }
.grade-circle.grade-b { background:linear-gradient(135deg,#3b82f6,#60a5fa); }
.grade-circle.grade-c { background:linear-gradient(135deg,#94a3b8,#cbd5e1); color:#475569; }
.grade-circle.grade-d { background:linear-gradient(135deg,#64748b,#475569); }
.rd-hero-mid { flex:1; }
.rd-hero-score { font-size:40px; font-weight:800; font-variant-numeric:tabular-nums; background:var(--gradient-primary); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; line-height:1; }
.rd-hero-dims { display:flex; gap:14px; }
.rd-hero-dim { text-align:center; min-width:56px; }
.d-dim-num { font-size:18px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.rd-cols { display:grid; grid-template-columns:1fr 1.4fr; gap:14px; }
.rd-col { padding:18px; border-radius:16px; }
.rd-col .rd-sec-h { font-size:12px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:12px; }
.facts-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
@media (max-width:700px){ .facts-grid{grid-template-columns:repeat(2,1fr);} }
.fact { padding:12px; background:rgba(255,255,255,.5); border-radius:12px; text-align:center; }
.fact-num { font-size:22px; font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; }
.dim-row { margin-bottom:14px; }
.dim-row.mgr-dim { margin-bottom:0; padding-top:10px; border-top:1px dashed rgba(0,0,0,.1); }
.dim-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.dim-name { font-size:13px; font-weight:600; flex:1; }
.dim-meta { font-size:11px; }
.dim-val-num { font-size:15px; font-weight:800; color:var(--primary); font-variant-numeric:tabular-nums; }
.dim-bar { height:8px; background:rgba(0,0,0,.06); border-radius:6px; overflow:hidden; }
.dim-fill { height:100%; background:var(--gradient-primary); border-radius:6px; transition:width .6s var(--ease-spring); }
.dim-desc { margin-top:4px; }

/* 评分表单 */
.auto-score-ref { padding:12px; border-radius:12px; background:rgba(255,255,255,.6); font-size:12.5px; }
.asr-row { display:flex; justify-content:space-between; padding:5px 0; color:var(--text-muted); }
.asr-row.total { border-top:1px dashed rgba(0,0,0,.1); margin-top:6px; padding-top:8px; font-weight:700; color:var(--text); font-size:13.5px; }
.adj-row { display:flex; align-items:center; gap:12px; }
.adj-row input[type=range] { flex:1; accent-color:var(--primary); }
.adj-num { font-size:16px; font-weight:800; color:var(--primary); min-width:40px; text-align:right; font-variant-numeric:tabular-nums; }
.chk { display:inline-flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; }
.chk input { accent-color:var(--primary); width:15px; height:15px; }

/* 星级 */
.star-picker { display:flex; align-items:center; }
.star-btn { background:none; border:none; font-size:24px; color:rgba(0,0,0,.15); cursor:pointer; padding:2px; transition:.15s; }
.star-btn.on { color:#f59e0b; }
.star-btn:hover { transform:scale(1.15); }
.eval-rating { margin-bottom:6px; font-size:22px; }
.eval-rating .star { color:rgba(0,0,0,.12); margin-right:2px; }
.eval-rating .star.on { color:#f59e0b; }

/* ========== 绩效证据面板 ========== */
.eval-block.danger { background:rgba(239,68,68,.06); border-left:3px solid var(--danger); }
.kr-role { display:inline-block; font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:8px; vertical-align:1px; margin-right:4px; }
.kr-role.owner { background:rgba(59,130,246,.12); color:#2563eb; }
.kr-role.sponsor { background:rgba(139,92,246,.12); color:#7c3aed; }
.kr-role.contrib { background:rgba(16,185,129,.12); color:#059669; }
.kr-ev-row { padding:10px 0; border-bottom:1px dashed rgba(0,0,0,.06); }
.kr-ev-row:last-child { border-bottom:none; }
.kr-ev-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.kr-ev-title { font-size:13px; font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kr-ev-pct { font-size:15px; font-weight:800; color:var(--primary); font-variant-numeric:tabular-nums; }
.kr-ev-bar { height:6px; background:rgba(0,0,0,.06); border-radius:4px; margin:6px 0 4px; overflow:hidden; }
.kr-ev-fill { height:100%; background:linear-gradient(90deg,#3b82f6,#60a5fa); border-radius:4px; transition:width .6s var(--ease-spring); }
.kr-ev-meta { font-size:11.5px; }
.ev-task-list { display:flex; flex-direction:column; gap:4px; }
.ev-task-row { display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:8px; font-size:12.5px; transition:background .15s; }
.ev-task-row:hover { background:rgba(0,0,0,.04); }
.ev-task-row.late { background:rgba(239,68,68,.05); }
.ev-task-row.late:hover { background:rgba(239,68,68,.1); }
.ev-dot { width:18px; height:18px; border-radius:50%; display:grid; place-items:center; font-size:10px; font-weight:800; flex-shrink:0; }
.ev-dot.ok { background:rgba(16,185,129,.12); color:#059669; }
.ev-dot.late { background:rgba(239,68,68,.12); color:#dc2626; }
.ev-t-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.ev-t-meta { color:var(--text-muted); flex-shrink:0; }
.heat-grid { display:flex; flex-wrap:wrap; gap:4px; }
.heat-cell { width:22px; height:22px; border-radius:5px; background:rgba(0,0,0,.05); display:grid; place-items:center; font-size:10px; color:transparent; transition:transform .1s; position:relative; cursor:default; }
.heat-cell.l1 { background:rgba(59,130,246,.18); }
.heat-cell.l2 { background:rgba(59,130,246,.35); }
.heat-cell.l3 { background:rgba(59,130,246,.55); }
.heat-cell.l4 { background:rgba(59,130,246,.78); color:#fff; }
.heat-cell.has-blocker::after { content:''; position:absolute; top:2px; right:2px; width:5px; height:5px; border-radius:50%; background:#ef4444; }
.ev-quote-block { margin-top:8px; }
.ev-quote-h { font-size:11.5px; font-weight:700; margin-bottom:6px; letter-spacing:.3px; }
.ev-quote-h.good { color:#059669; }
.ev-quote-h.warn { color:#d97706; }
.ev-quote { padding:7px 10px; font-size:12.5px; line-height:1.6; border-radius:8px; margin-bottom:4px; display:flex; gap:8px; }
.ev-quote.good { background:rgba(16,185,129,.06); border-left:2px solid #10b981; }
.ev-quote.warn { background:rgba(245,158,11,.06); border-left:2px solid #f59e0b; }

/* 响应式 */
@media (max-width: 768px) {
  .rd-cols { grid-template-columns:1fr; }
  .rd-grid { grid-template-columns:1fr; }
  .review-grid { grid-template-columns:1fr; }
  .rd-hero { flex-direction:column; text-align:center; gap:12px; }
  .rd-hero-dims { justify-content:center; }
}

/* 空状态 */
.empty-state { padding:48px 24px; text-align:center; border-radius:16px; border:1px dashed rgba(255,255,255,.3); }
.empty-state .es-icon { color:var(--muted); margin-bottom:12px; display:inline-flex; }
.empty-state .es-title { font-size:15px; font-weight:600; color:var(--text); margin-bottom:6px; }
.empty-state .es-desc { font-size:13px; }

/* 表单网格（日报/周报/绩效表单） */
.form-grid { display:flex; flex-direction:column; gap:14px; }
.form-row { display:flex; flex-direction:column; gap:6px; }
.form-row > label { font-size:12.5px; font-weight:600; color:var(--text-2); }
.eval-text { font-size:13.5px; line-height:1.7; color:var(--text); white-space:pre-wrap; }
.danger-text { color:var(--danger) !important; }

/* ============ 部门架构 ============ */
.team-layout { display:grid; grid-template-columns:260px 1fr; gap:18px; align-items:start; }
.dept-tree { padding:14px; position:sticky; top:76px; max-height:calc(100vh - 96px); overflow-y:auto; }
.dept-tree .dt-title { font-size:12px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; padding:0 6px; }
.dept-node { display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:10px; cursor:pointer; font-size:13.5px; color:var(--text); transition:.15s; user-select:none; }
.dept-node:hover { background:rgba(99,102,241,.08); }
.dept-node.on { background:linear-gradient(135deg,rgba(99,102,241,.15),rgba(139,92,246,.12)); color:var(--primary); font-weight:600; box-shadow:inset 2px 0 0 var(--primary); }
.dept-node .dt-caret { width:14px; height:14px; display:inline-flex; align-items:center; justify-content:center; font-size:9px; color:var(--text-muted); transition:.2s; flex-shrink:0; }
.dept-node.open .dt-caret { transform:rotate(90deg); }
.dept-node .dt-icon { width:22px; height:22px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; flex-shrink:0; }
.dept-node .dt-name { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dept-node .dt-count { font-size:11px; color:var(--text-muted); background:rgba(0,0,0,.05); padding:1px 7px; border-radius:10px; }
.dept-node.on .dt-count { background:var(--primary); color:#fff; }
.dept-children { padding-left:14px; overflow:hidden; }
.dept-children.collapsed { display:none; }
.dept-unassigned { margin-top:10px; padding-top:10px; border-top:1px dashed rgba(0,0,0,.08); }

/* ============ 部门绩效看板 ============ */
.dept-hero { padding:22px; border-radius:18px; background:linear-gradient(135deg,rgba(99,102,241,.14) 0%,rgba(139,92,246,.10) 50%,rgba(236,72,153,.10) 100%); border:1px solid rgba(99,102,241,.18); margin-bottom:16px; display:flex; gap:22px; align-items:stretch; position:relative; overflow:hidden; }
.dept-hero::before { content:''; position:absolute; inset:-20% -20% auto auto; width:300px; height:300px; background:radial-gradient(circle,rgba(99,102,241,.25),transparent 60%); filter:blur(30px); pointer-events:none; }
.dept-hero > * { position:relative; z-index:1; }
.dh-score { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:130px; padding:8px 18px; border-radius:16px; background:rgba(255,255,255,.6); backdrop-filter:blur(12px); }
.dh-score .dh-num { font-size:52px; font-weight:800; background:linear-gradient(135deg,#6366F1,#8B5CF6); -webkit-background-clip:text; -webkit-text-fill-color:transparent; line-height:1; font-family:var(--font-mono,ui-monospace,SFMono-Regular,monospace); }
.dh-score .dh-label { font-size:12px; color:var(--text-muted); margin-top:4px; }
.dh-score .dh-grade { margin-top:6px; font-size:13px; font-weight:700; padding:2px 10px; border-radius:10px; background:linear-gradient(135deg,#10b981,#22c55e); color:#fff; }
.dh-info { flex:1; display:flex; flex-direction:column; gap:12px; }
.dh-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dh-title { font-size:20px; font-weight:700; }
.dh-switch { display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border-radius:10px; background:rgba(0,0,0,.05); font-size:12px; cursor:pointer; transition:.15s; }
.dh-switch:hover { background:rgba(99,102,241,.15); color:var(--primary); }
.dh-switch select { border:none; outline:none; background:transparent; font-size:12px; font-weight:600; color:inherit; cursor:pointer; }
.dh-meta { display:flex; gap:18px; font-size:12.5px; color:var(--text-muted); }
.dh-meta b { color:var(--text); font-weight:700; }
.dh-dims { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.dh-dim { background:rgba(255,255,255,.55); border-radius:12px; padding:10px 12px; backdrop-filter:blur(6px); }
.dh-dim .dd-label { font-size:11.5px; color:var(--text-muted); margin-bottom:5px; }
.dh-dim .dd-val { font-size:22px; font-weight:700; color:var(--text); font-family:var(--font-mono,ui-monospace,SFMono-Regular,monospace); }
.dh-dim .dd-bar { height:4px; border-radius:3px; background:rgba(0,0,0,.08); margin-top:6px; overflow:hidden; }
.dh-dim .dd-bar > i { display:block; height:100%; background:linear-gradient(90deg,#6366F1,#8B5CF6); border-radius:3px; }

.dept-dist { margin-bottom:16px; }
.dd-row { display:flex; align-items:center; gap:10px; padding:6px 0; font-size:12.5px; }
.dd-row .dr-g { width:24px; font-weight:800; text-align:center; }
.dd-row .dr-g.grade-s { color:#EF4444; }
.dd-row .dr-g.grade-ap { color:#A855F7; }
.dd-row .dr-g.grade-a { color:#10B981; }
.dd-row .dr-g.grade-b { color:#3B82F6; }
.dd-row .dr-g.grade-c { color:#94A3B8; }
.dd-row .dr-g.grade-d { color:#64748B; }
.dd-row .dr-track { flex:1; height:8px; border-radius:6px; background:rgba(0,0,0,.06); overflow:hidden; }
.dd-row .dr-track > i { display:block; height:100%; border-radius:6px; }
.dd-row .dr-n { width:40px; text-align:right; font-family:var(--font-mono,ui-monospace,SFMono-Regular,monospace); font-size:12px; color:var(--text-muted); }

.dept-subdepts { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; margin-bottom:16px; }
.subdept-card { padding:12px 14px; border-radius:12px; background:rgba(255,255,255,.6); border:1px solid rgba(0,0,0,.05); cursor:pointer; transition:.2s; display:flex; align-items:center; gap:10px; }
.subdept-card:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(99,102,241,.12); border-color:rgba(99,102,241,.25); }
.subdept-card .sd-name { font-size:13px; font-weight:600; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.subdept-card .sd-num { font-size:16px; font-weight:800; font-family:var(--font-mono); color:var(--primary); }
.subdept-card .sd-p { font-size:11px; color:var(--text-muted); }

/* 成员小头像条（部门绩效） */
.dept-members { display:flex; flex-wrap:wrap; gap:6px; }
.dm-avatar { width:28px; height:28px; border-radius:50%; font-size:11px; font-weight:700; color:#fff; display:inline-flex; align-items:center; justify-content:center; border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.08); cursor:pointer; transition:.15s; position:relative; }
.dm-avatar:hover { transform:scale(1.15); z-index:2; }
.dm-avatar .dm-tip { position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:rgba(0,0,0,.8); color:#fff; font-size:11px; padding:4px 8px; border-radius:6px; white-space:nowrap; pointer-events:none; opacity:0; transition:.15s; }
.dm-avatar:hover .dm-tip { opacity:1; }
.dm-avatar.more { background:rgba(0,0,0,.08); color:var(--text-muted); }

@media (max-width:1024px) {
  .team-layout { grid-template-columns:1fr; }
  .dept-tree { position:static; max-height:none; }
  .dh-dims { grid-template-columns:repeat(2,1fr); }
}
.section-title { font-size:12px; font-weight:600; letter-spacing:.3px; text-transform:uppercase; }


/* ===== 本次批量 UI 修复样式 ===== */
.avatar.xs { width:22px; height:22px; font-size:10px; }
.avatar.img { background-size:cover; background-position:center; background-repeat:no-repeat; color:transparent; }
.avatar.img::after { content:''; }

/* 工具类 */
.ml-4 { margin-left:4px; } .ml-6 { margin-left:6px; } .mt-4{margin-top:4px} .mt-6{margin-top:6px} .mt-8{margin-top:8px} .mt-10{margin-top:10px} .mt-12{margin-top:12px}
.row { display:flex; align-items:center; } .row.gap-6{gap:6px} .row.gap-8{gap:8px} .row.gap-10{gap:10px} .row.gap-12{gap:12px} .row.between{justify-content:space-between}
.row.wrap{flex-wrap:wrap}

/* OKR 详情 meta-chip */
.meta-chip { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; padding:5px 10px; border-radius:10px; background:rgba(255,255,255,.55); color:var(--text-muted); border:1px solid rgba(0,0,0,.04); }
.meta-chip .chip-label { display:inline-flex; align-items:center; gap:4px; color:var(--text-faint); font-weight:500; }
.meta-chip .chip-val { display:inline-flex; align-items:center; gap:4px; color:var(--text); font-weight:600; }
.meta-chip .avatars-line { display:inline-flex; align-items:center; gap:4px; }

/* 日报详情头部修复 */
.rd-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:18px; }
.rd-head-l { flex:1; min-width:0; }
.rd-meta { display:flex; align-items:center; gap:0; margin-top:6px; flex-wrap:wrap; }
.rc-author { display:inline-flex; align-items:center; }

/* 筛选条横向 seg + 窄下拉 */
.seg.seg-h button { display:inline-flex; align-items:center; gap:4px; padding:7px 14px; }
.filter-bar { flex-wrap:wrap; }

/* 自定义人员选择器 upicker */
.upicker { position:relative; display:inline-block; }
.upick-btn { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:10px; border:1px solid rgba(0,0,0,.08); background:rgba(255,255,255,.7); color:var(--text); font-size:12.5px; font-weight:600; cursor:pointer; min-width:130px; max-width:200px; transition:.2s; }
.upick-btn:hover { background:rgba(255,255,255,.95); border-color:var(--primary); }
.upick-btn svg { transition:transform .2s; margin-left:auto; }
.upicker.open .upick-btn svg { transform:rotate(180deg); }
.upick-label { display:inline-flex; align-items:center; gap:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.upick-label .upick-n { overflow:hidden; text-overflow:ellipsis; }
.upick-menu { position:fixed; top:0; left:0; z-index:9999; min-width:220px; max-height:280px; overflow:auto; background:var(--surface-solid, #fff); border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.06); padding:6px; opacity:0; transform:translateY(-4px); transition:opacity .15s, transform .15s; }
.upick-menu.open { opacity:1; transform:translateY(0); }
.upick-opt { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; cursor:pointer; transition:.15s; }
.upick-opt:hover { background:var(--surface-2, rgba(0,0,0,.05)); }
.upick-opt.on { background:rgba(99,102,241,.1); color:var(--primary); }
.upick-n { font-size:13px; font-weight:600; color:var(--text); }
.upick-t { margin-left:auto; font-size:11px; }
.upicker.upick-sm .upick-btn { padding:5px 8px; font-size:12px; min-width:120px; max-width:160px; }

/* 成员表单头像 */
.field-avatar { flex:0 0 auto; }
.field-avatar .avatar.lg { width:64px; height:64px; flex:none; }

/* ===== 项目详情 ===== */
.pm-list { display:flex; flex-direction:column; gap:2px; }
.pm-row { display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:8px; transition:background .15s; }
.pm-row:hover { background:var(--surface-2); }
.pm-row .bold { font-size:13px; }
.stats-row { display:flex; gap:10px; flex-wrap:wrap; }
.stat-pill { flex:1; min-width:80px; padding:10px 12px; border-radius:12px; background:var(--surface-2); text-align:center; }
.stat-num { font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.1; }
.stat-num.todo { color:#94A3B8; }
.stat-num.doing { color:#3B82F6; }
.stat-num.review { color:#F59E0B; }
.stat-num.done { color:#10B981; }
.stat-lbl { margin-top:4px; }
.sprint-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.sprint-card { padding:14px 16px; border-radius:14px; background:var(--surface-2); border:1px solid var(--border); transition:.2s; }
.sprint-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.06); }

/* ===== 迭代卡片紧凑布局（覆盖旧 sprint-card） ===== */
.sprint-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:14px; }
.sprint-card { padding:16px 18px; display:flex; flex-direction:column; gap:10px; background:var(--surface-solid); border:1px solid var(--border); border-radius:16px; transition:.25s var(--spring); position:relative; overflow:hidden; }
.sprint-card:hover { transform:translateY(-3px); box-shadow:0 14px 36px rgba(0,0,0,.08); border-color:var(--primary); }
.sprint-card.active { border-color:var(--primary); box-shadow:0 10px 30px rgba(99,102,241,.14); }
.sp-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.sp-title { flex:1; min-width:0; display:flex; align-items:center; gap:10px; }
.sp-key { flex:none; font-size:11px; font-weight:800; letter-spacing:.5px; padding:3px 8px; border-radius:7px; background:var(--surface-2); color:var(--text-muted); font-family:'SF Mono',ui-monospace,monospace; }
.sp-name { font-size:15px; font-weight:700; line-height:1.35; color:var(--text); word-break:break-word; }
.sp-actions { display:flex; gap:4px; flex:none; opacity:0; transition:opacity .2s; align-items:center; }
.sprint-card:hover .sp-actions, .sprint-card.active .sp-actions { opacity:1; }
.sp-actions .icon-btn { background:transparent; color:var(--text-muted); display:inline-flex; align-items:center; justify-content:center; padding:0; }
.sp-actions .icon-btn svg { width:14px; height:14px; display:block; }
.sp-actions .icon-btn:hover { background:var(--surface-2); color:var(--primary); }
.sp-status { display:flex; }
.sp-goal { display:flex; align-items:flex-start; gap:6px; line-height:1.55; color:var(--text-muted); }
.sp-goal svg { flex:none; margin-top:2px; opacity:.7; }
.sp-goal span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sp-meta { display:flex; flex-wrap:wrap; gap:10px 14px; color:var(--text-muted); }
.sp-meta > span { display:inline-flex; align-items:center; gap:4px; }
.sp-bar .progress { height:6px; }
.sp-foot { display:flex; justify-content:space-between; align-items:center; padding-top:2px; }

/* ===== 项目详情紧凑布局 ===== */
.pd-progress { padding:22px 24px; }
.pd-top { display:grid; grid-template-columns:1fr 260px; gap:24px; align-items:stretch; }
.pd-left { display:flex; flex-direction:column; gap:12px; min-width:0; }
.pd-num-row { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.pd-num { font-size:40px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; color:var(--text); letter-spacing:-.02em; background:var(--gradient-primary); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.pd-unit { font-size:18px; font-weight:700; }
.pd-sub { font-size:12.5px; }
.pd-bar .progress { height:8px; border-radius:8px; }
.pd-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.pd-stats .stat-pill { padding:12px 10px; }
.pd-stats .stat-num { font-size:22px; }
.pd-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
.pd-right { padding:14px 16px; border-radius:14px; background:var(--surface-2); display:flex; flex-direction:column; gap:12px; }
.pd-team-title { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--text-muted); }
.pd-members { display:flex; flex-wrap:wrap; gap:8px; flex:1; align-content:flex-start; }
.mem-avatar { transition:transform .2s var(--spring); cursor:pointer; }
.mem-avatar:hover { transform:translateY(-2px) scale(1.08); }
.pd-team-all { align-self:flex-start; }

@media (max-width:900px) {
  .pd-top { grid-template-columns:1fr; }
  .pd-stats { grid-template-columns:repeat(2,1fr); }
}

/* ===== 迭代横向列表行 ===== */
.sprint-list { display:flex; flex-direction:column; gap:10px; }
.sprint-row { padding:14px 18px; background:var(--surface-solid); border:1px solid var(--border); border-radius:14px; transition:.2s var(--spring); position:relative; }
.sprint-row:hover { transform:translateY(-1px); box-shadow:0 10px 28px rgba(0,0,0,.07); border-color:var(--primary); }
.sprint-row.active { border-color:var(--primary); box-shadow:0 6px 20px rgba(99,102,241,.12); background:linear-gradient(180deg, rgba(99,102,241,.04), transparent 60%); }
.sr-main { display:flex; flex-direction:column; gap:10px; min-width:0; }
.sr-head { display:flex; align-items:center; gap:10px; }
.sr-name { font-size:15px; font-weight:700; color:var(--text); flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-actions { margin-left:auto; display:flex; gap:4px; align-items:center; opacity:0; transition:opacity .2s; flex:none; }
.sprint-row:hover .sr-actions, .sprint-row.active .sr-actions { opacity:1; }
.sr-actions .icon-btn { background:transparent; color:var(--text-muted); display:inline-flex; align-items:center; justify-content:center; padding:0; width:28px; height:28px; border-radius:8px; }
.sr-actions .icon-btn svg { width:14px; height:14px; display:block; }
.sr-actions .icon-btn:hover { background:var(--surface-2); color:var(--primary); }
.sr-body { display:flex; align-items:center; gap:18px; flex-wrap:wrap; font-size:12.5px; color:var(--text-muted); }
.sr-goal { display:inline-flex; align-items:center; gap:5px; flex:1; min-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-goal.muted { color:var(--text-faint); }
.sr-goal svg { flex:none; opacity:.7; }
.sr-meta { display:inline-flex; gap:12px; flex:none; }
.sr-meta > span { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.sr-pct { font-weight:600; color:var(--primary); }
.sr-bar .progress { height:6px; border-radius:999px; }

/* ====== 角色与权限页 ====== */
.role-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; }
.role-card { background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:14px; transition:.2s var(--spring); display:flex; flex-direction:column; gap:12px; }
.role-card:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.07); border-color:var(--primary); }
.role-card-admin { border-color:rgba(239,68,68,.4); background:linear-gradient(180deg, rgba(239,68,68,.06), transparent 70%); }
.rc-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.rc-name { font-weight:700; font-size:15px; display:flex; align-items:center; gap:6px; }
.rc-count { font-size:24px; font-weight:800; color:var(--primary); line-height:1; }
.rc-count span { font-size:11px; color:var(--text-muted); font-weight:500; margin-left:2px; }
.role-card-admin .rc-count { color:#EF4444; }
.rc-avatars { display:flex; align-items:center; min-height:32px; }
.rc-avatars .avatar.sm { margin-left:-6px; border:2px solid var(--surface-2); }
.rc-avatars .avatar.sm:first-child { margin-left:0; }
.rc-avatars .avatar.more { background:var(--surface); color:var(--text-muted); font-size:11px; display:inline-flex; align-items:center; justify-content:center; }
.rc-actions { margin-top:auto; display:flex; gap:8px; }

.perm-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:12px; }
.perm-table { width:100%; border-collapse:collapse; font-size:13px; }
.perm-table th, .perm-table td { padding:10px 12px; text-align:center; border-bottom:1px solid var(--border); white-space:nowrap; }
.perm-table th { background:var(--surface-2); font-weight:600; font-size:12px; color:var(--text-muted); position:sticky; top:0; }
.perm-table th:first-child, .perm-table td.perm-name { text-align:left; position:sticky; left:0; background:var(--surface); z-index:1; min-width:220px; }
.perm-table th:first-child { background:var(--surface-2); z-index:2; }
.perm-table tr.perm-group td { background:var(--surface-2); font-weight:600; text-align:left; padding:8px 12px; color:var(--text-muted); font-size:12px; letter-spacing:.3px; }
.perm-table td.perm-name { display:flex; align-items:center; gap:8px; }
.perm-table td.perm-name code { font-size:11px; color:var(--text-muted); background:transparent; padding:0; }
.perm-table td.perm-cell.on { color:var(--primary); }
.perm-table td.perm-cell:not(.on) { color:var(--border); }
.perm-legend { display:inline-block; width:12px; height:12px; border-radius:4px; border:1px solid var(--border); vertical-align:middle; margin-right:4px; background:var(--surface-2); }
.perm-legend.on { background:var(--primary); border-color:var(--primary); }

.member-role-list { display:flex; flex-direction:column; gap:6px; }
.mr-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:10px; transition:.15s; }
.mr-row:hover { background:var(--surface-2); }
.mr-main { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }

.perm-chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip-solid { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:999px; background:rgba(99,102,241,.1); color:var(--primary); font-size:12px; font-weight:500; }

/* badge color variants */
.badge-danger { background:rgba(239,68,68,.12); color:#EF4444; }
.badge-primary { background:rgba(99,102,241,.12); color:#6366F1; }
.badge-success { background:rgba(16,185,129,.12); color:#10B981; }
.badge-warning { background:rgba(245,158,11,.12); color:#F59E0B; }
.badge-info { background:rgba(14,165,233,.12); color:#0EA5E9; }
.badge-pink { background:rgba(236,72,153,.12); color:#EC4899; }
.badge-muted { background:var(--surface-2); color:var(--text-muted); }

.avatar.lg { width:48px; height:48px; font-size:20px; }

code { background:var(--surface-2); padding:1px 6px; border-radius:5px; font-size:12px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--text); }

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

/* ===== 角色管理新增样式 ===== */
.rl-color-dot{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s ease, border-color .15s ease;}
.rl-color-dot:hover{transform:scale(1.1);}
.rl-color-dot.sel{border-color:var(--text);transform:scale(1.1);box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--primary);}
.rl-color-dot:disabled{cursor:not-allowed;opacity:.5;transform:none;}
.perm-toggle{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.perm-toggle input{display:none;}
.perm-toggle .perm-box{width:26px;height:26px;border-radius:8px;border:1.5px solid var(--border);display:flex;align-items:center;justify-content:center;background:var(--surface);transition:all .15s ease;color:transparent;}
.perm-toggle:hover .perm-box{border-color:var(--primary);}
.perm-toggle input:checked + .perm-box{background:var(--primary);border-color:var(--primary);color:#fff;}
.perm-toggle input:checked + .perm-box::after{content:'✓';font-size:14px;font-weight:700;}
.perm-toggle input:disabled + .perm-box{cursor:not-allowed;opacity:.5;}
.role-opt-edit{transition:border-color .15s ease, background .15s ease;}
.role-opt-edit:hover{background:var(--surface-2);}
.role-opt-edit input[type=radio]{accent-color:var(--primary);}

/* ---------- 工作流配置 ---------- */
.wf-hint{display:flex;align-items:center;gap:6px;color:var(--text-muted);}
.wf-warning{display:flex;align-items:center;gap:6px;padding:8px 12px;background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.25);color:#EF4444;border-radius:10px;margin-bottom:10px;font-size:13px;}
.wf-rows{display:flex;flex-direction:column;gap:8px;}
.wf-row{display:grid;grid-template-columns:72px 28px 1fr auto;gap:10px;align-items:center;padding:10px 12px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;transition:.15s ease;}
.wf-row:hover{border-color:var(--primary);}
.wf-order{display:flex;flex-direction:column;align-items:center;gap:2px;}
.wf-order .wf-idx{font-size:12px;font-weight:700;color:var(--text-muted);width:24px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--surface);border:1px solid var(--border);}
.wf-order .btn-icon{width:24px;height:22px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text-muted);}
.wf-order .btn-icon:hover:not(:disabled){color:var(--primary);border-color:var(--primary);background:rgba(59,130,246,.06);}
.wf-order .btn-icon:disabled{opacity:.35;cursor:not-allowed;}
.wf-arrow{display:flex;align-items:center;justify-content:center;color:var(--text-muted);}
.wf-main{display:flex;flex-direction:column;gap:4px;min-width:0;}
.wf-main .wf-name{flex:1;min-width:120px;}
.wf-main .wf-color{width:36px;height:32px;padding:0;border:1px solid var(--border);border-radius:8px;background:none;cursor:pointer;flex:none;}
.wf-main .wf-cat{flex:none;}
.wf-main .wf-wip{flex:none;display:flex;align-items:center;gap:4px;}
.wf-main .wf-code{flex:none;padding:2px 6px;border-radius:6px;background:var(--surface);border:1px solid var(--border);font-size:11px;color:var(--text-muted);}
.wf-rows [data-wfclr].rl-color-dot{width:18px;height:18px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:.12s;}
.wf-rows [data-wfclr].rl-color-dot.sel{border-color:var(--text);transform:scale(1.15);box-shadow:0 2px 6px rgba(0,0,0,.12);}

/* btn-xs 工具类 */
.btn.btn-xs{height:24px;padding:0 8px;font-size:11px;border-radius:6px;}
.btn.btn-icon{display:inline-flex;align-items:center;justify-content:center;}

/* ---------- 导航：分组/二级菜单 ---------- */
.nav-group{display:flex;flex-direction:column;}
.nav-group .nav-group-head{justify-content:space-between;cursor:pointer;}
.nav-group .nav-caret{margin-left:auto;color:var(--text-faint);transition:transform .2s ease;display:inline-flex;}
.nav-group.open .nav-caret{transform:rotate(180deg);}
.nav-group .nav-sub{display:none;flex-direction:column;padding:2px 0 4px 26px;gap:2px;}
.nav-group.open .nav-sub{display:flex;}
.nav-sub-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;color:var(--text-2);font-size:13px;text-decoration:none;transition:.15s ease;font-weight:500;}
.nav-sub-item svg{width:15px;height:15px;flex:none;opacity:.7;}
.nav-sub-item:hover{background:var(--surface-2);color:var(--text);}
.nav-sub-item.active{background:rgba(59,130,246,.12);color:var(--primary);}
.nav-sub-item.active svg{opacity:1;}
.nav-group-head.child-active{color:var(--primary);}
.nav-group-head.child-active svg{color:var(--primary);}

/* ---------- 工作流预览/子弹 ---------- */
.wf-preview{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px 12px;background:var(--surface-2);border:1px dashed var(--border);border-radius:10px;}
.wf-preview-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;color:#fff;background:var(--wc);box-shadow:0 2px 6px rgba(0,0,0,.08);white-space:nowrap;}
.wf-preview-arrow{color:var(--text-faint);display:inline-flex;align-items:center;}
.wf-bullet{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--primary);margin-right:6px;vertical-align:middle;}
.mr-8{margin-right:8px;}

/* ===========================================================
   移动端适配（手机 / 小屏平板 ≤640px）
   =========================================================== */
@media (max-width: 640px) {
  /* 整体：sidebar 全宽抽屉 + 遮罩 */
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh; width: 82vw; max-width: 300px;
    transform: translateX(-105%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 200; padding: 16px 12px;
    box-shadow: 12px 0 40px rgba(0,0,0,.18);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199;
    opacity: 0; pointer-events: none; transition: opacity .25s;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex !important; }

  /* 顶栏紧凑化 */
  .topbar { padding: 0 12px; gap: 8px; height: 56px; }
  .topbar .page-title { font-size: 16px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .search { max-width: none; margin-left: 0; padding: 8px 10px; flex: 0 0 auto; background: transparent; border: none; box-shadow: none; }
  .topbar .search input { display: none; }
  .topbar .search kbd { display: none; }
  .topbar .search::after { content: ''; }
  .topbar .icon-btn { width: 38px; height: 38px; }
  .user-chip .meta { display: none; }
  .user-chip { padding: 4px; }

  /* 内容区 */
  .content { padding: 14px 12px 28px; }
  .page-head { flex-direction: column; align-items: flex-start !important; gap: 10px; margin-bottom: 14px; }
  .page-head h1 { font-size: 20px; }
  .page-head p { font-size: 13px; }
  .page-head .row { width: 100%; }
  .page-head .btn { flex: 1; justify-content: center; }

  /* 网格全列 */
  .grid-bento { gap: 10px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 12 !important; }

  /* 卡片 */
  .card { padding: 14px; border-radius: 14px; }
  .card-title { font-size: 14px; }

  /* 按钮触摸友好 */
  .btn { min-height: 38px; font-size: 13.5px; }
  .btn-sm { min-height: 32px; font-size: 12.5px; padding: 0 10px; }

  /* 输入框防 iOS 缩放 */
  .input, .select, textarea { font-size: 16px !important; }

  /* 看板：横向滚动 */
  .board { display: block; overflow-x: auto; overflow-y: visible; white-space: nowrap; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
  .columns { display: inline-flex; gap: 10px; align-items: flex-start; white-space: nowrap; }
  .column { width: 78vw; max-width: 300px; min-width: 240px; flex: none; white-space: normal; }
  .column .column-head { position: sticky; top: 0; }

  /* 任务卡 */
  .task-card { padding: 10px 12px; }
  .t-meta { flex-wrap: wrap; gap: 4px; }

  /* 表格：允许横向滚动 */
  .perm-table-wrap, table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; font-size: 12.5px; }
  table th, table td { padding: 8px 8px; }
  .mr-row { flex-direction: column; align-items: flex-start !important; gap: 8px; }
  .mr-row .mr-main { width: 100%; }
  .mr-row button { align-self: flex-end; }

  /* 角色卡片 */
  .role-grid { grid-template-columns: 1fr; gap: 10px; }
  .role-card { padding: 12px; }
  .rc-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rc-actions { width: 100%; }
  .rc-actions .btn { flex: 1; }

  /* 工作流配置 */
  .wf-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .wf-row .wf-order { flex-direction: row; gap: 8px; justify-content: flex-start; }
  .wf-row .wf-order .wf-idx { order: 0; width: auto; padding: 0 8px; }
  .wf-row .wf-order .btn-icon { width: 28px; height: 28px; }
  .wf-row .wf-arrow { justify-content: flex-start; transform: rotate(90deg); padding-left: 6px; }
  .wf-main .row { flex-wrap: wrap; }
  .wf-main .wf-name { min-width: 0; flex: 1 1 100%; }
  .wf-main .wf-cat, .wf-main .wf-color { flex: none; }
  .wf-main .wf-code { display: none; }
  .wf-preview { padding: 8px 10px; gap: 4px; font-size: 11px; }
  .wf-preview-pill { padding: 3px 8px; font-size: 11px; }
  .wf-hint { font-size: 12px; line-height: 1.6; }

  /* Modal/Drawer 近全宽 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; margin: 0; border-radius: 18px 18px 0 0; max-height: 92dvh; animation: slideUp .25s ease; }
  .modal .modal-head { padding: 16px 16px 10px; }
  .modal .modal-body { padding: 8px 16px 16px; max-height: calc(92dvh - 130px); overflow-y: auto; }
  .modal .modal-foot { padding: 10px 16px 16px; gap: 8px; }
  .modal .modal-foot .btn { flex: 1; }
  .drawer { width: 92vw !important; right: 0 !important; }
  @keyframes slideUp { from { transform: translateY(100%); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

  /* 仪表盘 bento 卡片紧凑 */
  .bento-num { font-size: 28px !important; }
  .stat-pill { padding: 8px 6px; min-width: 0; }
  .stat-pill .stat-num { font-size: 18px; }
  .stat-pill .stat-lbl { font-size: 10.5px; }

  /* 项目列表 / 迭代列表 */
  .sprint-row { padding: 12px; }
  .sr-goal { min-width: 0; white-space: normal; }
  .project-card { padding: 12px; }

  /* 需求 / 缺陷列表条目紧凑 */
  .req-row, .bug-row, .task-row { padding: 10px 8px; }
  .filter-bar { flex-wrap: wrap; gap: 6px; }
  .filter-bar .seg-h { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .filter-bar .select { max-width: none; flex: 1; }

  /* 部门绩效 */
  .dh-score { min-width: 90px; padding: 8px 14px; }
  .dh-score .dh-num { font-size: 36px; }
  .dh-dims { grid-template-columns: repeat(2, 1fr); }
  .dept-subdepts { grid-template-columns: repeat(2, 1fr); }
  .dept-hero { flex-direction: column; padding: 16px; gap: 14px; }

  /* 登录页 */
  .login-wrap { padding: 16px; }
  .login-card { padding: 20px; }
  .login-box h2 { font-size: 22px; }
}

/* 进一步超小屏 ≤380px */
@media (max-width: 380px) {
  .topbar .page-title { font-size: 14px; max-width: 30vw; }
  .content { padding: 12px 10px 24px; }
  .card { padding: 12px 10px; }
  .dept-subdepts { grid-template-columns: 1fr; }
  .wf-preview-pill { font-size: 10px; padding: 2px 6px; }
}

/* ===========================================================
   日报周报 · 工作周视图 v2 (2026-10-19)
   =========================================================== */

/* 顶部周汇总条 */
.week-summary {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 14px;
  margin-bottom: 18px;
}
.ws-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ws-stat::before {
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background: var(--gradient-primary); opacity:.8;
}
.ws-stat.done::before { background: linear-gradient(135deg,#10b981,#22d3ee); }
.ws-stat.plan::before { background: linear-gradient(135deg,#3b82f6,#818cf8); }
.ws-stat.delay::before { background: linear-gradient(135deg,#f59e0b,#f97316); }
.ws-stat.rate::before { background: linear-gradient(135deg,#8b5cf6,#ec4899); }
.ws-stat.hours::before { background: linear-gradient(135deg,#64748b,#94a3b8); }
.ws-k { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .02em; }
.ws-v { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ws-v small { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-left: 3px; }
.ws-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* 周导航 */
.week-nav { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.week-nav-label { font-size:14px; font-weight:700; color: var(--text); }
.week-nav-sub { font-size:12px; color: var(--text-muted); margin-left:2px; }

/* 日期条（周一到周日横滑） */
.day-strip { display:grid; grid-template-columns: repeat(7, 1fr); gap:10px; margin-bottom:18px; }
.day-col {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display:flex; flex-direction:column; transition: all .2s;
  box-shadow: var(--shadow-sm); position:relative; min-width:0;
}
.day-col:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.day-col.today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.12), var(--shadow-sm); }
.day-col.weekend { background: var(--surface-2); opacity:.75; }
.day-col.empty-day { border-style: dashed; opacity:.55; }
.day-col.future { opacity:.7; }
.day-col.demo-day { border-style: dashed; }
.day-col.demo-day .day-head::after {
  content:'示例'; position:absolute; top:6px; right:8px; font-size:9px; font-weight:700;
  padding:1px 6px; border-radius:4px; background: rgba(99,102,241,.12); color: var(--primary);
}
.day-col.demo-day .day-head { position: relative; cursor: pointer; }
.day-head { padding:10px 12px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; cursor:pointer; }
.day-col.today .day-head { background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.05)); }
.day-wk { font-size:11px; color: var(--text-muted); font-weight:700; letter-spacing:.04em; }
.day-date { font-size:20px; font-weight:800; font-variant-numeric: tabular-nums; letter-spacing:-.02em; }
.day-col.today .day-date { color: var(--primary); }
.day-mood { font-size:18px; }
.day-body { padding:10px 10px 8px; flex:1; display:flex; flex-direction:column; gap:6px; min-height: 90px; min-width:0; overflow:hidden; }
.day-foot { padding: 6px 10px 10px; display:flex; align-items:center; justify-content:space-between; gap:6px; border-top: 1px dashed var(--border); margin-top:auto; }
.day-stat-pill {
  font-size:10.5px; font-weight:600; padding:2px 8px; border-radius:999px;
  background: var(--surface-2); color: var(--text-muted); display:inline-flex; align-items:center; gap:4px;
}
.day-stat-pill.done { background: rgba(16,185,129,.12); color:#059669; }
.day-stat-pill.delay { background: rgba(245,158,11,.12); color:#b45309; }
.day-stat-pill.todo { background: rgba(59,130,246,.10); color:#2563eb; }
.day-add-btn {
  width:24px; height:24px; border-radius:8px; display:grid; place-items:center;
  border:1px dashed var(--border-strong); background:transparent; cursor:pointer;
  color: var(--text-muted); font-size:16px; line-height:1; padding:0;
  transition: all .15s;
}
.day-add-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,.08); }
.day-write-btn {
  font-size:11px; padding:4px 10px; border-radius:8px; border:1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor:pointer; font-weight:600;
}
.day-write-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,.06); }

/* 工作事项行 */
.wi-row {
  display:grid; grid-template-columns: 18px 1fr; column-gap:8px; row-gap:2px;
  padding:6px; border-radius:8px;
  transition: background .12s;
  align-items:flex-start;
}
.wi-row:hover { background: var(--surface-2); }
.wi-check {
  appearance:none; -webkit-appearance:none;
  width:18px; height:18px; border-radius:6px; border:1.5px solid var(--border-strong);
  background: var(--surface); cursor:pointer; display:grid; place-items:center;
  margin-top:1px; transition: all .15s;
  grid-column:1; grid-row:1;
}
.wi-check:hover { border-color: var(--primary); }
.wi-check:checked { background: var(--primary); border-color: var(--primary); }
.wi-check:checked::after { content:"✓"; color:#fff; font-size:12px; font-weight:800; line-height:1; }
.wi-check.delayed { border-color: #f59e0b; }
.wi-body { grid-column:2; grid-row:1; min-width:0; }
.wi-text { font-size:13px; color: var(--text); line-height:1.5; word-break: break-word; }
.wi-row.done .wi-text { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.wi-row.delayed .wi-text { color: #b45309; }
.wi-row.doing .wi-text { color: var(--text); }
.wi-meta { display:flex; gap:6px; margin-top:4px; flex-wrap:wrap; }
.wi-tag {
  font-size:11px; padding:2px 8px; border-radius:10px; background: var(--surface-2);
  color: var(--text-muted); display:inline-flex; align-items:center; gap:3px; line-height:1.4;
}
.wi-tag.task { background: rgba(99,102,241,.10); color: var(--primary); cursor:pointer; }
.wi-tag.task:hover { background: rgba(99,102,241,.18); }
.wi-tag.delay-to { background: rgba(245,158,11,.10); color:#b45309; }
.wi-tag.from { background: rgba(148,163,184,.15); color: var(--text-muted); }
.wi-actions {
  grid-column:1 / span 2;
  display:none; gap:4px; padding-top:4px; padding-left:26px;
  justify-content:flex-start; flex-wrap:wrap;
}
.wi-row:hover .wi-actions { display:flex; }
.wi-act {
  height:24px; padding:0 10px; border-radius:6px; border:1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size:11px; cursor:pointer;
  display:inline-flex; align-items:center; gap:3px; transition: all .12s;
}
.wi-act:hover { background: var(--surface-2); color: var(--text); }
.wi-act.delay:hover { color:#b45309; background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); }
.wi-act.del:hover { color:#ef4444; background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); }

/* 快速添加条 */
.wi-quick-add { display:flex; gap:6px; margin-top:4px; align-items:center; }
.wi-quick-add input {
  flex:1; min-width:0; height:28px; border:1px dashed var(--border-strong); border-radius:7px; padding:0 8px;
  background: transparent; font-size:12px; color: var(--text); outline:none; width:1%;
}
.wi-quick-add input:focus { border-style:solid; border-color: var(--primary); background: var(--surface); }
.wi-quick-add .wi-add-confirm {
  flex:none; height:28px; padding:0 10px; border-radius:7px; border:none; background: var(--primary); color:#fff;
  font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; line-height:28px;
}
.wi-quick-add .wi-add-confirm:hover { filter:brightness(1.08); }

/* 任务链接：可点击跳转到任务详情 */
.wi-tag.task { cursor:pointer; }
.wi-tag.task:hover { background: rgba(55,138,221,.15); }
.wi-text a.wi-task-link { color: var(--primary); text-decoration:none; border-bottom:1px dotted var(--border-strong); margin-left:4px; font-size:11px; }
.wi-text a.wi-task-link:hover { color: var(--primary-strong); border-bottom-color: var(--primary); }

/* 今日聚焦 */
.focus-card {
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border:1px solid #dce6f5; border-radius: var(--radius-lg);
  padding:14px 16px; margin-bottom:14px;
}
.focus-card.dark { /* fallback */ }
.focus-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; gap:10px; }
.focus-title { font-size:13px; font-weight:600; color: #0c447c; display:flex; align-items:center; gap:6px; }
.focus-title .focus-tag { background:#e6f1fb; color:#185fa5; font-size:11px; padding:2px 8px; border-radius:10px; font-weight:500; }
.focus-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; }
.focus-col { background:#fff; border:1px solid #eef2f7; border-radius:8px; padding:10px 12px; min-height:80px; }
.focus-col.overdue { border-color:#f5c1c1; background:#fff7f7; }
.focus-col.due { border-color:#fce1b8; background:#fffbf5; }
.focus-col.carried { border-color:#d5e8fb; background:#f5f9ff; }
.focus-col.blocker { border-color:#ef4444; background:linear-gradient(180deg,#fff5f5,#ffe9e9); }
.focus-col-h { font-size:11px; font-weight:600; color:var(--text-2); margin-bottom:6px; display:flex; align-items:center; justify-content:space-between; }
.focus-col-h .count { background:var(--surface-2); border-radius:10px; padding:1px 7px; font-size:10px; color:var(--text-2); }
.focus-col.overdue .focus-col-h { color:#a32d2d; }
.focus-col.due .focus-col-h { color:#b45309; }
.focus-col.carried .focus-col-h { color:#185fa5; }
.focus-col.blocker .focus-col-h { color:#b91c1c; }
.focus-col.blocker .focus-col-h .count { background:#ef4444; color:#fff; }
.focus-list { display:flex; flex-direction:column; gap:4px; }
.focus-item { display:flex; align-items:center; gap:6px; font-size:12px; padding:4px 6px; border-radius:6px; cursor:pointer; }
.focus-item:hover { background: var(--surface-2); }
.focus-item .fi-add { flex:none; width:18px; height:18px; border-radius:5px; background:#e6f1fb; color:#185fa5; font-size:12px; line-height:18px; text-align:center; font-weight:600; }
.focus-item.overdue .fi-add { background:#fcebeb; color:#a32d2d; }
.focus-item.due .fi-add { background:#faeee0; color:#b45309; }
.focus-item.blocker.elevated { background:rgba(239,68,68,.08); }
.focus-item.blocker.elevated .fi-add { background:#ef4444; color:#fff; font-weight:800; }
.focus-item .fi-text { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.focus-item .fi-meta { font-size:10px; color:var(--text-muted); flex:none; }
.focus-empty { font-size:11px; color:var(--text-faint); padding:8px 0; text-align:center; }

/* 周报模态 */
.modal-mask { position:fixed; inset:0; background:rgba(20,30,50,.4); z-index:500; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:var(--surface); border-radius:var(--radius-xl); width:100%; max-width:760px; max-height:90vh; overflow:auto; box-shadow:0 20px 60px rgba(0,0,0,.18); }
.modal-head { padding:18px 22px 14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; background:var(--surface); z-index:2; }
.modal-head h3 { margin:0; font-size:16px; font-weight:700; }
.modal-body { padding:18px 22px; }
.modal-foot { padding:12px 22px 18px; display:flex; gap:10px; justify-content:flex-end; border-top:1px solid var(--border); position:sticky; bottom:0; background:var(--surface); }
.wkr-block { margin-bottom:16px; }
.wkr-block label { display:block; font-size:12px; font-weight:600; color:var(--text-2); margin-bottom:6px; }
.wkr-block textarea, .wkr-block input[type=text] {
  width:100%; border:1px solid var(--border); border-radius:8px; padding:10px 12px; font-size:13px;
  font-family: inherit; background:var(--surface); color:var(--text); outline:none; box-sizing:border-box;
}
.wkr-block textarea { min-height:70px; resize:vertical; }
.wkr-block textarea:focus, .wkr-block input:focus { border-color:var(--primary); }
.wkr-list { display:flex; flex-direction:column; gap:8px; }
.wkr-kr { border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
.wkr-kr-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.wkr-kr-title { font-size:12px; font-weight:600; color:var(--text); flex:1; min-width:0; }
.wkr-kr-title small { font-weight:400; color:var(--text-muted); margin-left:6px; }
.wkr-kr input[type=range] { flex:none; width:140px; }
.wkr-kr .kr-num { font-size:13px; font-weight:700; color:var(--primary); width:44px; text-align:right; flex:none; }
.wkr-kr input[type=text] { min-height:unset; height:28px; font-size:12px; padding:6px 10px; }
.wkr-risk-elevated { border-left:3px solid #d85a30; padding-left:9px; }
.wkr-chip-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.wkr-chip { border:1px solid var(--border); background:var(--surface-2); border-radius:14px; padding:2px 10px; font-size:11px; color:var(--text-2); cursor:pointer; }
.wkr-chip:hover { border-color:var(--primary); color:var(--primary); }
.wkr-chip.active { background:var(--primary); border-color:var(--primary); color:#fff; }

/* 空状态 */
.day-empty-hint {
  font-size:12px; color: var(--text-faint); text-align:center; padding:16px 8px;
  display:flex; flex-direction:column; gap:6px; align-items:center;
}

/* 卡片：周报视图 */
.wk-card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding:20px 22px; margin-bottom:16px; box-shadow: var(--shadow-sm);
}
.wk-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:12px; flex-wrap:wrap; }
.wk-title { font-size:17px; font-weight:800; letter-spacing:-.01em; }
.wk-days { display:grid; grid-template-columns:1fr; gap:10px; }
.wk-day { border-left:3px solid var(--border); padding:4px 0 4px 14px; }
.wk-day.today { border-left-color: var(--primary); }
.wk-day-head { font-size:13px; font-weight:700; color: var(--text-2); margin-bottom:6px; }
.wk-day-head small { font-weight:500; color: var(--text-muted); margin-left:6px; font-size:11px; }
.wk-summary-text { font-size:13.5px; line-height:1.7; color: var(--text); background: var(--surface-2); padding:12px 14px; border-radius:12px; margin-bottom:14px; }

/* 移动端适配（工作周视图） */
@media (max-width: 1100px) {
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .week-summary { grid-template-columns: repeat(3, 1fr); gap:10px; }
  .day-strip { grid-template-columns: repeat(7, minmax(130px,1fr)); overflow-x:auto; padding-bottom:4px; }
  .day-col { min-width:150px; }
  .focus-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .week-summary { grid-template-columns: repeat(2, 1fr); gap:8px; }
  .ws-stat { padding:10px 12px; }
  .ws-v { font-size:20px; }
  .day-strip { gap:8px; }
  .day-col { min-width:160px; }
  .wk-card { padding:14px; }
}

/* ---------- P3-B 停滞预警横幅 ---------- */
.stag-banner {
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;margin:14px 0;border-radius:14px;
  background:linear-gradient(135deg, rgba(220,38,38,.08), rgba(217,119,6,.1));
  border:1px solid rgba(220,38,38,.2);
  animation:sbIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes sbIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.stag-banner .sb-ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#ef4444,#f97316);flex:none}
.stag-banner .sb-main{flex:1;min-width:0}
.stag-banner .sb-t{font-weight:600;font-size:14px;color:var(--text)}
.stag-banner .sb-s{margin-top:2px}
.stag-banner .btn{flex:none}

/* ---------- P3-A 协助请求中心 ---------- */
.help-list{display:flex;flex-direction:column;gap:10px}
.help-row{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:14px}
.help-row.done{opacity:.7}
.help-status{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;background:linear-gradient(135deg,#ef4444,#f97316)}
.help-row.done .help-status{background:linear-gradient(135deg,#10b981,#34d399)}
.help-main{flex:1;min-width:0}
.help-title{font-weight:600;font-size:14px;line-height:1.5}
.help-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:4px}
.help-resolution{margin-top:8px;padding:8px 12px;background:rgba(16,185,129,.08);border-radius:8px;font-size:13px;color:var(--success)}
.help-row .btn{flex:none;align-self:center}

/* ---------- P3-B 导航红点 ---------- */
.nav-item{position:relative}
.nav-dot{position:absolute;top:10px;right:14px;width:8px;height:8px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px var(--bg);animation:dotPulse 1.8s infinite}
@keyframes dotPulse{0%,100%{box-shadow:0 0 0 2px var(--bg),0 0 0 0 rgba(239,68,68,.5)}50%{box-shadow:0 0 0 2px var(--bg),0 0 0 6px rgba(239,68,68,0)}}

/* ---------- P3-D 复盘会议 ---------- */
.retro-history{margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.retro-hist-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.retro-timeline{display:flex;flex-direction:column;gap:8px}
.rt-card{padding:0;border-radius:12px;overflow:hidden;transition:box-shadow .18s}
.rt-card.glass{background:var(--surface);border:1px solid var(--border)}
.rt-card:hover{border-color:var(--border-glow)}
.rt-card.rt-static .rt-head{cursor:default}
.rt-head{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 14px;cursor:pointer;transition:background .15s;user-select:none}
.rt-head:hover{background:var(--surface-2)}
.rt-head-main{flex:1;min-width:0}
.rt-title{font-weight:600;font-size:14px;line-height:1.4}
.rt-head-right{flex:none;display:flex;align-items:center;gap:10px}
.rt-progress{flex:none}
.rt-pct{display:none}
.rt-bar{width:110px;height:6px;background:var(--surface-3);border-radius:3px;overflow:hidden}
.rt-fill{height:100%;background:linear-gradient(90deg,var(--primary),var(--accent));border-radius:3px;transition:width .4s}
.rt-toggle{width:28px;height:28px;padding:0;display:flex;align-items:center;justify-content:center;transition:transform .2s;color:var(--text-3)}
.rt-toggle svg{transition:transform .2s}
.rt-card.rt-open .rt-toggle svg{transform:rotate(90deg)}
.rt-card.rt-open .rt-toggle{color:var(--primary)}
.rt-body{display:none;padding:0 14px 12px;border-top:1px solid var(--border)}
.rt-card.rt-open .rt-body{display:block}
.rt-summary{padding:10px 12px;background:var(--surface-2);border-radius:10px;font-size:13px;line-height:1.6;margin:10px 0}
.rt-sec{margin-top:10px}
.rt-sec-h{font-weight:600;font-size:13px;display:flex;align-items:center;gap:6px;margin-bottom:6px}
.rt-sec-h.good{color:var(--success)}
.rt-sec-h.warn{color:var(--warning)}
.rt-sec ul{margin:0;padding-left:18px}
.rt-sec li{font-size:13px;line-height:1.7}
.rt-ais{margin-top:4px}
.ai-list{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.ai-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:transparent;border:1px solid transparent;transition:background .15s}
.ai-row:hover{background:var(--surface-2)}
.ai-row.done{opacity:.6}
.ai-row.done .ai-text{text-decoration:line-through}
.ai-row.overdue{border-left:3px solid #ef4444;background:rgba(239,68,68,.05)}
.ai-row.overdue .ai-text{color:#ef4444}
.ai-chk{width:16px;height:16px;cursor:pointer;accent-color:var(--primary);flex:none;margin-top:2px}
.ai-main{flex:1;min-width:0}
.ai-text{font-size:13px;line-height:1.5;word-break:break-word}
.ai-meta{display:flex;align-items:center;gap:8px;margin-top:3px;font-size:12px;color:var(--text-3);flex-wrap:wrap}
.ai-meta .avatar{width:18px;height:18px}
.ai-meta .ai-due{white-space:nowrap}
.ai-meta .ai-due.overdue{color:#ef4444;font-weight:600}
.ai-meta .ai-due.soon{color:var(--warning);font-weight:600}
.ai-meta a{color:var(--primary);text-decoration:none}
.ai-meta a:hover{text-decoration:underline}
.ai-actions{flex:none;display:flex;gap:4px;opacity:0;transition:opacity .15s}
.ai-row:hover .ai-actions{opacity:1}
.ai-row .btn{flex:none}

/* 复盘模态 */
.retro-modal{width:min(720px,92vw);max-height:86vh;overflow:hidden;display:flex;flex-direction:column}
.retro-modal .modal-body{padding:16px 20px;overflow-y:auto;flex:1}
.ai-edit-row{display:flex;gap:6px;margin-bottom:6px;align-items:center}
.ai-edit-row .input,.ai-edit-row .select{height:32px;font-size:13px}
.ai-edit-row .icon-btn{flex:none;color:var(--muted)}
.ai-edit-row .icon-btn:hover{color:var(--danger)}

/* 停滞 KR ack */
.stag-row{position:relative;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:var(--surface-2);transition:background .15s}
.stag-row:hover{background:var(--surface-3)}
.stag-row.acked{opacity:.55}
.stag-row .stag-title{font-weight:500;font-size:13px}
.stag-ack{font-size:11px;padding:2px 8px;border-radius:99px;background:rgba(16,185,129,.12);color:var(--success);flex:none}
.stag-row .btn{flex:none;opacity:0;transition:opacity .15s}
.stag-row:hover .btn,.stag-row.sev-danger .btn{opacity:1}
.ack-modal{width:min(520px,92vw)}
.ack-kr-title{font-weight:600;font-size:15px;margin-bottom:4px;line-height:1.4}
.ack-opt{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:10px;border:1px solid var(--border);cursor:pointer;transition:all .15s}
.ack-opt:hover{background:var(--surface-2)}
.ack-opt input[type=radio]{margin-top:3px;accent-color:var(--primary)}
.ack-opt:has(input:checked){border-color:var(--primary);background:rgba(99,102,241,.08)}
.btn-xs{padding:4px 10px;font-size:11.5px;border-radius:8px}

/* ===== P4-B 阻塞协助指派与处理闭环 ===== */
.help-summary { display:flex; align-items:center; padding:10px 14px; border-radius:10px; margin-bottom:12px; font-size:13px; }
.help-summary b { color:var(--accent); font-weight:700; }
.help-modal { width:500px; max-width:94vw; }
.help-blocker-text { background:var(--bg-soft); border:1px solid var(--border); border-radius:8px; padding:10px 12px; font-size:13px; line-height:1.55; margin-top:6px; }
.help-assignee-slot, .ha-slot { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:6px; min-height:32px; }
.help-row { display:flex; gap:12px; padding:14px; border-radius:12px; margin-bottom:10px; transition:all .2s; border:1px solid var(--border); align-items:flex-start; }
.help-row:hover { border-color:var(--accent-soft); }
.help-row.mine { border-left:3px solid var(--accent); }
.help-row.done { opacity:.65; }
.help-status { flex-shrink:0; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; background:var(--accent-soft); color:var(--accent); margin-top:2px; }
.help-status.warn { background:rgba(239,68,68,.12); color:#ef4444; }
.help-status.done { background:rgba(34,197,94,.12); color:#22c55e; }
.help-main { flex:1; min-width:0; }
.help-head-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.help-title { font-weight:600; font-size:14px; line-height:1.5; }
.help-meta { display:flex; align-items:center; flex-wrap:wrap; gap:2px; }
.help-overdue-badge { background:rgba(239,68,68,.1); color:#ef4444; font-size:11px; padding:2px 8px; border-radius:99px; font-weight:600; }
.help-note { margin-top:6px; font-size:12.5px; padding:6px 10px; background:var(--bg-soft); border-radius:6px; color:var(--text-dim); line-height:1.5; }
.help-note.assign { border-left:2px solid var(--accent); }
.help-note b { color:var(--text); font-weight:600; margin-right:4px; }
.help-resolution { margin-top:6px; font-size:12.5px; padding:6px 10px; background:rgba(34,197,94,.08); color:#16a34a; border-radius:6px; line-height:1.5; }
.help-actions { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.chip-mini { font-size:11px; padding:1px 7px; border-radius:99px; background:var(--bg-soft); color:var(--text-dim); font-weight:500; }
.chip-mini.chip-primary { background:var(--accent-soft); color:var(--accent); }

/* ===== P4-C 行动项指派增强 + overdue ===== */
/* (ai-row.overdue / ai-due 样式已合并到上方主定义) */
.ai-actions { display:flex; gap:6px; align-items:center; }
.ai-edit-row { display:flex; gap:6px; margin-bottom:6px; align-items:center; }
.ai-edit-row .input, .ai-edit-row .select { height:32px; }
.help-modal .form-row { margin-bottom:12px; }
.help-modal label { display:block; font-size:12.5px; color:var(--text-dim); margin-bottom:4px; font-weight:500; }

/* ===== P5 绩效周期 + 360 ===== */
.subtabs { display:flex; gap:6px; margin:0 0 14px; border-bottom:1px solid var(--border, #e5e7eb); padding-bottom:8px; flex-wrap:wrap; }
.subtab { border:none; background:transparent; padding:7px 14px; border-radius:8px; font-size:13.5px; color:var(--text-dim,#64748b); cursor:pointer; font-weight:500; transition:.15s; }
.subtab:hover { background:rgba(99,102,241,.08); color:var(--text,#0f172a); }
.subtab.active { background:rgba(99,102,241,.14); color:#4f46e5; font-weight:600; }
.cycle-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; margin-top:6px; }
.cycle-card { padding:16px; border-radius:14px; }
.cycle-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.cycle-name { font-size:15.5px; font-weight:600; }
.cycle-sub { margin-top:3px; }
.cycle-status { font-size:11.5px; padding:3px 9px; border-radius:20px; font-weight:600; white-space:nowrap; }
.cycle-status.st-open { background:rgba(16,185,129,.14); color:#059669; }
.cycle-status.st-calibrating { background:rgba(245,158,11,.16); color:#d97706; }
.cycle-status.st-closed { background:rgba(100,116,139,.16); color:#475569; }
.cycle-actions { display:flex; gap:8px; margin-top:14px; flex-wrap:wrap; }
.month-chips { display:flex; flex-wrap:wrap; gap:8px; }
.month-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--border,#e5e7eb); border-radius:8px; font-size:12.5px; cursor:pointer; user-select:none; }
.month-chip.on { background:rgba(99,102,241,.12); border-color:#6366f1; color:#4f46e5; }
.dist-bars { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.dist-bar-row { display:flex; align-items:center; gap:10px; }
.dist-bar-row .dr-g { width:22px; height:22px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; flex:none; }
.dist-bar-row .dr-track { flex:1; height:10px; background:rgba(148,163,184,.18); border-radius:6px; overflow:hidden; }
.dist-bar-row .dr-track i { display:block; height:100%; border-radius:6px; }
.dist-bar-row .dr-n { font-size:12.5px; color:var(--text-dim,#64748b); width:84px; text-align:right; }
.dist-hints { line-height:1.7; }
.dist-hints .warn-line { color:#d97706; }
.calib-table { border-top:1px solid var(--border,#e5e7eb); }
.calib-row { display:grid; grid-template-columns:1fr 60px 70px; align-items:center; gap:8px; padding:9px 2px; border-bottom:1px solid rgba(148,163,184,.14); }
.calib-name { display:flex; align-items:center; gap:8px; font-size:13.5px; }
.calib-name .dot { width:9px; height:9px; border-radius:50%; flex:none; }
.calib-score { font-weight:700; font-size:15px; text-align:center; }
.grade-sel { justify-self:end; }
.peer-block { border-left:3px solid #8b5cf6; }
.peer-agg { display:flex; gap:18px; flex-wrap:wrap; margin-bottom:12px; padding:10px 0; border-bottom:1px dashed rgba(148,163,184,.3); }
.peer-agg-item { display:flex; flex-direction:column; gap:2px; }
.peer-agg-val { font-size:20px; font-weight:700; color:#4f46e5; }
.peer-list { display:flex; flex-direction:column; gap:8px; }
.peer-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.peer-rater { display:flex; align-items:center; gap:6px; min-width:120px; }
.peer-done { color:#059669; font-weight:600; font-size:12.5px; }
.peer-pending { color:#d97706; font-weight:600; font-size:12.5px; }
.peer-comment { font-style:italic; }
.peer-ops { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.peer-invite-body { max-height:60vh; overflow:auto; }
.peer-choose { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.peer-choose-row { display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:8px; cursor:pointer; font-size:13.5px; }
.peer-choose-row:hover { background:rgba(99,102,241,.07); }

/* ===== P5-C 绩效 → 下周期 OKR 闭环 ===== */
.grade-s{color:#EF4444}.grade-ap{color:#A855F7}.grade-a{color:#10B981}.grade-b{color:#3B82F6}.grade-c{color:#94A3B8}.grade-d{color:#64748B}
.pod-body{display:flex;flex-direction:column;gap:14px;max-height:62vh;overflow:auto;padding-right:4px}
.pod-card{padding:16px;border-radius:14px;border:1px solid rgba(255,255,255,.14)}
.pod-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.pod-who{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.pod-name{margin-left:2px}
.pod-grade{padding:2px 9px;border-radius:8px;font-weight:700;font-size:12px;color:#fff}
.pod-grade.grade-s{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.pod-grade.grade-ap{background:linear-gradient(135deg,#8b5cf6,#ec4899)}
.pod-grade.grade-a{background:linear-gradient(135deg,#10b981,#22c55e)}
.pod-grade.grade-b{background:linear-gradient(135deg,#3b82f6,#60a5fa)}
.pod-grade.grade-c{background:linear-gradient(135deg,#94a3b8,#cbd5e1);color:#475569}
.pod-grade.grade-d{background:linear-gradient(135deg,#64748b,#475569)}
.pod-adopted{display:inline-flex;align-items:center;gap:4px;color:#059669;font-size:12.5px;font-weight:600}
.pod-obj{font-size:14.5px;font-weight:600;line-height:1.5;margin-bottom:6px}
.pod-desc{line-height:1.6;margin-bottom:10px}
.pod-krs{display:flex;flex-direction:column;gap:6px}
.pod-kr{display:flex;align-items:center;gap:10px;font-size:13px;padding:7px 10px;border-radius:9px;background:rgba(99,102,241,.06)}
.pod-kr-w{flex-shrink:0;font-weight:700;color:var(--primary);min-width:36px}
.pod-kr-title{flex:1}
.pod-kr-basis{font-size:11.5px;color:var(--muted);flex-shrink:0}
.pod-ops{display:flex;gap:8px;margin-top:12px}
.perf-src-badge{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 14px;border-radius:10px;background:rgba(16,185,129,.1);color:#059669;margin-bottom:6px}
.perf-ctx-card{padding:16px 18px;border-radius:14px;border:1px solid rgba(99,102,241,.2);background:rgba(99,102,241,.05);margin-bottom:6px}
.perf-ctx-h{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;margin-bottom:12px}
.perf-ctx-h .sub{font-weight:400;color:var(--muted);font-size:12.5px}
.perf-ctx-dims{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px;margin-bottom:12px}
.pd-item{display:flex;align-items:center;gap:10px;font-size:12.5px}
.pd-label{width:72px;color:var(--muted);flex-shrink:0}
.pd-bar{flex:1;height:8px;border-radius:6px;background:rgba(255,255,255,.12);overflow:hidden}
.pd-bar i{display:block;height:100%;border-radius:6px;background:var(--primary)}
.pd-val{width:28px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.pd-item.weak .pd-bar i{background:#f59e0b}
.pd-item.weak .pd-label{color:#f59e0b;font-weight:600}
.pd-item.strong .pd-bar i{background:#10b981}
.pd-item.strong .pd-label{color:#10b981;font-weight:600}
.perf-ctx-actions{margin-top:4px}

.pager{padding:14px 4px 4px;border-top:1px solid var(--border);margin-top:8px;align-items:center;}
.pager .btn[disabled]{opacity:.45;cursor:not-allowed;}
.pager .select.sm{height:30px;font-size:12px;padding:0 8px;}

/* ---------- Inbox 我的工作 ---------- */
.nav-item[data-key="inbox"]{position:relative;background:linear-gradient(135deg,rgba(99,102,241,.10),rgba(139,92,246,.08));border:1px solid rgba(99,102,241,.18);margin:4px 8px;border-radius:12px;font-weight:600;}
.nav-item[data-key="inbox"]:hover{background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(139,92,246,.14));}
.nav-item[data-key="inbox"].active{background:linear-gradient(135deg,rgba(99,102,241,.22),rgba(139,92,246,.18));border-color:var(--primary);color:#fff;}
.nav-badge{position:absolute;top:6px;right:10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(239,68,68,.4);font-family:var(--font-mono);}
#inbox-filter{background:var(--surface-2);border-radius:12px;padding:4px;}
.inbox-kpi{margin-bottom:16px;}
.kpi-card{flex:1;min-width:130px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;}
.kpi-card .kpi-num{font-size:26px;font-weight:800;font-family:var(--font-mono);letter-spacing:-.02em;line-height:1;}
.kpi-card .kpi-num.danger{color:var(--danger);}
.kpi-card .kpi-num.primary{color:var(--primary);}
.kpi-card .kpi-num.warning{color:var(--warning);}
.kpi-card .kpi-num.success{color:var(--success);}
.inbox-section{margin-bottom:14px;}
.inbox-list{display:flex;flex-direction:column;gap:8px;}
.inbox-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:12px;background:var(--surface-2);border:1px solid transparent;transition:all .18s;}
.inbox-item:hover{border-color:var(--border-glow);background:var(--surface);transform:translateY(-1px);}
.inbox-item.reported{opacity:.72;}
.inbox-item.reported:hover{opacity:1;}
.inbox-item-main{flex:1;min-width:0;}
.inbox-item-title{font-size:14px;font-weight:600;cursor:pointer;color:var(--text);line-height:1.45;}
.inbox-item-title:hover{color:var(--primary);}
.inbox-item-title svg{vertical-align:-2px;margin-right:4px;}
.inbox-item-actions{flex:none;display:flex;gap:6px;}
.overdue{color:var(--danger)!important;font-weight:600;}
@media(max-width:640px){
  .inbox-item{flex-direction:column;align-items:flex-start;}
  .inbox-item-actions{width:100%;justify-content:flex-end;}
  .kpi-card{min-width:calc(50% - 8px);flex:0 0 calc(50% - 8px);}
}

.field{position:relative;}.char-count{position:absolute;right:10px;bottom:8px;font-size:11px;color:var(--text-3);font-family:var(--font-mono);pointer-events:none;}.char-count.over{color:var(--danger);font-weight:600;}textarea.input,textarea.textarea{padding-bottom:28px;}

.kpi-card{cursor:pointer;transition:all .18s;}
.kpi-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);}
.kpi-card .kpi-num.good{color:var(--success);}
.kpi-card .kpi-num.info{color:var(--primary);}
.inbox-item.done{opacity:.6;background:var(--surface);}
.inbox-item.done .inbox-item-title{text-decoration:line-through;color:var(--text-2);}
.inbox-item.done:hover{opacity:.85;}
.badge.good{background:rgba(16,185,129,.12);color:var(--success);border-color:rgba(16,185,129,.25);}
.badge.info{background:rgba(59,130,246,.12);color:var(--primary);border-color:rgba(59,130,246,.25);}
.inbox-section{scroll-margin-top:72px;}

/* ===== 动态（团队活动流） ===== */
.act-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px;}
.act-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);font-size:13px;cursor:pointer;transition:all .15s;}
.act-chip:hover{border-color:var(--primary);color:var(--primary);}
.act-chip.active{background:var(--primary);border-color:var(--primary);color:#fff;}
.act-chip.disabled{opacity:.4;cursor:not-allowed;}
.act-chip-cnt{font-size:11px;opacity:.7;font-variant-numeric:tabular-nums;}
.activity-feed{position:relative;margin-top:16px;}
.activity-item{position:relative;display:flex;gap:12px;padding:8px 0;}
.activity-item::before{content:'';position:absolute;left:13px;top:38px;bottom:-8px;width:2px;background:var(--border);z-index:0;}
.activity-item:last-child::before{display:none;}
.activity-item .act-avatar{width:28px;height:28px;flex:none;position:relative;z-index:1;}
.activity-item .act-avatar .avatar{border:2px solid var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.15);}
.act-body{flex:1;min-width:0;}
.act-line{font-size:14px;line-height:1.55;}
.act-line b{font-weight:600;}
.act-target{color:var(--primary);text-decoration:none;}
.act-target:hover{text-decoration:underline;}
.act-target.muted{color:var(--text-3);}
.act-time{font-size:12px;color:var(--text-3);margin-top:3px;}
.activity-item.skeleton .sk-av{width:28px;height:28px;border-radius:50%;}
.sk-line{height:10px;border-radius:6px;background:var(--border);margin-bottom:6px;animation:actPulse 1.4s ease-in-out infinite;}
.sk-line.sm{height:8px;opacity:.7;}
@keyframes actPulse{0%,100%{opacity:.55;}50%{opacity:1;}}
