/* ============ 全局变量与基础（双主题：白天浅色玻璃拟态 / 夜晚浅色未来风） ============ */
:root {
  /* 白天：浅色玻璃拟态（马卡龙深紫 · 去扁平质感） */
  --primary: #D4537E;
  --primary-2: #7F77DD;
  --primary-dark: #993556;
  --primary-soft: rgba(212, 83, 126, 0.12);
  --accent: #A66BCF;

  --bg: #FDF2F6;
  --bg-2: #F7EEFB;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #FBF4FA;
  --border: #F0D9E8;
  --border-strong: #E3C0DB;

  --text: #3C3489;
  --text-2: #5F4B8B;
  --text-3: #A79FC8;

  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --cyan: #0891b2;
  --violet: #7c3aed;

  --green-text: #166534;
  --amber-text: #92400e;
  --red-text: #b91c1c;
  --red-text-2: #dc2626;

  --green-soft: #e8f6ee;
  --amber-soft: #fdf3e0;
  --red-soft: #fdecec;
  --blue-soft: #eaf2fd;
  --violet-soft: #f1ecfe;
  --orange-soft: #FBEAF0;

  --green-border: rgba(22, 163, 74, 0.30);
  --amber-border: rgba(217, 119, 6, 0.30);
  --red-border: rgba(220, 38, 38, 0.30);
  --indigo-border: rgba(212, 83, 126, 0.32);

  --on-primary: #ffffff;
  --primary-glow: rgba(212, 83, 126, 0.32);
  --primary-glow-strong: rgba(212, 83, 126, 0.48);
  --cyan-soft: #E4F0EE;
  --gray-soft: #F5F1F8;
  --mask: rgba(44, 36, 92, 0.42);

  --sidebar-bg: linear-gradient(180deg, #2C245C 0%, #3C3489 52%, #4B2A5E 100%);
  --sidebar-text: #F6EFFB;
  --sidebar-text-2: rgba(246, 239, 251, 0.86);
  --sidebar-muted: rgba(246, 239, 251, 0.55);
  --sidebar-item: rgba(246, 239, 251, 0.07);
  --sidebar-item-strong: rgba(246, 239, 251, 0.16);
  --sidebar-border: rgba(166, 107, 207, 0.30);
  --topbar-bg: #2C245C;

  --glow-1: rgba(212, 83, 126, 0.14);
  --glow-2: rgba(166, 107, 207, 0.14);
  --glow-3: rgba(127, 119, 221, 0.10);

  /* 横幅渐变 */
  --skin-banner: linear-gradient(150deg, #3C3489 0%, #5C3B7E 52%, #D4537E 100%);

  --radius: 8px;
  --radius-sm: 5px;
  /* 统一微交互缓动曲线（高级感核心：前快后极慢的 ease-out-expo / 通用 Material ease-out） */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px rgba(60, 52, 137, 0.05);
  --shadow: 0 4px 16px rgba(60, 52, 137, 0.12);
  --shadow-lg: 0 12px 32px rgba(60, 52, 137, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 夜晚：浅色未来风 */
[data-theme="cyber"] {
  --primary: #D4537E;
  --primary-2: #7F77DD;
  --primary-dark: #993556;
  --primary-soft: rgba(212, 83, 126, 0.14);
  --accent: #A66BCF;

  --bg: #F4EDF6;
  --bg-2: #EDE5F0;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #F7F0FA;
  --border: #ECDCF0;
  --border-strong: #DCC5E4;

  --text: #3C3489;
  --text-2: #5F4B8B;
  --text-3: #A79FC8;

  --green: #059669;
  --amber: #d97706;
  --red: #e11d48;
  --blue: #0284c7;
  --cyan: #06b6d4;
  --violet: #7c3aed;

  --green-text: #047857;
  --amber-text: #92400e;
  --red-text: #be123c;
  --red-text-2: #e11d48;

  --green-soft: #e6f7ef;
  --amber-soft: #fef6e0;
  --red-soft: #fdecf0;
  --blue-soft: #e8f4fd;
  --violet-soft: #f0eafe;
  --orange-soft: #FBEAF0;

  --green-border: rgba(5, 150, 105, 0.30);
  --amber-border: rgba(217, 119, 6, 0.30);
  --red-border: rgba(225, 29, 72, 0.30);
  --indigo-border: rgba(212, 83, 126, 0.32);

  --on-primary: #ffffff;
  --primary-glow: rgba(212, 83, 126, 0.36);
  --primary-glow-strong: rgba(212, 83, 126, 0.52);
  --cyan-soft: #E4F0EE;
  --gray-soft: #F3EFF7;
  --mask: rgba(44, 36, 92, 0.42);

  --sidebar-bg: linear-gradient(180deg, #2C245C 0%, #3C3489 52%, #4B2A5E 100%);
  --sidebar-text: #F6EFFB;
  --sidebar-text-2: rgba(246, 239, 251, 0.86);
  --sidebar-muted: rgba(246, 239, 251, 0.55);
  --sidebar-item: rgba(246, 239, 251, 0.07);
  --sidebar-item-strong: rgba(246, 239, 251, 0.16);
  --sidebar-border: rgba(166, 107, 207, 0.30);
  --topbar-bg: #2C245C;

  --glow-1: rgba(212, 83, 126, 0.18);
  --glow-2: rgba(166, 107, 207, 0.16);
  --glow-3: rgba(127, 119, 221, 0.12);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.18);
}

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

html, body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius:12px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-2); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 500;
  transition: all .18s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary); box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 8px 24px var(--primary-glow-strong); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red-border); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius:10px; border: none;
  background: transparent; color: var(--text-3); transition: all .15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px;
}
.field label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%; padding: 10px 13px; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--text); transition: border .15s, box-shadow .15s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea { resize: vertical; min-height: 76px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7a9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }

