:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --border: #eef0f4;
  --border-strong: #e3e6ee;
  --text: #1a1d24;
  --text-sub: #69707e;
  --text-faint: #9aa1ae;
  --primary: #2f6bff;
  --primary-hover: #1f57e0;
  --primary-soft: #eef4ff;
  --primary-bg: #f5f8ff;
  --green: #16a34a;
  --green-bg: #e8f8ef;
  --red: #e5484d;
  --red-bg: #fdecec;
  --amber: #d97706;
  --amber-bg: #fdf4e4;
  --purple: #7c3aed;
  --purple-bg: #f3efff;
  --gray-bg: #f4f5f8;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, .08), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --ring: 0 0 0 3px rgba(47, 107, 255, .16);
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

.app { display: flex; flex-direction: column; height: 100vh; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5d9e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c2c7d2; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 24px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  flex-shrink: 0; position: relative; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #2f6bff 0%, #6a5cff 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; box-shadow: 0 2px 6px rgba(47, 107, 255, .32);
}
.logo { font-size: 20px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.current-user-label { color: var(--text-sub); font-size: 13px; }
.current-user-name { font-weight: 600; }
.user-switcher {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--panel); color: var(--text); cursor: pointer;
}

/* ===== 按钮 ===== */
.btn {
  padding: 8px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .16s ease; white-space: nowrap;
}
.btn:hover { background: var(--gray-bg); border-color: #d4d8e2; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(47, 107, 255, .35);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--red); border-color: #f5c6c9; background: #fff; }
.btn-danger:hover { background: var(--red-bg); border-color: #f0b6ba; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:active { transform: none; }

/* ===== 布局 ===== */
.layout { display: flex; flex: 1; overflow: hidden; }

.sidebar {
  width: 208px; background: var(--panel); border-right: 1px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; flex-shrink: 0;
}
.nav-group-title { font-size: 11.5px; color: var(--text-faint); padding: 0 12px 8px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 9px 12px; margin-bottom: 3px;
  border: none; background: transparent; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--text-sub); transition: all .15s; position: relative;
}
.nav-item:hover { background: var(--gray-bg); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--primary);
}
.nav-icon { font-size: 15px; width: 18px; text-align: center; opacity: .85; }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.stat-card {
  background: var(--gray-bg); border-radius: var(--radius); padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border);
}
.stat-num { font-size: 20px; font-weight: 700; }
.stat-num.blue { color: var(--primary); }
.stat-num.amber { color: var(--amber); }
.stat-label { font-size: 12px; color: var(--text-sub); }

/* ===== 主内容 ===== */
.main { flex: 1; display: flex; overflow: hidden; }

.list-panel {
  width: 372px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; background: var(--panel);
}
.list-header {
  padding: 18px 18px 12px; display: flex; align-items: center; justify-content: space-between;
}
.list-header h2 { font-size: 16px; font-weight: 700; }
.list-header-right { display: flex; align-items: center; gap: 10px; }
.sort-select {
  padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 7px;
  font-size: 12px; background: var(--panel); color: var(--text-sub); cursor: pointer;
}
.list-count { font-size: 12px; color: var(--text-faint); }
.report-list { flex: 1; overflow-y: auto; padding: 0 14px 18px; }

