/* ===========================================================
   律笺 · 全局样式
   品牌色：靛蓝 → 紫罗兰（冷静、专业，带一点科技的清透）
   =========================================================== */
:root {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --line: #e7e9f4;
  --line-strong: #d9dcec;
  --text: #1a1d3a;
  --text-2: #545b7a;
  --text-3: #8a90ac;

  --brand: #182f3c;
  --brand-2: #23546c;
  --primary: #1f86a6;
  --primary-h: #176e8a;
  --primary-soft: #e9f5f9;
  --violet: #4fb8d0;
  --cyan: #22d3ee;

  --success: #0d9488;
  --success-soft: #e6faf6;
  --warn: #5b6fb8;
  --warn-soft: #edf7fa;
  --danger: #d64553;
  --danger-soft: #fdeef1;
  --red: #d64553;
  --red-soft: #fdeef1;
  --amber: #5b6fb8;
  --amber-soft: #edf7fa;
  --blue: #1f86a6;
  --blue-soft: #e9f5f9;
  --green: #0d9488;
  --green-soft: #e6faf6;
  --slate: #4a4f73;
  --slate-soft: #eff1f9;
  --gray: #71769a;
  --gray-soft: #f3f4fa;
  --teal: #0d9488;
  --teal-soft: #e6faf6;
  --pink: #c24e6e;
  --pink-soft: #fbeef2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 54, 70, .05);
  --shadow: 0 6px 24px rgba(20, 70, 90, .07);
  --shadow-lg: 0 24px 64px rgba(18, 60, 78, .18);
  --sidebar-w: 224px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd4e6; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b3b8d0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

/* ------------------ 布局 ------------------ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background:
    radial-gradient(560px 300px at 110% -10%, rgba(79, 184, 208, .30), transparent 62%),
    radial-gradient(420px 260px at -20% 108%, rgba(34, 211, 238, .14), transparent 60%),
    linear-gradient(180deg, #14333f 0%, #1a4557 52%, #0f2a36 100%);
  color: #c8cce8;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-word { display: block; height: 28px; width: auto; filter: drop-shadow(0 6px 14px rgba(4, 26, 36, .4)); }
.brand-sub { font-size: 8.5px; letter-spacing: 2.2px; color: #7fa6b6; }
.brand-mark { display: none; width: 34px; height: 34px; border-radius: 10px; }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-group-title { font-size: 11px; color: #7d82ad; padding: 12px 12px 6px; letter-spacing: 1.2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px;
  border-radius: 9px; color: #c3c7e4; cursor: pointer;
  font-size: 14px; user-select: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, #2b93b0, #3aa8c4);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 134, 166, .35);
}
.nav-item .badge-dot {
  margin-left: auto; background: #d64553; color: #fff;
  font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 9px; font-weight: 600;
}
.nav-item.active .badge-dot { background: rgba(255, 255, 255, .25); }

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-card { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; cursor: pointer; }
.user-card:hover { background: rgba(255, 255, 255, .07); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4a4585, #245069);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none;
}
.user-card .u-name { color: #e6eef7; font-size: 13px; line-height: 1.3; }
.user-card .u-role { color: #7f97ae; font-size: 11px; }
.u-out {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 7px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #b9c6d6; font-size: 11.5px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.u-out .ic { width: 13px; height: 13px; }
.u-out:hover { background: rgba(244, 63, 94, .16); border-color: rgba(244, 63, 94, .38); color: #ffd7de; }
.u-out:active { transform: translateY(1px); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h); flex: none;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.page-sub { font-size: 12px; color: var(--text-3); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.global-search { position: relative; width: 260px; }
.global-search input {
  width: 100%; height: 34px; padding: 0 12px 0 32px;
  border: 1px solid var(--line); border-radius: 18px;
  background: #f7f9fc; outline: none; transition: all .15s;
}
.global-search input:focus { background: #fff; border-color: #c6e4ee; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.global-search .ic { position: absolute; left: 10px; top: 9px; color: var(--text-3); width: 16px; height: 16px; }

.content { padding: 20px 22px 40px; flex: 1; }
.page { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ------------------ 通用组件 ------------------ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-body { padding: 18px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: #b9c6d6; background: #fbfcfe; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #f1f5fa; color: var(--text); }
.btn-danger { color: var(--danger); border-color: #f3cfd7; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #eeb3c1; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; }

.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none; transition: all .15s;
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: #9fd6e3; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.input::placeholder, .textarea::placeholder { color: #a9b6c6; }
.select { appearance: none; padding-right: 26px; 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='%238b99ac' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 5px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-slate { background: var(--slate-soft); color: var(--slate); }
.tag-gray { background: var(--gray-soft); color: var(--gray); }
.tag-teal { background: var(--teal-soft); color: var(--teal); }
.tag-pink { background: var(--pink-soft); color: var(--pink); }
.tag-outline { background: #fff; border: 1px solid var(--line-strong); color: var(--text-2); }

.level-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.lv-A { background: #d64553; }
.lv-B { background: #4fb8d0; }
.lv-C { background: #a3b0c2; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tb th {
  text-align: left; font-weight: 500; color: var(--text-3); font-size: 12.5px;
  padding: 10px 14px; background: #fafbfd; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.tb td { padding: 12px 14px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
table.tb tbody tr { transition: background .12s; }
table.tb tbody tr:hover { background: #f8fafd; }
table.tb tbody tr.clickable { cursor: pointer; }
table.tb tbody tr:last-child td { border-bottom: none; }
.cell-main { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.num { font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-lg { font-size: 15px; }
.text-muted { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.nowrap { white-space: nowrap; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* 状态标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; }
.tab {
  padding: 11px 13px; font-size: 13.5px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .cnt {
  background: #eef1f6; color: var(--text-2); font-size: 11px;
  padding: 1px 6px; border-radius: 8px; font-weight: 500; min-width: 18px; text-align: center;
}
.tab.active .cnt { background: var(--primary-soft); color: var(--primary); }

/* 筛选栏 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 130px; }
.filter-bar .search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.filter-bar .search-wrap .input { width: 100%; padding-left: 32px; }
.filter-bar .search-wrap .ic { position: absolute; left: 10px; top: 9px; color: var(--text-3); width: 16px; height: 16px; }
.filter-bar .spacer { flex: 1; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.pager .info { font-size: 12.5px; color: var(--text-3); }
.pager .pages { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pg {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.pg:hover:not(:disabled) { border-color: #c6e4ee; color: var(--primary); }
.pg.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pg:disabled { opacity: .45; cursor: not-allowed; }

/* 空状态 */
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty .ic { width: 40px; height: 40px; stroke-width: 1.2; margin-bottom: 10px; color: #c9cee2; }
.empty p { margin: 4px 0 0; font-size: 13px; }

/* 抽屉 */
.overlay {
  position: fixed; inset: 0; background: rgba(14, 26, 42, .38);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90;
  backdrop-filter: blur(2px);
}
.overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 820px; max-width: 96vw;
  background: var(--surface); box-shadow: var(--shadow-lg); z-index: 100;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.32, .72, 0, 1);
  display: flex; flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.drawer-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.drawer-head .close { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fcfdff; }

.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98);
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 110;
  width: 700px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transition: all .2s;
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: 920px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fcfdff; border-radius: 0 0 12px 12px; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--text-3); transition: all .15s;
}
.icon-btn:hover { background: #eff1f9; color: var(--text); }

/* 提示 */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1b1d38; color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: toastIn .2s ease;
}
.toast.success { background: #0f766e; }
.toast.error { background: #b83b4b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #e8eaf4; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid #c6e4ee;
}
.tl-item.primary::before { border-color: var(--primary); background: var(--primary); }
.tl-item.success::before { border-color: var(--success); background: var(--success); }
.tl-item.danger::before { border-color: var(--danger); background: var(--danger); }
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.tl-time { font-size: 12px; color: var(--text-3); }
.tl-body { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }

/* 流程步骤 */
.stepper { display: flex; align-items: center; margin: 4px 0 18px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.step .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font-size: 11px; background: #fff; color: var(--text-3);
}
.step.done { color: var(--success); }
.step.done .dot { border-color: var(--success); background: var(--success); color: #fff; }
.step.current { color: var(--primary); font-weight: 600; }
.step.current .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.step-line { flex: 1; height: 2px; background: #e8eaf4; margin: 0 8px; min-width: 12px; }
.step-line.done { background: var(--success); }

/* 详情信息网格 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.info-item { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-item:nth-last-child(-n+2) { border-bottom: none; }
.info-item .k { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.info-item .v { color: var(--text); word-break: break-all; }
.info-item.span-2 { grid-column: span 2; }
.info-item.span-2:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.info-item.full:last-child { border-bottom: none; }

.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 10px; display: flex; align-items: center; gap: 6px; }
.section-title:first-child { margin-top: 0; }

/* 合同附件 */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.file-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.file-ico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  background: #eff1f9; color: var(--text-3);
}
.file-ico.pdf { background: var(--danger-soft); color: var(--danger); }
.file-ico.img { background: var(--primary-soft); color: var(--primary); }
.file-ico.doc { background: var(--success-soft); color: var(--success); }
.file-main { flex: 1; min-width: 0; }
.file-name {
  display: block; font-size: 13px; font-weight: 500; color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-name:hover { color: var(--primary); text-decoration: underline; }
.file-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.file-item .icon-btn { opacity: 0; transition: opacity .15s; }
.file-item:hover .icon-btn { opacity: 1; }
.file-empty {
  font-size: 12.5px; color: var(--text-3); background: var(--bg);
  border: 1px dashed var(--line-strong); border-radius: 10px; padding: 14px; text-align: center; line-height: 1.7;
}

/* 看板 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .k-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 26px; font-weight: 650; letter-spacing: -.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi .k-icon {
  position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.kpi.warn .k-icon { background: var(--warn-soft); color: var(--warn); }
.kpi.green .k-icon { background: var(--green-soft); color: var(--green); }
.kpi.red .k-icon { background: var(--red-soft); color: var(--red); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: 1.85fr 1fr; gap: 14px; }
.mt-14 { margin-top: 14px; }
.mb-14 { margin-bottom: 14px; }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 210px; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eff1f9; }
.rank-row:last-child { border-bottom: none; }
.rank-no {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; background: #f0f3f7; color: var(--text-2); flex: none;
}
.rank-no.top1 { background: #edf7fa; color: #5b6fb8; }
.rank-no.top2 { background: #eef1f6; color: #545b7a; }
.rank-no.top3 { background: #f3ecff; color: #a85c2a; }
.rank-bar { flex: 1; min-width: 0; }
.rank-bar .bar-bg { height: 5px; background: #eff1f9; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.rank-bar .bar { height: 100%; background: linear-gradient(90deg, #2b93b0, #1f86a6); border-radius: 3px; }

.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eff1f9;
}
.todo-item:last-child { border-bottom: none; }
.todo-item .t-main { flex: 1; min-width: 0; }
.todo-item .t-name { font-size: 13.5px; font-weight: 500; }
.todo-item .t-sub { font-size: 12px; color: var(--text-3); }

/* 登录页 */
/* ------------------ 登录页 ------------------ */
.lg-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(540px, 1.06fr) minmax(430px, .94fr);
  background: #fff;
}

/* 左侧品牌区 */
.lg-visual {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 46px 56px 38px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(820px 580px at 82% -8%, rgba(79, 184, 208, .62) 0%, transparent 58%),
    radial-gradient(620px 480px at -8% 108%, rgba(34, 211, 238, .20) 0%, transparent 58%),
    linear-gradient(152deg, #123243 0%, #1a4c63 54%, #0d2734 100%);
}
.lg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .075) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(120% 88% at 46% 18%, #000 32%, transparent 76%);
  mask-image: radial-gradient(120% 88% at 46% 18%, #000 32%, transparent 76%);
}
.lg-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.lg-orb.a { width: 400px; height: 400px; right: -120px; top: 70px; background: radial-gradient(circle, rgba(127, 211, 227, .45), transparent 68%); }
.lg-orb.b { width: 300px; height: 300px; left: -110px; bottom: -90px; background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 70%); }

.lg-brand { position: relative; z-index: 2; }
.lg-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.lg-word {
  display: block; height: 40px; width: auto; max-width: 100%;
  filter: drop-shadow(0 8px 18px rgba(4, 26, 36, .35));
}
.lg-lockup span { font-size: 9px; letter-spacing: 3px; color: #9dc3d1; }
.lg-mini-brand .lg-word { height: 28px; filter: none; }
.lg-mini-brand > span { font-size: 8.5px; letter-spacing: 2px; color: var(--text-3); }

.lg-copy { position: relative; z-index: 2; margin: auto 0; max-width: 520px; padding: 46px 0 30px; }
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 1.8px; color: #e3e5fb;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 6px 13px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lg-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 10px rgba(34, 211, 238, .9); }
.lg-copy h1 { margin: 26px 0 18px; font-size: 42px; line-height: 1.34; letter-spacing: 1.5px; font-weight: 600; }
.lg-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #bff0fa, #4fb8d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-copy p { margin: 0; max-width: 460px; color: #d3d7f5; font-size: 14px; line-height: 1.95; letter-spacing: .3px; }

.lg-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.lg-point {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: #eceefc;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px; padding: 10px 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lg-point svg { width: 15px; height: 15px; color: #67e8f9; }

/* 流程演示：不套外框，白卡直接浮在品牌底上 */
.lg-demo {
  position: relative; z-index: 2;
  margin-top: 32px; max-width: 460px;
}
.demo-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 2px 9px;
  font-size: 10.5px; letter-spacing: 1.6px; color: rgba(255, 255, 255, .6);
}
.demo-head .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #7fd3e3; box-shadow: 0 0 10px rgba(127, 211, 227, .9);
  animation: demoPulse 2.2s ease-in-out infinite;
}
.demo-head .demo-step {
  margin-left: auto; font-variant-numeric: tabular-nums;
  letter-spacing: .8px; color: rgba(255, 255, 255, .5);
}
@keyframes demoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}

.demo-stage { position: relative; height: 176px; }
.dc {
  position: absolute; inset: 0;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: #fff; color: var(--text);
  box-shadow: 0 24px 56px rgba(4, 26, 36, .34), 0 1px 0 rgba(255, 255, 255, .5) inset;
  opacity: 0; filter: blur(3px);
  transform: translateY(14px) scale(.988);
  transition:
    opacity .6s cubic-bezier(.22, .61, .36, 1),
    transform .6s cubic-bezier(.22, .61, .36, 1),
    filter .45s ease;
  pointer-events: none;
  will-change: opacity, transform;
}
.dc.on { opacity: 1; transform: none; filter: none; }
.dc-top { display: flex; align-items: center; gap: 10px; }
.dc-av {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #1f86a6, #4fb8d0);
}
.dc-av.v { background: linear-gradient(135deg, #2b93b0, #7fd0e0); }
.dc-av.c { background: linear-gradient(135deg, #14495e, #2b93b0); }
.dc-av.t { background: linear-gradient(135deg, #14b8a6, #22d3ee); }
.dc-id { min-width: 0; line-height: 1.35; }
.dc-id b { display: block; font-size: 14.5px; letter-spacing: .4px; }
.dc-id span { display: block; font-size: 11.5px; color: var(--text-3); }
.dc-badge {
  margin-left: auto; flex: none;
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: #e9f5f9; color: #1f86a6;
}
.dc-badge.violet { background: #eef1fb; color: #4f63a8; }
.dc-badge.teal { background: #e6faf6; color: #0d9488; }
.dc-label { margin-top: 14px; font-size: 10.5px; letter-spacing: 1.4px; color: var(--text-3); }
.dc-text {
  margin-top: 5px; font-size: 13px; line-height: 1.75; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dc-foot {
  display: flex; gap: 14px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--text-3);
}
.dc-foot span + span { margin-left: auto; }

.demo-prog { display: flex; gap: 6px; margin-top: 14px; }
.demo-prog i {
  position: relative; flex: 1; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, .22); overflow: hidden;
}
.demo-prog i.on::after {
  content: ""; display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), #ffffff);
  transform-origin: left center;
  animation: demoFill 5.2s linear forwards;
}
@keyframes demoFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lg-demo:hover .demo-prog i.on::after { animation-play-state: paused; }

/* 鼠标跟随粒子层 */
.lg-particles {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* 右侧表单区 */
.lg-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 56px 40px;
  background:
    radial-gradient(620px 440px at 88% -6%, #eef8fb 0%, transparent 58%),
    radial-gradient(520px 380px at -6% 104%, #e9fbff 0%, transparent 56%),
    #fbfbff;
}
.lg-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #eceafb;
  border-radius: 22px;
  padding: 40px 36px 30px;
  box-shadow: 0 26px 64px rgba(20, 74, 96, .10), 0 2px 6px rgba(20, 74, 96, .04);
}
.lg-card-head .mark { display: none; }
.lg-card h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: .5px; color: var(--text); }
.lg-card .sub { margin: 9px 0 26px; font-size: 13px; color: var(--text-3); line-height: 1.7; }

.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.lg-input-wrap { position: relative; }
.lg-input-wrap .fi {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #a4a9c7; pointer-events: none; transition: color .16s;
}
.lg-input-wrap input {
  width: 100%; height: 46px;
  border: 1px solid #e4e5f3; background: #f8f8fd;
  border-radius: 12px; padding: 0 14px 0 42px;
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.lg-input-wrap input::placeholder { color: #a9aecb; }
.lg-input-wrap input:focus { border-color: #9fd6e3; background: #fff; box-shadow: 0 0 0 4px rgba(31, 134, 166, .12); }
.lg-input-wrap:focus-within .fi { color: var(--primary); }

.lg-err {
  display: none;
  margin-bottom: 14px; padding: 9px 12px;
  background: var(--danger-soft); color: var(--danger);
  border-radius: 9px; font-size: 12.5px; line-height: 1.6;
}
.lg-err.show { display: block; }

.lg-submit {
  width: 100%; height: 48px; margin-top: 8px;
  border: 0; border-radius: 12px; cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 4px;
  background: linear-gradient(120deg, #1f86a6, #3aa8c4);
  box-shadow: 0 12px 26px rgba(31, 134, 166, .32);
  transition: transform .16s, box-shadow .16s, opacity .16s;
}
.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(31, 134, 166, .4); }
.lg-submit:active { transform: translateY(0); }
.lg-submit[disabled] { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }

.lg-note { margin-top: 18px; text-align: center; font-size: 11.5px; color: #a0a5c2; line-height: 1.9; }
.lg-panel-foot {
  position: absolute; left: 0; right: 0; bottom: 24px;
  text-align: center; font-size: 11.5px; color: #a4a9c7; letter-spacing: 1.2px;
}
.lg-mini-brand { display: none; align-items: center; gap: 12px; margin-bottom: 22px; }

@media (max-width: 1120px) {
  .lg-visual { padding: 38px 40px 30px; }
  .lg-copy { padding: 30px 0 18px; }
  .lg-copy h1 { font-size: 34px; }
  .lg-copy p { font-size: 13px; max-width: 400px; }
  .lg-points { margin-top: 24px; }
  .lg-point { font-size: 12px; padding: 8px 11px; }
  .lg-demo { display: none; }
  .lg-orb.b { display: none; }
}

@media (max-width: 900px) {
  .lg-mini-brand { display: flex; }
  .lg-panel { padding: 34px 20px 30px; align-content: center; }
  .lg-panel-foot { position: static; margin-top: 18px; }
  .lg-card { padding: 30px 24px 24px; border-radius: 18px; }
}


/* 工具类 */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.skeleton { background: linear-gradient(90deg, #f3f4fa 25%, #e9eef5 37%, #f3f4fa 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 16px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; background: #fff; transition: all .15s;
}
.chip:hover { border-color: #c6e4ee; color: var(--primary); }
.chip.active { background: var(--primary-soft); border-color: #c6e4ee; color: var(--primary); font-weight: 500; }

.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #d3d8e9; border-radius: 12px; cursor: pointer; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(17px); }

/* ------------------ 服务团队 / 协作 ------------------ */
.avatar-sm {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #4a4585, #245069);
  color: #fff; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 600; flex: none; letter-spacing: .3px;
}
.avatar-sm.me { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.avatar-sm.owner { background: linear-gradient(135deg, #2a5f78, #1f4557); }

.team-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafcff;
}
.team-box .owner { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.team-box .owner .role { font-size: 11px; color: var(--text-3); font-weight: 400; }
.team-list { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.member-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.member-chip .x { cursor: pointer; color: var(--text-3); font-size: 12px; padding: 0 2px; border-radius: 50%; }
.member-chip .x:hover { color: var(--danger); background: var(--danger-soft); }
.member-chip .note { color: var(--text-3); font-size: 11px; }

.pool-days { font-size: 12px; color: var(--text-3); }
.pool-days.warn { color: var(--amber); }
.pool-days.old { color: var(--danger); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-mini {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stat-mini .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.stat-mini .v { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: .3px; }
.stat-mini .v small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
@media (max-width: 1180px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }
  .brand-word, .brand-sub, .nav-item span.label, .nav-group-title, .user-card .u-meta, .badge-dot { display: none; }
  .u-out { margin: 0 auto; }
  .u-out span { display: none; }
  .brand-mark { display: block; }
  .brand { align-items: center; padding: 14px 0; }
  .nav-item { justify-content: center; }
  .lg-page { grid-template-columns: 1fr; }
  .lg-visual { display: none; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .drawer { width: 100%; }
  .content { padding: 14px; }
  .global-search { width: 150px; }
}

/* 顶栏消息铃铛 */
.topbar-bell {
  position: relative; width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; padding: 0;
}
.topbar-bell:hover { border-color: var(--line-strong); color: var(--primary); background: var(--primary-soft); }
.topbar-bell .bell-dot {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-style: normal;
  font-weight: 600; line-height: 18px; text-align: center; border: 2px solid var(--bg);
}

/* 消息列表 */
.nt-desk { display: flex; flex-direction: column; }
.nt-row {
  display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line);
  cursor: pointer; border-radius: 8px; transition: background .15s;
}
.nt-row:last-child { border-bottom: 0; }
.nt-row:hover { background: var(--bg); }
.nt-row.read { opacity: .6; }
.nt-row .nt-ico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.nt-row .nt-main { flex: 1; min-width: 0; }
.nt-row .nt-title { font-size: 13.5px; font-weight: 500; color: var(--text); display: flex; gap: 10px; align-items: baseline; }
.nt-row .nt-time { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-weight: 400; flex: 0 0 auto; }
.nt-row .nt-body { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }

/* 建档查重提示 */
.dupe-tip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 7px; padding: 7px 10px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.55;
  background: var(--amber-soft); color: var(--amber); border: 1px solid #ddd2fb;
}
.dupe-tip[hidden] { display: none; }
.dupe-tip .dt-main { flex: 1; min-width: 0; }
.dupe-tip .dt-main b { display: block; font-weight: 600; }
.dupe-tip .dt-main span { display: block; font-size: 12px; opacity: .85; margin-top: 1px; }
.dupe-tip a { flex: 0 0 auto; color: var(--primary); font-weight: 500; text-decoration: none; white-space: nowrap; }
.dupe-tip a:hover { text-decoration: underline; }

/* ===========================================================
   AI 参谋
   AI 结论一律用「靛蓝 + 虚线边框」和人工录入区分，避免看成系统事实
   =========================================================== */
:root {
  --ai: #1f86a6;
  --ai-soft: #e9f5f9;
  --ai-line: #d3e9f1;
}

.ai-panel { font-size: 13px; color: var(--text); }

.ai-topbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.ai-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  padding: 3px 9px; border-radius: 20px;
  color: var(--ai); background: var(--ai-soft); border: 1px solid var(--ai-line);
}
.ai-tag svg { width: 12px; height: 12px; }
.ai-topbar .spacer { flex: 1; }

.ai-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-tabs .at {
  padding: 5px 12px; border-radius: 7px; font-size: 12.5px; cursor: pointer;
  color: var(--text-2); background: #fff; border: 1px solid var(--line);
  transition: .15s;
}
.ai-tabs .at:hover { border-color: var(--ai-line); color: var(--ai); }
.ai-tabs .at.on { background: var(--ai); border-color: var(--ai); color: #fff; font-weight: 500; }

/* 头部结论 */
.ai-hero {
  display: flex; gap: 16px; align-items: stretch;
  padding: 16px 18px; border-radius: 11px;
  background: linear-gradient(135deg, #f7f8ff 0%, #eef1fe 100%);
  border: 1px solid var(--ai-line);
}
.ai-hero-main { flex: 1; min-width: 0; }
.ai-headline { font-size: 15.5px; font-weight: 600; line-height: 1.5; color: #182f3c; }
.ai-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.ai-hero-meta .tag { font-size: 11.5px; }

.ai-score { flex: 0 0 92px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.ai-score .n { font-size: 26px; font-weight: 700; line-height: 1; color: var(--ai); font-variant-numeric: tabular-nums; }
.ai-score .n small { font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 1px; }
.ai-score .l { font-size: 11px; color: var(--text-3); margin: 4px 0 6px; }
.ai-score .bar { height: 4px; border-radius: 4px; background: #dfe3fb; overflow: hidden; }
.ai-score .bar i { display: block; height: 100%; border-radius: 4px; background: var(--ai); }

.ai-reason {
  margin-top: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.6;
  padding-left: 10px; border-left: 2px solid var(--ai-line);
}

/* 分区 */
.ai-sec { margin-top: 18px; }
.ai-sec > h4 {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  letter-spacing: .4px; text-transform: uppercase;
  margin-bottom: 9px;
}
.ai-sec > h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ai-text { font-size: 13.5px; line-height: 1.75; color: var(--text); }

/* 信号 */
.ai-sigs { display: flex; flex-direction: column; gap: 7px; }
.ai-sig {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 11px; border-radius: 8px; background: #fbfcfe;
  border: 1px solid var(--line); line-height: 1.6;
}
.ai-sig .dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; background: var(--text-3); }
.ai-sig.pos { background: #effbf8; border-color: #ccf2ea; }
.ai-sig.pos .dot { background: var(--success); }
.ai-sig.neg { background: #f9fcfd; border-color: #e8f4f8; }
.ai-sig.neg .dot { background: #3aa8c4; }
.ai-sig .txt { flex: 1; min-width: 0; }

.ai-ev {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 5px; color: var(--ai); background: var(--ai-soft);
  cursor: help; white-space: nowrap;
}
.ai-infer {
  flex: 0 0 auto; font-size: 10.5px; padding: 1px 6px; border-radius: 5px;
  color: var(--text-3); background: var(--gray-soft); border: 1px solid var(--line);
  white-space: nowrap;
}

/* 动作卡 */
.ai-acts { display: flex; flex-direction: column; gap: 10px; }
.ai-act {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fff; transition: .15s;
}
.ai-act:hover { border-color: var(--ai-line); box-shadow: var(--shadow-sm); }
.aa-head { display: flex; align-items: center; gap: 8px; }
.aa-idx {
  flex: 0 0 auto; width: 19px; height: 19px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--ai);
}
.aa-title { font-size: 13.5px; font-weight: 600; }
.aa-when {
  margin-left: auto; flex: 0 0 auto; font-size: 11px; padding: 1px 7px; border-radius: 5px;
  color: var(--warn); background: var(--warn-soft); border: 1px solid #ddd2fb;
}
.aa-detail { margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.aa-script {
  position: relative; margin-top: 8px; padding: 9px 34px 9px 11px;
  border-radius: 7px; background: var(--ai-soft); border: 1px dashed var(--ai-line);
  font-size: 12.5px; line-height: 1.7; color: #23506a;
}
.aa-script::before { content: '照着说'; position: absolute; top: -7px; left: 9px; font-size: 10px; color: var(--ai); background: #fff; padding: 0 4px; }
.aa-copy {
  position: absolute; right: 6px; top: 6px;
  border: 1px solid var(--ai-line); background: #fff; color: var(--ai);
  border-radius: 5px; font-size: 11px; padding: 2px 6px; cursor: pointer;
}
.aa-copy:hover { background: var(--ai); color: #fff; border-color: var(--ai); }

/* 待补信息 */
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: var(--amber-soft); color: var(--warn); border: 1px solid #ddd2fb;
}

/* 要素表 */
.ai-elements { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ai-el { display: flex; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ai-el:last-child { border-bottom: 0; }
.ai-el .k {
  flex: 0 0 96px; padding: 8px 12px; background: #fafbfd;
  color: var(--text-2); border-right: 1px solid var(--line);
}
.ai-el .v { flex: 1; padding: 8px 12px; line-height: 1.6; }
.ai-el .v.miss { color: var(--text-3); font-style: italic; }

/* 双栏 */
.ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .ai-cols { grid-template-columns: 1fr; } }
.ai-box { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: #fbfcfe; }
.ai-box .bt { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.ai-list { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.85; color: var(--text-2); }
.ai-list li::marker { color: var(--ai); }

/* 提示与页脚 */
.ai-warn {
  margin-top: 16px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.65;
  background: var(--warn-soft); color: #4a5ea6; border: 1px solid #ddd2fb;
  display: flex; gap: 7px; align-items: flex-start;
}
.ai-warn svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }

.ai-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-3); line-height: 1.6;
}
.ai-foot .spacer { flex: 1; }

/* 加载 */
.ai-loading { padding: 10px 0; }
.ai-loading .lh { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ai); margin-bottom: 16px; }
.ai-spin {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--ai-line); border-top-color: var(--ai);
  animation: ai-spin .8s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-sk { height: 11px; border-radius: 5px; background: linear-gradient(90deg, #f0f2fa 25%, #e6e9f7 37%, #f0f2fa 63%); background-size: 400% 100%; animation: ai-sk 1.4s ease infinite; margin-bottom: 9px; }
@keyframes ai-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.ai-empty { text-align: center; padding: 34px 20px; }
.ai-empty .ico { color: var(--ai); opacity: .35; margin-bottom: 10px; }
.ai-empty .t { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ai-empty .s { font-size: 12.5px; color: var(--text-3); line-height: 1.7; max-width: 380px; margin: 0 auto 16px; }

.ai-off {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: 9px; font-size: 13px; line-height: 1.7;
  background: var(--gray-soft); border: 1px dashed var(--line-strong); color: var(--text-2);
}

/* 工作台体检卡 */
.ai-card-head { display: flex; align-items: center; gap: 8px; }
.ai-card-head .mini {
  font-size: 11px; font-weight: 600; color: var(--ai); background: var(--ai-soft);
  border: 1px solid var(--ai-line); border-radius: 5px; padding: 1px 6px;
}
.ai-bn { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ai-bn:last-child { border-bottom: 0; }
.ai-bn .idx {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--danger); background: var(--danger-soft);
}
.ai-bn .bd { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.65; }
.ai-bn .bd b { display: block; font-weight: 600; margin-bottom: 2px; }
.ai-bn .bd .fix { color: var(--success); margin-top: 3px; display: block; }

/* 跟进内容旁的 AI 整理 */
.ai-write { display: flex; align-items: center; gap: 9px; margin-top: 7px; flex-wrap: wrap; }
.ai-write .hint { font-size: 11.5px; color: var(--text-3); }
.ai-write .btn { color: var(--ai); border-color: var(--ai-line); }
.ai-write .btn:hover { background: var(--ai-soft); }

/* ===========================================================
   AI 模型管理（设置页）
   =========================================================== */
.mlist { display: flex; flex-direction: column; gap: 8px; }

.mrow {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
  transition: .15s;
}
.mrow:hover { border-color: var(--ai-line); box-shadow: var(--shadow-sm); }
.mrow.off { background: #fbfbfd; opacity: .62; }

.mr-idx {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--ai); font-variant-numeric: tabular-nums;
}
.mrow.off .mr-idx { background: var(--text-3); }

.mr-main { flex: 1; min-width: 0; }
.mr-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mr-title b { font-size: 13.5px; font-weight: 600; }
.mr-meta {
  margin-top: 3px; font-size: 12px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mr-stat { margin-top: 4px; font-size: 11.5px; line-height: 1.6; }
.mr-stat svg { width: 11px; height: 11px; vertical-align: -1px; }

.mr-ops { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.mr-ops .btn { padding: 3px 7px; font-size: 12px; }
.mr-ops .btn.danger { color: var(--danger); }
.mr-ops .btn.danger:hover { background: var(--danger-soft); }
.mr-ops .btn:disabled { opacity: .35; cursor: default; }

@media (max-width: 760px) {
  .mrow { flex-wrap: wrap; }
  .mr-ops { width: 100%; justify-content: flex-start; padding-left: 34px; }
}

.mform .grid-2 { align-items: start; }

/* ===========================================================
   客户来意（建档时第一手诉求，详情顶部常驻）
   =========================================================== */
.brief-bar {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; margin-bottom: 14px;
  background: var(--primary-soft); border: 1px solid #d6ecf3; border-radius: var(--radius);
}
.brief-bar.empty { background: var(--warn-soft); border-color: #ddd2fb; }
.brief-bar .bb-icon {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; background: #fff; color: var(--primary);
}
.brief-bar.empty .bb-icon { color: var(--warn); }
.brief-bar .bb-icon svg { width: 13px; height: 13px; }
.brief-bar .bb-main { flex: 1; min-width: 0; }
.brief-bar .bb-t {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  color: var(--primary); text-transform: none;
}
.brief-bar.empty .bb-t { color: var(--warn); }
.brief-bar .bb-tag {
  font-weight: 500; padding: 0 6px; border-radius: 4px;
  background: #fff; color: var(--text-2); font-size: 11px; line-height: 17px;
}
.brief-bar .bb-s {
  margin-top: 2px; font-size: 13.5px; line-height: 1.62; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.brief-bar .btn { flex: 0 0 auto; }

/* 表单里的「套一句」快捷句式 */
.brief-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.brief-chips .bc-label { font-size: 11.5px; color: var(--text-3); }
.brief-chips .bc {
  font: inherit; font-size: 12px; line-height: 1;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: var(--surface); color: var(--text-2);
  transition: all .15s;
}
.brief-chips .bc:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.brief-chips .bc:active { transform: translateY(1px); }

/* 列表里的来意摘要 */
.brief-line { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===========================================================
   公海领取预览（领取前先看清客户情况）
   =========================================================== */
.claim-card { display: flex; align-items: center; gap: 12px; padding-bottom: 13px; border-bottom: 1px dashed var(--line); }
.claim-card .cc-av {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 17px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
}
.claim-card .cc-main { flex: 1; min-width: 0; }
.claim-card .cc-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; font-weight: 600; }
.claim-card .cc-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.claim-card .cc-days { flex: 0 0 auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.claim-brief { margin-top: 14px; padding: 11px 13px; border-radius: 8px; background: var(--primary-soft); border: 1px solid #d6ecf3; }
.claim-brief.empty { background: var(--warn-soft); border-color: #ddd2fb; }
.claim-brief .cb-t { font-size: 11.5px; font-weight: 600; color: var(--primary); }
.claim-brief.empty .cb-t { color: var(--warn); }
.claim-brief .cb-s { margin-top: 3px; font-size: 13.5px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word; }

.claim-hist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 14px; }
.claim-hist .ch { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.claim-hist .ch b { display: block; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.claim-hist .ch span { font-size: 11.5px; color: var(--text-3); }

.claim-follows { display: flex; flex-direction: column; gap: 7px; }
.claim-follows .cf { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.6; }
.claim-follows .cf-t { flex: 0 0 auto; padding: 0 6px; border-radius: 4px; background: var(--slate-soft); color: var(--slate); font-size: 11.5px; }
.claim-follows .cf-c { flex: 1; min-width: 0; color: var(--text-2); }
.claim-follows .cf-d { flex: 0 0 auto; color: var(--text-3); font-size: 12px; }

.claim-note {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 16px;
  padding: 9px 12px; border-radius: 7px; background: #f6f8fb;
  font-size: 12.5px; color: var(--text-3); line-height: 1.7;
}
.claim-note .ic { flex: 0 0 auto; margin-top: 2px; color: var(--text-3); }

/* ===========================================================
   AI 参谋：页签醒目 + 触发前确认（防误点浪费 token）
   =========================================================== */
.tabs .tab.tab-ai { color: var(--primary); font-weight: 600; }
.tabs .tab.tab-ai .ic { color: var(--primary); }
.tabs .tab.tab-ai.active { background: var(--primary-soft); color: var(--primary); border-radius: 8px 8px 0 0; }

.ai-gate { padding: 28px 22px 26px; text-align: center; }
.ai-gate .ag-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.ai-gate .ag-t { margin-top: 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.ai-gate .ag-s { margin-top: 6px; font-size: 13px; color: var(--text-3); line-height: 1.7; }
.ai-gate .ag-points {
  display: inline-flex; flex-direction: column; gap: 7px; margin-top: 16px;
  padding: 12px 18px; text-align: left;
  background: #f8fafd; border: 1px solid var(--line); border-radius: 9px;
  font-size: 12.5px; color: var(--text-2);
}
.ai-gate .ag-points > div { display: flex; align-items: center; gap: 7px; }
.ai-gate .ag-points .ic { color: var(--success); }
.ai-gate .ag-btns { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .dc { transition: none; }
  .demo-bar .dot { animation: none; }
}

/* ==================== 团队经营体检（周报） ==================== */
.tm-head { display: flex; gap: 14px; align-items: flex-start; }
.tm-score {
  flex: 0 0 auto; width: 74px; height: 74px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid rgba(31,134,166,.14);
}
.tm-score i { font-style: normal; font-size: 11px; font-weight: 600; margin-top: 4px; opacity: .7; }
.tm-score.s-good { background: var(--success-soft); color: var(--success); border-color: rgba(13,148,136,.16); }
.tm-score.s-mid { background: #f6f3ff; color: #6a5bb8; border-color: rgba(106,91,184,.14); }
.tm-score.s-bad { background: var(--danger-soft); color: var(--danger); border-color: rgba(214,69,83,.16); }
.tm-head-main { flex: 1; min-width: 0; }
.tm-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.tm-tag { padding: 1px 7px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tm-tag.lite { background: #f2f4f9; color: var(--text-3); font-weight: 500; }
.tm-health { font-size: 12.5px; color: var(--text-2); line-height: 1.75; margin-top: 7px; }
.tm-compare {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.7;
  background: linear-gradient(90deg, rgba(31,134,166,.07), rgba(31,134,166,.02));
  border-left: 2.5px solid var(--primary); color: var(--text-2);
}

.tm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 2px; }
.tm-cell {
  padding: 10px 11px 9px; border-radius: 9px; background: #fafbfe;
  border: 1px solid var(--line);
}
.tm-lab { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 4px; color: var(--text); }
.tm-val i { font-style: normal; font-size: 11px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.tm-del { font-size: 11.5px; margin-top: 3px; font-weight: 600; }
.tm-del.good { color: var(--success); }
.tm-del.bad { color: var(--danger); }
.tm-del.flat, .tm-del.new { color: var(--text-3); font-weight: 500; }
.tm-avg { font-size: 10.5px; color: #a3a9c0; margin-top: 3px; }
.tm-note {
  font-size: 11px; color: var(--text-2); line-height: 1.55; margin-top: 6px;
  padding-top: 6px; border-top: 1px dashed var(--line);
}
.tm-quota { font-size: 11px; color: var(--text-3); }

.tm-list { display: flex; flex-direction: column; gap: 8px; }
.tm-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
  font-family: inherit;
}
.tm-item:hover { border-color: var(--primary); background: #fbfdff; }
.tm-item-l { flex: 0 0 116px; }
.tm-item-l b { display: block; font-size: 13px; color: var(--text); }
.tm-item-l span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.tm-item-m {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.55;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tm-item-r { flex: 0 0 auto; display: flex; align-items: baseline; gap: 8px; }
.tm-hs { font-size: 19px; font-weight: 800; color: var(--primary); }
.tm-hs i { font-style: normal; font-size: 10px; font-weight: 500; color: var(--text-3); margin-left: 1px; }
.tm-hd { font-size: 11px; font-weight: 600; }
.tm-hd.good { color: var(--success); }
.tm-hd.bad { color: var(--danger); }
.tm-hd.flat { color: var(--text-3); }
.tm-list-foot { font-size: 11.5px; color: var(--text-3); margin-top: 12px; text-align: center; }

@media (max-width: 1100px) {
  .tm-grid { grid-template-columns: repeat(2, 1fr); }
}