/* ============ 表格 ============ */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow-x: auto; overflow-y: hidden;
  box-shadow: 0 1px 3px rgba(60, 52, 137, 0.05);
}
/* 数据表：表头吸顶（贴顶栏下方，表头上方内容随页面滚走），马卡龙深紫渐变白字 */
.table-wrap.sticky-thead { overflow: visible; }
.table-wrap.sticky-thead thead th {
  position: sticky; top: 62px; z-index: 5;
  padding: 14px 10px;
  background: var(--primary);
  color: #fff; font-weight: 700; letter-spacing: .02em;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.table { width: 100%; border-collapse: collapse; min-width: 100%; }
.table th {
  text-align: left; font-size: 12.5px; font-weight: 700; color: var(--text-2);
  padding: 11px 10px; background: var(--surface-2);
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap; letter-spacing: .02em;
}
.table td {
  padding: 9px 10px; font-size: 12.5px; color: var(--text-2);
  border-bottom: 1px solid var(--border); vertical-align: middle;
  transition: background .15s ease;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s ease, box-shadow .15s ease; }
.table tbody tr:hover { background: var(--primary-soft); }
.table tbody tr:hover td:first-child { box-shadow: inset 2.5px 0 0 var(--primary); }
.table .cell-strong { color: var(--text); font-weight: 600; }
.table .cell-sub { color: var(--text-3); font-size: 12.5px; }
.table .actions { display: flex; gap: 2px; justify-content: flex-end; }

/* 快捷登记表格：更紧凑，尽量一屏展示完整 */
.table.quick-table { min-width: 100%; }
.table.quick-table th { padding: 6px 6px; font-size: 12px; }
.table.quick-table td { padding: 4px 6px; font-size: 12.5px; }
.table.quick-table .input,
.table.quick-table .select { font-size: 12.5px; }

/* ============ 圆润卡片式表格（面试反馈） ============ */
.table-wrap.table-wrap-round {
  border-radius:20px;
  border: 1px solid var(--border);
  overflow-x: auto;   /* 允许横向滚动（手机端表格左右滑动） */
  overflow-y: hidden;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}
.table-wrap.table-wrap-round .table { border-collapse: separate; border-spacing: 0; }
.table-wrap.table-wrap-round th {
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
  white-space: nowrap;
}
.table-wrap.table-wrap-round th:first-child { border-top-left-radius: 15px; }
.table-wrap.table-wrap-round th:last-child { border-top-right-radius: 15px; }
.table-wrap.table-wrap-round td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-wrap.table-wrap-round tbody tr { transition: background .15s ease, box-shadow .15s ease; }
.table-wrap.table-wrap-round tbody tr:hover { background: var(--surface); }
.table-wrap.table-wrap-round tbody tr:last-child td { border-bottom: none; }
.table-wrap.table-wrap-round tbody tr:last-child td:first-child { border-bottom-left-radius: 15px; }
.table-wrap.table-wrap-round tbody tr:last-child td:last-child { border-bottom-right-radius: 15px; }

/* 面试反馈：JS 克隆吸顶表头（与圆角表格表头一致） */
#js-sticky-clone table { border-collapse: separate; border-spacing: 0; background: var(--surface); }
#js-sticky-clone th {
  padding: 12px 14px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border);
  text-align: left; letter-spacing: .04em;
}
#js-sticky-clone th:first-child { border-top-left-radius: 0; }
#js-sticky-clone th:last-child { border-top-right-radius: 0; }