.report-item {
  padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; cursor: pointer; transition: all .16s ease; background: var(--panel);
}
.report-item:hover { border-color: #cdd7f5; box-shadow: var(--shadow); transform: translateY(-1px); }
.report-item.selected { border-color: var(--primary); background: var(--primary-bg); box-shadow: var(--shadow-sm); }
.report-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.report-item-author { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-item-date { font-size: 12px; color: var(--text-faint); }
.report-item-mid { font-size: 13px; color: var(--text-sub); margin-bottom: 9px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-item-meta { font-size: 12px; color: var(--text-faint); }
.report-item-badges { display: flex; align-items: center; gap: 6px; }
.score-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  background: var(--purple-bg); color: var(--purple);
}

/* 头像 */
.avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #7ea2ff, #2f6bff);
}
.avatar-sm { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.avatar-lg { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
.avatar.variant-0 { background: linear-gradient(135deg, #7ea2ff, #2f6bff); }
.avatar.variant-1 { background: linear-gradient(135deg, #5ad1a5, #16a34a); }
.avatar.variant-2 { background: linear-gradient(135deg, #ffb66b, #f59e0b); }
.avatar.variant-3 { background: linear-gradient(135deg, #b79bff, #7c3aed); }
.avatar.variant-4 { background: linear-gradient(135deg, #ff8fa3, #e5484d); }
.avatar.variant-5 { background: linear-gradient(135deg, #5bc0eb, #0ea5e9); }

/* 标签 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.badge-type { background: var(--gray-bg); color: var(--text-sub); }
.badge-draft { background: var(--gray-bg); color: var(--text-sub); }
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-approving { background: var(--primary-soft); color: var(--primary); }
.badge-reply { background: var(--purple-bg); color: var(--purple); }
.badge-done { background: var(--green-bg); color: var(--green); }
.badge-archived { background: var(--gray-bg); color: var(--text-faint); }
.badge-returned { background: var(--red-bg); color: var(--red); }

/* ===== 详情面板 ===== */
.detail-panel { flex: 1; overflow-y: auto; padding: 26px 36px; }
.detail-content { max-width: 840px; margin: 0 auto; }

.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.detail-header-left { display: flex; align-items: center; gap: 14px; }
.detail-title { font-size: 20px; font-weight: 700; margin-bottom: 3px; }
.detail-meta { color: var(--text-sub); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.detail-header-right { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; flex-shrink: 0; }
.score-box {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 20px; border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff; min-width: 96px; box-shadow: 0 4px 12px rgba(124, 58, 237, .28);
}
.score-box-label { font-size: 11px; opacity: .9; }
.score-box-value { font-size: 26px; font-weight: 800; line-height: 1.2; }
.score-box-hint { font-size: 10px; opacity: .75; }

.section-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.section-title { font-size: 14.5px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-title .icon { font-size: 16px; }
.content-block { margin-bottom: 16px; }
.content-block:last-child { margin-bottom: 0; }
.content-label { font-size: 13px; color: var(--text-sub); margin-bottom: 4px; font-weight: 600; }
.content-text { line-height: 1.65; white-space: pre-wrap; color: var(--text); }

/* 审批链 */
.approver-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chain-node {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  border-radius: 9px; background: var(--gray-bg); font-size: 13px; border: 1px solid var(--border);
}
.chain-node .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.chain-node.approved { background: var(--green-bg); color: var(--green); border-color: #cdeeda; }
.chain-node.approved .dot { background: var(--green); }
.chain-node.returned { background: var(--red-bg); color: var(--red); border-color: #f6d6d8; }
.chain-node.returned .dot { background: var(--red); }
.chain-node.current { background: var(--primary-soft); color: var(--primary); font-weight: 600; border-color: #cdd7f5; }
.chain-node.current .dot { background: var(--primary); }
.chain-arrow { color: var(--text-faint); font-size: 13px; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -22px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline-item::after {
  content: ''; position: absolute; left: -17.5px; top: 16px; bottom: -4px;
  width: 1px; background: var(--border-strong);
}
.timeline-item:last-child::after { display: none; }
.timeline-item.approved::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.timeline-item.returned::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.timeline-item.done::before { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-bg); }
.timeline-head { font-size: 12.5px; color: var(--text-sub); margin-bottom: 5px; }
.timeline-head strong { color: var(--text); font-weight: 600; }
.timeline-comment {
  background: var(--gray-bg); border-radius: 9px; padding: 10px 13px;
  font-size: 13px; line-height: 1.6; white-space: pre-wrap; border: 1px solid var(--border);
}

/* 操作区 */
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== 模态框 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .44);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease;
}
.modal-mask.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel); border-radius: var(--radius-lg); width: 560px; max-width: 92vw;
  max-height: 88vh; overflow-y: auto; padding: 26px; box-shadow: var(--shadow-lg);
  animation: popIn .2s cubic-bezier(.16, 1, .3, 1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.modal.modal-wide { width: 780px; max-width: 94vw; }

/* 编辑弹窗布局 */
.edit-layout { display: flex; gap: 20px; }
.edit-form { flex: 1; min-width: 0; }
.edit-side { flex: 1; min-width: 0; }
.side-title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.side-tip { font-size: 12px; color: var(--text-sub); margin-bottom: 12px; }
.prev-plans-panel {
  background: var(--gray-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; max-height: 460px; overflow-y: auto;
}
.prev-plans-panel .plan-list { line-height: 1.7; }

.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: var(--red); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--panel);
  transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-faint); }
.form-textarea { min-height: 84px; resize: vertical; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.form-input:disabled, .form-select:disabled { background: var(--gray-bg); color: var(--text-sub); cursor: not-allowed; }
.form-row { display: flex; gap: 12px; }
.form-row > .form-group { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* 审批人选择 */
.approver-pick-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.approver-pick-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s;
}
.approver-pick-item:last-child { border-bottom: none; }
.approver-pick-item:hover { background: var(--gray-bg); }
.approver-pick-item input { width: 16px; height: 16px; }
.approver-order { font-size: 12px; color: var(--primary); font-weight: 700; min-width: 18px; }
.approver-pick-name { font-weight: 600; }
.approver-pick-role { font-size: 12px; color: var(--text-sub); }

.empty-state { text-align: center; color: var(--text-faint); padding: 52px 20px; }
.empty-state .empty-icon { font-size: 42px; margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--text-sub); margin-top: 5px; line-height: 1.55; }

/* ===== 登录页 ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #eef3ff 0%, #f6f7fb 46%, #eaf3ff 100%);
}
.login-screen.hidden { display: none; }
.login-card {
  width: 408px; max-width: 92vw; background: var(--panel);
  border-radius: 20px; padding: 40px 36px 30px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.login-logo {
  width: 56px; height: 56px; border-radius: 15px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #2f6bff 0%, #6a5cff 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 6px 18px rgba(47, 107, 255, .35);
}
.login-brand { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: .3px; }
.login-sub { text-align: center; color: var(--text-sub); font-size: 12.5px; margin: 6px 0 26px; }
.btn-block { width: 100%; margin-top: 10px; padding: 10px; font-size: 14px; }
.login-error {
  background: var(--red-bg); color: var(--red); font-size: 13px;
  padding: 9px 13px; border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid #f6d6d8;
}
.login-tip {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-sub); line-height: 1.9;
}
.login-tip .mono { font-size: 11.5px; }
.mono { font-family: "SF Mono", Consolas, "JetBrains Mono", monospace; background: var(--gray-bg); padding: 1px 6px; border-radius: 5px; }
.current-user-name { font-weight: 600; }

/* ===== 成员管理 ===== */
.user-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.user-table-head, .user-table-row {
  display: grid; grid-template-columns: 0.9fr 1.1fr 0.8fr 0.8fr 0.9fr 0.7fr 1.3fr;
  gap: 8px; align-items: center; padding: 11px 14px; font-size: 13px;
}
.user-table-head { background: var(--gray-bg); font-weight: 600; color: var(--text-sub); font-size: 12px; }
.user-table-row { border-top: 1px solid var(--border); transition: background .12s; }
.user-table-row:hover { background: var(--primary-bg); }
.user-table-row.row-pending { background: var(--amber-bg); }
.user-actions { display: flex; gap: 6px; }

/* ===== 总结/计划 列表编辑器（各自独立） ===== */
.list-editor-row {
  display: grid; grid-template-columns: 28px 1fr 44px; gap: 8px;
  margin-bottom: 8px; align-items: start;
}
.list-editor-row-sum { grid-template-columns: 28px 1fr 96px 44px; }
.list-editor-row-plan { grid-template-columns: 28px 1fr 88px 44px; }
.list-editor-progress { padding: 8px 6px; font-size: 13px; }
.list-editor-weight { padding: 8px 6px; font-size: 13px; }

/* 计划权重汇总栏 */
.plan-weight-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding: 8px 12px;
  background: var(--gray-bg); border: 1px solid var(--border); border-radius: 9px;
}
.plan-weight-text { font-size: 13px; color: var(--text-sub); }
.plan-weight-text strong { font-size: 15px; font-weight: 700; margin: 0 2px; }
.plan-weight-hint { font-size: 11.5px; color: var(--text-faint); margin-left: 6px; }

/* 总结编辑器（卡片式：计划只读 + 总结输入 + 完成度 + 权重） */
.sum-editor-item {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--panel);
}
.sum-editor-plan {
  font-size: 12px; color: var(--text-sub); background: var(--gray-bg);
  padding: 5px 10px; border-radius: 7px; margin-bottom: 8px; line-height: 1.5;
}
.sum-editor-plan.extra { background: var(--amber-bg); color: var(--amber); }
.sum-editor-row { display: flex; gap: 8px; align-items: flex-start; }
.sum-editor-row .list-editor-input { flex: 1; }
.sum-editor-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sum-editor-meta .meta-label { font-size: 12px; color: var(--text-sub); flex-shrink: 0; }
.sum-editor-meta .list-editor-progress { width: 92px; flex-shrink: 0; }
.sum-editor-meta .list-editor-weight { width: 84px; flex-shrink: 0; }
.list-editor-no {
  display: flex; align-items: center; justify-content: center;
  height: 44px; color: var(--text-faint); font-weight: 600; font-size: 13px;
}
.list-editor-input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13px; font-family: inherit; color: var(--text); background: var(--panel);
  min-height: 44px; resize: vertical; transition: border-color .15s, box-shadow .15s;
}
.list-editor-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.list-editor-del { align-self: start; }

/* ===== 条目化展示表格 ===== */
.item-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.item-table-head, .item-table-row {
  display: grid; grid-template-columns: 48px 1fr 1fr; gap: 0;
  align-items: stretch; font-size: 13px;
}
.item-table-head {
  background: var(--gray-bg); font-weight: 600; color: var(--text-sub);
  padding: 9px 12px; font-size: 12px;
}
.item-table-row { border-top: 1px solid var(--border); }
.item-table-row:hover { background: var(--primary-bg); }
.item-table-row > span { padding: 11px 12px; }
.item-table-row > span + span { border-left: 1px solid var(--border); }
.item-no { text-align: center; color: var(--text-faint); font-weight: 600; }
.item-cell { white-space: pre-wrap; line-height: 1.6; }
.cell-empty { color: var(--text-faint); }

/* 完成度徽章 */
.progress-pill {
  display: inline-flex; align-items: center;
  margin-top: 6px; padding: 1.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.6;
}
.progress-100 { background: var(--green-bg); color: var(--green); }
.progress-80 { background: var(--primary-soft); color: var(--primary); }
.progress-60 { background: var(--amber-bg); color: var(--amber); }
.progress-40 { background: #fff1e6; color: #e07b24; }
.progress-20 { background: var(--red-bg); color: var(--red); }
.progress-0 { background: var(--gray-bg); color: var(--text-faint); }

/* 详情页总结卡片（计划只读 + 总结 + 完成度） */
.summary-item {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 10px; background: var(--panel);
}
.summary-item:last-child { margin-bottom: 0; }
.summary-plan {
  font-size: 12px; color: var(--text-sub); background: var(--gray-bg);
  padding: 5px 10px; border-radius: 7px; margin-bottom: 8px; line-height: 1.5;
}
.summary-plan.extra { background: var(--amber-bg); color: var(--amber); }
.summary-text { line-height: 1.65; white-space: pre-wrap; }

/* 计划列表（带权重） */
.plan-list { margin: 0; padding-left: 22px; line-height: 1.9; }
.plan-list li { margin-bottom: 5px; }
.plan-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  margin-bottom: 8px; background: var(--panel);
}
.plan-item:last-child { margin-bottom: 0; }
.plan-item-no {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-top: 1px;
}
.plan-item-text { flex: 1; line-height: 1.6; white-space: pre-wrap; }
.weight-pill {
  flex-shrink: 0; display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--purple-bg); color: var(--purple);
  margin-top: 1px;
}

/* ===== 待分配通知按钮 ===== */
.btn-pending { border-color: #f5c15d; background: var(--amber-bg); color: #b45309; font-weight: 600; }
.btn-pending:hover { background: #fbeccb; border-color: #f0b84b; }
.btn-pending .badge { margin-left: 2px; }

/* ===== 组织架构思维导图 ===== */
.org-layout { display: flex; gap: 20px; align-items: flex-start; }
.org-tree-panel { flex: 1.5; min-width: 0; }
.org-dept-panel { flex: 1; min-width: 0; }
.org-tree-title { font-size: 13px; font-weight: 700; color: var(--text-sub); margin-bottom: 10px; }
.org-tree { max-height: 60vh; overflow: auto; padding: 4px; }

.org-roots { display: flex; flex-direction: column; gap: 14px; }
.org-node { position: relative; }
.org-children {
  margin-left: 24px; padding-left: 18px;
  border-left: 2px solid #dde1ec;
  display: flex; flex-direction: column; gap: 12px; margin-top: 12px;
}
.org-node-card {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 9px 13px; cursor: pointer; transition: all .16s; width: fit-content; min-width: 158px;
  box-shadow: var(--shadow-sm);
}
.org-node-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.org-node-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.org-node-meta { font-size: 12px; color: var(--text-sub); margin-top: 4px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.org-node-dept { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

.dept-list { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.dept-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  border-bottom: 1px solid var(--border); font-size: 13px; transition: background .12s;
}
.dept-row:last-child { border-bottom: none; }
.dept-row:hover { background: var(--primary-bg); }
.dept-name { font-weight: 600; flex: 1; }
.dept-cnt { color: var(--text-faint); font-size: 12px; }

/* ===== 通用 ===== */
.hidden { display: none !important; }
.app.hidden { display: none; }
