/* ===== 汇信财富中心工程工单运营分析看板 ===== */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #1c2533;
  --ink-2: #45536a;
  --muted: #7a8699;
  --line: #e3e8f0;
  --navy: #12263f;
  --accent: #1d5fd6;
  --accent-soft: #e8f0fd;
  --good: #15803d;
  --good-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf1e0;
  --bad: #b91c1c;
  --bad-soft: #fdeaea;
  --c-a: #3b82f6;
  --c-b: #10b981;
  --c-c: #f59e0b;
  --c-d: #8b5cf6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 33, 61, .05), 0 4px 14px rgba(16, 33, 61, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.num, .kpi-value, td.n, th.n { font-variant-numeric: tabular-nums; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  color: #dce6f2;
  box-shadow: 0 2px 10px rgba(10, 25, 47, .35);
}
.topbar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, #2f6fed, #59a5f5);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.brand-name { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #b8c7da; text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(84, 144, 245, .22); color: #fff; }

/* ---------- 页头 ---------- */
.hero {
  background: linear-gradient(160deg, #16304e 0%, #1d3f66 55%, #254a78 100%);
  color: #eaf1f9;
  padding: 46px 24px 42px;
}
.hero-inner { max-width: 1360px; margin: 0 auto; }
.hero h1 { font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.hero .sub { margin-top: 12px; color: #b9cbdf; font-size: 14px; max-width: 980px; }
.hero-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-chip {
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: 5px 14px; font-size: 12.5px; color: #d5e2f1;
  background: rgba(255,255,255,.06);
}
.hero-chip b { color: #fff; font-weight: 600; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
section.block { padding: 34px 0 6px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-index {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 9px;
}
.section-head h2 { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.section-head .desc { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 18px;
}
.card h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 4px; color: var(--ink); }
.card .card-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1080px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- KPI 卡片 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1080px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 14px; position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.kpi.warn::before { background: var(--warn); }
.kpi.bad::before { background: var(--bad); }
.kpi.good::before { background: var(--good); }
.kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi-value { font-size: 27px; font-weight: 700; margin-top: 4px; letter-spacing: .3px; }
.kpi-value .unit { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 3px; }
.kpi-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi-foot .up { color: var(--good); font-weight: 600; }
.kpi-foot .down { color: var(--bad); font-weight: 600; }
.kpi-foot .flat { color: var(--ink-2); font-weight: 600; }

/* ---------- 结论列表 ---------- */
.findings { list-style: none; }
.findings li {
  position: relative; padding: 10px 0 10px 30px; border-bottom: 1px dashed var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.findings li:last-child { border-bottom: none; }
.findings li::before {
  content: attr(data-i); position: absolute; left: 0; top: 11px;
  width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft);
  color: var(--accent); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.findings b, .card p b { color: var(--ink); }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: 320px; }
.chart.tall { height: 400px; }
.chart.short { height: 260px; }
.chart-fallback {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--muted); font-size: 13px; background: #fafbfc; border-radius: 8px;
}

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th {
  background: #f7f9fc; color: var(--ink-2); font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid #d8e0ec; white-space: nowrap;
}
.tbl tbody tr:hover { background: #f8fafd; }
.tbl .rowhead { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--accent-soft); color: var(--accent); }
.tag.mute { background: #eef1f6; color: var(--ink-2); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; }

/* ---------- 员工 scorecard ---------- */
.emp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1180px) { .emp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .emp-grid { grid-template-columns: 1fr; } }
.emp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.emp-head { display: flex; align-items: center; justify-content: space-between; }
.emp-name { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.emp-avatar {
  width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent);
}
.emp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emp-stat { background: #f7f9fc; border-radius: 8px; padding: 7px 8px; }
.emp-stat .k { font-size: 11px; color: var(--muted); white-space: nowrap; }
.emp-stat .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.emp-stat .v .u { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.emp-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.emp-bar-row .lab { width: 52px; flex: none; }
.emp-bar { flex: 1; height: 7px; background: #edf1f7; border-radius: 4px; overflow: hidden; display: flex; }
.emp-bar span { display: block; height: 100%; }
.emp-note { font-size: 12.5px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 9px; }
.emp-note .line { display: flex; gap: 7px; margin-top: 4px; }
.emp-note .ico { flex: none; width: 15px; height: 15px; border-radius: 4px; margin-top: 3px; }
.emp-note .ico.plus { background: var(--good); }
.emp-note .ico.minus { background: var(--bad); }
.emp-note .ico.plain { background: #b6c2d4; }

/* ---------- 行动指引 ---------- */
.g-item { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin-bottom: 20px; }
.g-item h4 { font-size: 15px; font-weight: 650; margin-bottom: 6px; }
.g-item p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.g-item .lbl { font-weight: 700; color: var(--ink); }
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .roadmap { grid-template-columns: 1fr; } }
.road-col { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.road-col h4 { font-size: 14.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.road-col .road-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.road-col ul { list-style: none; }
.road-col li { font-size: 13px; color: var(--ink-2); padding: 6px 0 6px 16px; position: relative; border-bottom: 1px dashed var(--line); }
.road-col li:last-child { border-bottom: none; }
.road-col li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.road-col li b { color: var(--ink); }

details.fold { border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; padding: 10px 14px; margin-bottom: 14px; }
details.fold summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
details.fold[open] summary { margin-bottom: 10px; }

/* ---------- 页脚 ---------- */
footer.site-foot {
  margin-top: 44px; background: var(--navy); color: #a9bcd3; padding: 34px 24px 40px;
}
.foot-inner { max-width: 1360px; margin: 0 auto; }
.foot-inner h3 { color: #e6eef8; font-size: 15px; margin-bottom: 12px; }
.foot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 28px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid p { font-size: 12.5px; padding-left: 14px; position: relative; }
.foot-grid p::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: #5c7ba1; }
.foot-bottom { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #7e93ac; }

/* ---------- 加载与错误 ---------- */
#load-mask {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 14px;
}
#load-mask .spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #cdd8e6; border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#err-banner {
  display: none; max-width: 1360px; margin: 18px auto 0; padding: 12px 18px;
  background: var(--bad-soft); color: var(--bad); border: 1px solid #f3c2c2;
  border-radius: 8px; font-size: 13px;
}
.backtop {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 17px; cursor: pointer;
  box-shadow: var(--shadow); display: none;
}
.backtop.show { display: block; }
@media print { .topbar, .backtop { display: none; } }