/* ============ 状态标签 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px rgba(0,0,0,.05); }
.badge-gray   { background: var(--gray-soft); color: var(--text-2); }
.badge-blue   { background: var(--blue-soft); color: var(--blue); }
.badge-amber  { background: var(--amber-soft); color: var(--amber); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-green  { background: var(--green-soft); color: var(--green); }
.badge-red    { background: var(--red-soft); color: var(--red); }
.badge-cyan   { background: var(--primary-soft); color: var(--cyan); }

/* ============ 卡片 ============ */
.card {
  background: var(--sk-surface, var(--surface));
  border: 1px solid var(--sk-line, var(--border));
  border-radius: var(--r-md, 8px);
  box-shadow: var(--sk-shadow, 0 1px 2px rgba(0,0,0,.04));
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: var(--mask);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius:20px; width: 100%; max-width: 560px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--border);
}

/* ============ 考核套用人员勾选面板 ============ */
.assess-filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.assess-filter-row > div[style] svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.assess-check-panel { background: var(--bg); }
.assess-check-group { padding: 2px 0; }
.assess-check-dept {
  font-size: 13px; font-weight: 800; color: var(--text); padding: 8px 8px 4px;
  display: flex; align-items: center; gap: 6px;
}
.assess-check-dept::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.assess-check-pos-block { padding-left: 10px; }
.assess-check-group-title {
  font-size: 12px; font-weight: 700; color: var(--text-3); padding: 6px 8px 4px;
  letter-spacing: .3px;
}
.assess-check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
  transition: background .12s ease;
}
.assess-check-item:hover { background: var(--surface-hover, rgba(0,0,0,.03)); }
.assess-check-item input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.assess-check-box {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px;
  border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); transition: all .15s ease;
}
.assess-check-item input:checked + .assess-check-box {
  background: var(--primary); border-color: var(--primary);
}
.assess-check-item input:checked + .assess-check-box::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.assess-check-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.assess-check-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Toast ============ */
#toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius:12px; font-size: 14px; font-weight: 500;
  background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); animation: slideDown .25s ease;
}
.toast.success { background: var(--green-soft); color: var(--green-text); border-color: var(--green-border); }
.toast.error { background: var(--red-soft); color: var(--red-text); border-color: var(--red-border); }
.toast .toast-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ============ 头像 ============ */
.avatar {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0;
  user-select: none;
}

/* ============ 空状态 ============ */
.empty {
  text-align: center; padding: 60px 20px; color: var(--text-3);
}
.empty .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.empty p { font-size: 14px; }

/* ============ 工具条 ============ */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .search-box .input { padding-left: 38px; }
.toolbar .search-box .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.toolbar .spacer { flex: 1; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}

