:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* 登录页 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-box { background: #fff; padding: 40px 36px; border-radius: 16px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center; }
.login-logo { font-size: 48px; }
.login-logo-img { width: 260px; max-width: 90%; margin-bottom: 20px; border-radius: 6px; }
.login-box h1 { font-size: 20px; margin: 12px 0 4px; }
.login-sub { color: var(--text-muted); font-size: 12px; margin-bottom: 24px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.login-msg { color: var(--danger); margin-top: 12px; font-size: 13px; min-height: 18px; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; transition: transform 0.25s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid #1e293b; }
.brand-logo { width: 100%; max-width: 188px; display: block; }
.brand-icon { font-size: 24px; }
.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; color: #cbd5e1; text-decoration: none; transition: 0.15s; }
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-footer { padding: 16px; border-top: 1px solid #1e293b; }
.user-info { font-size: 13px; margin-bottom: 10px; color: #94a3b8; }
.user-info strong { color: #fff; display: block; }

.main { flex: 1; margin-left: 220px; }
.topbar { background: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.topbar h2 { font-size: 18px; }
.menu-toggle { display: none; font-size: 20px; background: none; border: none; cursor: pointer; }
.content { padding: 24px; }

/* 卡片与通用 */
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; transition: 0.15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: #cbd5e1; border: 1px solid #334155; }
.btn-ghost:hover { background: #1e293b; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

.card { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.kpi-label { color: var(--text-muted); font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.kpi-value.green { color: var(--success); }
.kpi-value.blue { color: var(--primary); }
.kpi-value.orange { color: var(--warning); }
.kpi-value.red { color: var(--danger, #dc2626); }
.kpi-unit { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
/* 门店看板：带左侧色条强调 */
.kpi.kpi-blue   { border-left: 3px solid var(--primary); }
.kpi.kpi-green  { border-left: 3px solid var(--success); }
.kpi.kpi-orange { border-left: 3px solid var(--warning); }
.kpi.kpi-red    { border-left: 3px solid #dc2626; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-card { background: var(--card); border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.chart-card h3 { font-size: 15px; margin-bottom: 12px; }
.chart { width: 100%; height: 300px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 13px; }
tr:hover td { background: #f8fafc; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 12px; }
.badge-green { background: #dcfce7; color: var(--success); }
.badge-blue { background: #dbeafe; color: var(--primary); }
.badge-gray { background: #f1f5f9; color: var(--text-muted); }
.badge-orange { background: #fef3c7; color: var(--warning); }
.badge-red { background: #fee2e2; color: var(--danger); }

.hidden { display: none !important; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 项目进度（AIDP） */
.prog-card { margin-bottom: 16px; }
.prog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { color: var(--text-muted); font-weight: 600; font-size: 13px; background: #f8fafc; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.num.up { color: var(--success); font-weight: 600; }
.num.down { color: var(--danger); font-weight: 600; }
.num.flat, .muted { color: var(--text-muted); }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.site-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.site-name { font-weight: 600; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.dot-red { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }

/* ===== 项目管理台 ===== */
.proj-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.proj-toolbar-right { display: flex; gap: 10px; }
.proj-filter select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; min-width: 160px; }

/* 今日 / 本周 / 本月 统计条 —— 紧凑，一行三块 */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-mini { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px 12px; }
.stat-mini-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; }
.stat-mini-top b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.mini-bar { height: 5px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #16a34a); border-radius: 6px; transition: width .3s; }

/* 标签页 —— 白底卡片式，紧凑 */
.proj-tabs { display: flex; gap: 4px; margin-bottom: 0; padding: 0 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px 10px 0 0; border-bottom: none; }
.ptab { background: none; border: none; padding: 11px 20px; font-size: 14px; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* 任务列表 —— 统一行高 + 斑马纹，去掉"松" */
.task-list { display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--border); border-radius: 0 0 10px 10px; padding: 2px 8px 8px; }
.task-list > .task-list-title { padding: 10px 8px 8px; font-size: 13px; color: var(--text-muted);
  font-weight: 600; letter-spacing: .3px; border-bottom: 1px solid #f1f5f9; margin-bottom: 4px; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 0 8px; height: 42px;
  border-radius: 8px; flex-shrink: 0; transition: background .12s; border-bottom: 1px solid #f6f8fb; }
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: #eff6ff; }
.task-done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-check { cursor: pointer; font-size: 17px; color: var(--primary); user-select: none; flex-shrink: 0; line-height: 1; }
.task-title { flex: 1; cursor: pointer; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-proj { font-size: 12px; color: var(--primary); background: #dbeafe; padding: 2px 9px; border-radius: 20px; flex-shrink: 0; }
.task-assignee { font-size: 12px; color: var(--text-muted); background: #f1f5f9; padding: 2px 9px; border-radius: 20px; flex-shrink: 0; }
.task-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.task-row:hover .task-actions { opacity: 1; }
.btn-ico { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--text-muted); padding: 3px 7px; border-radius: 5px; }
.btn-ico:hover { background: #e2e8f0; color: var(--text); }
.btn-ico.danger:hover { background: #fee2e2; color: var(--danger); }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prio-high { background: #dc2626; }
.prio-normal { background: #f59e0b; }
.prio-low { background: #94a3b8; }

/* 项目卡片 —— 高度收窄，信息分层 */
.proj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 12px; }
.proj-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.pc-head h3 { margin: 0; font-size: 15px; }
.pc-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-bar { position: relative; height: 18px; background: #f1f5f9; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.pc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #16a34a); }
.pc-bar span { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--text); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.pc-dl { color: var(--danger); font-weight: 600; }
.muted-sm { font-size: 12px; color: var(--text-muted); font-weight: normal; }

/* ===== 业务线板块分组 ===== */
.biz-block { margin-bottom: 22px; }
.biz-block:last-child { margin-bottom: 0; }
.biz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 10px 14px; background: linear-gradient(90deg, #eff6ff, #f8fafc);
  border-left: 3px solid var(--primary); border-radius: 8px; }
.biz-icon { font-size: 20px; }
.biz-name { font-size: 16px; font-weight: 700; }
.biz-count { font-size: 12px; color: var(--primary); background: #dbeafe; padding: 2px 10px; border-radius: 20px; }
.biz-desc { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ===== 风险预警条 ===== */
.risk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
  background: #fff7ed; border: 1px solid #fed7aa; font-size: 13px; }
.risk-bar.risk-ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.risk-title { font-weight: 700; color: #c2410c; flex-shrink: 0; }
.risk-item { padding: 3px 10px; border-radius: 20px; cursor: default; white-space: nowrap; }
.risk-item.risk-high { background: #fee2e2; color: #b91c1c; }
.risk-item.risk-mid { background: #ffedd5; color: #c2410c; }
.risk-item.risk-low { background: #fef9c3; color: #a16207; }
.risk-more { color: var(--text-muted); font-size: 12px; }

/* ===== 经营目标 ===== */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rt-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #fff; }
.rt-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.rt-name { font-size: 14px; color: var(--text-muted); }
.rt-rate { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-rate small { font-size: 10px; font-weight: 400; color: var(--text-muted); }
.rt-good { color: #16a34a; } .rt-mid { color: #f59e0b; } .rt-bad { color: #dc2626; }
.rt-nums { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.rt-nums b { font-size: 24px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rt-nums span { font-size: 12px; color: var(--text-muted); }
.rt-bar { height: 7px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.rt-bar i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.rt-bar i.rt-good { background: linear-gradient(90deg, #22c55e, #16a34a); }
.rt-bar i.rt-mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.rt-bar i.rt-bad { background: linear-gradient(90deg, #f87171, #dc2626); }
.rt-proj { padding: 12px 0; border-top: 1px solid #f1f5f9; }
.rt-proj:first-of-type { border-top: none; padding-top: 4px; }
.rt-proj-head { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

/* ===== 项目开发流程（标准 7 阶段） ===== */
.pc-src { font-size: 12px; color: var(--text-muted); }

.flow-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.flow-title { display: flex; align-items: baseline; gap: 14px; }
.flow-title h2 { margin: 0; font-size: 20px; }
.flow-prog { font-size: 14px; color: var(--text-muted); }
.flow-prog b { font-size: 22px; color: var(--primary); font-variant-numeric: tabular-nums; }
.flow-region { font-size: 13px; color: var(--text-muted); }
.flow-actions { display: flex; gap: 8px; margin-left: auto; }

.flow-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.flow-progress-bar { flex: 1; height: 12px; background: #e2e8f0; border-radius: 8px; overflow: hidden; }
.flow-progress-bar i { display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #2563eb, #16a34a); transition: width .4s; }
.flow-progress-tip { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

.flow-empty-card { text-align: center; padding: 40px 24px; }
.flow-empty-card p { margin-bottom: 8px; }
.flow-type-pick { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.flow-type-pick select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }

/* 阶段网格 —— 7 阶段横向时间轴 */
.flow-stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.flow-stage { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 10px 12px;
  display: flex; flex-direction: column; min-height: 200px; position: relative; }
.flow-stage::after { content: ''; position: absolute; top: 22px; right: -10px; width: 10px; height: 2px;
  background: var(--border); }
.flow-stage:last-child::after { display: none; }
.flow-stage.flow-done { border-color: #bbf7d0; background: #f0fdf4; }
.flow-stage.flow-doing { border-color: #bfdbfe; background: #eff6ff; box-shadow: 0 2px 10px rgba(37,99,235,.1); }
.fs-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.fs-icon { font-size: 15px; }
.fs-name { font-weight: 600; font-size: 14px; }
.fs-pct { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.flow-done .fs-pct { color: var(--success); font-weight: 600; }
.fs-nodes { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.fs-node { display: flex; align-items: flex-start; gap: 6px; padding: 5px 5px; border-radius: 6px;
  font-size: 12.5px; transition: background .12s; }
.fs-node:hover { background: #f1f5f9; }
.fs-node.node-done .fn-name { text-decoration: line-through; color: var(--text-muted); }
.fn-chk { cursor: pointer; font-size: 14px; color: var(--primary); flex-shrink: 0; user-select: none; line-height: 1.25; }
.fn-name { flex: 1; cursor: pointer; line-height: 1.35; word-break: break-all; }
.fn-w { font-size: 10px; color: #94a3b8; background: #f1f5f9; padding: 0 5px; border-radius: 8px;
  flex-shrink: 0; margin-top: 1px; }
.fn-actions { display: none; gap: 0; flex-shrink: 0; }
.fs-node:hover .fn-actions { display: flex; }
.fs-empty { font-size: 12px; color: #cbd5e1; padding: 6px; }

@media (max-width: 1400px) {
  .flow-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow-stage:nth-child(4)::after { display: none; }
}

@media (max-width: 768px) {
  .stat-strip { grid-template-columns: 1fr; }
  .proj-toolbar { flex-direction: column; align-items: stretch; }
  .proj-cards { grid-template-columns: 1fr; }
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .chart-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  .data-table th, .data-table td { padding: 7px 6px; font-size: 13px; }
}

/* ===== 门店/加盟（加盟店汇总） ===== */
#store-table th, #store-table td,
.modal table th, .modal table td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px;
}
#store-table th, .modal table th { color: var(--text-muted); font-weight: 600; font-size: 12px; background: #f8fafc; white-space: nowrap; }
#store-table tbody tr:hover { background: #f8fafc; }
.cell-wrap { max-width: 180px; white-space: normal; line-height: 1.4; }
.row-actions { white-space: nowrap; }
.row-actions .btn { margin-right: 4px; }
.plate { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #dbeafe; color: #1e40af; font-size: 12px; font-weight: 600; }
.link-store { color: var(--primary, #2563eb); text-decoration: none; font-weight: 600; }
.link-store:hover { text-decoration: underline; }
.sum-chip { display: inline-block; margin-left: 10px; padding: 4px 10px; border-radius: 6px; background: #f1f5f9; font-size: 13px; color: var(--text-muted); }
.sum-chip b { color: var(--text); }

/* 门店详情弹窗 */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.detail-grid > div.full { grid-column: 1 / -1; }
.detail-grid label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.detail-grid > div > div { font-size: 14px; line-height: 1.5; }
.sub { font-size: 12px; color: var(--text-muted); }
.modal { max-width: 760px; }
.sum-chip-main { background: #dbeafe; color: #1e40af; font-size: 14px; padding: 5px 14px; }
.sum-chip-main b { color: #1e3a8a; font-size: 16px; }
.stu-done { color: #1e40af; font-weight: 700; }
.flag-ok { display:inline-block; padding:1px 8px; border-radius:10px; background:#dcfce7; color:#166534; font-size:12px; font-weight:600; }
.flag-no { display:inline-block; padding:1px 8px; border-radius:10px; background:#f1f5f9; color:#64748b; font-size:12px; }
.tra-tab { background:#f1f5f9; color:#475569; border:1px solid transparent; }
.tra-tab.active { background:#dbeafe; color:#1e40af; border-color:#93c5fd; font-weight:700; }
.pill { display:inline-block; padding:2px 10px; border-radius:12px; font-size:12px; font-weight:600; text-decoration:none; white-space:nowrap; }
.pill-contract { background:#dcfce7; color:#166534; border:1px solid #86efac; }
.pill-contract:hover { background:#bbf7d0; }
.pill-none { background:#f1f5f9; color:#94a3b8; border:1px solid #e2e8f0; }

/* 到期时间 + 倒计时 */
.exp-box { display:flex; flex-direction:column; gap:3px; line-height:1.3; }
.exp-date { font-size:13px; color:var(--text); font-variant-numeric:tabular-nums; }
.exp-badge { display:inline-block; align-self:flex-start; padding:1px 8px; border-radius:10px; font-size:11px; font-weight:600; white-space:nowrap; }
.exp-ok { background:#dcfce7; color:#166534; }
.exp-warn { background:#fef3c7; color:#b45309; }
.exp-danger { background:#fee2e2; color:#b91c1c; }
.exp-expired { background:#dc2626; color:#fff; }
.exp-none { color:#94a3b8; font-size:12px; }
.sum-chip-danger { background:#fee2e2; color:#b91c1c; }
.sum-chip-danger b { color:#991b1b; }
.sum-chip-warn { background:#fef3c7; color:#b45309; }
.sum-chip-warn b { color:#92400e; }

/* ===== 法人主体（营业执照档案）===== */
.ent-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1500px) { .ent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .ent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .ent-grid { grid-template-columns: 1fr; } }
.ent-card {
  border: 1px solid var(--border, #e2e8f0); border-top: 3px solid #c81f28; border-radius: 10px;
  background: #fff; padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
  transition: box-shadow .18s, transform .18s;
}
.ent-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.09); transform: translateY(-1px); }
.ent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ent-name { font-size: 13px; font-weight: 600; line-height: 1.4; color: #0f172a; }
.ent-brand {
  flex: none; font-size: 10.5px; padding: 2px 7px; border-radius: 20px;
  background: #fee2e2; color: #b91c1c; font-weight: 500; white-space: nowrap;
}
.ent-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px; color: #64748b; letter-spacing: 0;
  background: #f8fafc; border-radius: 5px; padding: 3px 6px; display: inline-block;
  overflow-wrap: anywhere;
}
.ent-body { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ent-row { display: flex; gap: 7px; font-size: 11.5px; line-height: 1.5; }
.ent-lab { flex: none; width: 56px; color: #94a3b8; }
.ent-val { flex: 1; color: #334155; word-break: break-all; }
.ent-val.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.ent-foot { display: flex; gap: 6px; padding-top: 7px; border-top: 1px dashed #e2e8f0; }
.ent-foot .btn { flex: 1; }
.ent-scope { font-size: 12.5px; line-height: 1.75; color: #475569; background: #f8fafc; border-radius: 6px; padding: 10px 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ent-row-full { flex-direction: column; gap: 2px; }
.ent-row-full .ent-lab { width: auto; }
/* 5 列布局下的紧凑微调 */
.ent-grid .ent-val { overflow-wrap: anywhere; }
.ent-grid .ent-foot .btn { padding: 5px 6px; font-size: 11.5px; }
/* 5 列：统一卡片高度、标签与值对齐 */
.ent-grid .ent-card { justify-content: flex-start; }
.ent-grid .ent-lab { width: 52px; flex-shrink: 0; }
.ent-grid .ent-name { min-height: 36px; display: flex; align-items: flex-start; }
.ent-grid .ent-body { gap: 4px; }
.ent-grid .ent-row { align-items: flex-start; }

/* ===== 开票信息胶囊 ===== */
.ent-inv {
  border-top: 1px dashed #e2e8f0; padding-top: 8px; margin-top: 2px;
  display: flex; flex-direction: column; gap: 5px;
}
.ent-inv-h {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 600; color: #b91c1c;
}
.ent-copy-all {
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
  font-size: 10.5px; padding: 1px 8px; border-radius: 10px; cursor: pointer;
  transition: background .15s, color .15s;
}
.ent-copy-all:hover { background: #fee2e2; }
.ent-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 6px;
  padding: 4px 7px; transition: background .15s, border-color .15s;
}
.ent-chip:hover { background: #f1f5f9; border-color: #cbd5e1; }
.ent-chip .k { flex: none; font-size: 10.5px; color: #94a3b8; }
.ent-chip .v { flex: 1; font-size: 11px; color: #334155; overflow-wrap: anywhere; }
.ent-chip.copied { background: #dcfce7; border-color: #86efac; }
.ent-chip.copied::after { content: '✓'; color: #16a34a; font-size: 11px; }

/* ===== 课程库 ===== */
.course-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.course-card {
  border: 1px solid var(--border, #e2e8f0); border-radius: 9px; background: #fff;
  padding: 9px 9px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  transition: box-shadow .18s, transform .18s;
}
.course-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.09); transform: translateY(-1px); }
.course-head { display: flex; flex-direction: column; gap: 4px; }
.course-name { font-size: 12px; font-weight: 600; line-height: 1.35; color: #0f172a;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-cat { align-self: flex-start; font-size: 9.5px; padding: 1px 6px; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.course-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 10.5px; }
.course-dur { background: #f1f5f9; color: #475569; border-radius: 4px; padding: 1px 5px; font-weight: 500; white-space: nowrap; }
.course-days { color: #94a3b8; font-size: 10px; white-space: nowrap; }
.course-price { display: flex; flex-direction: column; gap: 1px; padding: 5px 0; border-top: 1px dashed #e2e8f0; border-bottom: 1px dashed #e2e8f0; }
.cp-main { font-size: 14px; font-weight: 700; color: #c81f28; line-height: 1.2; }
.cp-old { font-size: 9.5px; color: #94a3b8; line-height: 1.3; }
.course-sum { font-size: 10.5px; color: #64748b; line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-foot { display: flex; gap: 5px; }
.course-foot .btn { flex: 1; padding: 3px 4px; font-size: 11px; }
.course-foot .sub { margin: 0 auto; }
.course-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.course-tag { font-size: 10px; padding: 1.5px 6px; border-radius: 5px; background: #f1f5f9; color: #475569; white-space: nowrap; font-weight: 500; }
.ct-comm { background: #fff7ed; color: #b45309; }
.ct-mat { background: #eff6ff; color: #1d4ed8; }
.ct-trainer { background: #f0fdf4; color: #15803d; }
.course-note { font-size: 10px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 6px; padding: 5px 7px; line-height: 1.5; }

/* ===== 月度开课计划（全年 12 月总览） ===== */
#plan-toggle:hover { background: #f8fafc; border-radius: 8px; }
.mp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mp-col { border: 1px solid var(--border, #e2e8f0); border-radius: 9px; overflow: hidden; background: #fcfdff;
  display: flex; flex-direction: column; min-height: 120px; }
.mp-head { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #f8fafc;
  border-bottom: 1px solid var(--border, #e2e8f0); }
.mp-head b { font-size: 13px; color: #0f172a; }
.mp-head.now { background: #fef2f2; border-bottom-color: #fecaca; }
.mp-head.now b { color: #c81f28; }
.mp-cnt { font-size: 10.5px; color: #64748b; margin-left: auto; }
.mp-now { font-size: 9.5px; background: #c81f28; color: #fff; border-radius: 4px; padding: 1px 5px; }
.mp-empty { font-size: 11px; color: #cbd5e1; text-align: center; padding: 18px 0; flex: 1;
  display: flex; align-items: center; justify-content: center; }
.mp-item { display: flex; align-items: center; gap: 5px; padding: 5px 9px; font-size: 11.5px;
  border-bottom: 1px dashed #f1f5f9; cursor: pointer; transition: background .12s; }
.mp-item:hover { background: #f1f5f9; }
.mp-item:last-child { border-bottom: 0; }
.mp-light { font-size: 9px; flex-shrink: 0; }
.mp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.mp-seq { font-size: 10px; color: #94a3b8; white-space: nowrap; flex-shrink: 0; }
.mp-date { font-size: 10px; color: #64748b; white-space: nowrap; flex-shrink: 0; }
.mp-st { font-size: 9.5px; white-space: nowrap; flex-shrink: 0; }
.mp-hint { font-size: 11px; color: #94a3b8; margin-top: 10px; text-align: center; }
@media (max-width: 1366px) { .mp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 期次详情弹层 */
.cd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 4px 0 2px; }
.cd-cell { border-bottom: 1px solid #f1f5f9; padding-bottom: 7px; }
.cd-lb { font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.cd-vl { font-size: 14px; font-weight: 600; color: #0f172a; }
.cd-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 1366px) { .course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 课程详情课表 */
.cs-row { display: flex; gap: 11px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.cs-row:last-child { border-bottom: 0; }
.cs-day { flex: none; width: 74px; font-size: 12px; font-weight: 600; color: #c81f28; padding-top: 1px; }
.cs-body { flex: 1; min-width: 0; }
.cs-topic { font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 3px; }
.cs-detail { font-size: 12px; color: #64748b; line-height: 1.7; }

/* ============================================================
   AI 经营参谋
   ============================================================ */
.nav-item.nav-ai { background: linear-gradient(90deg, rgba(37,99,235,0.22), transparent); }
.nav-item.nav-ai.active { background: linear-gradient(90deg, #2563eb, #7c3aed); }

.ai-loading { padding: 60px 0; text-align: center; color: #64748b; font-size: 14px; }
.ai-empty { text-align: center; padding: 50px 24px; }
.ai-empty-icon { font-size: 46px; margin-bottom: 12px; }
.ai-empty h3 { font-size: 17px; margin-bottom: 8px; }
.ai-empty p { margin-bottom: 20px; }

.ai-hero { background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #4c1d95); color: #fff; border: none; }
.ai-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.ai-hero-date { font-size: 12px; color: #93c5fd; letter-spacing: 0.5px; margin-bottom: 8px; }
.ai-hero-head { font-size: 19px; font-weight: 600; line-height: 1.55; max-width: 900px; }
.ai-hero-act .btn-ghost { border-color: rgba(255,255,255,0.35); color: #e2e8f0; }
.ai-hero-act .btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; }
.ai-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.15); font-size: 12px; color: #cbd5e1; align-items: center; }
.ai-dot { padding: 2px 9px; border-radius: 20px; font-weight: 500; }
.ai-danger-dot { background: rgba(220,38,38,0.3); color: #fecaca; }
.ai-warn-dot { background: rgba(217,119,6,0.34); color: #fed7aa; }
.ai-good-dot { background: rgba(22,163,74,0.3); color: #bbf7d0; }

.ai-llm-card { margin-top: 16px; border-left: 4px solid #2563eb; }
.ai-llm-card h3 { margin-bottom: 10px; }
.ai-llm-body { font-size: 13.5px; line-height: 1.95; color: #1e293b; }

.ai-sys-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.ai-sys { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; }
.ai-sys-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ai-sys-rate { font-size: 26px; font-weight: 700; line-height: 1.1; }
.ai-sys-rate small { font-size: 13px; font-weight: 500; margin-left: 2px; }
.ai-sys-bar { height: 5px; background: #f1f5f9; border-radius: 4px; overflow: hidden; margin: 9px 0 7px; }
.ai-sys-bar i { display: block; height: 100%; border-radius: 4px; }
.ai-sys-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); }
.ai-sys.ai-good .ai-sys-rate { color: #16a34a; } .ai-sys.ai-good .ai-sys-bar i { background: #16a34a; }
.ai-sys.ai-warn .ai-sys-rate { color: #d97706; } .ai-sys.ai-warn .ai-sys-bar i { background: #d97706; }
.ai-sys.ai-danger .ai-sys-rate { color: #dc2626; } .ai-sys.ai-danger .ai-sys-bar i { background: #dc2626; }
.ai-bad { color: #dc2626; font-weight: 500; }
.ai-ok { color: #16a34a; }

.ai-list-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.ai-filters { display: flex; gap: 6px; }
.ai-chip { border: 1px solid var(--border); background: #fff; color: #475569; font-size: 12px;
  padding: 4px 12px; border-radius: 20px; cursor: pointer; transition: 0.15s; }
.ai-chip:hover { border-color: #94a3b8; }
.ai-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.ai-list { margin-top: 14px; }
.ai-item { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden; background: #fff; transition: 0.15s; }
.ai-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.06); }
.ai-item-bar { width: 4px; flex: none; }
.ai-item-main { flex: 1; min-width: 0; padding: 13px 15px; }
.ai-item-act { flex: none; display: flex; flex-direction: column; gap: 5px;
  justify-content: center; padding: 0 13px; border-left: 1px solid #f1f5f9; }
.ai-item-head { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 6px; }
.ai-item-lv { font-size: 11.5px; font-weight: 600; }
.ai-item-type { font-size: 10.5px; background: #f1f5f9; color: #475569; padding: 1px 7px; border-radius: 20px; }
.ai-item-tag { font-size: 10.5px; background: #eff6ff; color: #1d4ed8; padding: 1px 7px; border-radius: 20px; }
.ai-item-st { font-size: 11px; color: #16a34a; }
.ai-item-title { font-size: 14px; font-weight: 600; line-height: 1.5; }
.ai-item-detail { font-size: 12.5px; color: #475569; line-height: 1.75; margin-top: 5px; }
.ai-item-ai { font-size: 12.5px; color: #4c1d95; background: #f5f3ff; border-radius: 8px;
  padding: 8px 11px; line-height: 1.8; margin-top: 8px; }
.ai-item-done { opacity: 0.55; }

.ai-item.ai-danger .ai-item-bar { background: #dc2626; }
.ai-item.ai-danger .ai-item-lv { color: #dc2626; }
.ai-item.ai-warn .ai-item-bar { background: #d97706; }
.ai-item.ai-warn .ai-item-lv { color: #d97706; }
.ai-item.ai-info .ai-item-bar { background: #2563eb; }
.ai-item.ai-info .ai-item-lv { color: #2563eb; }
.ai-item.ai-good .ai-item-bar { background: #16a34a; }
.ai-item.ai-good .ai-item-lv { color: #16a34a; }

/* ============================================================
   我的任务
   ============================================================ */
.mt-list { margin-top: 6px; }
.mt-row { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 15px; margin-bottom: 9px; background: #fff; transition: 0.15s; }
.mt-row:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.06); }
.mt-done { opacity: 0.55; }
.mt-lv { flex: none; width: 26px; height: 26px; border-radius: 7px; background: #eff6ff; color: #1d4ed8;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.mt-main { flex: 1; min-width: 0; }
.mt-title { font-size: 14px; font-weight: 600; line-height: 1.5; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.mt-detail { font-size: 12.5px; color: #475569; line-height: 1.7; margin-top: 6px; }
.mt-blocked { font-size: 12.5px; color: #b91c1c; background: #fef2f2; border-radius: 7px;
  padding: 6px 10px; margin-top: 7px; line-height: 1.7; }
.mt-overdue { color: #dc2626; font-size: 12px; font-weight: 500; }
.mt-sub { font-size: 11.5px; color: #64748b; }
.mt-act { flex: none; display: flex; gap: 6px; align-items: center; }
.btn-xs { padding: 3px 9px; font-size: 11.5px; border-radius: 6px; }

@media (max-width: 1366px) { .ai-sys-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px) {
  .ai-sys-grid { grid-template-columns: 1fr; }
  .ai-item { flex-direction: column; }
  .ai-item-act { flex-direction: row; border-left: 0; border-top: 1px solid #f1f5f9; padding: 10px 13px; }
  .mt-row { flex-wrap: wrap; }
}

/* ============================================================
   目标拆解
   ============================================================ */
.proj-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.proj-toolbar-right { display: flex; gap: 8px; }
.proj-filter { display: flex; align-items: center; }
.muted-sm { color: var(--text-muted); font-size: 12px; }
.muted { color: var(--text-muted); }

.bd-lag-note { font-size: 12.5px; margin: 10px 0 14px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 14px; }
.bd-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.bd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.bd-name { font-size: 13.5px; font-weight: 600; }
.bd-scope { font-size: 11px; color: #64748b; }
.bd-rate { font-size: 24px; font-weight: 700; line-height: 1.15; }
.bd-rate small { font-size: 12.5px; font-weight: 500; margin-left: 1px; }
.bd-bars { margin: 9px 0 7px; }
.bd-bar { position: relative; height: 7px; background: #f1f5f9; border-radius: 4px; margin-bottom: 5px; }
.bd-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; min-width: 2px; }
.bd-bar i { display: block; height: 100%; border-radius: 4px; }
.bd-bar-time i { background: repeating-linear-gradient(45deg,#cbd5e1,#cbd5e1 4px,#e2e8f0 4px,#e2e8f0 8px); }
.bd-nums { display: flex; justify-content: space-between; font-size: 12px; color: #475569; }
.bd-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: #94a3b8; margin-top: 8px; }
.bd-lg-fill { width: 12px; height: 6px; background: #2563eb; border-radius: 3px; }
.bd-lg-time { width: 12px; height: 6px; border-radius: 3px; margin-left: 8px;
  background: repeating-linear-gradient(45deg,#cbd5e1,#cbd5e1 2px,#e2e8f0 2px,#e2e8f0 4px); }

.bd-ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bd-ai-t { font-size: 12.5px; font-weight: 600; color: #4c1d95; margin-bottom: 6px; }
.bd-ai-list { margin: 0; padding-left: 20px; }
.bd-ai-list li { font-size: 13px; line-height: 1.85; color: #1e293b; }
.bd-ai-risk { margin-top: 12px; background: #fffbeb; border-left: 3px solid #d97706;
  border-radius: 7px; padding: 9px 12px; font-size: 12.5px; color: #92400e; line-height: 1.7; }

.bd-items { margin-top: 14px; }
.bd-item { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.bd-item-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.bd-item-head label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.bd-mon { font-size: 13px; font-weight: 600; color: #1e3a8a; margin: 11px 0 9px; }
.bd-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 11px; }
.bd-week { background: #f8fafc; border-radius: 9px; padding: 11px 12px; }
.bd-week-t { font-size: 12.5px; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.bd-week-d { font-size: 11.5px; color: #64748b; line-height: 1.7; }
.bd-days { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bd-day { font-size: 11px; background: #fff; border: 1px solid #e2e8f0; color: #475569;
  border-radius: 20px; padding: 2px 9px; }

@media (max-width: 820px) { .bd-ai-cols { grid-template-columns: 1fr; } }

/* ============================================================
   团队看板
   ============================================================ */
.tm-signals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tm-sig { font-size: 12px; padding: 4px 11px; border-radius: 20px; line-height: 1.6; }
.tm-sig-danger { background: rgba(220,38,38,0.28); color: #fecaca; }
.tm-sig-warn { background: rgba(217,119,6,0.32); color: #fed7aa; }
.tm-sig-ok { background: rgba(22,163,74,0.3); color: #bbf7d0; }

.tm-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-top: 14px; }
.tm-dept { border: 1px solid var(--border); border-radius: 10px; padding: 14px; border-left: 4px solid #cbd5e1; }
.tm-dept.dh-good { border-left-color: #16a34a; }
.tm-dept.dh-normal { border-left-color: #2563eb; }
.tm-dept.dh-risk { border-left-color: #dc2626; background: #fef8f8; }
.tm-dept.dh-warn { border-left-color: #d97706; background: #fffdf7; }
.tm-dept-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tm-dept-name { font-size: 13.5px; font-weight: 600; }
.tm-dept-h { font-size: 10.5px; padding: 1px 8px; border-radius: 20px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.tm-dept-h.dh-good { background: #dcfce7; color: #15803d; }
.tm-dept-h.dh-risk { background: #fee2e2; color: #b91c1c; }
.tm-dept-h.dh-warn { background: #fef3c7; color: #b45309; }
.tm-dept-rate { font-size: 24px; font-weight: 700; line-height: 1.15; margin-top: 6px; }
.tm-dept-rate small { font-size: 12.5px; font-weight: 500; }
.tm-dept-sub { font-size: 11.5px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.tm-dept-bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: #f1f5f9; margin: 9px 0 7px; }
.tm-dept-bar i { display: block; height: 100%; }
.tm-seg-done { background: #16a34a; }
.tm-seg-doing { background: #2563eb; }
.tm-seg-blocked { background: #dc2626; }
.tm-seg-todo { background: #e2e8f0; }
.tm-dept-foot { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-muted); }

.tm-person { display: flex; align-items: center; gap: 14px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; }
.tm-p-info { flex: none; width: 160px; min-width: 0; }
.tm-p-name { font-size: 13.5px; font-weight: 600; margin-right: 6px; }
.tm-p-dept { font-size: 11px; color: var(--text-muted); }
.tm-p-load { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tm-p-bar { flex: 1; height: 7px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.tm-p-bar i { display: block; height: 100%; background: linear-gradient(90deg,#60a5fa,#2563eb); border-radius: 4px; }
.tm-p-num { flex: none; font-size: 11.5px; color: #475569; width: 62px; }
.tm-p-nums { flex: none; display: flex; gap: 10px; align-items: center; font-size: 11.5px; }
.tm-p-done { color: #475569; }
.tm-p-rate { font-weight: 600; color: #2563eb; }
.tm-p-ot { color: #16a34a; }

@media (max-width: 820px) {
  .tm-dept-grid { grid-template-columns: 1fr; }
  .tm-person { flex-wrap: wrap; }
  .tm-p-info { width: auto; }
  .tm-p-load { flex-basis: 100%; }
}

/* ==================================================================
 * 项目经营管理（第三阶段）
 * 布局骨架：头部 → Tab → 内容；项目卡 / 台账表 / 模型表 / 举措条
 * ================================================================== */

.nav-biz { background: linear-gradient(90deg, rgba(37,99,235,.18), transparent); }

.bz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.bz-title { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bz-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bz-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.bz-tab { padding: 9px 16px; font-size: 13.5px; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 6px; }
.bz-tab:hover { color: var(--primary); }
.bz-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.bz-dot { background: var(--danger); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; font-weight: 600; }

.bz-empty { text-align: center; padding: 48px 24px; }
.bz-empty h3 { margin-bottom: 10px; }
.bz-empty p { max-width: 620px; margin: 0 auto 20px; line-height: 1.75; }

/* 总盘：两栏 */
.bz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .bz-two { grid-template-columns: 1fr; } }

/* 进度条 */
.bz-bar { height: 8px; background: #f1f5f9; border-radius: 5px; overflow: hidden; margin-bottom: 4px; }
.bz-bar i { display: block; height: 100%; border-radius: 5px; transition: width .3s; }
.bz-bar-txt { font-size: 11.5px; color: var(--text-muted); }

/* 计划 vs 实绩对比 */
.bz-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.bz-legend span { display: flex; align-items: center; gap: 5px; }
.bz-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.bz-compare { display: flex; flex-direction: column; gap: 10px; }
.bz-cmp-row { display: grid; grid-template-columns: 70px 1fr 80px; gap: 10px; align-items: center; }
.bz-cmp-label { font-size: 12.5px; color: var(--text-muted); }
.bz-cmp-val { font-size: 13px; font-weight: 600; text-align: right; }
.bz-note { font-size: 11.5px; color: var(--text-muted); line-height: 1.7; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }

/* 风险分布 */
.bz-risk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.bz-risk-item { text-align: center; padding: 14px 6px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); }
.bz-risk-num { font-size: 24px; font-weight: 700; line-height: 1.1; }
.bz-risk-cn { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.bz-risk-danger .bz-risk-num { color: var(--danger); }
.bz-risk-risk .bz-risk-num { color: #f97316; }
.bz-risk-watch .bz-risk-num { color: #ca8a04; }
.bz-risk-good .bz-risk-num { color: var(--success); }
.bz-risk-unknown .bz-risk-num { color: #94a3b8; }
@media (max-width: 700px) { .bz-risk-grid { grid-template-columns: repeat(3, 1fr); } }

/* 通用表格 */
.bz-table { width: 100%; overflow-x: auto; }
.bz-tr { display: grid; grid-template-columns: 1.6fr .9fr 1fr 1fr .8fr 1fr .5fr; gap: 10px; padding: 11px 10px; border-bottom: 1px solid var(--border); align-items: center; font-size: 13px; }
.bz-table-wide .bz-tr { grid-template-columns: 1.7fr .9fr .7fr 1.1fr 1fr 1fr .6fr .8fr .8fr .7fr .6fr .5fr; font-size: 12.5px; }
.bz-th { background: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 12px; border-radius: 6px; position: sticky; top: 0; }
.bz-tr:not(.bz-th):hover { background: #f8fafc; }
.bz-td-name { font-weight: 600; }
.bz-link { color: var(--primary); text-decoration: none; font-size: 12.5px; }
.bz-link:hover { text-decoration: underline; }
.bz-del { color: var(--danger); }

/* 项目卡网格 */
.bz-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bz-proj { border: 1px solid var(--border); border-radius: 12px; padding: 15px; cursor: pointer; transition: all .18s; background: #fff; }
.bz-proj:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(37,99,235,.13); transform: translateY(-2px); }
.bz-proj-noplan { border-style: dashed; background: #fafbfc; }
.bz-proj-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.bz-proj-name { font-weight: 600; font-size: 14.5px; }
.bz-proj-line { margin-bottom: 10px; }
.bz-proj-money { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.bz-proj-money b { display: block; font-size: 15px; margin-top: 2px; }
.bz-proj-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.bz-filter { margin-bottom: 14px; }

/* 建议目标 */
.bz-suggest-head { background: linear-gradient(135deg, #eff6ff, #f8fafc); border: 1px solid #bfdbfe; }
.bz-suggest-head h3 { margin-bottom: 8px; }
.bz-suggest-head p { line-height: 1.8; }
.bz-suggest-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 10px; }
.bz-suggest-sum b { display: block; font-size: 18px; margin-top: 4px; }
.bz-big { color: var(--primary); font-size: 22px !important; }
@media (max-width: 820px) { .bz-suggest-sum { grid-template-columns: repeat(2, 1fr); } }
.bz-suggest-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.bz-basis-list { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; }
.bz-basis-item { padding: 12px 14px; background: #f8fafc; border-radius: 9px; border-left: 3px solid var(--primary); }
.bz-basis-name { font-weight: 600; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.bz-basis-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.75; }
.bz-basis-modal .bz-basis-item { font-size: 13.5px; border-left: none; border-bottom: 1px solid var(--border); border-radius: 0; }

/* 需老板决策 */
.bz-att-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bz-att { padding: 13px 15px; border-radius: 9px; background: #f8fafc; border-left: 4px solid #94a3b8; }
.bz-att.danger { border-left-color: var(--danger); background: #fef2f2; }
.bz-att.risk { border-left-color: #f97316; background: #fff7ed; }
.bz-att.watch { border-left-color: #eab308; background: #fefce8; }
.bz-att.info { border-left-color: var(--primary); background: #eff6ff; }
.bz-att-proj { font-weight: 600; margin-bottom: 5px; }
.bz-att-text { font-size: 13px; margin-bottom: 4px; }
.bz-att-sug { font-size: 12.5px; color: var(--text-muted); }

/* 项目详情 */
.bz-diag { border-left: 4px solid var(--primary); }
.bz-diag-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
.bz-diag-list li { padding: 9px 13px; background: #f8fafc; border-radius: 7px; font-size: 13px; line-height: 1.7; }
.bz-diag-list li::before { content: '→ '; color: var(--primary); font-weight: 700; }
.bz-aidp { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.bz-aidp-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.bz-aidp-m { font-size: 11.5px; padding: 4px 9px; background: #f1f5f9; border-radius: 6px; color: var(--text-muted); }
.bz-aidp-m b { color: var(--text); }
.bz-aidp-m.st { background: #fef2f2; color: var(--danger); }

/* 月度台账 */
.bz-month-scroll { overflow-x: auto; }
.bz-month-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 900px; }
.bz-month-table th { background: #f8fafc; padding: 9px 8px; text-align: left; font-size: 11.5px; color: var(--text-muted); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border); }
.bz-month-table td { padding: 9px 8px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.bz-month-table tbody tr:hover { background: #f8fafc; }
.bz-month-table tfoot td { background: #f8fafc; font-weight: 600; border-top: 2px solid var(--border); }
.bz-cur-month { background: #eff6ff !important; }
.bz-editable { cursor: pointer; border-bottom: 1px dashed #cbd5e1; }
.bz-editable:hover { background: #eff6ff; color: var(--primary); }
.bz-action-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-neg { color: var(--danger); }
.bz-month-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.bz-model-sum { margin-top: 12px; padding: 11px 14px; background: #f8fafc; border-radius: 8px; font-size: 13px; }
.bz-warn { color: #b45309; background: #fef3c7; padding: 3px 9px; border-radius: 5px; margin-left: 8px; font-size: 12.5px; }
.bz-ok { color: #15803d; background: #dcfce7; padding: 3px 9px; border-radius: 5px; margin-left: 8px; font-size: 12.5px; }
.bz-big-num { font-size: 26px; font-weight: 700; color: var(--primary); margin: 10px 0; }

/* 举措 */
.bz-act-list { display: flex; flex-direction: column; gap: 10px; }
.bz-act { display: flex; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.bz-act:hover { border-color: #bfdbfe; background: #f8fafc; }
.bz-act-left { flex: 1; min-width: 0; }
.bz-act-title { font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.bz-act-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.bz-act-purpose { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.bz-act-right { flex: none; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
@media (max-width: 700px) { .bz-act { flex-direction: column; } .bz-act-right { flex-direction: row; align-items: center; } }

/* chips */
.bz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bz-chip { padding: 7px 14px; background: #f1f5f9; border-radius: 16px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.bz-chip:hover { background: #dbeafe; color: var(--primary); }

/* 表单 */
.bz-form { display: flex; flex-direction: column; gap: 13px; max-height: 62vh; overflow-y: auto; padding: 4px 2px; }
.bz-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.bz-field { display: flex; flex-direction: column; gap: 5px; }
.bz-field > span { font-size: 12.5px; color: var(--text-muted); }
.bz-field input, .bz-field select { padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; font-size: 13.5px; font-family: inherit; }
.bz-field input:focus, .bz-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.bz-hint { font-size: 12.5px; color: var(--text-muted); background: #f8fafc; padding: 10px 13px; border-radius: 7px; line-height: 1.7; }
.bz-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* 收入模型编辑行 */
.bz-model-item { display: grid; grid-template-columns: 2fr .8fr .7fr .9fr .8fr 1fr 1fr auto; gap: 8px; align-items: center; }
.bz-model-item input, .bz-model-item select { padding: 8px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; font-family: inherit; width: 100%; }
@media (max-width: 900px) { .bz-model-item { grid-template-columns: 1fr 1fr; } }
