:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0e1a2f;
  --ink-2: #26344d;
  --muted: #6b7a90;
  --muted-2: #93a1b5;
  --line: #e6ebf4;
  --line-2: #eff3f9;
  --navy: #0b1526;
  --navy-2: #101e34;
  --brand: #2f6bff;
  --brand-ink: #1f4fcc;
  --brand-soft: #eaf1ff;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #f59e0b;
  --warn-soft: #fff5e3;
  --ok: #10b981;
  --ok-soft: #e7f8f1;
  --info: #0ea5e9;
  --info-soft: #e8f6fd;
  --purple: #7c5cff;
  --purple-soft: #f0edff;
  --shadow: 0 1px 2px rgba(15, 27, 47, .04), 0 10px 30px -12px rgba(15, 27, 47, .12);
  --shadow-lg: 0 24px 60px -20px rgba(11, 21, 38, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 238px;
  --topbar-h: 74px;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(47, 107, 255, .09), transparent 60%),
    radial-gradient(700px 380px at 8% 108%, rgba(124, 92, 255, .06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.fill { fill: currentColor; stroke: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd9e8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9c6da; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 框架 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; position: relative; z-index: 1; }
.scrim { display: none; }
.sidebar {
  background: linear-gradient(178deg, #0c1729 0%, #0a1322 58%, #0c1830 100%);
  color: #dbe4f3;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  position: relative;
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 255, .28), transparent 65%);
  top: -140px; right: -120px;
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; position: relative; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(47, 107, 255, .32), rgba(47, 107, 255, .08));
  border: 1px solid rgba(126, 168, 255, .28);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px -8px rgba(47,107,255,.7);
}
.brand-logo svg { width: 26px; height: 26px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.brand-name span { font-size: 11px; font-weight: 600; color: #7fb0ff; letter-spacing: 1.5px; margin-left: 3px; }
.brand-sub { font-size: 11px; color: #7488a6; letter-spacing: 2.5px; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; position: relative; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10.5px 12px;
  border: 0; background: transparent;
  color: #93a5c0; border-radius: 11px;
  font-size: 14px; text-align: left; width: 100%;
  transition: background .16s ease, color .16s ease, transform .16s ease;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #dbe6f7; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(47, 107, 255, .22), rgba(47, 107, 255, .08));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(104, 152, 255, .22);
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 3px; background: #5b8dff; box-shadow: 0 0 12px #5b8dff;
}
.nav-item .nav-badge {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.nav-sep { height: 1px; background: rgba(255,255,255,.06); margin: 10px 10px; }
.nav-label { font-size: 10.5px; letter-spacing: 2px; color: #55688a; padding: 8px 12px 4px; }

.side-foot { position: relative; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.role-label { font-size: 11px; color: #6d80a0; display: block; margin: 0 4px 6px; letter-spacing: 1px; }
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.06); color: #dfe8f7;
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 8px 30px 8px 12px; font-size: 13px; cursor: pointer;
}
.select-wrap select option { background: #0e1a2f; color: #dfe8f7; }
.select-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #7c8fae; pointer-events: none; }
.side-note { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #61748f; margin: 12px 4px 0; }
.side-note .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }

.main { display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 20;
}
.menu-btn { display: none !important; }
.page-title h1 { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.page-title p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sim-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 20px;
  border: 1px solid #d5e2ff; background: #f2f6ff;
  color: #2b5fd9; font-size: 12px; font-weight: 600;
}
.sim-chip.paused { background: #f6f7fa; border-color: var(--line); color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
.sim-chip.paused .pulse { background: #b6c1d2; animation: none; box-shadow: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.today-text { font-size: 12px; color: var(--muted); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--ink-2);
  transition: .15s ease; position: relative;
}
.icon-btn:hover { border-color: #cfdaf0; background: #f8faff; }
.bell-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.me-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 13px;
  background: var(--brand); flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.me-meta { display: flex; flex-direction: column; line-height: 1.25; }
.me-meta b { font-size: 13px; }
.me-meta small { font-size: 11px; color: var(--muted); }

.view { flex: 1; overflow-y: auto; padding: 24px 28px 40px; position: relative; }
.view--fixed { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 20px; }
.view > .page-head:first-child { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 通用 ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .head-text h1 { font-size: 21px; font-weight: 700; letter-spacing: .2px; }
.page-head .head-text p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 18px 18px; }
.section-gap { height: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; transition: .15s ease; white-space: nowrap;
}
.btn:hover { border-color: #cfdaf0; background: #f8faff; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(47,107,255,.8); }
.btn-primary:hover { background: #275eea; border-color: #275eea; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #d63b40; border-color: #d63b40; }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.btn-soft:hover { background: #dde9ff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f2f5fb; color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  background: #f2f5fa; color: #56657c; font-size: 11.5px; white-space: nowrap;
}
.tag.blue { background: var(--brand-soft); color: var(--brand-ink); }
.tag.green { background: var(--ok-soft); color: #087f5b; }
.tag.amber { background: var(--warn-soft); color: #a55a00; }
.tag.red { background: var(--danger-soft); color: #b42328; }
.tag.purple { background: var(--purple-soft); color: #5b3ce0; }
.tag.gray { background: #f1f3f7; color: #6b7789; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.high { background: var(--danger-soft); color: #c92a2f; }
.badge.medium { background: var(--warn-soft); color: #b45309; }
.badge.low { background: #eef2f8; color: #64748b; }
.badge.ok { background: var(--ok-soft); color: #0a7a5a; }
.badge.info { background: var(--info-soft); color: #0369a1; }
.badge.solid-red { background: var(--danger); color: #fff; }
.badge.solid-red::before { background: #fff; }

.risk-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; }
.risk-high { color: #d13438; } .risk-high .risk-dot { background: #e5484d; }
.risk-watch { color: #b45309; } .risk-watch .risk-dot { background: #f59e0b; }
.risk-normal { color: #0a7a5a; } .risk-normal .risk-dot { background: #10b981; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 44px 20px; color: var(--muted); text-align: center; font-size: 12.5px;
}
.empty svg { width: 34px; height: 34px; opacity: .35; }
.empty b { font-size: 13px; color: var(--ink-2); font-weight: 600; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  height: 30px; padding: 0 11px; border-radius: 8px; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.chip:hover { border-color: #cfdaf0; color: var(--ink-2); }
.chip.active { background: #101c30; border-color: #101c30; color: #fff; }
.chip .cnt { font-size: 11px; opacity: .7; }
.chip.active .cnt { opacity: .85; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.search-box input {
  height: 34px; width: 100%; padding: 0 32px 0 34px;
  border: 1px solid var(--line); border-radius: 9px; background: #f8fafd;
  outline: none; font-size: 13px; transition: .15s;
}
.search-box input:focus { background: #fff; border-color: #b8cdff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.search-box input::placeholder { color: #a7b3c6; }

.select {
  height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 13px; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select:focus { border-color: #b8cdff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }

.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none;
  font-size: 13px; transition: .15s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; line-height: 1.6; }
.input:focus, textarea.input:focus { border-color: #b8cdff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px 15px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  animation: rise .4s ease both;
}
.kpi-card:nth-child(2) { animation-delay: .04s; }
.kpi-card:nth-child(3) { animation-delay: .08s; }
.kpi-card:nth-child(4) { animation-delay: .12s; }
.kpi-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(47,107,255,.1)), transparent 70%);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--glow-soft, var(--brand-soft)); color: var(--glow-ink, var(--brand));
}
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-value { font-size: 29px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.trend-up { color: #d13438; font-weight: 600; }
.trend-down { color: #0a7a5a; font-weight: 600; }
.trend-flat { color: var(--muted); }

.notice {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, #fff8ef, #fffdf8 60%);
  border: 1px solid #f7e2bd; border-radius: 13px;
  padding: 11px 15px; margin-bottom: 16px; font-size: 12.5px; color: #8a5a10;
}
.notice strong { color: #7c4a00; }
.notice .n-icon { width: 30px; height: 30px; border-radius: 9px; background: #ffe9c7; display: grid; place-items: center; color: #b45309; flex: none; }
.notice .n-icon svg { width: 17px; height: 17px; }
.notice .n-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 图表 ---------- */
.trend-chart { width: 100%; height: 216px; display: block; }
.trend-chart text { font-size: 10.5px; fill: #97a4b8; }
.trend-chart .grid-line { stroke: #eef2f8; stroke-width: 1; }
.trend-chart .area { fill: url(#trendGrad); }
.trend-chart .line-path { fill: none; stroke: #2f6bff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart .dot { fill: #fff; stroke: #2f6bff; stroke-width: 2; }
.trend-chart .dot.hot { fill: #e5484d; stroke: #fff; stroke-width: 2; }
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut {
  width: 152px; height: 152px; border-radius: 50%; position: relative; flex: none;
  background: conic-gradient(#eef2f8 0deg 360deg);
  transition: background .4s;
}
.donut::after {
  content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.donut-center b { font-size: 25px; font-weight: 700; letter-spacing: -.5px; }
.donut-center span { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-item .sw { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.legend-item .lv { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-item .pct { color: var(--muted); font-size: 11px; width: 34px; text-align: right; }

/* ---------- 列表 ---------- */
.risk-list { display: flex; flex-direction: column; }
.risk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-top: 1px solid var(--line-2);
  transition: background .15s; cursor: pointer;
}
.risk-row:first-child { border-top: 0; }
.risk-row:hover { background: #f9fbff; }
.risk-rank { width: 22px; font-size: 12px; font-weight: 700; color: var(--muted-2); text-align: center; flex: none; }
.risk-rank.top { color: var(--danger); }
.risk-main { min-width: 0; flex: 1; }
.risk-main b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-main small { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 1px; }
.score-bar { width: 74px; height: 6px; border-radius: 6px; background: #eef2f8; overflow: hidden; flex: none; }
.score-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffb020, #e5484d); }
.risk-num { width: 26px; text-align: right; font-size: 12.5px; font-weight: 700; color: #c92a2f; font-variant-numeric: tabular-nums; }
.risk-row .chev { color: #c4cedd; flex: none; }

.feed { display: flex; flex-direction: column; max-height: 348px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 11px 18px; border-top: 1px solid var(--line-2); animation: flashIn .5s ease; }
.feed-item:first-child { border-top: 0; }
@keyframes flashIn { 0% { background: #fff7e8; } 100% { background: transparent; } }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.feed-dot.high { background: #e5484d; box-shadow: 0 0 0 3px #fdecec; }
.feed-dot.medium { background: #f59e0b; box-shadow: 0 0 0 3px #fff5e3; }
.feed-dot.low { background: #94a3b8; box-shadow: 0 0 0 3px #f1f5f9; }
.feed-main { min-width: 0; flex: 1; }
.feed-title { font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feed-title b { font-weight: 600; }
.feed-snip { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
table.data th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 10px 14px; background: #f8fafd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f9fbff; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
.cell-main { font-weight: 600; font-size: 13px; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cell-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-amount.out { color: #c92a2f; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.snippet-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; }
.time-cell { white-space: nowrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.row-flex { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar.xs { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }

/* ---------- 会话 ---------- */
.conv-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 298px;
  gap: 14px; flex: 1; min-height: 0;
}
.conv-list-panel, .chat-panel, .conv-profile { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.conv-toolbar { padding: 13px 13px 10px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 9px; }
.conv-toolbar .chips { gap: 5px; }
.conv-toolbar .chip { height: 26px; padding: 0 9px; font-size: 11.5px; }
.conv-scroll { overflow-y: auto; flex: 1; }
.conv-item {
  display: flex; gap: 10px; padding: 12px 13px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .13s; position: relative;
}
.conv-item:hover { background: #f8faff; }
.conv-item.active { background: #eff5ff; }
.conv-item.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.conv-item-main { min-width: 0; flex: 1; }
.conv-item-top { display: flex; align-items: center; gap: 6px; }
.conv-item-top b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-top .time { margin-left: auto; font-size: 10.5px; color: var(--muted-2); flex: none; }
.conv-item-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv-item-meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.conv-item .risk-pill { font-size: 10.5px; }
.mini-badge { font-size: 10px; padding: 1px 5px; border-radius: 5px; background: var(--danger-soft); color: #c92a2f; font-weight: 600; }
.mini-badge.amber { background: var(--warn-soft); color: #b45309; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

.chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px; border-bottom: 1px solid var(--line); flex: none;
}
.chat-head .back-btn { display: none; }
.chat-head-main { min-width: 0; flex: 1; }
.chat-head-main b { font-size: 14px; display: flex; gap: 7px; align-items: center; }
.chat-head-main small { font-size: 11.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.chat-head-actions { display: flex; gap: 7px; align-items: center; }
.chat-alert-strip {
  display: flex; align-items: center; gap: 8px;
  background: #fff8ef; border-bottom: 1px solid #f7e2bd;
  padding: 7px 16px; font-size: 11.5px; color: #8a5a10; flex: none;
}
.chat-alert-strip svg { width: 14px; height: 14px; color: #d97706; }
.chat-alert-strip b { color: #b45309; }
.chat-alert-strip .spacer { flex: 1; }

.chat-scroll { flex: 1; overflow-y: auto; padding: 16px 18px 8px; background: linear-gradient(180deg, #f8fafd, #fbfcfe 40%, #fff); }
.day-sep { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 10.5px; margin: 14px 0; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.msg { display: flex; gap: 9px; margin-bottom: 14px; align-items: flex-start; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.msg.sales { flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 600; }
.msg-body { max-width: min(72%, 560px); min-width: 0; }
.msg.sales .msg-body { display: flex; flex-direction: column; align-items: flex-end; }
.msg-meta { font-size: 10.5px; color: var(--muted-2); margin: 0 3px 4px; display: flex; gap: 6px; align-items: center; }
.bubble {
  background: #fff; border: 1px solid var(--line);
  padding: 9px 12px; border-radius: 4px 13px 13px 13px;
  font-size: 13px; line-height: 1.62; word-break: break-word; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(15,27,47,.03);
}
.msg.sales .bubble {
  background: linear-gradient(135deg, #3d74ff, #2f6bff);
  border-color: transparent; color: #fff;
  border-radius: 13px 4px 13px 13px;
  box-shadow: 0 6px 14px -8px rgba(47,107,255,.65);
}
.msg.sales .bubble.high { box-shadow: 0 0 0 2px #ffb4b6, 0 6px 14px -8px rgba(47,107,255,.65); }
.bubble .bubble-icon { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; }
.money-bubble { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: #fff7e6; border: 1px solid #f6d9a4; color: #9a5b00; min-width: 170px; }
.msg.sales .money-bubble { background: #fff3d6; border-color: #f3d391; }
.money-bubble .m-icon { width: 32px; height: 32px; border-radius: 9px; background: #ffe3ae; display: grid; place-items: center; color: #b45309; }
.money-bubble b { font-size: 16px; font-weight: 700; color: #b45309; font-variant-numeric: tabular-nums; }
.money-bubble small { display: block; font-size: 10.5px; color: #a97a35; }
.img-bubble { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: #f6f8fc; border: 1px dashed #d9e2f0; color: var(--muted); font-size: 12px; min-width: 150px; }
.hit-line { display: flex; gap: 5px; flex-wrap: wrap; margin: 5px 2px 0; }
.hit {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600;
  background: #fff2f2; color: #c92a2f; border: 1px solid #fbdcde; cursor: pointer;
}
.hit.medium { background: #fff8e8; color: #a55a00; border-color: #f8e3b5; }
.hit.low { background: #f3f5f9; color: #64748b; border-color: #e6eaf2; }
.hit.done { opacity: .5; text-decoration: line-through; }
.hit::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.chat-foot {
  flex: none; padding: 9px 16px; border-top: 1px solid var(--line-2);
  font-size: 11px; color: var(--muted-2); display: flex; align-items: center; gap: 6px;
  background: #fbfcfe;
}
.chat-foot svg { width: 13px; height: 13px; }

/* 客户画像 */
.profile-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line-2); }
.profile-top { display: flex; align-items: center; gap: 11px; }
.profile-top b { font-size: 14px; display: block; }
.profile-top small { font-size: 11.5px; color: var(--muted); }
.profile-scroll { overflow-y: auto; padding: 14px 16px 18px; }
.score-ring { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 12px; background: #f8fafd; border: 1px solid var(--line-2); }
.score-ring svg { width: 74px; height: 74px; transform: rotate(-90deg); flex: none; }
.score-ring .ring-bg { fill: none; stroke: #e9eef7; stroke-width: 8; }
.score-ring .ring-val { fill: none; stroke: #e5484d; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.score-ring .ring-text { position: relative; }
.score-ring .r-num { font-size: 21px; font-weight: 700; color: #c92a2f; }
.score-ring .r-label { font-size: 10.5px; color: var(--muted); }
.score-meta b { font-size: 13px; display: block; }
.score-meta span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.profile-section { margin-top: 16px; }
.profile-section h4 { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .5px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.profile-section h4 .spacer { flex: 1; }
.profile-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 4px 0; }
.profile-kv span { color: var(--muted); }
.profile-kv b { font-weight: 600; text-align: right; }
.cat-bar { margin-bottom: 9px; }
.cat-bar-top { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 3px; }
.cat-bar-top span { color: var(--ink-2); }
.cat-bar-top b { color: var(--muted); font-weight: 600; }
.cat-bar-track { height: 5px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.cat-bar-track i { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.label-item { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 11.5px; border-bottom: 1px dashed var(--line-2); }
.label-item:last-child { border-bottom: 0; }
.label-item .lbl { font-weight: 600; }
.label-item .cnt { margin-left: auto; color: var(--muted); }
.mini-list { display: flex; flex-direction: column; gap: 7px; }
.mini-item { display: flex; gap: 8px; align-items: center; font-size: 11.5px; background: #f8fafd; border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 9px; }
.mini-item .mi-main { min-width: 0; flex: 1; }
.mini-item .mi-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item small { color: var(--muted); font-size: 10.5px; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.profile-actions .btn { height: 33px; font-size: 12px; }

/* ---------- 会议 ---------- */
.meet-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.meet-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.meet-list-scroll { overflow-y: auto; flex: 1; }
.meet-item { padding: 13px 15px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .13s; position: relative; }
.meet-item:hover { background: #f8faff; }
.meet-item.active { background: #eff5ff; }
.meet-item.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.meet-item-top { display: flex; align-items: center; gap: 7px; }
.meet-item-top b { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet-item small { display: flex; gap: 7px; color: var(--muted); font-size: 11px; margin-top: 4px; flex-wrap: wrap; }
.live-tag { display: inline-flex; align-items: center; gap: 5px; background: #e8f8f1; color: #0a7a5a; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: blink 1.4s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.meet-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; position: relative; }
.meet-head { padding: 16px 18px 13px; border-bottom: 1px solid var(--line); flex: none; }
.meet-title-row { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.meet-title-row h2 { font-size: 16px; font-weight: 700; }
.meet-title-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.meet-sub { display: flex; gap: 12px; color: var(--muted); font-size: 11.5px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: #c92a2f; font-size: 12.5px; }
.meet-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; flex: 1; min-height: 0; }
.transcript { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line-2); }
.transcript-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; background: linear-gradient(180deg, #fafcff, #fff); }
.seg { display: flex; gap: 10px; margin-bottom: 14px; animation: msgIn .3s ease; }
.seg-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 600; }
.seg-main { min-width: 0; flex: 1; }
.seg-top { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--muted-2); margin-bottom: 3px; }
.seg-top b { color: var(--ink-2); font-size: 11.5px; }
.seg-content { font-size: 13px; line-height: 1.65; color: var(--ink-2); background: #f6f8fc; border: 1px solid var(--line-2); border-radius: 3px 11px 11px 11px; padding: 8px 11px; display: inline-block; max-width: 100%; }
.seg.risk .seg-content { background: #fff7f7; border-color: #fbdadc; }
.seg-live { border: 1px dashed #cfe0ff; background: #f7faff; color: #3b5f9e; font-size: 12px; border-radius: 9px; padding: 7px 10px; margin-left: 42px; }
.interim { margin: 0 0 12px 42px; border: 1px dashed #cfe0ff; background: #f7faff; color: #3b5f9e; font-size: 12px; border-radius: 9px; padding: 7px 10px; }
.meet-side { overflow-y: auto; padding: 16px; background: #fbfcfe; }
.meet-side h4 { font-size: 11.5px; color: var(--muted); letter-spacing: .5px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); margin-bottom: 16px; }
.action-item { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.action-item:last-child { border-bottom: 0; }
.action-item .num { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 2px; }
.action-item b { font-weight: 600; display: block; font-size: 11.5px; color: var(--ink-2); }
.action-item small { color: var(--muted); font-size: 10.5px; }
.meet-risk-item { display: flex; gap: 7px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 11.5px; }
.meet-risk-item:last-child { border-bottom: 0; }
.meet-risk-item .rd { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; }
.meet-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 10px; }
.meet-placeholder svg { width: 44px; height: 44px; opacity: .3; }

/* ---------- 销售管理 ---------- */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.pipe-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow); cursor: pointer; transition: .15s; }
.pipe-card:hover { border-color: #cdd9ee; transform: translateY(-1px); }
.pipe-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.pipe-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pipe-label i { width: 6px; height: 6px; border-radius: 2px; background: var(--pc, #94a3b8); }
.pipe-value { font-size: 21px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pipe-value small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; border: 0; background: transparent; color: var(--muted);
  padding: 9px 14px 11px; font-size: 13px; font-weight: 600; transition: color .15s;
  white-space: nowrap; flex: none;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-ink); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.tab .num { display: inline-block; margin-left: 4px; font-size: 10.5px; background: #eef2f8; color: var(--muted); padding: 1px 6px; border-radius: 8px; }
.tab.active .num { background: var(--brand-soft); color: var(--brand-ink); }

.task-list { display: flex; flex-direction: column; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); }
.task-row:last-child { border-bottom: 0; }
.task-check {
  width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid #cbd5e5; background: #fff;
  display: grid; place-items: center; flex: none; color: transparent; transition: .15s;
}
.task-check:hover { border-color: var(--brand); color: var(--brand); }
.task-check svg { width: 12px; height: 12px; }
.task-row.done .task-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-row.done .task-main b { color: var(--muted-2); text-decoration: line-through; font-weight: 500; }
.task-main { min-width: 0; flex: 1; }
.task-main b { font-size: 13px; font-weight: 600; display: block; }
.task-main small { font-size: 11.5px; color: var(--muted); display: flex; gap: 7px; margin-top: 2px; flex-wrap: wrap; }
.task-due { font-size: 11px; white-space: nowrap; font-weight: 600; }
.due-over { color: #c92a2f; }
.due-today { color: #b45309; }
.due-ok { color: var(--muted); }

.dup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dup-card { padding: 16px; }
.dup-head { display: flex; align-items: center; gap: 8px; }
.dup-head b { font-size: 13px; }
.dup-evidence { font-size: 11.5px; color: var(--muted); margin: 4px 0 10px; }
.dup-members { display: flex; flex-direction: column; gap: 7px; }
.dup-member { display: flex; align-items: center; gap: 8px; background: #f8fafd; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.dup-member .dm-main { min-width: 0; flex: 1; }
.dup-member .dm-main b { font-size: 12px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dup-member small { font-size: 10.5px; color: var(--muted); }

.team-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.hero-mini { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; }
.hero-mini span { font-size: 11.5px; color: var(--muted); }
.hero-mini b { display: block; font-size: 22px; font-weight: 700; margin-top: 2px; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.bar-row:last-child { border-bottom: 0; }
.bar-track { flex: 1; height: 8px; border-radius: 8px; background: #eef2f8; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #5b8dff, #2f6bff); }
.bar-num { width: 44px; text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-table .rank-1 { color: #b45309; font-weight: 700; }

/* ---------- 规则中心 ---------- */
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.words-toolbar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; align-items: center; }
.words-toolbar .search-box { width: 210px; }
.word-code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; background: #f6f8fc; padding: 2px 6px; border-radius: 5px; color: #4b5b72; border: 1px solid var(--line-2); }
.switch { position: relative; width: 34px; height: 20px; border-radius: 12px; background: #d7dfec; border: 0; transition: .18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 16px; }
.test-zone textarea { min-height: 132px; }
.test-result { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.test-highlight { font-size: 13px; line-height: 1.9; padding: 12px; border-radius: 10px; background: #f8fafd; border: 1px solid var(--line); }
.test-highlight mark { background: #ffe0e1; color: #b42328; padding: 1px 3px; border-radius: 4px; font-weight: 600; }
.test-highlight mark.medium { background: #ffedc9; color: #9a5b00; }
.test-highlight mark.low { background: #e9edf5; color: #4b5b72; }
.test-hits { display: flex; flex-direction: column; gap: 7px; }
.test-hit { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.test-hit .th-label { font-weight: 600; }
.test-hit .th-meta { color: var(--muted); font-size: 10.5px; margin-left: auto; }
.rank-list { display: flex; flex-direction: column; gap: 11px; }
.rank-item { display: flex; align-items: center; gap: 9px; }
.rank-item .rk { width: 18px; font-size: 11px; font-weight: 700; color: var(--muted-2); }
.rank-item .rk.first { color: #d97706; }
.rank-bar { flex: 1; }
.rank-bar b { font-size: 11.5px; font-weight: 600; display: block; margin-bottom: 4px; }
.rank-track { height: 6px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.rank-track i { display: block; height: 100%; border-radius: 6px; background: #e5484d; }
.rank-count { width: 26px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(9, 17, 32, .48);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.1);
}
.modal.wide { width: min(720px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head .modal-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.modal-close { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: #f3f6fb; color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { background: #e9eef7; color: var(--ink); }
.modal-body { padding: 16px 20px 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 20px 20px; }
.modal-section { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 11px; padding: 12px; margin-bottom: 14px; font-size: 12.5px; line-height: 1.7; }
.modal-evidence { font-size: 12px; color: var(--muted); }
.modal-evidence b { color: var(--ink-2); }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.choice {
  flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff;
  display: flex; flex-direction: column; gap: 2px; text-align: left; transition: .15s;
}
.choice b { font-size: 12.5px; }
.choice small { font-size: 10.5px; color: var(--muted); }
.choice:hover { border-color: #cfdaf0; }
.choice.selected { border-color: var(--brand); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(47,107,255,.08); }
.choice.danger.selected { border-color: var(--danger); background: #fff8f8; box-shadow: 0 0 0 3px rgba(229,72,77,.08); }
.choice.ok.selected { border-color: var(--ok); background: #f5fdf9; box-shadow: 0 0 0 3px rgba(16,185,129,.08); }

.drawer-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(9,17,32,.4); backdrop-filter: blur(2px); animation: fadeIn .18s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
  width: min(520px, 100%); background: #fff;
  box-shadow: -20px 0 50px rgba(11,21,38,.18);
  display: flex; flex-direction: column;
  animation: slideIn .25s cubic-bezier(.2,.9,.3,1);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.drawer-section { margin-top: 18px; }
.drawer-section h4 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.kv { font-size: 12px; }
.kv span { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.kv b { font-weight: 600; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: none; }
.tl-dot.red { background: var(--danger); }
.tl-dot.amber { background: var(--warn); }
.tl-dot.green { background: var(--ok); }
.tl-main { font-size: 12px; min-width: 0; flex: 1; }
.tl-main b { font-weight: 600; }
.tl-main small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }

.risk-profile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: linear-gradient(180deg, #fbfcff, #fff); }
.rp-head { display: flex; gap: 14px; align-items: center; }
.rp-score { width: 74px; height: 74px; border-radius: 50%; flex: none; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef2f8 0); }
.rp-score::before { content: ""; position: absolute; inset: 7px; background: #fff; border-radius: 50%; }
.rp-score b { position: relative; font-size: 22px; line-height: 1; color: var(--c); }
.rp-score span { position: relative; font-size: 10px; color: var(--muted); margin-top: 3px; }
.rp-meta { min-width: 0; }
.rp-counts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.rp-meta small { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.rp-bars { margin-top: 11px; display: flex; flex-direction: column; gap: 7px; }
.rp-bar { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; }
.rp-cat { color: #4b5b72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-track { height: 7px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.rp-track i { display: block; height: 100%; border-radius: 5px; }
.rp-pts { font-weight: 600; white-space: nowrap; }
.rp-pts em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 2px; }
.rp-advice { display: flex; gap: 7px; margin-top: 11px; padding: 8px 10px; border-radius: 9px; background: #f6f9ff; color: #38506f; font-size: 11.5px; line-height: 1.55; }
.rp-advice svg.ic { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--brand); }
.evi-list { display: flex; flex-direction: column; gap: 9px; }
.evi-item { border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: #fff; }
.evi-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.evi-src { font-size: 10.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.evi-src.meeting { color: #5b3ce0; }
.evi-time { margin-left: auto; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.evi-text { font-size: 12.5px; line-height: 1.6; color: #26364d; word-break: break-word; }
.evi-text mark { background: #ffe0e1; color: #b42328; padding: 1px 3px; border-radius: 4px; font-weight: 600; }
.evi-text mark.medium { background: #ffedc9; color: #9a5b00; }
.evi-text mark.low { background: #e9edf5; color: #4b5b72; }
.evi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.evi-foot .small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 250px; max-width: 360px; pointer-events: none;
  background: #101c30; color: #eef3fb; border-radius: 11px;
  padding: 11px 14px; box-shadow: 0 16px 40px -12px rgba(11,21,38,.5);
  font-size: 12.5px; display: flex; align-items: flex-start; gap: 9px;
  animation: toastIn .25s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--brand); }
.toast.danger .t-dot { background: #ff6b6f; }
.toast.warn .t-dot { background: #fbbf24; }
.toast.success .t-dot { background: #34d399; }
.toast b { font-weight: 600; }
.toast small { display: block; color: #a9b8cf; font-size: 11px; margin-top: 2px; }

/* ---------- 骨架屏 ---------- */
.skeleton-page { padding-top: 6px; }
.sk-line { height: 20px; border-radius: 8px; background: linear-gradient(90deg, #eef2f8 25%, #f6f9fd 37%, #eef2f8 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; margin-bottom: 20px; }
.sk-line.w40 { width: 40%; }
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.sk-card { height: 108px; border-radius: 16px; background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 37%, #eef2f8 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
.sk-panel { height: 320px; border-radius: 16px; background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 37%, #eef2f8 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1380px) {
  .conv-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .conv-profile { display: none; }
}
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .meet-body { grid-template-columns: minmax(0, 1fr); }
  .meet-side { border-top: 1px solid var(--line-2); }
  .rules-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dup-grid { grid-template-columns: 1fr; }
  .team-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-text { display: none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 90; top: 0; left: 0; bottom: 0; width: 264px;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.9,.3,1);
    box-shadow: 20px 0 50px rgba(5,12,24,.35);
  }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(6,12,24,.45); z-index: 89; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid !important; }
  .topbar { padding: 0 16px; gap: 11px; }
  .me-chip { padding-left: 10px; }
  .me-meta { display: none; }
  .view { padding: 18px 16px 32px; }
  .conv-layout { grid-template-columns: 1fr; }
  .conv-layout .chat-panel { display: none; }
  .conv-layout.chat-open .conv-list-panel { display: none; }
  .conv-layout.chat-open .chat-panel { display: flex; height: 100%; }
  .chat-head .back-btn { display: grid; }
  .chat-head { gap: 8px; padding: 10px 12px; }
  .chat-head > .avatar { display: none; }
  .chat-head-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
  .chat-head-main b .tag { display: none; }
  .chat-head-actions [data-open-customer] { display: none; }
  .msg-body { max-width: 84%; }
  .meet-layout { grid-template-columns: 1fr; }
  .meet-layout .meet-main { display: none; }
  .meet-layout.meet-open .meet-list { display: none; }
  .meet-layout.meet-open .meet-main { display: flex; height: 100%; }
  .meet-mobile-back { display: inline-flex !important; }
  .page-head .head-actions { width: 100%; margin-left: 0; }
  .page-head .head-actions .search-box { flex: 1; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view--fixed { padding-bottom: 12px; }
}
@media (max-width: 640px) {
  .top-actions { gap: 8px; }
  .sim-chip span:last-child { display: none; }
  .sim-chip { padding: 8px; }
  .page-title h1 { font-size: 17px; }
  .page-title p { display: none; }
  .kpi-grid { gap: 10px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 25px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body { padding: 14px; }
  .card-head { padding: 14px 14px 0; }
  .donut-wrap { gap: 14px; }
  .donut { width: 124px; height: 124px; }
  .donut::after { inset: 15px; }
  .donut-center b { font-size: 21px; }
  .page-head { margin-bottom: 13px; }
  .page-head .head-text h1 { font-size: 19px; }
  .team-hero { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { border-radius: 16px; }
  .overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: 92vh; }
  .toast-root { right: 12px; left: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .drawer { width: 100%; }
  .drawer-foot { padding: 10px 16px; }
  .drawer-foot .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .kv-grid { grid-template-columns: 1fr; }
  .meet-title-actions { width: 100%; }
  .meet-title-actions .btn { flex: 1; }
  .score-ring { align-items: center; }
  .chat-head-actions .btn span { display: none; }
  .chat-head-actions .btn { padding: 0 9px; }
  .conv-toolbar .search-box { width: 100%; }
  table.data { min-width: 0; width: max-content; }
  table.data th, table.data td { white-space: nowrap; }
  .snippet-cell { max-width: 220px; }
  .cell-sub { white-space: nowrap; }
}
/* ---------- 通知中心 / 批量处置 / 命中高亮 ---------- */
.notify-head-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center;
}
.notify-head-icon svg { width: 19px; height: 19px; }
.notify-drawer .drawer-body { padding-top: 8px; }
.notify-item { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.notify-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.notify-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.notify-label { font-size: 13px; }
.notify-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.notify-snippet {
  font-size: 12px; color: var(--ink-2); background: #f8fafd;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; margin-top: 7px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notify-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.batch-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; font-size: 12.5px; color: var(--ink-2);
  background: #f5f9ff; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.batch-bar b { color: var(--brand-ink); }
.pick-col { width: 34px; text-align: center; }
.pick-col input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }

.bubble mark, .seg-content mark {
  background: #ffe0e1; color: #b42328; padding: 0 2px; border-radius: 3px; font-weight: 600;
}
.bubble mark.medium, .seg-content mark.medium { background: #ffedc9; color: #9a5b00; }
.bubble mark.low, .seg-content mark.low { background: #e9edf5; color: #4b5b72; }

/* ---------- 新建任务 / 操作审计 ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.task-toolbar-info {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px; box-shadow: var(--shadow);
}
.task-toolbar-info svg.ic { width: 16px; height: 16px; color: var(--brand); }
.task-toolbar-info b { color: var(--brand-ink); }
.task-toolbar-info b.over { color: var(--danger); }

.audit-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.audit-stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 118px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 15px; box-shadow: var(--shadow);
}
.audit-stat span { font-size: 12px; color: var(--muted); }
.audit-stat b { font-size: 21px; letter-spacing: -.02em; }
.audit-stat--hint {
  flex: 1; flex-direction: row; align-items: center; gap: 8px;
  min-width: 240px; color: var(--muted); font-size: 12px; line-height: 1.45;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff); box-shadow: none;
}
.audit-stat--hint svg.ic { width: 18px; height: 18px; color: var(--brand); flex: none; }
.audit-detail {
  max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2);
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .task-toolbar { flex-direction: column; align-items: stretch; }
  .task-toolbar .btn { width: 100%; }
  .task-toolbar-info { justify-content: center; }
  .audit-summary { gap: 8px; }
  .audit-stat { flex: 1 1 40%; min-width: 0; padding: 9px 12px; }
  .audit-stat b { font-size: 18px; }
  .audit-stat--hint { flex-basis: 100%; min-width: 0; }
  .audit-detail { max-width: 220px; }
}

/* ---------- 任务催办 ---------- */
.task-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.task-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.task-right .btn svg.ic { width: 13px; height: 13px; }
.remind-tag {
  font-size: 10.5px; font-weight: 600; color: #9a5b00;
  background: var(--warn-soft); border-radius: 6px; padding: 0 6px; line-height: 17px;
}
@media (max-width: 640px) {
  .task-toolbar-actions { width: 100%; }
  .task-toolbar-actions .btn { width: auto; flex: 1; }
  .task-row { align-items: flex-start; }
  .task-right { flex-direction: column; align-items: flex-end; gap: 5px; }
}

/* ---------- 检测概览 ---------- */
.detect-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.detect-card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; box-shadow: var(--shadow); min-width: 0;
}
.detect-card span { font-size: 12px; color: var(--muted); }
.detect-card b { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.detect-card b em { font-size: 12px; font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.detect-card small { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag svg.ic { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .detect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .detect-grid { gap: 8px; }
  .detect-card { padding: 10px 12px; }
  .detect-card b { font-size: 19px; }
  .detect-card small { white-space: normal; line-height: 1.35; }
}

/* ---------- 告警处置时效（SLA） ---------- */
.sla-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.sla-card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; box-shadow: var(--shadow); min-width: 0;
}
.sla-card span { font-size: 12px; color: var(--muted); }
.sla-card b { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.sla-card b em { font-size: 12px; font-style: normal; font-weight: 500; color: var(--muted); margin-left: 3px; }
.sla-card small { font-size: 11.5px; color: var(--muted-2); }
.sla-card.alert { border-color: #f3c2c4; background: linear-gradient(180deg, #fff8f8, #fff); }
.sla-card.alert b { color: #c92a2f; }
.sla-banner {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding: 10px 13px;
  border: 1px solid #f3c2c4; border-radius: 11px; background: #fff7f7;
}
.sla-banner .sla-ico { color: #c92a2f; display: grid; place-items: center; flex: none; }
.sla-banner .sla-ico svg { width: 18px; height: 18px; }
.sla-banner b { display: block; font-size: 12.5px; color: #8f1d22; }
.sla-banner small { font-size: 11px; color: #9b5c5f; }
.sla-banner .btn { margin-left: auto; flex: none; }
.age-cell { white-space: nowrap; font-size: 12px; }
.age-over { color: #c92a2f; font-weight: 600; }
.chip.chip-overdue { color: #b42328; background: #fff6f6; border-color: #f3c2c4; }
.chip.chip-overdue.active { background: #e5484d; border-color: #e5484d; color: #fff; }
.chip.chip-overdue .cnt { background: rgba(229, 72, 77, .12); }
.chip.chip-overdue.active .cnt { background: rgba(255, 255, 255, .22); color: #fff; }
@media (max-width: 900px) {
  .sla-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sla-grid { gap: 9px; }
  .sla-card { padding: 10px 12px; }
  .sla-card b { font-size: 19px; }
  .sla-banner { align-items: flex-start; flex-wrap: wrap; }
  .sla-banner .btn { margin-left: 0; }
}

/* ---------- 团队处置时效与负责人下钻 ---------- */
.hero-alert { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: #c92a2f; }
.perf-list { display: flex; flex-direction: column; }
.perf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px; border-bottom: 1px solid var(--line-2); border-radius: 8px;
  cursor: pointer; transition: background .15s ease;
}
.perf-row:last-child { border-bottom: 0; }
.perf-row:hover, .perf-row:focus-visible { background: #f7f9fd; outline: none; }
.perf-row.warn { background: #fffafa; }
.perf-name {
  width: 78px; font-size: 12.5px; font-weight: 600;
  display: flex; flex-direction: column; line-height: 1.25;
}
.perf-name small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.perf-metric { display: flex; flex-direction: column; align-items: flex-start; min-width: 58px; }
.perf-metric small { font-size: 10.5px; color: var(--muted); }
.perf-metric b { font-size: 14px; font-variant-numeric: tabular-nums; }
.perf-metric b.danger { color: #c92a2f; }
.perf-link { margin-left: auto; font-size: 12px; color: var(--brand-ink); font-weight: 600; }
.team-row { cursor: pointer; }
.team-row:hover td { background: #f7f9fd; }
.owner-filter {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 9px 12px;
  border: 1px solid #d8e3ff; border-radius: 10px; background: #f4f7ff;
  font-size: 12.5px; color: #2a4b9b;
}
.owner-filter .of-ico { display: grid; place-items: center; color: #2f6bff; }
.owner-filter .of-ico svg { width: 16px; height: 16px; }
.owner-filter .btn { margin-left: auto; }
.notify-item.overdue { border-left: 3px solid #e5484d; padding-left: 10px; background: #fffafa; }
.notify-overdue-text { color: #c92a2f; }
@media (max-width: 640px) {
  .perf-row { flex-wrap: wrap; gap: 6px 10px; }
  .perf-name { width: auto; flex: 1 1 90px; }
  .perf-name small { display: none; }
  .perf-metric { min-width: 50px; }
  .perf-link { display: none; }
  .owner-filter .btn { margin-left: 0; }
}

/* ---------- 规则效果分析 ---------- */
.effect-strip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
}
.effect-lead { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.effect-lead .ef-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); }
.effect-lead .ef-ico svg { width: 18px; height: 18px; }
.effect-lead b { display: block; font-size: 13px; color: var(--ink); }
.effect-lead small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.effect-metrics { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.effect-metric {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 7px 12px; min-width: 112px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fafcff;
  font: inherit; color: inherit; transition: border-color .15s ease, background .15s ease;
}
.effect-metric:hover { border-color: #cfdaf0; background: #f5f8ff; }
.effect-metric small { font-size: 11px; color: var(--muted); }
.effect-metric b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink); }
.effect-metric b em { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; font-style: normal; }
.effect-metric.warn { background: #fff8f8; border-color: #f3c2c4; }
.effect-metric.warn b { color: #c92a2f; }
.effect-tag { font-size: 10.5px; color: var(--muted); max-width: 240px; }
.effect-metric.warn .effect-tag { color: #b42328; }
.effect-more { margin-left: auto; flex: none; }
.effect-chips { flex-wrap: wrap; }
.effect-chips .chip { height: 27px; padding: 0 9px; font-size: 11.5px; }
.eff-col { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.eff-col b { font-size: 13px; }
.eff-bad { color: #c92a2f; font-weight: 600; }
.effect-time { white-space: nowrap; }
.effect-row-bad td { background: #fffafa; }
.effect-row-bad:hover td { background: #fff4f4; }
.rank-item .rank-sub { margin: 1px 0 3px; line-height: 1.3; }
.rank-item .rank-count { flex: none; }
.rank-item.rank-hot .rank-count { color: #c92a2f; }
.rank-item.rank-hot .rank-track i { background: linear-gradient(90deg, #f0a5a8, #e5484d); }
@media (max-width: 640px) {
  .effect-strip { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .effect-lead { min-width: 0; }
  .effect-metrics { width: 100%; }
  .effect-metric { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .effect-metric small { white-space: normal; line-height: 1.3; }
  .effect-tag { display: none; }
  .effect-more { width: 100%; margin-left: 0; }
  .effect-time { font-size: 11px; }
  .words-toolbar .search-box { width: 100%; }
  .effect-chips { width: 100%; }
}

/* ---------- 规则调优建议 ---------- */
.effect-actions { display: flex; gap: 8px; margin-left: auto; flex: none; }
.effect-tune { color: #b42328; border-color: #f3c2c4; background: #fff8f8; }
.effect-tune:hover { background: #fff1f1; border-color: #e9a7aa; }
.effect-tune .eff-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 3px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 600;
}
.tune-list { display: flex; flex-direction: column; gap: 10px; }
.tune-row {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff;
}
.tune-row.tuned { background: #fffaf3; border-color: #f3ddb8; }
.tune-main { min-width: 0; }
.tune-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tune-title b { font-size: 13.5px; }
.tune-stats { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.tune-stats b { color: #b42328; font-weight: 600; }
.tune-actions { display: flex; gap: 6px; flex: none; }
.tune-recent { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.tune-recent-title { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.tune-log { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 12px; border-bottom: 1px dashed var(--line-2); }
.tune-log:last-child { border-bottom: 0; }
.tune-log-text { flex: 1; min-width: 0; color: var(--ink-2); }
.tune-log-meta { flex: none; font-size: 11px; color: var(--muted); }
.tune-foot { margin-right: auto; }
@media (max-width: 640px) {
  .effect-actions { width: 100%; margin-left: 0; }
  .effect-actions .btn { flex: 1; justify-content: center; }
  .tune-row { flex-direction: column; align-items: stretch; }
  .tune-actions .btn { flex: 1; justify-content: center; }
  .tune-log { flex-wrap: wrap; }
  .tune-log-meta { width: 100%; }
}

/* ---------- 规则新建/编辑 ---------- */
.rule-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rule-form .input.code, .rule-preview textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.rule-preview { margin-top: 6px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: #f8fafc; }
.rule-preview-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rule-preview-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.rule-preview-actions { display: flex; gap: 8px; margin: 10px 0; }
.rule-preview-result { min-height: 20px; }
.preview-state { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.preview-state.ok { color: #0a7a5a; border-color: #bbf7d0; background: #f4fdf9; }
.preview-state.bad { color: #b42318; border-color: #fecaca; background: #fef2f2; }
.preview-state.warn { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.preview-state.muted { color: var(--muted); }
.preview-matches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview-match { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 12.5px; color: #9a3412; }
@media (max-width: 640px) {
  .rule-form .form-row { grid-template-columns: 1fr; }
  .rule-preview-actions .btn { flex: 1; justify-content: center; }
  .rule-preview-head { align-items: flex-start; }
  .rule-preview-head span { flex: 1 1 100%; }
}

/* ---------- 命中样本下钻 ---------- */
.hit-link {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: 13px;
  color: var(--brand); border-bottom: 1px dashed rgba(47,107,255,.45); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.hit-link:hover { color: var(--brand-ink); border-bottom-style: solid; }
.rank-item.rank-clickable { cursor: pointer; border-radius: 9px; padding: 5px 6px; margin: -5px -6px; transition: background .15s; }
.rank-item.rank-clickable:hover { background: #f4f8ff; }
.hits-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; padding: 18px 4px; }
.hits-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hits-stat { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.hits-stat small { display: block; font-size: 10.5px; color: var(--muted); }
.hits-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.hits-stat.warn b { color: #b7791f; }
.hits-stat.bad b { color: #c92a2f; }
.hits-stat .hits-time { font-size: 12px; font-weight: 600; }
.hits-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; flex-wrap: wrap; }
.hits-target { font-size: 11.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.hits-bar .chips { flex: none; }
.hits-list-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.hits-list-head b { font-size: 12.5px; }
.hits-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.hit-sample {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line-2); background: #fff;
  border-radius: 11px; padding: 10px 12px; transition: .15s; cursor: pointer;
}
.hit-sample:hover { border-color: #cfdaf0; background: #fbfdff; box-shadow: 0 2px 8px rgba(31,45,80,.06); }
.hs-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.hs-snippet { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hs-meta { font-size: 11px; color: var(--muted); margin-top: 5px; }
.hs-label { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }
@media (max-width: 640px) {
  .hits-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hits-stat:last-child { grid-column: 1 / -1; }
  .hits-bar .chips { width: 100%; }
  .hits-list { max-height: 40vh; }
  .modal-foot .btn { flex: 1; justify-content: center; }
}