/* 单元格悬停浮层提示（备注/日期明细） */
.tip-wrap { position: relative; }
.tip-wrap .tip-box {
  display: none; position: absolute; z-index: 200; left: 0; top: 100%;
  margin-top: 6px; background: #1b2440; color: var(--text); padding: 10px 12px;
  border-radius:12px; font-size: 12.5px; max-width: 380px; min-width: 140px;
  white-space: normal; line-height: 1.7; word-break: break-all;
  border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
}
.tip-wrap:hover .tip-box { display: block; }

/* ============ 3D 观感增强（暗黑玻璃） ============ */
body {
  background: var(--bg);
  background-attachment: fixed;
}
.card {
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 4px 14px var(--primary-glow-strong); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { box-shadow: none; }
.btn-ghost:hover { box-shadow: none; }
.table-wrap {
  box-shadow: none;
  transition: box-shadow .18s ease;
}
.table-wrap:hover { box-shadow: var(--shadow-sm); }
.stat-card {
  box-shadow: none;
}

/* 列表行定位闪烁动画 */
@keyframes row-flash {
  0%, 100% { background-color: transparent; }
  50% { background-color: #fde68a; }
}
.row-flash { animation: row-flash 0.5s ease-in-out 3; }
.stat-card:hover { box-shadow: var(--shadow-sm); }
.modal { box-shadow: var(--shadow-lg); }
.input, .select, .textarea { box-shadow: none; }
.badge { box-shadow: none; }

/* ============ 全局统一微交互体系（所有可点击内容，简约 / 高级 / 一致） ============ */
/* 所有按钮：hover 轻微上浮 + 微亮，active 按下回弹（ease-out 高级缓动） */
button:not(:disabled) {
  transition: transform .16s var(--ease-soft), box-shadow .16s var(--ease-soft), filter .16s var(--ease-soft);
}
button:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.05); }
button:not(:disabled):active { transform: translateY(0) scale(.96); transition-duration: .06s; }
.btn:active { transform: translateY(0) scale(.96) !important; }
.icon-btn:active { transform: scale(.88) !important; }

/* 所有链接：hover 变淡 + 饱和度提升（温和） */
a[onclick], a[href^="javascript:"] { transition: opacity .16s var(--ease-soft), filter .16s var(--ease-soft); }
a[onclick]:hover, a[href^="javascript:"]:hover { opacity: .82; filter: saturate(1.2); }

/* 所有可点击容器（带 onclick 的非链接/按钮元素）：hover 轻微上浮 + 微亮，active 回弹 */
[onclick]:not(a):not(button):not(.icon-btn) {
  cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), filter .2s var(--ease-soft);
}
[onclick]:not(a):not(button):not(.icon-btn):hover { transform: translateY(-2px); filter: brightness(1.02); }
[onclick]:not(a):not(button):not(.icon-btn):active { transform: translateY(0) scale(.99); }

/* 表格行 hover 过渡 */
.table tbody tr { transition: background .15s var(--ease-soft); }

/* 数据驱动的可点击卡片（优秀案例/待跟进方块/通知项/历史通知项）：hover 上浮 + 金色描边 */
[data-jump], [data-hover-card], [data-notify-item], [data-nh-item] {
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s var(--ease-soft);
}
[data-jump]:hover, [data-hover-card]:hover, [data-notify-item]:hover, [data-nh-item]:hover {
  border-color: var(--primary) !important;
}


/* ============ 工作群聊悬浮窗（右下角） ============ */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.18);
  transition: box-shadow .18s ease;
}
.chat-fab:hover { box-shadow: 0 6px 16px rgba(16, 24, 40, 0.24); }
.chat-fab:active { transform: scale(.94); }
.chat-fab-icon { font-size: 26px; line-height: 1; }
.chat-fab-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.chat-panel {
  position: fixed; right: 22px; bottom: 88px; z-index: 301;
  width: 660px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 120px);
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius:12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
  display: flex; flex-direction: column; overflow: hidden;
  animation: chat-pop .2s ease;
}
@keyframes chat-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* 左右两栏：左侧联系人 + 右侧会话 */
.chat-panel-main { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.chat-sidebar {
  width: 190px; flex-shrink: 0; display: flex; flex-direction: column;
  border-right: 1px solid var(--border); background: var(--surface-2); overflow: hidden;
}
.chat-search { padding: 10px 10px 6px; flex-shrink: 0; }
.chat-search-input {
  width: 100%; padding: 7px 10px; font-size: 12.5px; border: 1px solid var(--border-strong);
  border-radius:12px; background: var(--surface); color: var(--text); outline: none; font-family: inherit;
}
.chat-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat-sidebar-list { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.chat-sidebar-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius:12px;
  cursor: pointer; transition: background .15s ease;
}
.chat-sidebar-item:hover { background: var(--primary-soft); }
.chat-sidebar-item.active { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.chat-sidebar-item .chat-avatar { width: 34px; height: 34px; font-size: 15px; }
.chat-sidebar-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sidebar-meta { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sidebar-group { font-size: 11px; color: var(--text-3); padding: 8px 10px 4px; font-weight: 700; }
.chat-conv { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.chat-conv-head {
  padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; color: var(--on-primary); flex-shrink: 0;
  background: var(--primary);
}
.chat-panel-title { font-size: 15px; font-weight: 700; }
.chat-panel-actions { display: flex; align-items: center; gap: 10px; }
.chat-member-count { font-size: 12px; opacity: .92; }
.chat-close {
  width: 26px; height: 26px; border: none; border-radius:10px;
  background: rgba(255, 255, 255, .2); color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.chat-close:hover { background: rgba(255, 255, 255, .34); }
.chat-panel-body {
  flex: 1; overflow-y: auto; padding: 14px 12px; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-day-sep { text-align: center; font-size: 11px; color: var(--text-3); margin: 4px 0; }
.chat-msg { display: flex; gap: 8px; max-width: 85%; }
.chat-msg.self { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.chat-bubble-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-meta { font-size: 11px; color: var(--text-3); }
.chat-msg.self .chat-meta { text-align: right; }
.chat-bubble {
  padding: 9px 12px; border-radius:14px; font-size: 13.5px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.chat-msg:not(.self) .chat-bubble { background: var(--surface-2); border: 1px solid var(--border); border-top-left-radius: 4px; }
.chat-msg.self .chat-bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.chat-time { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.chat-msg.self .chat-time { text-align: right; }
.chat-panel-foot {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.chat-input {
  flex: 1; resize: none; padding: 9px 12px; font-size: 13.5px; line-height: 1.5; max-height: 96px;
  border: 1px solid var(--border-strong); border-radius:12px; background: var(--surface); color: var(--text);
  outline: none; font-family: inherit;
}
.chat-input:focus { border-color: var(--primary); background: var(--surface-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat-send {
  padding: 9px 16px; border: none; border-radius:12px; cursor: pointer; flex-shrink: 0;
  background: var(--primary); color: var(--on-primary); font-size: 13.5px; font-weight: 600;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chat-send:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--primary-glow-strong); }
.chat-send:active { transform: scale(.95); }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }

/* 群聊/私聊切换 tab */
.chat-panel-tabs {
  display: flex; gap: 4px; padding: 8px 12px 0; background: var(--surface-2); flex-shrink: 0;
}
.chat-tab {
  padding: 6px 16px; border: none; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); transition: all .15s ease;
}
.chat-tab.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 2px 8px var(--primary-glow); }
.chat-tab:hover { transform: translateY(-1px); }

/* 附件工具栏 */
.chat-toolbar { display: flex; gap: 6px; align-items: center; }
.chat-upload-btn {
  width: 32px; height: 32px; border: none; border-radius:12px; cursor: pointer; font-size: 16px; line-height: 1;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.chat-upload-btn:hover { background: var(--primary-soft); transform: translateY(-1px); }

/* 图片/视频/文件消息 */
.chat-media { display: block; max-width: 220px; border-radius:12px; cursor: zoom-in; }
.chat-video { display: block; max-width: 220px; max-height: 180px; border-radius:12px; background: #000; }
.chat-file {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius:12px;
  background: rgba(255, 255, 255, .18); text-decoration: none; font-size: 13px; font-weight: 600;
}
.chat-msg:not(.self) .chat-file { background: var(--surface-2); color: var(--primary); border: 1px solid var(--border); }
.chat-msg.self .chat-file { color: #fff; }
.chat-file-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-size { font-size: 11px; opacity: .8; white-space: nowrap; }

/* 私聊联系人列表 */
.chat-contact {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  border-radius:12px; transition: background .15s ease;
}
.chat-contact:hover { background: var(--primary-soft); }
.chat-contact .chat-avatar { width: 38px; height: 38px; font-size: 16px; }
.chat-contact-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.chat-contact-meta { font-size: 11.5px; color: var(--text-3); }

/* 聊天可点击卡片（转发数据，点击跳转） */
.chat-card {
  max-width: 250px; border-radius:14px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.chat-card:hover { border-color: var(--primary); }
.chat-card-head {
  padding: 9px 12px; font-size: 13px; font-weight: 700; color: var(--on-primary);
  background: var(--primary);
}
.chat-card-body {
  padding: 9px 12px; font-size: 12.5px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow-y: auto;
}
.chat-card-foot {
  padding: 6px 12px; font-size: 11px; font-weight: 600; color: var(--primary);
  border-top: 1px solid var(--border); background: var(--primary-soft); text-align: center;
}

/* 骨架屏 shimmer 动画（页面加载占位） */
@keyframes skeleton-wave {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* 播报式平滑滚动（优秀面试 / 排行榜）
   自动播报改为 JS 递增 scrollTop，容器本身保持可滚动：鼠标滚轮 / 触屏 / 拖动滚动条都能手动查看 */
.auto-scroll-box {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sk-line, rgba(120,130,150,.4)) transparent;
}
.auto-scroll-box::-webkit-scrollbar { width: 6px; }
.auto-scroll-box::-webkit-scrollbar-thumb { background: var(--sk-line, rgba(120,130,150,.4)); border-radius: 3px; }
.auto-scroll-box::-webkit-scrollbar-track { background: transparent; }
.auto-scroll-track { display: flex; flex-direction: column; }

/* 首页公告窗横向滚动（新闻跑马灯） */
.ann-scroll-text { display: inline-block; white-space: nowrap; will-change: transform; animation: annScroll var(--ann-scroll-duration, 22s) linear infinite; }
.ann-scroll-text:hover { animation-play-state: paused; }
@keyframes annScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}


/* 效率页经纪人面板：一排最多 2 个 */
.agent-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
@media (max-width: 900px) {
  .agent-panel-grid { grid-template-columns: 1fr; }
}

/* ============ 可点击模块 hover 交互动画（上浮 + 阴影 + 边框高亮） ============ */
[data-goto-assess],
[data-goto-follow],
[data-goto-invite],
[data-follow-pending],
[data-audio-missing],
[data-batch-approve],
[data-jump],
[data-hover-card],
[data-notify-item],
[data-nh-item] {
  cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s var(--ease-soft), filter .2s var(--ease-soft);
}
[data-goto-assess]:hover,
[data-goto-follow]:hover,
[data-goto-invite]:hover,
[data-follow-pending]:hover,
[data-audio-missing]:hover,
[data-batch-approve]:hover,
[data-jump]:hover,
[data-hover-card]:hover,
[data-notify-item]:hover,
[data-nh-item]:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 40px rgba(60, 52, 137, 0.14), 0 6px 16px rgba(166, 107, 207, 0.28);
  border-color: var(--primary) !important;
  filter: saturate(1.06);
}
[data-goto-assess]:active,
[data-goto-follow]:active,
[data-goto-invite]:active,
[data-follow-pending]:active,
[data-audio-missing]:active,
[data-batch-approve]:active,
[data-jump]:active,
[data-hover-card]:active,
[data-notify-item]:active,
[data-nh-item]:active {
  transform: translateY(0) scale(.99);
  transition-duration: .06s;
}

/* 首页待办瓷砖（data-tile）：高级 hover——上浮 + 微缩 + 双层阴影 + 金边 + 饱和度 */
[data-tile] {
  cursor: pointer;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-soft), filter .22s var(--ease-soft);
}
[data-tile]:hover {
  transform: translateY(-7px) scale(1.045);
  box-shadow: 0 22px 44px rgba(60, 52, 137, 0.20), 0 8px 20px rgba(127, 119, 221, 0.34) !important;
  border-color: var(--accent) !important;
  filter: saturate(1.12) brightness(1.03);
  z-index: 3;
}
[data-tile]:active { transform: translateY(-1px) scale(.99); transition-duration: .08s; }

/* 日历格子（所有日期可点击）hover：背景变亮 + 上浮放大 + 金色描边 + 阴影（强反馈） */
[data-cal-click] {
  cursor: pointer;
  position: relative;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), filter .2s var(--ease-out);
}
[data-cal-click]:hover {
  transform: translateY(-4px) scale(1.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), 0 0 0 3px var(--accent);
  filter: brightness(1.16) saturate(1.2);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 3;
}
[data-cal-click]:active { transform: translateY(0) scale(1.03); transition-duration: .08s; }

/* 键盘 / 无障碍焦点态：所有可交互元素统一金色 focus ring */
button:focus-visible,
a:focus-visible,
[onclick]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 触屏设备（无 hover）：禁用 hover 上浮/位移（保留 active 按下反馈），避免误触跳动 */
@media (hover: none) {
  [data-goto-assess]:hover, [data-goto-follow]:hover, [data-goto-invite]:hover,
  [data-follow-pending]:hover, [data-audio-missing]:hover, [data-batch-approve]:hover,
  [data-jump]:hover, [data-hover-card]:hover, [data-notify-item]:hover, [data-nh-item]:hover {
    transform: none;
    box-shadow: none;
  }
  [data-tile]:hover { transform: none; box-shadow: none; filter: none; }
  [data-cal-click]:hover { transform: none; box-shadow: none; }
  [onclick]:not(a):not(button):not(.icon-btn):hover { transform: none; }
  button:not(:disabled):hover { transform: none; }
}

/* ============ 移动端通用自适应（≤900px，仅移动端，不影响 PC） ============ */
@media (max-width: 900px) {
  /* 弹窗：近全屏、圆角收小 */
  .modal { max-width: 100% !important; max-height: 92vh; border-radius: 18px; }
  .modal-head { padding: 14px 16px; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  /* 表单输入：≥16px 防 iOS 聚焦自动缩放 */
  .input, .select, .textarea { font-size: 16px; }
  /* 触控目标：按钮/图标按钮 ≥ 40px */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .icon-btn { width: 36px; height: 36px; }
  /* 表格：顺滑横向滚动 */
  .table-wrap, .table-wrap.table-wrap-round { -webkit-overflow-scrolling: touch; }
  /* 工具条：搜索框占满一行 */
  .toolbar { gap: 8px; }
  .toolbar .search-box { max-width: none; flex: 1 1 100%; }
  /* 工具条：手机端允许换行（覆盖 PC 端单行 nowrap，避免横向溢出） */
  .toolbar[style*="nowrap"] { flex-wrap: wrap !important; }
  .toolbar input[type="date"].input { width: 130px !important; }
  /* 统计卡：2 列紧凑 */
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-card .stat-icon { width: 38px; height: 38px; border-radius: 10px; }
  .stat-card .stat-num { font-size: 20px; }
  .stat-card .stat-label { font-size: 12px; }
  /* 页头标题收小 */
  .page-head h2 { font-size: 18px; }
  .page-head p { font-size: 12.5px; }
  /* 卡片内边距收紧 */
  .card { padding: 14px 16px !important; }
  /* 表格：字体与内边距收小 */
  .table th, .table td { font-size: 13px; padding: 8px 8px; }
  .table .cell-strong { font-size: 13.5px; }
  /* 移动端：表格内联编辑控件（面试反馈等）触控友好，≥16px 防 iOS 缩放 */
  .table .input, .table .select, .table .textarea { font-size: 16px !important; min-height: 34px; }
  .table .select { padding-right: 26px; }
  /* 欢迎横幅：文字收小、内边距收紧 */
  .hero-banner { padding: 20px 18px; }
  .hero-banner .hero-text h2 { font-size: 19px; }
}
