:root {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-surface: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.88);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;

  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --accent: #059669;
  --accent-purple: #8b5cf6;
  --danger: #ef4444;
  --warning: #d97706;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --input-bg: rgba(241, 245, 249, 0.8);
  --terminal-bg: #f1f5f9;
  --terminal-text: #0284c7;
  --navbar-bg: rgba(255, 255, 255, 0.9);
  --modal-bg: #ffffff;
  --tag-bg: rgba(0, 0, 0, 0.05);
  --tag-text: #334155;
  --radial-1: rgba(59, 130, 246, 0.06);
  --radial-2: rgba(249, 115, 22, 0.05);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-surface: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.88);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;

  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --accent: #059669;
  --accent-purple: #8b5cf6;
  --danger: #ef4444;
  --warning: #d97706;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --input-bg: rgba(241, 245, 249, 0.8);
  --terminal-bg: #f1f5f9;
  --terminal-text: #0284c7;
  --navbar-bg: rgba(255, 255, 255, 0.9);
  --modal-bg: #ffffff;
  --tag-bg: rgba(0, 0, 0, 0.05);
  --tag-text: #334155;
  --radial-1: rgba(59, 130, 246, 0.06);
  --radial-2: rgba(249, 115, 22, 0.05);
}

[data-theme="dark"] {
  --bg-dark: #0a0e17;
  --bg-card: rgba(18, 25, 38, 0.75);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --bg-surface: rgba(30, 41, 59, 0.75);
  --card-bg: rgba(18, 25, 38, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --accent: #10b981;
  --accent-purple: #8b5cf6;
  --danger: #ef4444;
  --warning: #fbbf24;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --input-bg: rgba(15, 23, 42, 0.6);
  --terminal-bg: #06090e;
  --terminal-text: #38bdf8;
  --navbar-bg: rgba(10, 14, 23, 0.85);
  --modal-bg: #0f172a;
  --tag-bg: rgba(255, 255, 255, 0.06);
  --tag-text: #e2e8f0;
  --radial-1: rgba(59, 130, 246, 0.08);
  --radial-2: rgba(139, 92, 246, 0.08);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  background-image:
    radial-gradient(circle at 15% 15%, var(--radial-1) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, var(--radial-2) 0%, transparent 40%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
.navbar {
  height: 68px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text-medium,
.brand-text-short {
  display: none;
}

.brand-text-full {
  display: inline;
}

.brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.3));
}

.brand-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.nav-stats {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav-stats span b {
  color: var(--primary);
  font-size: 1rem;
}

/* 主题切换按钮 */
.theme-toggle-btn {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Container - 随浏览器窗口自适应，占据窗口 98% 宽度 */
.container {
  width: 98%;
  max-width: 98vw;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
  flex: 1;
}

/* Panels */
.grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1080px) {
  .grid-top {
    grid-template-columns: 1fr !important;
  }
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ingestion Control */
.input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 兼容浏览器自动填充，防止被强制设为白底黑字 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-main) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--tag-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.16);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 14px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  width: 0%;
  transition: width 0.3s ease;
}

.log-terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--terminal-text);
  margin-top: 10px;
  box-sizing: border-box;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* 默认单行极简状态 */
.log-terminal.is-compact {
  height: 34px;
  padding: 6px 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 展开多行状态 */
.log-terminal:not(.is-compact),
.log-terminal.is-expanded {
  height: 110px;
  padding: 10px 12px;
  overflow-y: auto;
  white-space: normal;
}

/* ==========================================================================
   Super Smart Search Console & High-impact UI
   ========================================================================== */
.super-search-console {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: calc(var(--radius-lg) + 6px);
  padding: 16px 20px 14px 20px;
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

[data-theme="dark"] .super-search-console {
  background: rgba(18, 25, 38, 0.85);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 0 28px rgba(59, 130, 246, 0.12);
}

/* 顶部流光氛围外边框（伪元素渐变光环） */
.super-search-console::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 8px);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.35));
  z-index: -1;
  opacity: 0.55;
  filter: blur(5px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.super-search-console:hover::before {
  opacity: 0.8;
  filter: blur(8px);
}

.super-search-console:focus-within::before {
  opacity: 1;
  filter: blur(10px);
}

.super-search-console:focus-within {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 18px 46px -10px rgba(37, 99, 235, 0.22), 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* 搜索大框容器 */
.search-box-large {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
}

/* 通用与大搜索框输入样式 */
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px 120px 16px 20px;
  font-size: 1.05rem;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
}

/* 首页高光大搜索框专有定制 */
.search-box-large .search-input {
  background: var(--bg-dark);
  border: 2px solid rgba(59, 130, 246, 0.28);
  border-radius: var(--radius-lg);
  padding: 17px 225px 17px 22px;
  /* 左侧自然内边距，右侧留出clear + kbd + btn */
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-main);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
}

[data-theme="dark"] .search-box-large .search-input {
  background: rgba(11, 17, 32, 0.7);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
}

.search-box-large .search-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 0.95rem;
}

.search-box-large .search-input:hover {
  border-color: rgba(59, 130, 246, 0.55);
}

.search-box-large .search-input:focus {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* 搜索框一键清除按钮 */
.search-clear-btn {
  position: absolute;
  right: 215px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--tag-bg);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 3;
}

.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  transform: translateY(-50%) scale(1.12);
}

/* 右侧操作组合 */
.search-action-group {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

/* 回车快捷键提示 */
.search-kbd-tag {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  letter-spacing: 0.3px;
}

/* 智能检索按钮 */
.search-btn-inside {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
}

.search-box-large .search-btn-inside {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  white-space: nowrap;
}

.search-box-large .search-btn-inside:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.search-box-large .search-btn-inside:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* 按钮前面的 AI 顾问头像图标 */
.search-btn-ai-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.search-box-large .search-btn-inside:hover .search-btn-ai-img {
  transform: scale(1.15) rotate(6deg);
}

.search-btn-icon {
  font-size: 1rem;
  display: inline-block;
  transition: transform 0.2s ease;
}

.search-box-large .search-btn-inside:hover .search-btn-icon {
  transform: scale(1.18);
}

/* 控制台底部多维检索模式说明栏 */
.search-console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 4px 6px 0 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.search-mode-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
  user-select: none;
}

.search-mode-tag .mode-icon {
  font-size: 0.85rem;
}

/* 响应式适配 */
@media (max-width: 820px) {
  .super-search-console {
    padding: 12px 14px;
  }

  .search-box-large .search-input {
    padding-left: 18px;
    padding-right: 175px;
    font-size: 0.95rem;
  }

  .search-clear-btn {
    right: 155px;
  }

  .search-kbd-tag {
    display: none;
  }

  .search-mode-tags {
    gap: 8px;
  }
}

@media (max-width: 580px) {
  .search-box-large .search-input {
    padding-right: 110px;
  }

  .search-clear-btn {
    right: 95px;
  }

  .search-btn-text {
    display: none;
  }

  .search-box-large .search-btn-inside {
    padding: 10px 14px;
  }
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.prompt-chip:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.prompt-chip.prompt-chip-add {
  border-style: dashed;
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.prompt-chip.prompt-chip-add:hover {
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.prompt-chip.prompt-chip-manage {
  cursor: default;
  border-color: rgba(99, 102, 241, 0.4);
  padding: 4px 6px 4px 12px;
  background: var(--bg-card);
}

.prompt-chip.prompt-chip-manage .prompt-chip-text {
  cursor: pointer;
}

.prompt-chip.prompt-chip-manage .prompt-chip-text:hover {
  color: var(--primary);
}

.prompt-chip-action-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.prompt-chip-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.prompt-chip-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.prompt-manage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  animation: fadeIn 0.2s ease;
}

/* Search History Section */
.search-history-section {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 6px;
  animation: fadeIn 0.2s ease-in;
}

.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.btn-clear-history {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-clear-history:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.search-history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-chip {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.history-chip:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.history-chip .chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  color: var(--text-dim);
  transition: all 0.15s;
  margin-left: 2px;
}

.history-chip .chip-del:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Intent badge banner */
.intent-banner {
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.85rem;
}

.intent-tag {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

/* Candidate Grid */
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
}

.candidate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.candidate-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-name-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-name-title .sub {
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.score-badge {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: inline-block;
  text-align: center;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* 首页最近候选人时间胶囊徽标与归属标签 */
.recent-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 16px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.recent-time-badge.time-updated {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.recent-time-badge.time-created {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.recent-owner-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-weight: 500;
  white-space: nowrap;
}

/* 首页最近候选人排序切换胶囊组 */
.recent-sort-pills {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.recent-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  user-select: none;
}

.recent-pill-btn:hover {
  color: var(--text-main);
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .recent-pill-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.recent-pill-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  font-weight: 600;
}

.pill-sort-arrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  min-width: 10px;
  text-align: center;
}

.recent-pill-btn:not(.active) .pill-sort-arrow {
  color: #64748b;
}

[data-theme="dark"] .recent-pill-btn:not(.active) .pill-sort-arrow {
  color: #94a3b8;
}

.recent-pill-btn.active .pill-sort-arrow {
  color: #ffffff;
}

.view-mode-btn .pill-sort-arrow {
  margin-left: 3px;
  font-weight: 700;
}

/* 首页管理角色联动包含团队复选框 */
.recent-team-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.recent-team-checkbox-label:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.recent-team-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* 首页检索模式徽标 */
.home-mode-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

/* 首页未登录引导卡片 */
.home-login-prompt-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.home-login-prompt-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.home-login-prompt-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.home-login-prompt-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.5;
}


/* 匹配度百分比色彩分级 */
/* 梯队 1: 极高匹配 (≥ 85%) - 翡翠绿 (精准命中/强烈推荐) */
.score-tier-perfect {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4) !important;
}

/* 梯队 2: 高度匹配 (70% - 84.9%) - 科技蓝 (职位契合/重点关注) */
.score-tier-high {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4) !important;
}

/* 梯队 3: 中度匹配 (58% - 69.9%) - 琥珀金/暖橙 (语义相关/潜质备选) */
.score-tier-medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4) !important;
}

/* 梯队 4: 基础匹配 (< 58%) - 冷岩灰 (低相似度/弱关联) */
.score-tier-low {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3) !important;
}

/* Candidate Card Note Badge */
.note-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tag-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1.2;
}

.note-badge-btn:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.note-badge-btn.has-notes {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 600;
}

[data-theme="dark"] .note-badge-btn.has-notes {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.note-badge-btn.has-notes:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--warning);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.link-btn-note {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.link-btn-note:hover {
  color: var(--primary);
  text-decoration: underline;
}

.link-btn-note.has-notes {
  color: #b45309;
  font-weight: 600;
}

[data-theme="dark"] .link-btn-note.has-notes {
  color: #fbbf24;
}

.candidate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

[data-theme="light"] .skill-tag:hover {
  border-color: #38bdf8;
  background: #e0f2fe;
  color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
}

[data-theme="dark"] .skill-tag:hover {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.skill-tag[data-has-custom-color="true"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25) !important;
}

/* 核心技能标签浮层交互面板 (SkillTagPopover) */
.skill-tag-popover {
  position: absolute;
  z-index: 10001;
  min-width: 250px;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  animation: skillPopoverFadeIn 0.18s ease-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
}

@keyframes skillPopoverFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.skill-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.skill-popover-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-popover-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.skill-popover-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.skill-popover-section-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.skill-color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: center;
}

.skill-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  padding: 0;
  outline: none;
  position: relative;
}

.skill-color-swatch:hover {
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.skill-color-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--primary), 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.12);
}

[data-theme="light"] .skill-color-swatch.is-active {
  border-color: #0f172a;
}

.skill-color-swatch .swatch-check {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.skill-color-swatch-default {
  background: var(--input-bg);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.skill-color-swatch-default:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.skill-popover-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
  cursor: pointer;
  transition: all 0.16s ease;
  box-sizing: border-box;
  margin-top: 4px;
}

[data-theme="dark"] .skill-popover-action-btn {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.skill-popover-action-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

/* 技能栈 AI 单独提炼与智能打标签按钮 */
.btn-ai-gen-skill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  border: 1px dashed var(--primary);
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}

.btn-ai-gen-skill:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.btn-ai-gen-skill:disabled {
  opacity: 0.65;
  cursor: wait;
  border-style: solid;
}

[data-theme="dark"] .btn-ai-gen-skill {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
  border-color: #6366f1;
}

[data-theme="dark"] .btn-ai-gen-skill:hover:not(:disabled) {
  background: #6366f1;
  color: #fff;
}

/* 候选人详情页核心技能栈「AI扩充 / AI生成」增强样式 */
.btn-ai-gen-skill.btn-ai-expand-detail {
  padding: 4px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.16));
  color: #4f46e5;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
  margin-left: 6px;
  letter-spacing: 0.3px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ai-gen-skill.btn-ai-expand-detail:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  border-color: #4f46e5;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.38);
}

.btn-ai-gen-skill.btn-ai-expand-detail:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .btn-ai-gen-skill.btn-ai-expand-detail {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.26));
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .btn-ai-gen-skill.btn-ai-expand-detail:hover:not(:disabled) {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.55);
}

.summary-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 候选人卡片底部多行优雅布局 */
.card-footer-multi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

/* 第一行：简历原件与下载按钮 */
.card-footer-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.card-file-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.card-file-info .file-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-download-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(59, 130, 246, 0.08);
}

.card-download-btn:hover {
  background: var(--primary-glow);
  text-decoration: underline;
  transform: translateY(-1px);
}

.card-download-btn.has-multi {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-weight: 600;
  color: var(--primary);
  padding: 2px 8px;
}

.card-download-btn.has-multi:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.card-preview-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  cursor: pointer;
}

.card-preview-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.card-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-download-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 2px;
  font-weight: 700;
  display: inline-block;
  line-height: 1.2;
}

.card-download-btn.has-multi:hover .card-download-badge {
  background: #ffffff;
  color: var(--primary);
}

/* 候选人列表视图 - 附件数量按钮与无附件状态标签（明暗双主题 WCAG AA 合规） */
.cand-attachment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.32);
  color: #1d4ed8;
  transition: all 0.18s ease;
}

.cand-attachment-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
}

.cand-attachment-btn:active {
  transform: translateY(0);
}

.cand-attachment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  line-height: 1;
}

.cand-attachment-btn:hover .cand-attachment-count {
  background: #ffffff;
  color: #1d4ed8;
}

.cand-attachment-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #475569;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.1);
  white-space: nowrap;
}

[data-theme="dark"] .cand-attachment-btn {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.36);
  color: #60a5fa;
}

[data-theme="dark"] .cand-attachment-btn:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

[data-theme="dark"] .cand-attachment-count {
  background: #3b82f6;
  color: #ffffff;
}

[data-theme="dark"] .cand-attachment-btn:hover .cand-attachment-count {
  background: #ffffff;
  color: #1d4ed8;
}

[data-theme="dark"] .cand-attachment-empty {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   Resume Download Selection Modal
   ========================================================================== */
.resume-download-modal-content {
  max-width: 580px;
  width: 92%;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .resume-download-modal-content {
  background: rgba(18, 25, 38, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.15);
}

.resume-download-modal-body {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
  margin-top: 14px;
}

.resume-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-download-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.resume-file-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.resume-file-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.resume-file-icon-box.pdf {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.resume-file-icon-box.docx,
.resume-file-icon-box.doc {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.resume-file-icon-box.excel {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.resume-file-icon-box.ppt {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.resume-file-icon-box.zip {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.resume-file-icon-box.video {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.resume-file-icon-box.audio {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

.resume-file-icon-box.img {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.resume-file-icon-box.txt {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.resume-file-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.resume-file-name-text {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-file-meta-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.resume-download-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.resume-download-action-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.resume-download-action-btn:active {
  transform: translateY(0);
}

.resume-download-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* 第二行：业务分析与操作工具栏 */
.card-footer-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-actions-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.card-actions-right {
  display: flex;
  align-items: center;
}

/* 诊断/AI分析胶囊按钮 */
.diag-card-btn {
  background: var(--tag-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.diag-card-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.diag-card-btn.diag-has-result {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
  font-weight: 600;
}

.diag-card-btn.diag-has-result:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* 备注药丸样式 */
.link-btn-note {
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.link-btn-note:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.link-btn-note.has-notes {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 600;
}

[data-theme="dark"] .link-btn-note.has-notes {
  color: #fbbf24;
}

.link-btn-note.has-notes:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* 面试药丸样式（首页候选人卡片底部） */
.link-btn-interview {
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.link-btn-interview:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.link-btn-interview.has-interviews {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.link-btn-interview.has-interviews:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .link-btn-interview.has-interviews {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(165, 180, 252, 0.4);
}

[data-theme="dark"] .link-btn-interview.has-interviews:hover {
  background: rgba(99, 102, 241, 0.32);
  border-color: #818cf8;
  color: #c7d2fe;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* 查看详情主操作按钮 */
.card-detail-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.card-detail-btn:hover {
  background: var(--primary-glow);
  transform: translateX(2px);
}

.link-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-content {
  background: var(--modal-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-main);
  transform: scale(1.05);
}

/* 候选人详情弹窗顶部栏：右侧预留安全间隙，避免操作按钮与右上角关闭X按钮靠太近导致误触 */
.cand-detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 12px;
  padding-right: 48px;
}


/* --- GEEKER-HH01 人才AI分析模块样式 --- */
.diagnosis-modal-content {
  max-width: 980px;
  width: 95%;
  max-height: 90vh;
  padding: 28px 36px;
}

/* 卡片诊断按钮与角标 */
.diag-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.diag-card-btn:hover {
  background: var(--primary-glow);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.diag-card-btn.diag-has-result {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}

.diag-card-btn.diag-has-result:hover {
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* 推荐级别标签 */
.diag-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.diag-level-strong {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.diag-level-good {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.diag-level-watch {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .diag-level-watch {
  color: #fbbf24;
}

.diag-level-not {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* 诊断头部区域 */
.diag-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-right: 44px;
}

.diag-header > div:first-child {
  flex: 1;
  min-width: 0;
}

.diag-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.diag-skill-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 500;
}

.diag-actions-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.diag-action-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  word-break: keep-all;
}

.diag-action-btn span {
  white-space: nowrap;
}

.diag-action-btn:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* 历史诊断切换提示横幅 */
.diag-history-banner {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

[data-theme="dark"] .diag-history-banner {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
  border-left-color: #60a5fa;
}

/* 历史诊断横幅中的职位匹配按钮 (饱满、高度提升、双主题对比度保证) */
.diag-banner-match-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.diag-banner-match-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.diag-banner-match-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .diag-banner-match-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.38);
}

[data-theme="dark"] .diag-banner-match-btn:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.55);
}

/* 核心价值与一句话结论大卡片 */
.diag-summary-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(16, 185, 129, 0.04));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.diag-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .diag-summary-row {
    grid-template-columns: 1fr;
  }
}

.diag-prop-box {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.diag-prop-box.prop-value {
  border-left: 4px solid #10b981;
}

.diag-prop-box.prop-risk {
  border-left: 4px solid #ef4444;
}

.diag-prop-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diag-prop-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
}

/* 人才AI分析 - 对标岗位与分析重点设定专属突出卡片 */
.diag-setup-card {
  position: relative;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.05) 0%, rgba(99, 102, 241, 0.03) 50%, rgba(16, 185, 129, 0.03) 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -2px rgba(37, 99, 235, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

[data-theme="dark"] .diag-setup-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.12);
}

.diag-setup-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

/* 独立的醒目输入框容器 */
.diag-field-block {
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(37, 99, 235, 0.22);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .diag-field-block {
  background: rgba(18, 25, 38, 0.9);
  border-color: rgba(59, 130, 246, 0.32);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.diag-field-block:hover {
  border-color: rgba(37, 99, 235, 0.45);
}

[data-theme="dark"] .diag-field-block:hover {
  border-color: rgba(59, 130, 246, 0.55);
}

.diag-field-block:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 4px 16px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

[data-theme="dark"] .diag-field-block:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28), 0 4px 18px rgba(59, 130, 246, 0.2);
}

.diag-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.diag-field-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.diag-field-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
}

.diag-badge-target {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .diag-badge-target {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.diag-badge-context {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .diag-badge-context {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

/* 高对比度与醒目输入控件 */
.diag-prominent-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--modal-bg, #ffffff);
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .diag-prominent-input {
  background: rgba(11, 17, 32, 0.92);
  border-color: #334155;
  color: #f1f5f9;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.diag-prominent-input::placeholder {
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 400;
}

[data-theme="dark"] .diag-prominent-input::placeholder {
  color: #64748b;
}

.diag-prominent-input:hover {
  border-color: #93c5fd;
}

[data-theme="dark"] .diag-prominent-input:hover {
  border-color: #60a5fa;
}

.diag-prominent-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

[data-theme="dark"] .diag-prominent-input:focus {
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

/* 快捷推荐标签行 */
.diag-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.diag-chips-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.diag-chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.18);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.diag-chip-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

[data-theme="dark"] .diag-chip-btn {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .diag-chip-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* 目标岗位三合一选择与输入组件样式 */
.diag-role-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diag-sub-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diag-sub-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.diag-sub-icon {
  font-size: 0.95rem;
}

.diag-sub-text {
  color: var(--text-main);
  font-weight: 600;
}

.diag-sub-tag {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .diag-sub-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.diag-job-select-control {
  width: 100%;
  box-sizing: border-box;
  background: var(--modal-bg, #ffffff);
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .diag-job-select-control {
  background: rgba(11, 17, 32, 0.92);
  border-color: #334155;
  color: #f1f5f9;
}

.diag-job-select-control:hover {
  border-color: #93c5fd;
}

[data-theme="dark"] .diag-job-select-control:hover {
  border-color: #60a5fa;
}

.diag-job-select-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

[data-theme="dark"] .diag-job-select-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.diag-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.diag-role-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.25);
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}

.diag-role-clear-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.diag-chip-candidate {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  font-weight: 600 !important;
}

[data-theme="dark"] .diag-chip-candidate {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.diag-chip-candidate:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

/* 对标职位输入条（通用保留） */
.diag-target-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  background: var(--tag-bg);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.diag-target-input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.diag-target-input:focus {
  border-color: var(--primary);
}

/* 导航 Tabs */
.diag-nav-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
}

.diag-nav-tab {
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.diag-nav-tab:hover {
  color: var(--primary);
}

.diag-nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Markdown 与富文本展示美化 */
.diag-markdown-content {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-main);
}

.diag-markdown-content h1,
.diag-markdown-content h2,
.diag-markdown-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 700;
}

.diag-markdown-content h1 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.diag-markdown-content h2 {
  font-size: 1.2rem;
  color: var(--primary);
}

.diag-markdown-content h3 {
  font-size: 1.02rem;
}

.diag-markdown-content p {
  margin-bottom: 12px;
}

.diag-markdown-content ul,
.diag-markdown-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.diag-markdown-content li {
  margin-bottom: 6px;
}

.diag-markdown-content blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(59, 130, 246, 0.05);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: var(--text-muted);
}

/* 诊断表格与沟通作战地图表格 */
.diag-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0 24px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.diag-table th {
  background: var(--tag-bg);
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border-subtle);
}

.diag-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.diag-table tr:last-child td {
  border-bottom: none;
}

.diag-table tr:hover td {
  background: rgba(59, 130, 246, 0.02);
}

/* 实战话术单元格与复制按钮 */
.script-cell-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.script-text {
  font-style: italic;
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.04);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
  flex: 1;
}

.btn-copy-script {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-copy-script:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 加载动画 */
.diag-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
  text-align: center;
}

.diag-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: diag-spin 1s linear infinite;
}

@keyframes diag-spin {
  to {
    transform: rotate(360deg);
  }
}

.diag-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 380px;
  text-align: left;
}

.diag-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-step-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* ========================================================
   候选人 AI 诊断与全维职位匹配工作台 (4大模式 & 流式打字机)
   ======================================================== */

.cand-match-hub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 4大对标模式 Tabs 切换栏 */
.cand-match-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.cand-match-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cand-match-tab-btn:hover {
  color: var(--text-main);
  background: var(--tag-bg);
}

.cand-match-tab-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .cand-match-tab-btn.active {
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

/* 模式内容面板 */
.cand-match-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 多职位模式下的职位勾选列表 */
.cand-job-pick-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cand-job-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--bg-card);
  transition: all 0.15s ease;
}

.cand-job-pick-item:hover {
  border-color: var(--primary);
  background: var(--tag-bg);
}

.cand-job-pick-item.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .cand-job-pick-item.selected {
  background: rgba(59, 130, 246, 0.16);
}

/* 匹配职位推荐卡片列表 */
.cand-matched-job-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.cand-matched-job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.cand-matched-job-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

[data-theme="dark"] .cand-matched-job-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* 匹配得分圆形徽标 */
.cand-matched-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 68px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 700;
  text-align: center;
}

/* 85% 及以上 高度契合 (绿色) */
.cand-score-high {
  background: rgba(4, 120, 87, 0.1);
  color: #047857;
  border: 2px solid #047857;
}
[data-theme="dark"] .cand-score-high {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: #34d399;
}

/* 70%-84% 良好契合 (蓝色) */
.cand-score-mid {
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  border: 2px solid #1d4ed8;
}
[data-theme="dark"] .cand-score-mid {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border-color: #60a5fa;
}

/* 70% 以下 局部契合 (琥珀橙) */
.cand-score-low {
  background: rgba(180, 83, 9, 0.08);
  color: #b45309;
  border: 2px solid #b45309;
}
[data-theme="dark"] .cand-score-low {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: #fbbf24;
}

.cand-matched-score-num {
  font-size: 1.25rem;
  line-height: 1;
}

.cand-matched-score-label {
  font-size: 0.65rem;
  margin-top: 3px;
  opacity: 0.9;
}

/* 职位元信息标签组 */
.cand-matched-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.cand-matched-tag {
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.cand-matched-overlap-tag {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 500;
}
[data-theme="dark"] .cand-matched-overlap-tag {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

/* 确保候选人录入弹窗与职位编辑弹窗能够盖在AI对标工作台（z-index: 1000）之上 */
#candidate-modal,
#job-modal {
  z-index: 1080;
}

/* 候选人对标工作台职位标题链接 */
.cand-single-job-title-link {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.cand-single-job-title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* 行内职位快速编辑按钮 */
.btn-job-edit-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card, var(--tag-bg));
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.btn-job-edit-inline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow, rgba(37, 99, 235, 0.08));
}

/* 描述修改微型快捷链接 */
.cand-job-edit-link {
  font-size: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cand-job-edit-link:hover {
  text-decoration: underline;
}

/* 流式打字机实时控制台 */
.diag-stream-console {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
}

[data-theme="dark"] .diag-stream-console {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.diag-stream-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--tag-bg);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.diag-stream-content-box {
  padding: 22px 26px 45px 26px;
  min-height: 280px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-main);
  position: relative;
  scroll-behavior: smooth;
}

/* 打字机闪烁光标 */
.diag-typewriter-cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  vertical-align: -0.18em;
  background-color: var(--primary);
  margin-left: 3px;
  animation: diagTypewriterBlink 0.85s infinite;
  border-radius: 1px;
}

@keyframes diagTypewriterBlink {
  0%, 45% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

/* 诊断报告大纲章节标题锚点 */
.diag-sec-heading {
  scroll-margin-top: 14px;
}

/* 标题标签导航条 (TOC Bar) */
.diag-toc-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--tag-bg);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.diag-toc-bar::-webkit-scrollbar {
  height: 4px;
}

.diag-toc-bar::-webkit-scrollbar-track {
  background: transparent;
}

.diag-toc-bar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.diag-toc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.diag-toc-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.diag-toc-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

[data-theme="dark"] .diag-toc-chip {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="dark"] .diag-toc-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
  color: #93c5fd;
}

[data-theme="dark"] .diag-toc-chip.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* 右下角悬浮回到顶部按钮 (Scroll To Top) */
.diag-scroll-top-btn {
  position: absolute;
  right: 20px;
  bottom: 24px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.diag-scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.diag-scroll-top-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-2px);
}

.diag-scroll-top-btn:active {
  transform: translateY(0);
}

[data-theme="dark"] .diag-scroll-top-btn {
  background: rgba(30, 41, 59, 0.9);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .diag-scroll-top-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* 全局 Toast (置顶居中，彻底避免与右下角 AI 顾问悬浮球/聊天窗口重叠) */
.toast-message {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  display: none;
  z-index: 100000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  max-width: 90vw;
  white-space: nowrap;
  animation: toast-in-top 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-message.toast-error {
  background: rgba(153, 27, 27, 0.92);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 12px 32px rgba(185, 28, 28, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toast-message.toast-success {
  background: rgba(6, 78, 59, 0.92);
  border-color: rgba(16, 185, 129, 0.4);
}

@keyframes toast-in-top {
  from {
    opacity: 0;
    transform: translate(-50%, -16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}


/* ========================================================
   用户管理与认证模块 (User Management & Auth Modal)
   ======================================================== */

/* 顶部导航栏用户状态 */
.user-auth-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-login-trigger {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}

[data-theme="dark"] .user-login-trigger {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

.user-login-trigger .login-text-full {
  display: inline;
}

.user-login-trigger .login-text-short {
  display: none;
}

.user-login-trigger:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 4px 12px 4px 5px;
  font-size: 0.82rem;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  user-select: none;
  cursor: pointer;
}

.user-profile-pill:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.user-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease;
}

.user-avatar-wrap:hover {
  transform: scale(1.05);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-avatar-placeholder {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-avatar-edit-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 0.75rem;
}

.user-avatar-wrap:hover .user-avatar-edit-badge {
  opacity: 1;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}

.user-name-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.user-title-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role-badge {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.user-profile-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
  margin: 0 2px;
}

.user-logout-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.user-logout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* 用户下拉菜单组件 */
.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-dropdown-arrow {
  font-size: 0.68rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
  margin-left: 2px;
  line-height: 1;
  display: inline-block;
}

.user-dropdown-arrow.open {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.45);
  padding: 8px;
  z-index: 1000;
  backdrop-filter: blur(16px);
  animation: dropdownFadeIn 0.16s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 8px 10px 6px;
}

.user-dropdown-header-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-header-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
}

.user-dropdown-item-icon {
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-dropdown-item-content {
  flex: 1;
  overflow: hidden;
}

.user-dropdown-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-dropdown-item-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-item-arrow {
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: transform 0.15s ease;
}

.user-dropdown-item:hover .user-dropdown-item-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.user-dropdown-item.user-dropdown-item-logout {
  color: #dc2626;
}

.user-dropdown-item.user-dropdown-item-logout .user-dropdown-title-logout {
  color: #dc2626;
}

.user-dropdown-item.user-dropdown-item-logout:hover {
  background: rgba(239, 68, 68, 0.08);
}

.user-dropdown-item.user-dropdown-item-logout:hover .user-dropdown-title-logout,
.user-dropdown-item.user-dropdown-item-logout:hover .user-dropdown-item-arrow {
  color: #b91c1c !important;
}

[data-theme="dark"] .user-dropdown-item.user-dropdown-item-logout {
  color: #f87171;
}

[data-theme="dark"] .user-dropdown-item.user-dropdown-item-logout .user-dropdown-title-logout {
  color: #f87171;
}

[data-theme="dark"] .user-dropdown-item.user-dropdown-item-logout:hover {
  background: rgba(239, 68, 68, 0.16);
}

[data-theme="dark"] .user-dropdown-item.user-dropdown-item-logout:hover .user-dropdown-title-logout,
[data-theme="dark"] .user-dropdown-item.user-dropdown-item-logout:hover .user-dropdown-item-arrow {
  color: #fca5a5 !important;
}

/* 微信客服与关于奇客卡片弹窗样式 */
.info-card-modal-content {
  max-width: 440px;
  width: 92%;
  padding: 24px 26px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
}

.info-modal-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.info-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.qr-code-wrapper {
  display: inline-block;
  padding: 10px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.qr-code-img {
  width: 200px;
  height: 200px;
  display: block;
  object-fit: contain;
}

.about-company-logo {
  max-width: 220px;
  max-height: 80px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.about-website-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--primary-glow);
  transition: all 0.2s ease;
}

.about-website-link:hover {
  text-decoration: underline;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* 个人资料编辑模态弹窗 */
.profile-modal-content {
  max-width: 520px;
  width: 94%;
  padding: 24px 28px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
}

.profile-modal-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.profile-avatar-preview-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-avatar-preview-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.profile-avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.profile-avatar-preview-wrap:hover .profile-avatar-hover-overlay {
  opacity: 1;
}

.profile-avatar-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-avatar-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-avatar-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.profile-preset-avatars-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.profile-preset-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-preset-avatars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-avatar-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.preset-avatar-btn:hover {
  transform: scale(1.15);
  border-color: var(--primary);
}

.preset-avatar-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.title-chip-btn {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.title-chip-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.profile-field-hint {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}

.profile-notify-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .profile-notify-card {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="dark"] .profile-notify-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
}

.profile-notify-info {
  flex: 1;
  min-width: 0;
}

.profile-notify-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.profile-notify-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.gm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.gm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.gm-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .gm-switch-slider {
  background-color: #64748b;
}

[data-theme="dark"] .gm-switch-slider {
  background-color: #64748b;
}

.gm-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  transition: transform 0.2s ease;
}

.gm-switch input:checked + .gm-switch-slider {
  background-color: var(--primary);
}

.gm-switch input:checked + .gm-switch-slider::before {
  transform: translateX(20px);
}

.gm-switch input:focus-visible + .gm-switch-slider {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

[data-theme="light"] #profile-modal input:-webkit-autofill,
[data-theme="light"] #profile-modal input:-webkit-autofill:hover,
[data-theme="light"] #profile-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
  -webkit-text-fill-color: #0f172a !important;
}

[data-theme="dark"] #profile-modal input:-webkit-autofill,
[data-theme="dark"] #profile-modal input:-webkit-autofill:hover,
[data-theme="dark"] #profile-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
  -webkit-text-fill-color: #f8fafc !important;
}

/* 认证模态弹窗 */
.auth-modal-content {
  max-width: 480px;
  width: 92%;
  padding: 24px 28px 28px 28px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.auth-modal-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  padding-right: 44px;
  /* 预留右上角关闭按钮安全间距，避免与关闭图标重叠 */
}

.auth-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  padding-bottom: 6px;
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.auth-tab-btn:hover {
  color: var(--primary);
  background: var(--primary-glow);
}

.auth-tab-btn.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-bottom: 2px solid var(--primary);
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-alert.info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 后台用户管理表格状态徽章 */
.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.user-status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .user-status-pending {
  color: #fbbf24;
}

.user-status-approved {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .user-status-approved {
  color: #34d399;
}

.user-status-rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.user-status-disabled {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* ========================================================
   招聘工作台全新多菜单导航与自适应布局 (98% 视口流式响应)
   ======================================================== */

.app-layout {
  display: flex;
  min-height: calc(100vh - 68px);
  width: 100%;
  position: relative;
}

/* 左侧经典折叠侧边栏 */
.app-sidebar {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  background: var(--navbar-bg);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  z-index: 90;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

/* 折叠小图标模式 (68px) */
.app-sidebar.collapsed {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
}

.app-sidebar.collapsed .sidebar-brand-text,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .nav-badge,
.app-sidebar.collapsed .sidebar-version {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 16px 0;
}

.app-sidebar.collapsed .sidebar-brand-info {
  display: none;
}

.app-sidebar.collapsed .sidebar-toggle-btn {
  transform: none;
}

.app-sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 12px 0;
}

.app-sidebar.collapsed .sidebar-nav-item .nav-icon {
  font-size: 1.3rem;
  margin: 0;
}

.app-sidebar.collapsed .sidebar-footer-link {
  justify-content: center;
  padding: 12px 0;
}

.app-sidebar.collapsed .sidebar-footer-link .nav-icon {
  font-size: 1.3rem;
  margin: 0;
}

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
}

.sidebar-brand-icon {
  font-size: 1.15rem;
}

.sidebar-toggle-btn {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: var(--primary);
}

/* 侧边栏导航列表 */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background: var(--tag-bg);
  color: var(--text-main);
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}

.sidebar-nav-item .nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
}

.sidebar-nav-item.active .nav-badge {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-footer .sidebar-nav-item {
  width: 100%;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar-footer-link:hover {
  color: var(--text-main);
  background: var(--tag-bg);
  transform: translateX(2px);
}

.sidebar-footer-link .nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-version {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
  padding: 0 4px;
}

.sidebar-version-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  outline: none;
}

.sidebar-version-btn .version-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.sidebar-version-btn:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sidebar-version-btn:active {
  transform: translateY(0);
}

/* 右侧主工作区 */
.app-main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
}

/* 视图切换动画 */
.workspace-view {
  display: none;
  animation: viewFadeIn 0.25s ease-out;
}

.workspace-view.active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 视图顶部通栏 */
.view-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.view-header-bar > div:first-child {
  min-width: 240px;
  flex: 1 1 300px;
}

.view-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.view-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.view-actions {
  display: flex;
  gap: 8px 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* 全局表格自定义显示列按钮与容器防折断/防竖向排版保护 */
[id^="col-customizer-"],
.col-customizer-wrap {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.btn-col-customizer {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.btn-col-customizer > span {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0 !important;
}

@media (max-width: 1200px) {
  .view-header-bar {
    gap: 12px;
  }

  .view-header-bar > div:first-child {
    width: 100%;
    flex: 0 0 100%;
  }

  .view-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 工作台表格卡片与多维表 */
.workbench-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  margin-bottom: 24px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.workbench-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.workbench-table th {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

[data-theme="dark"] .workbench-table th {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .workbench-table th {
  background: rgba(0, 0, 0, 0.04);
}

/* 可排序表头统一样式（明暗双主题 WCAG AA 对比度合规） */
th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.16s ease, color 0.16s ease;
  outline: none;
}

[data-theme="light"] th.sortable-th {
  color: #334155;
}

[data-theme="dark"] th.sortable-th {
  color: #cbd5e1;
}

[data-theme="light"] th.sortable-th:hover,
[data-theme="light"] th.sortable-th:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: #0f172a;
}

[data-theme="dark"] th.sortable-th:hover,
[data-theme="dark"] th.sortable-th:focus-visible {
  background: rgba(59, 130, 246, 0.14);
  color: #f8fafc;
}

[data-theme="light"] th.sortable-th.sort-active {
  background: rgba(37, 99, 235, 0.11);
  color: #1d4ed8;
}

[data-theme="dark"] th.sortable-th.sort-active {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.sortable-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  min-width: 12px;
  transition: color 0.16s ease, transform 0.16s ease;
}

[data-theme="light"] th.sortable-th .sort-indicator {
  color: #64748b;
}

[data-theme="dark"] th.sortable-th .sort-indicator {
  color: #94a3b8;
}

[data-theme="light"] th.sortable-th:hover .sort-indicator {
  color: #1d4ed8;
}

[data-theme="dark"] th.sortable-th:hover .sort-indicator {
  color: #93c5fd;
}

[data-theme="light"] th.sortable-th.sort-active .sort-indicator {
  color: #1d4ed8;
}

[data-theme="dark"] th.sortable-th.sort-active .sort-indicator {
  color: #60a5fa;
}

.workbench-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

/* 表格数据行手势与过渡动画 */
.workbench-table tbody tr,
.table-container table tbody tr {
  transition: background-color 0.15s ease;
}

.workbench-table tbody tr.clickable-row,
.table-container table tbody tr.clickable-row {
  cursor: pointer;
}

/* 隔行换色（斑马纹）：对非表头过滤行、非空数据提示行的偶数行应用微弱底色 */
.workbench-table tbody tr:not(.table-filter-row):not(.table-empty-row):nth-child(even),
.table-container table tbody tr:not(.table-filter-row):not(.table-empty-row):nth-child(even) {
  background-color: rgba(0, 0, 0, 0.022);
}

[data-theme="dark"] .workbench-table tbody tr:not(.table-filter-row):not(.table-empty-row):nth-child(even),
[data-theme="dark"] .table-container table tbody tr:not(.table-filter-row):not(.table-empty-row):nth-child(even) {
  background-color: rgba(255, 255, 255, 0.022);
}

/* 鼠标悬浮整行高亮 (Hover Highlight) */
.workbench-table tbody tr.clickable-row:hover,
.table-container table tbody tr.clickable-row:hover,
.workbench-table tbody tr:not(.table-filter-row):not(.table-empty-row):hover,
.table-container table tbody tr:not(.table-filter-row):not(.table-empty-row):hover {
  background-color: rgba(37, 99, 235, 0.06) !important;
}

[data-theme="dark"] .workbench-table tbody tr.clickable-row:hover,
[data-theme="dark"] .table-container table tbody tr.clickable-row:hover,
[data-theme="dark"] .workbench-table tbody tr:not(.table-filter-row):not(.table-empty-row):hover,
[data-theme="dark"] .table-container table tbody tr:not(.table-filter-row):not(.table-empty-row):hover {
  background-color: rgba(59, 130, 246, 0.09) !important;
}

/* 操作列与内嵌交互控件光标状态保持自然 */
.table-col-actions,
.row-actions-group,
.action-btn-group {
  cursor: default;
}

#candidates-table th:last-child,
#candidates-table td.table-col-actions,
#jobs-table th:last-child,
#jobs-table td.table-col-actions {
  min-width: 180px;
}

.row-btn,
.row-btn-gear,
.btn-act,
.btn,
a,
input,
select,
textarea {
  cursor: pointer;
}

/* 表头过滤筛选行 */
.table-filter-row td {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid var(--border-subtle);
}

[data-theme="dark"] .table-filter-row td {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .table-filter-row td {
  background: rgba(0, 0, 0, 0.02);
}

.table-filter-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.table-filter-input:focus {
  border-color: var(--primary);
}

.btn-table-action {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-table-action:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: var(--primary-glow);
}

/* 行内操作按钮组 */
.row-actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 2x2 规整微质感操作网格规范 */
#candidates-table .row-actions-group,
#jobs-table .row-actions-group,
.row-actions-group.grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
  justify-items: stretch;
  align-items: center;
}

#candidates-table .row-actions-group .row-btn,
#candidates-table .row-actions-group .row-btn-gear,
#jobs-table .row-actions-group .row-btn,
#jobs-table .row-actions-group .row-btn-gear,
.row-actions-group.grid-2x2 .row-btn,
.row-actions-group.grid-2x2 .row-btn-gear {
  width: 100%;
  height: 26px;
  padding: 0 4px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 4px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

#jobs-table .row-actions-group .row-btn-gear {
  grid-column: span 2;
}

.row-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.row-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.row-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.row-btn-primary:hover {
  background: #2563eb;
  color: #fff;
}

.row-btn-accent {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .row-btn-accent {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.row-btn-accent:hover {
  background: #10b981;
  color: #fff;
}

.row-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.row-btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

/* 齿轮操作按钮 */
.row-btn-gear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.row-btn-gear:hover,
.row-btn-gear.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* 统一表格行内操作齿轮下拉菜单 (基于固定视口定位，解决表格容器 overflow 截断问题) */
.table-action-dropdown {
  position: fixed;
  min-width: 136px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.45);
  padding: 5px;
  z-index: 1050;
  backdrop-filter: blur(16px);
  animation: dropdownFadeIn 0.15s ease-out;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="light"] .table-action-dropdown {
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.14), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
  border-color: #e2e8f0;
}

.table-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.table-action-item:hover {
  background: var(--bg-card-hover, rgba(148, 163, 184, 0.12));
  color: var(--primary);
}

.table-action-item.danger {
  color: #ef4444;
}

.table-action-item.danger:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

[data-theme="light"] .table-action-item.danger {
  color: #dc2626;
}

[data-theme="light"] .table-action-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.table-action-item.success {
  color: #10b981;
}

.table-action-item.success:hover {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

[data-theme="light"] .table-action-item.success {
  color: #047857;
}

[data-theme="light"] .table-action-item.success:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.table-action-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 3px 0;
}

/* 分页控件条 */
.workbench-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-btn {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn:not(:disabled):hover {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.page-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.page-size-select {
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
}

/* 职位、候选人与面试工具栏与状态药丸 */
.jobs-toolbar,
.candidates-toolbar,
.interviews-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.jobs-status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-pill:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.status-pill.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.jobs-search-wrap {
  width: 320px;
}

.jobs-search-wrap .search-input {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.88rem;
}

/* 职位状态徽章 */
.job-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.job-status-open {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .job-status-open {
  color: #34d399;
}

.job-status-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .job-status-paused {
  color: #fbbf24;
}

.job-status-closed {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

[data-theme="dark"] .job-status-closed {
  color: #94a3b8;
}

/* 职位弹窗与候选人录入弹窗 */
.candidate-modal-content,
.job-modal-content {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.job-match-modal-content {
  max-width: 920px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.job-match-results-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

/* 职位智能人岗匹配卡片 */
.job-match-card {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: all 0.2s ease;
}

.job-match-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.job-match-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.job-match-score-num {
  font-size: 1.35rem;
  line-height: 1;
}

.job-match-score-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================
   职位智能匹配前置配置弹窗与选项样式
   ======================================================== */
.job-match-config-content {
  max-width: 740px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 28px;
  transition: min-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* 当指定候选人下拉列表弹出展开时，拉高弹窗高度以便一次性展示更多候选人 */
.job-match-config-content.dropdown-expanded {
  min-height: min(740px, 86vh);
}

.job-match-info-strip {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

[data-theme="dark"] .job-match-info-strip {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(99, 102, 241, 0.28);
  color: #94a3b8;
}

.job-match-info-strip strong {
  color: var(--text-main);
}

[data-theme="dark"] .job-match-info-strip strong {
  color: #f1f5f9;
}

.job-match-mode-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 0 16px;
  background: var(--input-bg);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.job-match-tab-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.job-match-tab-btn:hover {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.08);
}

.job-match-tab-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.job-match-panel {
  margin-top: 4px;
}

.job-match-radio-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.match-radio-label,
.match-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-main);
  user-select: none;
}

.match-radio-label input[type="radio"],
.match-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.match-cand-search-wrap {
  position: relative;
  width: 100%;
}

.match-cand-search-wrap input {
  width: 100%;
  height: 40px;
  padding: 8px 36px 8px 12px;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.match-cand-arrow-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 2;
}

.match-cand-arrow-btn:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.match-cand-arrow-btn.open .match-cand-arrow-icon {
  transform: rotate(180deg);
}

.match-cand-arrow-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.match-cand-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  z-index: 60;
  transition: max-height 0.25s ease;
}

/* 弹窗高度拉高时，同步扩充候选人下拉列表的最大高度 */
.job-match-config-content.dropdown-expanded .match-cand-dropdown {
  max-height: min(450px, calc(86vh - 280px));
}

.match-cand-dropdown-header {
  padding: 8px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 10px;
  flex-wrap: wrap;
}

.match-cand-batch-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-cand-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.match-cand-checkbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--primary);
}

.match-cand-dropdown-footer {
  padding: 8px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 全库推荐：核心技能标签药丸交互组件 */
.match-skills-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.match-skills-actions {
  display: flex;
  gap: 6px;
}

.match-skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  min-height: 32px;
}

.match-skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
}

.match-skill-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.match-skill-pill.selected {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.4);
  font-weight: 600;
}

[data-theme="dark"] .match-skill-pill.selected {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border-color: rgba(99, 102, 241, 0.45);
}

.match-skills-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.match-skills-add-row input {
  flex: 1;
  max-width: 260px;
  height: 32px;
  font-size: 0.8rem;
  padding: 4px 10px;
}

.match-cand-item {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.match-cand-item:last-child {
  border-bottom: none;
}

.match-cand-item:hover {
  background: var(--bg-card-hover);
}

.match-cand-item.selected {
  background: rgba(99, 102, 241, 0.08);
}

[data-theme="dark"] .match-cand-item.selected {
  background: rgba(99, 102, 241, 0.18);
}

.match-cand-time-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  font-weight: 500;
}

[data-theme="dark"] .match-cand-time-badge {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

.match-selected-cands-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 20px;
}

.match-cand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-size: 0.82rem;
  font-weight: 600;
  animation: fadeIn 0.2s ease;
}

[data-theme="dark"] .match-cand-pill {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.35);
}

.match-cand-pill-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.match-cand-pill-close:hover {
  background: #ef4444;
  color: #ffffff;
}

.job-match-config-badge-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.job-match-config-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  padding: 3px 9px;
  border-radius: 12px;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .job-match-config-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.38);
}

/* 单人深度人岗报告流式展示盒 */
.job-match-deep-report-box {
  margin-top: 14px;
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary);
}

[data-theme="dark"] .job-match-deep-report-box {
  background: rgba(30, 41, 59, 0.4);
}

/* ========================================================
   面试安排与多维反馈模块 (Interviews Module)
   ======================================================== */

.interview-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.interview-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interview-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.interview-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.interview-stat-card.recommended::before {
  background: #8b5cf6;
}

.interview-stat-card.today::before {
  background: #3b82f6;
}

.interview-stat-card.scheduled::before {
  background: #f59e0b;
}

.interview-stat-card.pending::before {
  background: #8b5cf6;
}

.interview-stat-card.passed::before {
  background: #10b981;
}

.interview-stat-card.rejected::before {
  background: #ef4444;
}

.interview-stat-card .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.interview-stat-card.recommended .stat-number {
  color: #8b5cf6;
}

.interview-stat-card.today .stat-number {
  color: #3b82f6;
}

.interview-stat-card.scheduled .stat-number {
  color: #b45309;
}

[data-theme="dark"] .interview-stat-card.scheduled .stat-number {
  color: #fbbf24;
}

.interview-stat-card.pending .stat-number {
  color: #7c3aed;
}

[data-theme="dark"] .interview-stat-card.pending .stat-number {
  color: #a78bfa;
}

.interview-stat-card.passed .stat-number {
  color: #047857;
}

[data-theme="dark"] .interview-stat-card.passed .stat-number {
  color: #34d399;
}

.interview-stat-card.rejected .stat-number {
  color: #ef4444;
}

.interview-stat-card .stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.interviews-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* 面试安排列表可点击实体链接 (候选人与在招职位) */
.interview-candidate-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.18s ease;
}

.interview-candidate-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.interview-job-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.18s ease;
}

.interview-job-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* 轮次标签 */
.interview-round-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}

/* 形式标签 */
.interview-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  margin-left: 4px;
}

/* 状态徽章 */
.interview-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.interview-status-recommended {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.interview-status-scheduled {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .interview-status-scheduled {
  color: #fbbf24;
}

.interview-status-pending_feedback {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

[data-theme="dark"] .interview-status-pending_feedback {
  color: #a78bfa;
}

.interview-status-passed {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .interview-status-passed {
  color: #34d399;
}

.interview-status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .interview-status-rejected {
  color: #f87171;
}

.interview-status-cancelled {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

[data-theme="dark"] .interview-status-cancelled {
  color: #94a3b8;
}

/* 今日面试预警高亮 */
.interview-today-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: #ef4444;
  color: #fff;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 3px;
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.03);
  }
}

/* 面试安排列表 - 邮件提醒投递状态胶囊 (双主题高对比度) */
.interview-email-status-row {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.interview-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: help;
}

[data-theme="light"] .interview-email-pill.is-sent {
  background: rgba(5, 150, 105, 0.12);
  color: #065f46;
  border: 1px solid rgba(5, 150, 105, 0.32);
}

[data-theme="dark"] .interview-email-pill.is-sent {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .interview-email-pill.is-pending {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .interview-email-pill.is-pending {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .interview-email-pill.is-failed {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.32);
}

[data-theme="dark"] .interview-email-pill.is-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

[data-theme="light"] .interview-email-pill.is-skipped,
[data-theme="light"] .interview-email-pill.is-disabled {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.28);
}

[data-theme="dark"] .interview-email-pill.is-skipped,
[data-theme="dark"] .interview-email-pill.is-disabled {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.32);
}

/* 推荐评级标签 */
.rating-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rating-strong {
  background: rgba(234, 179, 8, 0.18);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.rating-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.rating-hold {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.rating-reject {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* 联想搜索下拉列表 */
.cand-options-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  margin-top: 4px;
}

.cand-option-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.cand-option-item:hover {
  background: var(--tag-bg);
}

.cand-option-item:last-child {
  border-bottom: none;
}

.selected-entity-card {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- 面试时间强调与彩色大选择器控件 --- */
.interview-time-group {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.04) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
}

.interview-key-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.15));
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.interview-time-preview-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 10px;
  border-radius: 12px;
}

.interview-time-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.interview-time-highlight-input {
  width: 330px;
  max-width: 100%;
  height: 54px;
  line-height: 54px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.8px;
  color: var(--primary);
  background: var(--bg-card);
  border: 2px solid rgba(59, 130, 246, 0.45);
  border-radius: var(--radius-md);
  padding: 0 16px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08);
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-family: inherit;
  margin: 0 auto;
}

.interview-time-highlight-input:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

.interview-time-highlight-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow), 0 6px 20px rgba(37, 99, 235, 0.18);
}

/* 居中日期时间各组成部分 */
.interview-time-highlight-input::-webkit-datetime-edit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-weight: 700;
}

.interview-time-highlight-input::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 放大、生动的彩色日历时间选择器图标 */
.interview-time-highlight-input::-webkit-calendar-picker-indicator {
  width: 28px;
  height: 28px;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='cal' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%232563eb'/%3E%3Cstop offset='100%25' stop-color='%238b5cf6'/%3E%3C/linearGradient%3E%3ClinearGradient id='clk' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23f59e0b'/%3E%3Cstop offset='100%25' stop-color='%23ef4444'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='3' y='4' width='18' height='17' rx='3.5' fill='url(%23cal)'/%3E%3Cpath d='M3 9h18' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='7.5' cy='6.5' r='1' fill='%23ffffff'/%3E%3Ccircle cx='16.5' cy='6.5' r='1' fill='%23ffffff'/%3E%3Crect x='6' y='12' width='3' height='3' rx='0.8' fill='rgba(255,255,255,0.9)'/%3E%3Crect x='10.5' y='12' width='3' height='3' rx='0.8' fill='rgba(255,255,255,0.9)'/%3E%3Ccircle cx='17' cy='17' r='5' fill='url(%23clk)' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpolyline points='17,14.5 17,17 18.8,17' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-size: 26px 26px;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
  filter: drop-shadow(0 2px 5px rgba(37, 99, 235, 0.35));
}

.interview-time-highlight-input::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.22);
  background-color: rgba(59, 130, 246, 0.12);
  filter: drop-shadow(0 3px 8px rgba(139, 92, 246, 0.5));
}

/* 快捷预设排期时间胶囊 */
.interview-time-quick-presets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preset-time-chip {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.preset-time-chip:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* 轮次自动推导徽章 */
.interview-round-auto-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

/* 快捷填入标签组 */
.interview-round-tags-wrap {
  padding: 8px 12px;
  background: var(--tag-bg);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
}

.round-tags-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.round-tags-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.round-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.round-tag-chip {
  padding: 3px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 500;
}

.round-tag-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.round-tag-chip.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(139, 92, 246, 0.15));
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}


.ai-feedback-box {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
}

.ai-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#btn-trigger-ai-summary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
  font-weight: 600;
  transition: all 0.2s ease;
}

[data-theme="dark"] #btn-trigger-ai-summary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.25) 100%);
  color: #a5b4fc;
  border-color: rgba(139, 92, 246, 0.45);
}

#btn-trigger-ai-summary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-1px);
}

#btn-trigger-ai-summary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ai-summary-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  min-height: 80px;
  max-height: 240px;
  overflow-y: auto;
}

/* 反馈概要条 */
.feedback-summary-bar {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
}

/* 弹窗宽度微调 */
.interview-modal-content {
  max-width: 660px;
  width: 92%;
}

/* ---------------------------------------------------------
   候选人录入、面试安排与职位管理弹窗同行化布局 (Horizontal Inline Form Layout)
   --------------------------------------------------------- */
.interview-form-row,
.job-form-row,
.candidate-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.interview-form-row.align-top,
.job-form-row.align-top,
.candidate-form-row.align-top {
  align-items: flex-start;
}

.interview-form-row.align-top .interview-row-label,
.job-form-row.align-top .job-row-label,
.candidate-form-row.align-top .candidate-row-label {
  padding-top: 7px;
}

.interview-row-label,
.job-row-label,
.candidate-row-label {
  width: 96px;
  min-width: 96px;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
  flex-shrink: 0;
  box-sizing: border-box;
}

.interview-row-content,
.job-row-content,
.candidate-row-content {
  flex: 1;
  min-width: 0;
  position: relative;
}

.interview-row-content input[type="text"],
.interview-row-content input[type="number"],
.interview-row-content select,
.job-row-content input[type="text"],
.job-row-content input[type="number"],
.job-row-content select,
.candidate-row-content input[type="text"],
.candidate-row-content input[type="number"],
.candidate-row-content input[type="email"],
.candidate-row-content select {
  height: 40px;
  padding: 8px 12px;
  font-size: 0.9rem;
  box-sizing: border-box;
  width: 100%;
}

.interview-row-content textarea,
.job-row-content textarea,
.candidate-row-content textarea {
  padding: 8px 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  box-sizing: border-box;
  width: 100%;
}

/* 轮次与形式 / 部门与城市双列拆分并排行 */
.interview-form-split-row,
.job-form-split-row,
.candidate-form-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.interview-split-col,
.job-split-col,
.candidate-split-col {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* 候选人录入查重预警横幅与错误提示明暗双主题对齐 */
#cand-form-dup-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

[data-theme="dark"] #cand-form-dup-banner {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

#cand-form-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.28);
  color: #b91c1c;
}

[data-theme="dark"] #cand-form-error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* 职位表单底部元数据只读展示框 */
#job-form-meta-row {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

#job-form-meta-row input[readonly] {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: default;
  font-size: 0.88rem;
  font-weight: 500;
  user-select: text;
}

[data-theme="dark"] #job-form-meta-row input[readonly] {
  background: rgba(30, 41, 59, 0.4);
  border-color: var(--border-subtle);
  color: #94a3b8;
}

/* 职位列表表格中的项目成员胶囊徽章 */
.member-tag-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 1px 6px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 4px;
  white-space: nowrap;
}

[data-theme="dark"] .member-tag-pill {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.35);
}

/* 紧凑版快捷填入标签栏 */
.interview-round-tags-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.round-tags-compact-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 薪资范围同行紧凑容器 */
.job-salary-range-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 360px;
  width: 100%;
}

/* 表单行内 AI 辅助生成按钮 (AI Generation Inline Button) */
.btn-ai-gen-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md, 6px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-ai-gen-inline:hover:not(:disabled) {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}

.btn-ai-gen-inline:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ai-gen-inline:disabled {
  opacity: 0.65;
  cursor: wait;
  border-color: var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-dim);
}

/* 紧凑小号变体 (用于说明栏/标题栏右侧及表格单元格操作) */
.btn-ai-gen-inline.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm, 4px);
}

#jobs-table td .btn-ai-gen-inline.btn-sm {
  height: 26px;
  padding: 0 8px;
  font-size: 0.74rem;
  box-shadow: none;
}

/* 暗黑主题对齐 */
[data-theme="dark"] .btn-ai-gen-inline {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.45);
}

[data-theme="dark"] .btn-ai-gen-inline:hover:not(:disabled) {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .btn-ai-gen-inline:disabled {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-dim);
  border-color: var(--border-subtle);
}

/* 职位描述 Markdown 编辑/预览切换 Tabs */
.job-desc-tab-group {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.job-desc-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.job-desc-tab-btn:hover {
  color: var(--text-main);
}

.job-desc-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .job-desc-tab-btn.active {
  background: var(--bg-card);
  color: #818cf8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 职位描述 Markdown 格式化预览容器 */
.job-desc-markdown-preview {
  width: 100%;
  min-height: 175px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 6px);
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.75;
  box-sizing: border-box;
  word-break: break-word;
}

.job-desc-markdown-preview h1,
.job-desc-markdown-preview h2,
.job-desc-markdown-preview h3 {
  margin-top: 14px;
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 700;
}

.job-desc-markdown-preview h1 {
  font-size: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.job-desc-markdown-preview h2 {
  font-size: 1.12rem;
  color: var(--primary);
}

[data-theme="dark"] .job-desc-markdown-preview h2 {
  color: #818cf8;
}

.job-desc-markdown-preview h3 {
  font-size: 1.02rem;
}

.job-desc-markdown-preview p {
  margin: 0 0 8px 0;
}

.job-desc-markdown-preview b,
.job-desc-markdown-preview strong {
  font-weight: 700;
  color: var(--text-main);
}

.job-desc-markdown-preview li {
  margin-left: 20px;
  margin-bottom: 4px;
  color: var(--text-main);
  list-style-type: disc;
}

.job-desc-markdown-preview hr {
  border: 0;
  border-top: 1px dashed var(--border-subtle);
  margin: 14px 0;
}

.job-desc-markdown-preview blockquote {
  border-left: 3px solid var(--primary);
  margin: 8px 0;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.05);
  color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}

[data-theme="dark"] .job-desc-markdown-preview blockquote {
  border-left-color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  color: #cbd5e1;
}

.job-desc-markdown-preview .empty-placeholder {
  color: var(--text-dim);
  font-style: italic;
  padding: 35px 10px;
  text-align: center;
}

/* 响应式断点适配 */
@media (max-width: 580px) {
  .interview-form-row,
  .job-form-row,
  .candidate-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .interview-row-label,
  .job-row-label,
  .candidate-row-label {
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  .interview-form-split-row,
  .job-form-split-row,
  .candidate-form-split-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.interview-feedback-modal-content {
  max-width: 760px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
}

/* 快速查看面试弹窗样式 */
.quick-interviews-modal-content {
  max-width: 840px;
  width: 95%;
  max-height: 86vh;
  overflow-y: auto;
}

/* 职位列表表格中的「推荐候选人」药丸徽章 */
.job-cand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.job-cand-badge:hover {
  transform: translateY(-1px);
}

.job-cand-badge.active {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.job-cand-badge.active:hover {
  background: rgba(245, 158, 11, 0.22);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .job-cand-badge.active {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
}
[data-theme="dark"] .job-cand-badge.active:hover {
  background: rgba(245, 158, 11, 0.32);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.job-cand-badge.idle {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.job-cand-badge.idle:hover {
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .job-cand-badge.idle {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.4);
}
[data-theme="dark"] .job-cand-badge.idle:hover {
  background: rgba(99, 102, 241, 0.28);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.job-cand-badge.none {
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px dashed var(--border-subtle);
  font-weight: 500;
}
.job-cand-badge.none:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--input-bg);
}

/* 职位推荐候选人全流程追踪模态弹窗 */
.job-cand-modal-content {
  max-width: 860px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
}

/* 状态筛选 Tab 栏 */
.job-cand-filter-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

.job-cand-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.job-cand-tab:hover {
  color: var(--text-main);
}
.job-cand-tab.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .job-cand-tab.active {
  background: var(--bg-card);
  color: #818cf8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 候选人聚合卡片列表 */
.job-candidates-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-cand-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px 20px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.job-cand-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .job-cand-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* 候选人状态大徽章 */
.job-cand-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.job-cand-status-pill.status-active {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .job-cand-status-pill.status-active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.job-cand-status-pill.status-passed {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
[data-theme="dark"] .job-cand-status-pill.status-passed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.job-cand-status-pill.status-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
[data-theme="dark"] .job-cand-status-pill.status-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.job-cand-status-pill.status-recommended {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
[data-theme="dark"] .job-cand-status-pill.status-recommended {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
}

/* 历史轮次展开抽屉 */
.job-cand-rounds-drawer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-cand-round-item {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.quick-interviews-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interview-timeline-card {
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.interview-timeline-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
}

.interview-timeline-card.recommended {
  border-left-color: #8b5cf6;
}

.interview-timeline-card.scheduled {
  border-left-color: #f59e0b;
}

.interview-timeline-card.pending_feedback {
  border-left-color: #8b5cf6;
}

.interview-timeline-card.passed {
  border-left-color: #10b981;
}

.interview-timeline-card.rejected {
  border-left-color: #ef4444;
}

.interview-timeline-card.cancelled {
  border-left-color: #94a3b8;
}

.interview-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.interview-timeline-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.interview-timeline-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  margin-top: 4px;
  font-size: 0.82rem;
}

/* 表格内高亮徽章与面试状态胶囊 */
.row-btn-has-active {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #b45309 !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .row-btn-has-active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  margin-left: 4px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.row-badge.active {
  background: #f59e0b;
  color: #fff;
  border-color: #d97706;
}

.interview-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.interview-counter-pill:hover {
  transform: scale(1.04);
}

.interview-counter-pill.active {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.interview-counter-pill.passed {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.interview-counter-pill.recommended {
  background: rgba(139, 92, 246, 0.16);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.interview-counter-pill.idle {
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

/* 模态弹窗双模式切换左右大卡片选择器 */
.interview-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 4px;
}

.mode-tab-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--tag-bg);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

.mode-tab-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(37, 99, 235, 0.04);
  transform: translateY(-1px);
}

.mode-tab-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mode-tab-content {
  flex: 1;
  min-width: 0;
}

.mode-tab-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.mode-tab-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.2;
}

.mode-tab-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 激活选中态 - 左右状态极其鲜明突出 */
.mode-tab-card.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
}

.mode-tab-card.active .mode-tab-icon {
  background: var(--primary-glow);
  transform: scale(1.06);
}

.mode-tab-card.active .mode-tab-title {
  color: var(--primary);
  font-weight: 700;
}

.mode-tab-card.active .mode-tab-desc {
  color: var(--primary);
  opacity: 0.88;
  font-weight: 500;
}

.mode-tab-card.active .mode-tab-radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px var(--bg-card);
}

/* 兼容旧版分段切换类 */
.modal-segmented-switch {
  display: flex;
  gap: 12px;
}

.modal-segmented-switch .segmented-btn {
  flex: 1;
}

/* ======================================================== */
/* AI 猎头招聘智能体 - 全局悬浮球与卡片式聊天窗口样式 */
/* ======================================================== */

.ai-chat-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.ai-chat-fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.ai-chat-fab:active {
  transform: translateY(0) scale(0.96);
}

.ai-chat-fab-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.6);
  animation: fabPulse 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes fabPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.18);
    opacity: 0;
  }

  100% {
    transform: scale(1.24);
    opacity: 0;
  }
}

.ai-chat-fab-icon {
  font-size: 1.45rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-fab-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: block;
}

.ai-chat-fab-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.ai-chat-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.48);
  z-index: 3;
  cursor: pointer;
}

.ai-chat-fab.has-reminders.tier-1h .ai-chat-fab-pulse {
  border-color: rgba(239, 68, 68, 0.92);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
  animation-duration: 1.25s;
}

.ai-chat-fab.has-reminders.tier-3h .ai-chat-fab-pulse {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
  animation-duration: 1.7s;
}

.ai-chat-fab.has-reminders.tier-24h .ai-chat-fab-pulse {
  border-color: rgba(59, 130, 246, 0.85);
}

/* 登录态右下角 AI 面试日程提醒悬浮卡 */
.ai-reminder-popover {
  position: fixed;
  right: 26px;
  bottom: 94px;
  width: 372px;
  max-width: calc(100vw - 32px);
  z-index: 9997;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  animation: windowSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .ai-reminder-popover {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="dark"] .ai-reminder-popover {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.ai-reminder-popover.tier-1h {
  border-top: 3px solid #dc2626;
}

.ai-reminder-popover.tier-3h {
  border-top: 3px solid #d97706;
}

.ai-reminder-popover.tier-24h {
  border-top: 3px solid #2563eb;
}

.ai-reminder-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .ai-reminder-popover-header {
  background: #f8fafc;
}

[data-theme="dark"] .ai-reminder-popover-header {
  background: rgba(30, 41, 59, 0.85);
}

.ai-reminder-popover-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.ai-reminder-popover-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-reminder-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ai-reminder-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  transition: all 0.15s ease;
}

[data-theme="light"] .ai-reminder-icon-btn:hover,
[data-theme="light"] .ai-reminder-icon-btn:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-theme="dark"] .ai-reminder-icon-btn:hover,
[data-theme="dark"] .ai-reminder-icon-btn:focus-visible {
  background: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.45);
}

.ai-reminder-popover-body {
  padding: 12px 14px;
}

.ai-rem-top-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.ai-rem-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

[data-theme="light"] .ai-rem-tier-badge.tier-1h {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .ai-rem-tier-badge.tier-1h {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.42);
}

[data-theme="light"] .ai-rem-tier-badge.tier-3h {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.32);
}

[data-theme="dark"] .ai-rem-tier-badge.tier-3h {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.42);
}

[data-theme="light"] .ai-rem-tier-badge.tier-24h {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .ai-rem-tier-badge.tier-24h {
  background: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.42);
}

.ai-rem-countdown {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.ai-rem-cand-line {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.35;
}

.ai-rem-cand-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.ai-rem-job-line {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ai-rem-meta-box {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-main);
}

[data-theme="light"] .ai-rem-meta-box {
  background: #f8fafc;
}

[data-theme="dark"] .ai-rem-meta-box {
  background: rgba(30, 41, 59, 0.55);
}

.ai-rem-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-rem-meta-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.71rem;
  font-weight: 600;
  background: var(--tag-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.ai-rem-link {
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

[data-theme="light"] .ai-rem-link {
  color: #1d4ed8;
}

[data-theme="light"] .ai-rem-link:hover,
[data-theme="light"] .ai-rem-link:focus-visible {
  color: #1e3a8a;
}

[data-theme="dark"] .ai-rem-link {
  color: #60a5fa;
}

[data-theme="dark"] .ai-rem-link:hover,
[data-theme="dark"] .ai-rem-link:focus-visible {
  color: #93c5fd;
}

.ai-reminder-popover-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 0 14px 12px 14px;
}

.ai-rem-btn {
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

[data-theme="light"] .ai-rem-btn-secondary {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .ai-rem-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="dark"] .ai-rem-btn-secondary {
  background: rgba(51, 65, 85, 0.7);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

[data-theme="dark"] .ai-rem-btn-secondary:hover {
  background: rgba(71, 85, 105, 0.9);
  color: #ffffff;
}

[data-theme="light"] .ai-rem-btn-ai {
  background: rgba(109, 40, 217, 0.1);
  color: #5b21b6;
  border: 1px solid rgba(109, 40, 217, 0.28);
}

[data-theme="light"] .ai-rem-btn-ai:hover {
  background: rgba(109, 40, 217, 0.18);
  color: #4c1d95;
}

[data-theme="dark"] .ai-rem-btn-ai {
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.42);
}

[data-theme="dark"] .ai-rem-btn-ai:hover {
  background: rgba(139, 92, 246, 0.35);
  color: #ffffff;
}

.ai-rem-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
}

.ai-rem-btn-primary:hover,
.ai-rem-btn-primary:focus-visible {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.ai-rem-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* AI 主窗口内部独立面试提醒折叠横幅 (不影响消息流与历史记录) */
.ai-chat-reminder-banner {
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

[data-theme="light"] .ai-chat-reminder-banner {
  background: #eff6ff;
}

[data-theme="dark"] .ai-chat-reminder-banner {
  background: rgba(30, 58, 138, 0.24);
}

.ai-chat-rem-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.78rem;
  color: var(--text-main);
}

.ai-chat-rem-summary-text {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-rem-toggle-btn {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .ai-chat-rem-toggle-btn {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

[data-theme="light"] .ai-chat-rem-toggle-btn:hover,
[data-theme="light"] .ai-chat-rem-toggle-btn:focus-visible {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}

[data-theme="dark"] .ai-chat-rem-toggle-btn {
  background: rgba(15, 23, 42, 0.75);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .ai-chat-rem-toggle-btn:hover,
[data-theme="dark"] .ai-chat-rem-toggle-btn:focus-visible {
  background: rgba(30, 41, 59, 0.95);
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.6);
}

.ai-chat-rem-expanded-list {
  max-height: 175px;
  overflow-y: auto;
  padding: 0 14px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-chat-rem-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.76rem;
}

.ai-chat-rem-mini-info {
  min-width: 0;
  flex: 1;
}

.ai-chat-rem-mini-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ai-chat-rem-mini-btn {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

[data-theme="light"] .ai-chat-rem-mini-btn:not(.primary) {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

[data-theme="light"] .ai-chat-rem-mini-btn:not(.primary):hover,
[data-theme="light"] .ai-chat-rem-mini-btn:not(.primary):focus-visible {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-theme="dark"] .ai-chat-rem-mini-btn:not(.primary) {
  background: rgba(51, 65, 85, 0.78);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="dark"] .ai-chat-rem-mini-btn:not(.primary):hover,
[data-theme="dark"] .ai-chat-rem-mini-btn:not(.primary):focus-visible {
  background: rgba(71, 85, 105, 0.95);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.5);
}

.ai-chat-rem-mini-btn.primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.ai-chat-rem-mini-btn.primary:hover,
.ai-chat-rem-mini-btn.primary:focus-visible {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* 浮动聊天窗口 */
.ai-chat-window {
  position: fixed;
  right: 26px;
  bottom: 94px;
  z-index: 9998;
  width: 440px;
  height: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: windowSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: width 0.25s ease, height 0.25s ease, transform 0.25s ease;
}

@keyframes windowSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 最大化全屏扩展态 */
.ai-chat-window.maximized {
  width: 780px;
  height: 84vh;
}

/* 窗口头部 */
.ai-chat-header {
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  overflow: hidden;
  padding: 2px;
}

.ai-avatar-badge-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.ai-online-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  animation: dotBlink 2s infinite ease-in-out;
}

@keyframes dotBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-header-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.ai-header-btn:hover {
  background: var(--tag-bg);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.ai-header-btn svg {
  display: block;
  pointer-events: none;
}

/* 消息流转展示区 */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

/* 欢迎卡片 */
.ai-welcome-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.05));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-main);
}

.ai-welcome-box h4 {
  font-size: 0.98rem;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
}

.ai-welcome-box p {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}

/* 消息气泡卡片 */
.ai-message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ai-message-row.user {
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.ai-msg-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.ai-welcome-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  margin-right: 4px;
}

.ai-message-row.user .ai-msg-avatar {
  background: var(--primary);
  color: #fff;
}

.ai-message-row.assistant .ai-msg-avatar {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 1px;
}

.ai-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
  border-radius: 12px;
}

.ai-message-row.user .ai-msg-bubble {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.ai-message-row.assistant .ai-msg-bubble {
  background: var(--tag-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 14px 14px 14px 2px;
}

.ai-msg-bubble pre {
  margin: 8px 0;
}

.ai-msg-bubble p:last-child {
  margin-bottom: 0;
}

/* 打字机光标脉动 */
.ai-typing-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: typingCursor 0.75s infinite ease-in-out;
}

@keyframes typingCursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* 快捷提示词横向滚动条 */
.ai-quick-prompts-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  flex-shrink: 0;
  overflow: hidden;
}

.ai-prompts-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  user-select: none;
  padding: 0;
}

.ai-prompts-scroll-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.ai-prompts-scroll-btn.left {
  left: 4px;
}

.ai-prompts-scroll-btn.right {
  right: 4px;
}

.ai-quick-prompts-bar {
  display: flex;
  gap: 8px;
  padding: 8px 14px 10px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  flex: 1;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
  -webkit-overflow-scrolling: touch;
}

.ai-quick-prompts-bar::-webkit-scrollbar {
  height: 4px;
}

.ai-quick-prompts-bar::-webkit-scrollbar-track {
  background: transparent;
}

.ai-quick-prompts-bar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.ai-quick-prompts-bar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.ai-prompt-pill {
  white-space: nowrap;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  flex-shrink: 0;
}

[data-theme="light"] .ai-prompt-pill {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .ai-prompt-pill:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

[data-theme="dark"] .ai-prompt-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

[data-theme="dark"] .ai-prompt-pill:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #60a5fa;
  transform: translateY(-1px);
}

/* 底部输入框 */
.ai-chat-footer {
  padding: 10px 14px 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  flex-shrink: 0;
}

.ai-chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 10px 8px 14px;
  transition: all 0.2s ease;
}

[data-theme="light"] .ai-chat-input-wrapper {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .ai-chat-input-wrapper:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .ai-chat-input-wrapper {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ai-chat-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.ai-chat-input-wrapper textarea,
#ai-chat-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  max-height: 110px;
  padding: 6px 8px 6px 8px !important;
  margin: 0 !important;
  font-family: inherit;
}

.ai-chat-input-wrapper textarea:focus,
#ai-chat-input:focus {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.ai-chat-input-wrapper textarea::placeholder,
#ai-chat-input::placeholder {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.ai-chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.ai-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 停止生成模式按键样式 */
.ai-chat-send-btn.stop-mode {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: ai-stop-pulse 1.8s infinite ease-in-out;
}

.ai-chat-send-btn.stop-mode:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.6);
}

@keyframes ai-stop-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

.ai-chat-input-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0 4px;
  align-items: center;
}

.ai-generating-text {
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.ai-stop-pill-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
}

.ai-stop-pill-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ======================================================== */
/* AI 顾问 - 关联候选人与职位实体样式 */
/* ======================================================== */

/* 当前打开对象感知横幅 */
.ai-active-entity-banner {
  margin: 0 16px 8px 16px;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  animation: fadeIn 0.25s ease-in-out;
}

.ai-active-entity-info {
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-active-entity-info b {
  color: var(--primary);
}

.ai-active-entity-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-active-entity-btn:hover {
  background: var(--primary-hover, #4338ca);
  transform: translateY(-1px);
}

/* 挂载对象标签栏 (更突出背景与舒适高度、大字体排版) */
.ai-attached-context-bar {
  margin: 0 14px 10px 14px;
  padding: 8px 12px;
  min-height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

[data-theme="light"] .ai-attached-context-bar {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95), rgba(248, 250, 252, 0.9));
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .ai-attached-context-bar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ai-attached-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.ai-attached-tags-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.2s ease-in;
  max-width: calc(100% - 10px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-entity-tag span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .ai-entity-tag.candidate {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
}

[data-theme="dark"] .ai-entity-tag.candidate {
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
}

[data-theme="light"] .ai-entity-tag.job {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

[data-theme="dark"] .ai-entity-tag.job {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.ai-entity-tag-remove {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  opacity: 0.75;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

.ai-entity-tag-remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.ai-attach-trigger-btn {
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .ai-attach-trigger-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .ai-attach-trigger-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

[data-theme="dark"] .ai-attach-trigger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ai-attach-trigger-btn:hover {
  border-color: #3b82f6;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

/* 实体搜索快捷下拉浮层 (明暗双主题全面对齐) */
.ai-entity-search-popover {
  position: absolute;
  bottom: 135px;
  left: 16px;
  right: 16px;
  background: var(--modal-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  animation: slideUpFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

[data-theme="light"] .ai-entity-search-popover {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .ai-entity-search-popover {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-entity-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

[data-theme="light"] .ai-entity-popover-header {
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .ai-entity-popover-header {
  background: rgba(15, 23, 42, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ai-entity-popover-tabs {
  display: flex;
  gap: 6px;
}

.ai-entity-scope-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

[data-theme="light"] .ai-entity-scope-tabs {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

[data-theme="dark"] .ai-entity-scope-tabs {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.ai-entity-scope-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 2px 7px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="light"] .ai-entity-scope-btn {
  color: #475569;
}

[data-theme="light"] .ai-entity-scope-btn:hover {
  color: #0f172a;
}

[data-theme="light"] .ai-entity-scope-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .ai-entity-scope-btn {
  color: #94a3b8;
}

[data-theme="dark"] .ai-entity-scope-btn:hover {
  color: #f8fafc;
}

[data-theme="dark"] .ai-entity-scope-btn.active {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 实体关系与权限徽章 */
.ai-entity-badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

/* 我的 (Owner) */
[data-theme="light"] .ai-entity-badge-tag.owner {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .ai-entity-badge-tag.owner {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* 协作 (Member) */
[data-theme="light"] .ai-entity-badge-tag.member {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .ai-entity-badge-tag.member {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* 管辖 (Subordinate) */
[data-theme="light"] .ai-entity-badge-tag.subordinate {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

[data-theme="dark"] .ai-entity-badge-tag.subordinate {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* 公司 (Colleague) */
[data-theme="light"] .ai-entity-badge-tag.colleague {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme="dark"] .ai-entity-badge-tag.colleague {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-entity-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.15s;
}

[data-theme="light"] .ai-entity-tab:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .ai-entity-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.ai-entity-tab.active {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
}

.ai-entity-popover-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

[data-theme="light"] .ai-entity-popover-close:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .ai-entity-popover-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ai-entity-search-box {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .ai-entity-search-box {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .ai-entity-search-box {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ai-entity-search-box input {
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.ai-entity-search-box input::placeholder {
  color: var(--text-dim);
}

[data-theme="light"] .ai-entity-search-box input {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .ai-entity-search-box input::placeholder {
  color: #64748b;
}

[data-theme="light"] .ai-entity-search-box input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .ai-entity-search-box input {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

[data-theme="dark"] .ai-entity-search-box input::placeholder {
  color: #64748b;
}

[data-theme="dark"] .ai-entity-search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.ai-entity-search-results {
  overflow-y: auto;
  max-height: 220px;
  padding: 6px 8px;
}

.ai-entity-search-empty {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ai-entity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 4px;
}

[data-theme="light"] .ai-entity-item:hover,
[data-theme="light"] .ai-entity-item.selected {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .ai-entity-item:hover,
[data-theme="dark"] .ai-entity-item.selected {
  background: rgba(59, 130, 246, 0.18);
}

.ai-entity-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.ai-entity-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

[data-theme="light"] .ai-entity-item.candidate .ai-entity-item-icon {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #6d28d9;
}

[data-theme="dark"] .ai-entity-item.candidate .ai-entity-item-icon {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

[data-theme="light"] .ai-entity-item.job .ai-entity-item-icon {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
}

[data-theme="dark"] .ai-entity-item.job .ai-entity-item-icon {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.ai-entity-item-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-entity-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .ai-entity-item-title {
  color: #0f172a;
}

[data-theme="light"] .ai-entity-item-desc {
  color: #475569;
}

[data-theme="dark"] .ai-entity-item-title {
  color: #f8fafc;
}

[data-theme="dark"] .ai-entity-item-desc {
  color: #94a3b8;
}

.ai-entity-item-action {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 8px;
  transition: all 0.15s;
}

[data-theme="light"] .ai-entity-item-action {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .ai-entity-item-action {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
}

/* 消息气泡内的关联徽章展示 */
.ai-msg-attached-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.ai-msg-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.ai-msg-badge.candidate {
  background: rgba(139, 92, 246, 0.25);
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.ai-msg-badge.job {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* --- 候选人画像详情与基本信息编辑区 --- */
.candidate-basic-info-box {
  background: var(--tag-bg);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
  transition: all 0.25s ease;
}

.candidate-basic-info-box.editing {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
}

.candidate-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  font-size: 0.9rem;
}

.candidate-edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.candidate-edit-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.candidate-edit-field input,
.candidate-edit-field select,
.candidate-edit-field textarea {
  padding: 9px 12px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.candidate-edit-field input:focus,
.candidate-edit-field select:focus,
.candidate-edit-field textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.work-exp-edit-item {
  padding: 18px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .work-exp-edit-item {
  background: rgba(30, 41, 59, 0.65);
  border: 1.5px solid #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.work-exp-edit-item:hover {
  border-color: #94a3b8;
}

[data-theme="dark"] .work-exp-edit-item:hover {
  border-color: #475569;
}

/* 高对比度输入控件 - 彻底解决输入框与背景过于接近、不易分辨可输入区域的问题 */
.work-exp-edit-item .candidate-edit-field input,
.work-exp-edit-item .candidate-edit-field select,
.work-exp-edit-item .candidate-edit-field textarea {
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  color: #0f172a !important;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
  font-size: 0.9rem;
  padding: 9px 12px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .work-exp-edit-item .candidate-edit-field input,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field select,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field textarea {
  background: #0f172a !important;
  border: 1.5px solid #475569 !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset;
}

.work-exp-edit-item .candidate-edit-field input:hover,
.work-exp-edit-item .candidate-edit-field select:hover,
.work-exp-edit-item .candidate-edit-field textarea:hover {
  border-color: #475569 !important;
}

[data-theme="dark"] .work-exp-edit-item .candidate-edit-field input:hover,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field select:hover,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field textarea:hover {
  border-color: #94a3b8 !important;
}

.work-exp-edit-item .candidate-edit-field input:focus,
.work-exp-edit-item .candidate-edit-field select:focus,
.work-exp-edit-item .candidate-edit-field textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
  background: #ffffff !important;
}

[data-theme="dark"] .work-exp-edit-item .candidate-edit-field input:focus,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field select:focus,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field textarea:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
  background: #0b1120 !important;
}

/* 占位符颜色高对比度适配 */
.work-exp-edit-item .candidate-edit-field input::placeholder,
.work-exp-edit-item .candidate-edit-field textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="dark"] .work-exp-edit-item .candidate-edit-field input::placeholder,
[data-theme="dark"] .work-exp-edit-item .candidate-edit-field textarea::placeholder {
  color: #64748b !important;
}

/* 字段标签强化 */
.work-exp-edit-item .candidate-edit-label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-main);
  margin-bottom: 6px;
  display: block;
}

/* 日历月份选择控件专属美化与主题对齐 */
.exp-calendar-input {
  cursor: pointer;
  color-scheme: light;
}

[data-theme="dark"] .exp-calendar-input {
  color-scheme: dark;
}

.exp-calendar-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  background-size: 18px 18px;
  transition: transform 0.15s ease;
  filter: drop-shadow(0 1px 2px rgba(37, 99, 235, 0.2));
}

.exp-calendar-input::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.18);
}

/* ========================================================
   自定义年月选择器弹窗组件 (Custom Month / Year Picker Popover)
   ======================================================== */
.custom-month-input-wrap {
  position: relative;
  width: 100%;
}

.custom-month-input {
  padding-right: 32px !important;
  cursor: pointer;
}

.custom-month-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
  pointer-events: auto;
  user-select: none;
}

.custom-month-icon:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}

.custom-month-picker-popover {
  position: fixed;
  width: 260px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100060;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-main, #1e293b);
  display: none;
  animation: cmp-fade-in 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: hidden;
}

[data-theme="dark"] .custom-month-picker-popover {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
  color: #f1f5f9;
}

@keyframes cmp-fade-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cmp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .cmp-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: #334155;
}

.cmp-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted, #64748b);
  transition: all 0.15s ease;
}

.cmp-nav-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  border-color: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .cmp-nav-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.cmp-title-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main, #0f172a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

[data-theme="dark"] .cmp-title-btn {
  color: #f8fafc;
}

.cmp-title-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  border-color: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .cmp-title-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.cmp-arrow-down,
.cmp-arrow-up {
  font-size: 0.68rem;
  opacity: 0.7;
}

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
}

.cmp-grid-item {
  height: 38px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .cmp-grid-item {
  color: #cbd5e1;
}

.cmp-grid-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .cmp-grid-item:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.cmp-grid-item.is-selected {
  background: var(--primary, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-glow, rgba(37, 99, 235, 0.35));
  border-color: var(--primary, #2563eb) !important;
}

.cmp-grid-item.is-current:not(.is-selected) {
  border: 1.5px solid var(--primary, #2563eb);
  color: var(--primary, #2563eb);
  font-weight: 600;
}

[data-theme="dark"] .cmp-grid-item.is-current:not(.is-selected) {
  border-color: #60a5fa;
  color: #93c5fd;
}

.cmp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .cmp-footer {
  background: rgba(255, 255, 255, 0.02);
  border-top-color: #334155;
}

.cmp-footer-btn {
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.cmp-clear-btn {
  color: var(--text-muted, #64748b);
}

.cmp-clear-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.cmp-today-btn {
  color: var(--primary, #2563eb);
}

.cmp-today-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

[data-theme="dark"] .cmp-today-btn {
  color: #60a5fa;
}

[data-theme="dark"] .cmp-today-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

/* 在职至今切换开关药丸样式 */
.exp-current-job-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.exp-current-job-pill:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary);
}

[data-theme="dark"] .exp-current-job-pill {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

[data-theme="dark"] .exp-current-job-pill:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  color: #93c5fd;
}

.exp-current-job-pill input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

/* 在职至今覆盖态提示层 */
.exp-current-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.08);
  border: 1.5px dashed var(--primary);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  pointer-events: none;
  backdrop-filter: blur(1px);
}

[data-theme="dark"] .exp-current-overlay {
  background: rgba(59, 130, 246, 0.15);
  border-color: #60a5fa;
  color: #93c5fd;
}

/* 单段履历已修改徽章与单段保存按钮 */
.exp-item-dirty-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 600;
  user-select: none;
}

[data-theme="dark"] .exp-item-dirty-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.exp-item-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.exp-item-save-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.work-exp-edit-item.is-dirty {
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08) !important;
}

[data-theme="dark"] .work-exp-edit-item.is-dirty {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

.work-exp-item-card {
  transition: all 0.2s ease;
}

/* 工作履历薪资文本高对比度与明暗双主题对齐 */
.exp-salary-text {
  color: #b45309;
  font-weight: 600;
}

[data-theme="dark"] .exp-salary-text {
  color: #fbbf24;
}

/* 在职至今下方切换栏容器 */
.exp-current-job-bottom-wrap {
  margin-top: 6px;
  display: flex;
  align-items: center;
}


.work-exp-item-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

@media (max-width: 640px) {
  .candidate-info-grid,
  .work-exp-edit-grid-4,
  .work-exp-edit-grid-2,
  .resume-section-edit-grid-4,
  .resume-section-edit-grid-3,
  .resume-section-edit-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================================
   📑 通用候选人履历模块（项目经历、教育背景、资格证书、语言能力、培训经历）
   ======================================================== */
.resume-section-box {
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.resume-section-box.resume-section-edit-mode {
  border: 1px solid var(--primary);
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.1);
}

.resume-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-collapse-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: transform 0.2s ease, color 0.15s ease;
}

.resume-collapse-toggle-btn:hover {
  color: var(--primary);
  background: var(--tag-bg);
}

.resume-section-box.is-collapsed .resume-collapse-toggle-btn svg,
.resume-section-box.is-collapsed .resume-collapse-toggle-icon {
  transform: rotate(-90deg);
}

.resume-section-box.is-collapsed .resume-section-body {
  display: none !important;
}

.resume-section-edit-item {
  padding: 18px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .resume-section-edit-item {
  background: rgba(30, 41, 59, 0.65);
  border: 1.5px solid #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.resume-section-edit-item:hover {
  border-color: #94a3b8;
}

[data-theme="dark"] .resume-section-edit-item:hover {
  border-color: #475569;
}

.resume-section-edit-item.is-dirty {
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08) !important;
}

[data-theme="dark"] .resume-section-edit-item.is-dirty {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

.resume-section-edit-item .candidate-edit-field input,
.resume-section-edit-item .candidate-edit-field select,
.resume-section-edit-item .candidate-edit-field textarea {
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  color: #0f172a !important;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
  font-size: 0.9rem;
  padding: 9px 12px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .resume-section-edit-item .candidate-edit-field input,
[data-theme="dark"] .resume-section-edit-item .candidate-edit-field select,
[data-theme="dark"] .resume-section-edit-item .candidate-edit-field textarea {
  background: #0f172a !important;
  border: 1.5px solid #475569 !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset;
}

.resume-section-edit-item .candidate-edit-field input:focus,
.resume-section-edit-item .candidate-edit-field select:focus,
.resume-section-edit-item .candidate-edit-field textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
  background: #ffffff !important;
}

[data-theme="dark"] .resume-section-edit-item .candidate-edit-field input:focus,
[data-theme="dark"] .resume-section-edit-item .candidate-edit-field select:focus,
[data-theme="dark"] .resume-section-edit-item .candidate-edit-field textarea:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
  background: #0b1120 !important;
}

.resume-section-edit-item .candidate-edit-label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-main);
  margin-bottom: 6px;
  display: block;
}

.resume-section-item-card {
  padding: 14px 16px;
  background: var(--tag-bg);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  border-left-width: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}

.resume-section-item-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.resume-section-item-card.border-proj {
  border-left-color: #8b5cf6;
}

.resume-section-item-card.border-edu {
  border-left-color: #059669;
}

.resume-section-item-card.border-cert {
  border-left-color: #d97706;
}

.resume-section-item-card.border-lang {
  border-left-color: #0284c7;
}

.resume-section-item-card.border-train {
  border-left-color: #ec4899;
}

/* 经历增补底栏样式 */
.resume-sections-add-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px dashed var(--border-subtle);
}

.resume-sections-add-bar-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.resume-add-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.resume-add-pill-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

[data-theme="dark"] .resume-add-pill-btn {
  background: rgba(30, 41, 59, 0.7);
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .resume-add-pill-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #60a5fa;
  color: #93c5fd;
}

/* --- 目录浏览器弹窗样式 --- */
.dir-shortcut-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 14px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dir-shortcut-pill:hover,
.dir-shortcut-pill.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.dir-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-size: 0.85rem;
  color: var(--text-main);
}

.dir-item-row:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
}

.dir-item-row.selected {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--primary);
  font-weight: 600;
}

.dir-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-item-action {
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.dir-item-row:hover .dir-item-action {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
}

/* =========================================================
   团队管理与组织架构模块样式 (Team Management)
   ========================================================= */

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.team-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.team-stat-number {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
}

.team-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.team-member-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.team-member-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.team-member-card.is-self {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.03) 0%, var(--card-bg) 100%);
}

.team-member-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: 100%;
}

/* 用户卡片头像 300x300px 尺寸规范 */
.team-member-avatar {
  width: 300px;
  height: 300px;
  min-width: 300px;
  min-height: 300px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  position: relative;
  flex-shrink: 0;
}

/* 上传自定义头像图片：300x300px 裁剪填充 */
.team-avatar-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* 未设置头像：系统 Logo 300x300 居中自适应 */
.team-avatar-logo-img {
  width: 300px;
  height: 300px;
  object-fit: contain;
  padding: 36px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.02);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
}

/* 快捷图标 emoji 头像：放大到 300px 大小 */
.team-member-avatar-emoji {
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.12) 0%, rgba(255, 255, 255, 0.02) 70%);
}

.team-avatar-emoji {
  width: 300px;
  height: 300px;
  font-size: 220px;
  line-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}

.team-member-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.team-member-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-member-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.team-member-dept {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.team-member-leader {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-secondary);
  padding: 3px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-top: 2px;
}

.team-member-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.team-action-btn {
  flex: 1;
  justify-content: center;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.member-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-meta {
  flex: 1;
  min-width: 0;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.member-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.member-username {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.member-title {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.member-leader-line {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 角色标签 */
.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-tag-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-tag-boss {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-tag-lead {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.role-tag-user {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.member-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}

.member-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.member-metric-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.member-metric-title {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.member-actions-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  flex-wrap: wrap;
}

.btn-member-action {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  color: var(--text-main);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-member-action:hover {
  background: var(--tag-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================================
   配置管理与失败监控样式 (Configuration & Failed Files)
   ======================================================== */
.config-tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.config-tabs-nav .tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.config-tabs-nav .tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .config-tabs-nav .tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.config-tabs-nav .tab-btn.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .config-tabs-nav .tab-btn.active {
  border-color: rgba(59, 130, 246, 0.35);
}

.config-subview {
  animation: fadeIn 0.2s ease-in-out;
}

.error-tag {
  color: #ef4444;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
  word-break: break-all;
  line-height: 1.4;
}

/* ======================================================== */
/* 全局高颜值网页内弹窗与 Toast 消息通知系统 (UI Dialog & Toast) */
/* ======================================================== */

.ui-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.ui-dialog-backdrop.ui-dialog-backdrop-show {
  opacity: 1;
}

.ui-dialog-card {
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-main);
  position: relative;
}

.ui-dialog-card.ui-dialog-has-extra {
  max-width: 530px;
}

.ui-dialog-card.ui-dialog-enter {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.ui-dialog-card.ui-dialog-exit {
  transform: scale(0.94) translateY(6px);
  opacity: 0;
}

/* 各类型高亮状态微发光 */
.ui-dialog-card.ui-dialog-danger {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 25px 60px -15px rgba(239, 68, 68, 0.2), 0 0 0 1px rgba(239, 68, 68, 0.3);
}

.ui-dialog-card.ui-dialog-warning {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 60px -15px rgba(245, 158, 11, 0.2), 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.ui-dialog-card.ui-dialog-success {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 25px 60px -15px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.ui-dialog-card.ui-dialog-info {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 25px 60px -15px rgba(59, 130, 246, 0.2), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.ui-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 14px;
}

.ui-dialog-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.ui-dialog-danger .ui-dialog-icon-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ui-dialog-warning .ui-dialog-icon-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.ui-dialog-success .ui-dialog-icon-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.ui-dialog-info .ui-dialog-icon-box {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.ui-dialog-title-box {
  flex: 1;
  min-width: 0;
}

.ui-dialog-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.ui-dialog-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.ui-dialog-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.ui-dialog-body {
  padding: 6px 24px 22px;
}

.ui-dialog-message {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-muted);
  word-break: break-word;
}

.ui-dialog-prompt-wrap {
  margin-top: 14px;
}

.ui-dialog-prompt-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.ui-dialog-prompt-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.ui-dialog-prompt-hint {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 6px;
}

.ui-dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

[data-theme="dark"] .ui-dialog-footer {
  background: rgba(0, 0, 0, 0.25);
}

.ui-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.ui-dialog-btn:active {
  transform: scale(0.97);
}

.ui-dialog-btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.ui-dialog-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

[data-theme="light"] .ui-dialog-btn-cancel {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .ui-dialog-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.ui-dialog-btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.ui-dialog-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.ui-dialog-btn-danger {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25);
}

.ui-dialog-btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.ui-dialog-btn-warning {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.ui-dialog-btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.ui-dialog-btn-success {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.ui-dialog-btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

/* ------------------------------------------------------------- */
/* 全局 Toast 通知容器与样式 */
/* ------------------------------------------------------------- */
.ui-toast-container {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
}

.ui-toast-item {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.12);
  cursor: pointer;
  user-select: none;
  transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(-16px) scale(0.95);
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-toast-item.ui-toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ui-toast-item.ui-toast-fadeout {
  opacity: 0;
  transform: translateY(-12px) scale(0.92);
}

.ui-toast-item.ui-toast-success {
  background: rgba(6, 78, 59, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 32px rgba(6, 78, 59, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.ui-toast-item.ui-toast-error {
  background: rgba(127, 29, 29, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 12px 32px rgba(127, 29, 29, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  white-space: normal;
  max-width: min(780px, 92vw);
  line-height: 1.5;
  user-select: text;
  cursor: pointer;
}

.ui-toast-item.ui-toast-error .ui-toast-text {
  user-select: text;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
}

.ui-toast-item.ui-toast-error .ui-toast-close {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  margin-left: 8px;
}

.ui-toast-item.ui-toast-error .ui-toast-close:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.ui-toast-item.ui-toast-warning {
  background: rgba(120, 53, 15, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 32px rgba(120, 53, 15, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.ui-toast-item.ui-toast-info {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.ui-toast-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.ui-toast-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  margin-left: 4px;
  transition: color 0.15s ease;
}

.ui-toast-close:hover {
  color: #ffffff;
}

/* ========================================================
   反馈与建议弹窗样式 (User Feedback & Suggestions Modal)
   ======================================================== */
.feedback-modal-content {
  max-width: 560px;
  width: 94%;
  padding: 26px 28px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
}

.feedback-user-info-card {
  display: none !important;
  margin: 16px 0 16px 0;
  padding: 12px 14px;
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.feedback-user-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-subtle);
}

.feedback-user-info-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.feedback-user-role-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

.feedback-user-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.feedback-user-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  overflow: hidden;
}

.feedback-info-label {
  color: var(--text-dim);
  font-size: 0.76rem;
  flex-shrink: 0;
}

.feedback-info-value {
  color: var(--text-main);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.category-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

.category-pill.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #f59e0b;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.feedback-modal-content form {
  margin-top: 18px;
}

/* ========================================================
   左侧贴边浮动竖版反馈建议标签 (Floating Feedback Tab)
   ======================================================== */
.floating-feedback-btn {
  position: fixed;
  left: 0;
  bottom: 220px;
  z-index: 995;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 7px 12px 6px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-left: none;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 4px 14px rgba(245, 158, 11, 0.38);
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  outline: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, background 0.22s ease;
}

.floating-feedback-btn:hover {
  transform: translateX(4px);
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 4px 6px 18px rgba(245, 158, 11, 0.52);
}

.floating-feedback-btn:active {
  transform: translateX(1px) scale(0.97);
}

.floating-feedback-btn .floating-feedback-icon {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.floating-feedback-btn .floating-feedback-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .floating-feedback-btn {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 2px 4px 16px rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
  .floating-feedback-btn {
    bottom: 110px;
    padding: 8px 5px 10px 4px;
  }

  .floating-feedback-btn .floating-feedback-text {
    font-size: 11px;
    letter-spacing: 2px;
  }
}

/* ==========================================================================
   移动端响应式与自适应全套样式 (Mobile Responsive Adaptation)
   ========================================================================== */

/* 移动端汉堡菜单切换按钮 (默认桌面隐藏) */
.mobile-nav-toggle {
  display: none;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  user-select: none;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:active {
  background: var(--bg-hover, rgba(255, 255, 255, 0.1));
  border-color: var(--primary);
  color: var(--primary);
}

/* 移动端抽屉遮罩背景层 */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1090;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.mobile-sidebar-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* 移动端底部原生快捷 Tab 导航栏 (默认桌面隐藏) */
.mobile-bottom-nav {
  display: none;
}

/* 核心断点：小屏幕与平板竖屏 (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }

  /* 1. Header 顶栏适配 */
  .navbar {
    padding: 0 14px !important;
    height: 56px !important;
  }

  .mobile-nav-toggle {
    display: inline-flex !important;
  }

  .brand {
    font-size: 1.05rem !important;
    gap: 8px !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .brand-title-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .brand-title-text .brand-text-full {
    display: none !important;
  }

  .brand-title-text .brand-text-medium {
    display: inline !important;
  }

  .brand-title-text .brand-text-short {
    display: none !important;
  }

  #current-db-label {
    max-width: 70px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }

  .db-switch-btn {
    padding: 4px 6px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
  }

  .brand-logo {
    height: 28px !important;
    flex-shrink: 0 !important;
  }

  .brand-badge {
    display: none !important;
  }

  .nav-stats {
    display: none !important;
  }

  .theme-toggle-btn {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }

  #theme-text {
    display: none !important;
  }

  .user-auth-widget .btn-user-profile {
    padding: 4px 8px !important;
  }

  .user-auth-widget .user-name-text {
    max-width: 60px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-actions-section {
    gap: 8px !important;
  }

  .user-login-trigger {
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    gap: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .user-profile-pill {
    padding: 3px 8px 3px 4px !important;
    gap: 6px !important;
  }

  .user-profile-pill .user-avatar-wrap {
    width: 28px !important;
    height: 28px !important;
  }

  .user-profile-pill .user-title-row {
    display: none !important;
  }

  .user-profile-pill .user-logout-btn {
    padding: 2px 6px !important;
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
  }

  /* 2. 侧边栏转为抽屉式 Off-Canvas */
  .app-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    max-width: 82vw !important;
    z-index: 1100 !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    background: var(--navbar-bg) !important;
    backdrop-filter: blur(20px);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
  }

  .app-sidebar.collapsed {
    width: 270px !important;
    max-width: 82vw !important;
  }

  .app-sidebar.collapsed .sidebar-brand-text,
  .app-sidebar.collapsed .nav-label,
  .app-sidebar.collapsed .nav-badge,
  .app-sidebar.collapsed .sidebar-version {
    display: inline-block !important;
  }

  .app-sidebar.collapsed .sidebar-header {
    justify-content: space-between !important;
    padding: 20px 16px !important;
  }

  .app-sidebar.collapsed .sidebar-brand-info {
    display: flex !important;
  }

  .app-sidebar.collapsed .sidebar-nav-item {
    justify-content: flex-start !important;
    padding: 12px 14px !important;
  }

  .sidebar-toggle-btn {
    display: none !important;
  }

  /* 3. 底部快捷导航栏 */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.15);
    user-select: none;
  }

  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    gap: 2px;
    flex: 1;
    height: 100%;
    transition: all 0.15s ease;
    cursor: pointer;
  }

  .mobile-bottom-nav-item .mbn-icon {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .mobile-bottom-nav-item.active {
    color: var(--primary);
    font-weight: 700;
  }

  .mobile-bottom-nav-item.active .mbn-icon {
    transform: scale(1.1);
  }

  /* 4. 主工作区与卡片适配 */
  .app-layout {
    display: block !important;
    min-height: auto !important;
  }

  .app-main-content {
    width: 100% !important;
    padding: 14px 12px !important;
    overflow-x: hidden;
  }

  .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .view-header-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .view-title {
    font-size: 1.25rem !important;
  }

  .view-subtitle {
    font-size: 0.8rem !important;
  }

  .view-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }

  .view-actions .btn {
    font-size: 0.82rem !important;
    padding: 7px 12px !important;
  }

  /* 首页工作台 */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .stat-card {
    padding: 14px 12px !important;
  }

  .stat-value {
    font-size: 1.4rem !important;
  }

  .stat-title {
    font-size: 0.78rem !important;
  }

  .grid-top {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 首页候选人卡片与网格移动端自适应 (彻底杜绝 420px minmax 导致的手机右侧溢出) */
  .candidate-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .candidate-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 14px 12px !important;
  }

  .card-top {
    gap: 8px !important;
    align-items: flex-start !important;
  }

  .card-name-title {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .card-name-title h3 {
    font-size: 1.1rem !important;
    flex-wrap: wrap !important;
  }

  .card-name-title .sub {
    font-size: 0.82rem !important;
    word-break: break-word !important;
  }

  .candidate-meta {
    gap: 6px 10px !important;
    font-size: 0.78rem !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
  }

  .candidate-meta span {
    word-break: break-word !important;
  }

  .skills-wrapper {
    gap: 5px !important;
    margin-bottom: 10px !important;
  }

  .skill-tag {
    font-size: 0.76rem !important;
    padding: 2px 8px !important;
  }

  .summary-text {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
  }

  .card-footer-multi {
    gap: 8px !important;
    padding-top: 10px !important;
  }

  .card-footer-file-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }

  .card-file-info {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .card-file-info .file-text {
    max-width: 100% !important;
  }

  .card-footer-actions-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .card-actions-left {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .diag-card-btn,
  .link-btn-note,
  .link-btn-interview,
  .card-detail-btn {
    font-size: 0.76rem !important;
    padding: 3px 8px !important;
  }

  .super-search-console {
    padding: 14px !important;
  }

  .search-box-large {
    margin-bottom: 12px !important;
  }

  .search-box-large .search-input {
    font-size: 0.95rem !important;
    height: 48px !important;
    padding-left: 42px !important;
    padding-right: 80px !important;
  }

  .search-box-large .search-btn {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 0.85rem !important;
  }

  .search-prompt-chips {
    gap: 6px !important;
  }

  .chip-btn {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
  }

  /* 候选人、职位与面试工具栏 */
  .jobs-toolbar,
  .candidates-toolbar,
  .interviews-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .jobs-status-pills {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    gap: 6px !important;
  }

  .status-pill {
    flex-shrink: 0 !important;
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
  }

  .interview-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .interview-stat-card {
    padding: 10px !important;
  }

  .interview-stat-card .stat-number {
    font-size: 1.3rem !important;
  }

  .interview-stat-card .stat-label {
    font-size: 0.72rem !important;
  }

  /* 5. 多维表格在移动端的触控优化 */
  .table-responsive {
    border-radius: 10px !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--border-subtle) !important;
    margin-bottom: 14px !important;
  }

  .workbench-table th,
  .workbench-table td {
    padding: 10px 10px !important;
    font-size: 0.8rem !important;
  }

  .workbench-pagination {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px 0 !important;
  }

  .pagination-buttons {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .pagination-buttons .btn {
    padding: 6px 14px !important;
    font-size: 0.82rem !important;
  }

  /* 6. 模态弹窗转为移动端 Bottom Sheet 底部抽屉与无横向滚动自适应 */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    overflow-x: hidden !important;
  }

  .modal-content {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    padding: 18px 14px !important;
    box-sizing: border-box !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6) !important;
    animation: mobileModalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  @keyframes mobileModalSlideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .modal-header {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    padding: 16px 18px 12px 18px !important;
    border-bottom: 1px solid var(--border-subtle);
  }

  .modal-body {
    padding: 16px 18px !important;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 10;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)) 18px !important;
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  }

  /* 7. 表单输入框防止 iOS 自动放大 (>=16px) */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* 8. AI 悬浮按钮与抽屉全屏展开 */
  .floating-btn-group {
    bottom: 74px !important;
    right: 14px !important;
  }

  .ai-chat-fab {
    right: 14px !important;
    bottom: 70px !important;
  }

  .ai-reminder-popover {
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    bottom: 136px !important;
  }

  .ai-chat-window {
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    bottom: 70px !important;
    max-height: calc(100vh - 90px) !important;
  }

  .ai-chat-drawer {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
    border-radius: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1300 !important;
  }

  .ai-chat-drawer-header {
    padding-top: max(16px, env(safe-area-inset-top, 0px)) !important;
  }

  /* 9. 列定制下拉浮层适配小屏幕居中或靠右 */
  .col-customizer-popover {
    right: -10px !important;
    min-width: 180px !important;
    max-width: 250px !important;
  }
}

/* 超窄屏手机微调 (<= 480px) */
@media (max-width: 480px) {
  .brand-title-text {
    font-size: 0.9rem !important;
  }

  .brand-title-text .brand-text-full,
  .brand-title-text .brand-text-medium {
    display: none !important;
  }

  .brand-title-text .brand-text-short {
    display: inline !important;
  }

  #current-db-label {
    max-width: 55px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .stat-card {
    padding: 10px 8px !important;
  }

  .stat-value {
    font-size: 1.25rem !important;
  }

  .stat-title {
    font-size: 0.72rem !important;
  }

  .interview-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .mobile-bottom-nav-item .mbn-label {
    font-size: 0.68rem !important;
  }

  .navbar-actions-section {
    gap: 4px !important;
  }

  .user-login-trigger {
    padding: 4px 8px !important;
    font-size: 0.76rem !important;
    border-radius: 16px !important;
    gap: 3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .user-login-trigger .login-text-full {
    display: none !important;
  }

  .user-login-trigger .login-text-short {
    display: inline !important;
  }

  .theme-toggle-btn {
    padding: 4px 6px !important;
    font-size: 0.76rem !important;
  }

  .nav-icon-menu-btn {
    padding: 4px 6px !important;
  }
}

/* 简历扫描与上传双模选项卡 */
.scan-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.scan-tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scan-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.scan-tab-btn.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: rgba(59, 130, 246, 0.35);
  font-weight: 600;
}

/* Web 文件夹与文件拖拽上传区域 (自适应居中排列，按钮居中对齐) */
.scan-drop-zone {
  border: 2px dashed rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.03);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 52px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.scan-drop-zone:hover,
.scan-drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.09);
  transform: translateY(-1px);
}

.drop-zone-lead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-main);
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

.drop-zone-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0;
  flex-shrink: 0;
}

.drop-zone-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0;
}

@media (max-width: 640px) {
  .scan-drop-zone {
    padding: 10px 12px;
  }

  .drop-zone-lead {
    white-space: normal;
  }
}

/* ========================================================
   ⚡ 批量解析实时入库流 (Live Stream Cards)
   ======================================================== */

.live-stream-panel {
  margin-top: 14px;
  margin-bottom: 14px;
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md, 12px);
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: livePanelFadeIn 0.35s ease;
}

[data-theme="light"] .live-stream-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .live-stream-panel {
  background: rgba(18, 25, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@keyframes livePanelFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-subtle, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .live-stream-header {
  border-bottom-color: #e2e8f0;
}

[data-theme="dark"] .live-stream-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.live-stream-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main, #f1f5f9);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

[data-theme="light"] .live-count-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .live-count-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-stream-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-live-ghost {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="light"] .btn-live-ghost {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

[data-theme="light"] .btn-live-ghost:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-theme="dark"] .btn-live-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

[data-theme="dark"] .btn-live-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.3);
}

.live-stream-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.live-stream-cards-container::-webkit-scrollbar {
  width: 5px;
}

[data-theme="light"] .live-stream-cards-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

[data-theme="dark"] .live-stream-cards-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

/* 单个候选人实时卡片 */
.live-stream-card {
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  animation: liveCardSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .live-stream-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .live-stream-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .live-stream-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .live-stream-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.22);
}

@keyframes liveCardSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.live-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.live-card-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

/* 新增入库 badge */
[data-theme="light"] .live-card-badge.added {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .live-card-badge.added {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* 合并更新 badge */
[data-theme="light"] .live-card-badge.updated {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .live-card-badge.updated {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* 已在库中 badge */
[data-theme="light"] .live-card-badge.skipped_exists {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

[data-theme="dark"] .live-card-badge.skipped_exists {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.live-card-time {
  font-size: 0.7rem;
  white-space: nowrap;
}

[data-theme="light"] .live-card-time {
  color: #64748b;
}

[data-theme="dark"] .live-card-time {
  color: #94a3b8;
}

.live-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-card-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.live-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

[data-theme="light"] .live-card-name {
  color: #0f172a;
}

[data-theme="light"] .live-card-name:hover {
  color: #2563eb;
  text-decoration: underline;
}

[data-theme="dark"] .live-card-name {
  color: #f8fafc;
}

[data-theme="dark"] .live-card-name:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.live-card-meta {
  font-size: 0.72rem;
}

[data-theme="light"] .live-card-meta {
  color: #475569;
}

[data-theme="dark"] .live-card-meta {
  color: #94a3b8;
}

.live-card-title-company {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .live-card-title-company {
  color: #334155;
}

[data-theme="dark"] .live-card-title-company {
  color: #cbd5e1;
}

.live-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.live-card-tag {
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 3px;
  transition: all 0.15s ease;
}

[data-theme="light"] .live-card-tag {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .live-card-tag {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 6px;
  margin-top: 2px;
}

[data-theme="light"] .live-card-footer {
  border-top: 1px solid #f1f5f9;
}

[data-theme="dark"] .live-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.live-btn {
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

[data-theme="light"] .live-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
}

[data-theme="light"] .live-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

[data-theme="dark"] .live-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

[data-theme="dark"] .live-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

/* AI分析按钮 */
[data-theme="light"] .live-btn-diag {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

[data-theme="light"] .live-btn-diag:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

[data-theme="dark"] .live-btn-diag {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

[data-theme="dark"] .live-btn-diag:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
}

/* 失败文件轻量警示条 */
.live-fail-pill {
  grid-column: 1 / -1;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  animation: liveCardSlideIn 0.25s ease;
}

[data-theme="light"] .live-fail-pill {
  background: #fef2f2;
  border: 1px dashed #fca5a5;
  color: #b91c1c;
}

[data-theme="dark"] .live-fail-pill {
  background: rgba(239, 68, 68, 0.1);
  border: 1px dashed rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.live-fail-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========================================================
   🛑 简历批量扫描/解析中途停止按钮 (Stop / Cancel Button)
   ======================================================== */
.btn-scan-stop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
  user-select: none;
  animation: liveCardSlideIn 0.25s ease;
}

[data-theme="light"] .btn-scan-stop {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08);
}

[data-theme="light"] .btn-scan-stop:hover:not(:disabled) {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

[data-theme="dark"] .btn-scan-stop {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-scan-stop:hover:not(:disabled) {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-scan-stop:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* 视图数据范围胶囊切换器 (Scope Toggle) */
.view-mode-toggle {
  display: inline-flex;
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-sm, 6px);
  padding: 3px;
  gap: 3px;
  align-items: center;
}

.view-mode-btn {
  padding: 5px 12px;
  font-size: 0.8rem;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-main, #f8fafc);
  background: rgba(255, 255, 255, 0.06);
}

.view-mode-btn.active {
  background: var(--primary, #3b82f6);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* 项目协作成员徽章 */
.badge-member {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   简历快速去重入库 (URL 与网页内容粘贴) 极速弹窗样式
   ========================================================================== */
.quick-import-modal-content {
  background: var(--modal-bg, #1e293b);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15);
}

.quick-import-env-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text-muted);
}

.quick-import-env-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.quick-import-env-pill.cdp-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.quick-import-env-pill.cdp-active .dot {
  background: #10b981;
}

.quick-import-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 8px;
  margin: 14px 0 16px 0;
  border: 1px solid var(--border-subtle);
}

.quick-import-error-banner {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  user-select: text;
  background: rgba(127, 29, 29, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 4px 16px rgba(127, 29, 29, 0.35), 0 0 0 1px rgba(239, 68, 68, 0.2);
  color: #f8fafc;
}

.quick-import-error-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.quick-import-error-icon {
  font-size: 1.15rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.quick-import-error-text {
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.55;
  word-break: break-word;
  user-select: text;
  color: #ffffff;
  font-weight: 500;
}

.quick-import-error-close {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 50%;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.quick-import-error-close:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.quick-import-tab-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.quick-import-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.quick-import-tab-btn.active {
  background: var(--primary, #3b82f6);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.quick-import-pane {
  display: none;
}

.quick-import-pane.active {
  display: block;
}

/* 步骤指示条 Stepper */
.quick-import-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 10px 10px 10px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary, #334155);
  border: 2px solid var(--border-color, #475569);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--border-color, #334155);
  margin: 0 8px;
  position: relative;
  top: -12px;
  transition: all 0.3s ease;
}

.step-item.active .step-icon {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  transform: scale(1.1);
}

.step-item.active .step-label {
  color: #60a5fa;
  font-weight: 700;
}

.step-item.completed .step-icon {
  background: #10b981;
  border-color: #34d399;
  color: #ffffff;
}

.step-item.completed .step-label {
  color: #34d399;
}

.step-line.completed {
  background: #10b981;
}

/* 旋转加载器 */
.quick-import-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(59, 130, 246, 0.15);
  border-top-color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto;
  animation: quickImportSpin 0.9s linear infinite;
}

@keyframes quickImportSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 结果卡片 */
.quick-import-result-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 10px;
}

[data-theme="light"] .quick-import-result-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 结果卡片内部信息块 (适配深浅主题) */
.quick-import-info-box {
  background: var(--tag-bg, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 0.83rem;
  line-height: 1.6;
}

[data-theme="light"] .quick-import-info-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="dark"] .quick-import-info-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* 技能标签 - 高对比度明晰配色 */
.quick-import-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.2s ease;
}

[data-theme="light"] .quick-import-skill-tag {
  background: #eff6ff;
  color: #1d4ed8;
  /* 浅色模式下深蓝色字，与 #f8fafc 极高对比度，清晰易读 */
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}

[data-theme="dark"] .quick-import-skill-tag {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  /* 深色模式下高亮淡蓝字，清晰夺目 */
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.dedup-badge-merged {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-theme="light"] .dedup-badge-merged {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.dedup-badge-new {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-theme="light"] .dedup-badge-new {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

[data-theme="light"] .quick-import-env-pill {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

[data-theme="light"] .quick-import-error-banner,
[data-theme="dark"] .quick-import-error-banner {
  background: rgba(127, 29, 29, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 4px 16px rgba(127, 29, 29, 0.35), 0 0 0 1px rgba(239, 68, 68, 0.2);
  color: #ffffff;
}

[data-theme="light"] .quick-import-error-text,
[data-theme="dark"] .quick-import-error-text {
  color: #ffffff !important;
}

[data-theme="light"] .quick-import-error-close,
[data-theme="dark"] .quick-import-error-close {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.16);
}

[data-theme="light"] .quick-import-error-close:hover,
[data-theme="dark"] .quick-import-error-close:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

/* ========================================================
   📇 名片与图片简历极速导入样式 (Dual-Theme Parity & WCAG AA)
   ======================================================== */
.quick-import-type-pills {
  display: flex;
  gap: 6px;
}

.quick-import-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-import-pill input[type="radio"] {
  display: none;
}

[data-theme="light"] .quick-import-pill {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .quick-import-pill:hover {
  background: #e2e8f0;
  color: #1e293b;
}

[data-theme="light"] .quick-import-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .quick-import-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .quick-import-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
}

[data-theme="dark"] .quick-import-pill.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.quick-import-image-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .quick-import-image-dropzone {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .quick-import-image-dropzone:hover,
[data-theme="light"] .quick-import-image-dropzone.dragover {
  background: #eff6ff;
  border-color: #3b82f6;
}

[data-theme="dark"] .quick-import-image-dropzone {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .quick-import-image-dropzone:hover,
[data-theme="dark"] .quick-import-image-dropzone.dragover {
  background: rgba(59, 130, 246, 0.08);
  border-color: #60a5fa;
}

.quick-import-image-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  text-align: left;
}

[data-theme="light"] .quick-import-image-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .quick-import-image-preview-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.quick-import-preview-thumb-wrap {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-subtle);
}

.quick-import-preview-thumb-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.quick-import-preview-meta {
  flex: 1;
  min-width: 0;
}

.quick-import-preview-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-import-preview-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.kbd-shortcut {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.76rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 4px;
  line-height: 1.2;
}

[data-theme="light"] .kbd-shortcut {
  background: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .kbd-shortcut {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* 扩展徽章 */
.resume-ext-badge.img {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .resume-ext-badge.img {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}


/* ==========================================================================
   Prompt Tuning Card & Dynamic Prompt Styles
   ========================================================================== */
.prompt-tuning-card {
  transition: all 0.25s ease;
}

[data-theme="light"] .prompt-tuning-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .prompt-tuning-card {
  background: rgba(18, 25, 38, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.prompt-mode-btn:hover {
  filter: brightness(1.1);
}

[data-theme="light"] #prompt-preview-details {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] #prompt-effective-preview {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}


/* ==========================================================================
   Model Base Config Card Styles
   ========================================================================== */
.model-base-config-card {
  transition: all 0.25s ease;
}

[data-theme="light"] .model-base-config-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .model-base-config-card {
  background: rgba(18, 25, 38, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   职位 AI 深度拆解与寻访作战地图模态弹窗样式 (GEEKER-JD01 v1.1.0)
   ========================================================================== */
.job-diag-modal-content {
  max-width: 960px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 30px;
}

.job-diag-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-right: 44px;
  margin-bottom: 14px;
}

.job-diag-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  flex-shrink: 0;
}

.job-diag-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

.job-diag-toolbar-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.job-diag-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  white-space: nowrap;
}

[data-theme="dark"] .job-diag-tool-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.12);
}

.job-diag-tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.job-diag-preflight-card {
  background: var(--tag-bg);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.job-diag-preflight-card textarea {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s;
}

.job-diag-preflight-card textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* 职位表格行内操作按钮 */
.row-btn-diag {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .row-btn-diag {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.4);
}

.row-btn-diag:hover {
  background: rgba(99, 102, 241, 0.22);
  transform: translateY(-1px);
}

.row-btn-diag.has-diag {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .row-btn-diag.has-diag {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.row-btn-diag.has-diag:hover {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* 职位拆解流式打字机浮动置顶与置底控制按钮组 (右下角常驻悬浮) */
.job-diag-scroll-wrapper {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 30;
  margin-top: 12px;
}

.job-diag-scroll-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

[data-theme="dark"] .job-diag-scroll-btn {
  background: rgba(30, 41, 59, 0.95);
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.job-diag-scroll-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28);
}

.job-diag-scroll-top-icon {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.job-diag-scroll-top-btn:hover .job-diag-scroll-top-icon {
  transform: translateY(-2px);
}

.job-diag-scroll-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #6366f1;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  animation: jobDiagPulse 1.8s infinite;
}

[data-theme="dark"] .job-diag-scroll-dot {
  background-color: #818cf8;
}

@keyframes jobDiagPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* 职位拆解顶部吸顶目录药丸导航栏 (Sticky TOC Pills) */
.job-diag-toc-bar {
  position: sticky;
  top: -12px;
  z-index: 24;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0 10px 0;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .job-diag-toc-bar {
  background: rgba(30, 41, 59, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.job-diag-toc-scroll-track {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 2px;
}

.job-diag-toc-scroll-track::-webkit-scrollbar {
  display: none;
}

.job-diag-toc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  background: var(--tag-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  flex-shrink: 0;
}

.job-diag-toc-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.job-diag-toc-pill.active {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .job-diag-toc-pill {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .job-diag-toc-pill:hover {
  border-color: #818cf8;
  color: #e0e7ff;
}

[data-theme="dark"] .job-diag-toc-pill.active {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
  border-color: #818cf8;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* 锚点跳转安全吸顶距离 */
#job-diag-body h2 {
  scroll-margin-top: 56px;
  position: relative;
}


/* ==========================================================================
   面试查重防撞单预警与历史轮次履历 (Duplicate Prevention & Round History)
   ========================================================================== */

/* 候选人与职位查重/防撞单预警条 */
.interview-duplicate-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #b45309;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  animation: dupAlertFadeIn 0.25s ease-out;
}

@keyframes dupAlertFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dup-alert-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.dup-alert-content {
  flex: 1;
  min-width: 0;
}

.dup-alert-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 3px;
  line-height: 1.35;
}

.dup-alert-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #b45309;
}

.dup-alert-action {
  flex-shrink: 0;
}

.btn-dup-switch {
  background: #d97706;
  color: #ffffff !important;
  border: 1px solid #b45309;
  font-size: 0.8rem;
  padding: 5px 12px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  transition: all 0.2s ease;
}

.btn-dup-switch:hover {
  background: #b45309;
  border-color: #92400e;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.35);
}

[data-theme="dark"] .interview-duplicate-alert {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .dup-alert-title {
  color: #fde68a;
}

[data-theme="dark"] .dup-alert-desc {
  color: #fbbf24;
}

[data-theme="dark"] .btn-dup-switch {
  background: #f59e0b;
  color: #0f172a !important;
  border: 1px solid #fbbf24;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .btn-dup-switch:hover {
  background: #fbbf24;
  border-color: #fde68a;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45);
}

/* 历史轮次流转履历折叠面板 */
.interview-round-history-wrap {
  margin-top: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.round-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(99, 102, 241, 0.05);
  transition: background 0.2s ease;
}

.round-history-header:hover {
  background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .round-history-header {
  background: rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .round-history-header:hover {
  background: rgba(99, 102, 241, 0.18);
}

.round-history-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.round-history-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.round-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
}

.round-history-item {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--input-bg, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.round-history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.round-history-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .round-history-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(165, 180, 252, 0.35);
}

.round-history-item-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.round-history-item-feedback {
  margin-top: 6px;
  padding: 5px 9px;
  border-left: 3px solid var(--primary);
  background: rgba(99, 102, 241, 0.04);
  color: var(--text-main);
  font-size: 0.78rem;
  border-radius: 0 4px 4px 0;
  line-height: 1.45;
}

[data-theme="dark"] .round-history-item-feedback {
  border-left-color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
}

/* ============================================================
   AI 顾问浮动框 - 历史会话抽屉与多会话管理样式
   ============================================================ */

/* 抽屉全屏半透明遮罩 (浮窗内部) */
.ai-drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* 历史会话左侧抽屉容器 */
.ai-chat-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 82%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.2);
}

.ai-chat-drawer.open {
  transform: translateX(0);
}

/* 明亮主题 */
[data-theme="light"] .ai-chat-drawer {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}

/* 暗黑主题 */
[data-theme="dark"] .ai-chat-drawer {
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* 抽屉头部 */
.ai-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ai-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.ai-drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.ai-drawer-close-btn:hover {
  background: var(--tag-bg);
  color: var(--text-main);
}

/* 抽屉操作栏 */
.ai-drawer-action-bar {
  padding: 12px 14px;
  flex-shrink: 0;
}

.ai-drawer-new-chat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
  transition: all 0.2s ease;
}

.ai-drawer-new-chat-btn:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.38);
}

/* 抽屉列表滚动区 */
.ai-drawer-session-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-drawer-session-list::-webkit-scrollbar {
  width: 4px;
}
.ai-drawer-session-list::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 4px;
}

/* 单条会话卡片项 */
.ai-session-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

[data-theme="light"] .ai-session-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

[data-theme="light"] .ai-session-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

[data-theme="light"] .ai-session-item.active {
  background: #eef2ff;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

[data-theme="dark"] .ai-session-item {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

[data-theme="dark"] .ai-session-item:hover {
  background: rgba(49, 46, 129, 0.35);
  border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .ai-session-item.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: #818cf8;
  box-shadow: 0 0 0 1px #818cf8;
}

/* 会话卡片首行：标题与悬浮操作 */
.ai-session-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ai-session-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* 行内重命名编辑框 */
.ai-session-title-input {
  width: 100%;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1.5px solid var(--primary);
  background: var(--input-bg);
  color: var(--text-main);
  outline: none;
}

/* 会话悬浮操作按钮组 */
.ai-session-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.ai-session-item:hover .ai-session-actions,
.ai-session-item.active .ai-session-actions {
  opacity: 1;
}

.ai-session-action-btn {
  background: transparent;
  border: none;
  padding: 3px 5px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.ai-session-action-btn:hover {
  background: var(--tag-bg);
}

.ai-session-action-btn.edit-btn:hover {
  color: #4f46e5;
}

.ai-session-action-btn.delete-btn:hover {
  color: #ef4444;
}

/* 会话卡片次行：时间与实体标签 */
.ai-session-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.74rem;
}

.ai-session-time {
  font-size: 0.73rem;
}

[data-theme="light"] .ai-session-time {
  color: #64748b;
}

[data-theme="dark"] .ai-session-time {
  color: #94a3b8;
}

.ai-session-entity-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .ai-session-entity-pill {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

[data-theme="dark"] .ai-session-entity-pill {
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* 空白列表状态 */
.ai-session-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  color: var(--text-dim);
  gap: 8px;
}

.ai-session-empty-state svg {
  opacity: 0.4;
}

/* 抽屉底部危险操作 */
.ai-drawer-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ai-drawer-clear-all-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

[data-theme="light"] .ai-drawer-clear-all-btn {
  background: #fef2f2;
  border: 1px dashed #fca5a5;
  color: #b91c1c;
}

[data-theme="light"] .ai-drawer-clear-all-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

[data-theme="dark"] .ai-drawer-clear-all-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  color: #f87171;
}

[data-theme="dark"] .ai-drawer-clear-all-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* ========================================================
   AI 顾问系统操作卡片 (AI Action Cards)
   ======================================================== */
.ai-action-card {
  margin: 12px 0 8px 0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  font-family: inherit;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card, #ffffff);
  text-align: left;
}

/* Light Theme Variables */
[data-theme="light"] .ai-action-card.pending {
  border-color: #c7d2fe;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08);
}
[data-theme="light"] .ai-action-card.completed {
  border-color: #a7f3d0;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}
[data-theme="light"] .ai-action-card.cancelled {
  border-color: #e2e8f0;
  background: #f8fafc;
  opacity: 0.85;
}

/* Dark Theme Variables */
[data-theme="dark"] .ai-action-card.pending {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .ai-action-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .ai-action-card.cancelled {
  border-color: rgba(71, 85, 105, 0.4);
  background: rgba(15, 23, 42, 0.5);
  opacity: 0.75;
}

/* Header */
.ai-action-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--tag-bg, rgba(241, 245, 249, 0.7));
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
}
[data-theme="light"] .ai-action-card.pending .ai-action-card-header {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-bottom-color: #c7d2fe;
}
[data-theme="dark"] .ai-action-card.pending .ai-action-card-header {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.45) 0%, rgba(30, 27, 75, 0.4) 100%);
  border-bottom-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .ai-action-card.completed .ai-action-card-header {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-bottom-color: #a7f3d0;
}
[data-theme="dark"] .ai-action-card.completed .ai-action-card-header {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(6, 95, 70, 0.35) 100%);
  border-bottom-color: rgba(16, 185, 129, 0.3);
}

.ai-action-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ai-action-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.ai-action-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-action-card-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}

/* Badges */
.ai-action-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}
[data-theme="light"] .ai-action-badge.badge-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .ai-action-badge.badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
[data-theme="light"] .ai-action-badge.badge-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
[data-theme="dark"] .ai-action-badge.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="light"] .ai-action-badge.badge-cancelled {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
[data-theme="dark"] .ai-action-badge.badge-cancelled {
  background: rgba(71, 85, 105, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.4);
}

/* Card Body & Form Grid */
.ai-action-card-body {
  padding: 12px 14px;
}
.ai-action-form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}
.ai-action-form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-action-form-item.col-12 { grid-column: span 12; }
.ai-action-form-item.col-8 { grid-column: span 8; }
.ai-action-form-item.col-6 { grid-column: span 6; }
.ai-action-form-item.col-4 { grid-column: span 4; }

@media (max-width: 640px) {
  .ai-action-form-item.col-8,
  .ai-action-form-item.col-6,
  .ai-action-form-item.col-4 {
    grid-column: span 12;
  }
}

.ai-action-form-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}
[data-theme="light"] .ai-action-form-label {
  color: #334155;
}
[data-theme="dark"] .ai-action-form-label {
  color: #cbd5e1;
}
.ai-action-form-label .req {
  color: #ef4444;
  margin-right: 2px;
}

.ai-action-input,
.ai-action-textarea {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--input-bg, #f8fafc);
  color: var(--text-main);
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.2s ease;
}
[data-theme="light"] .ai-action-input,
[data-theme="light"] .ai-action-textarea {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
[data-theme="dark"] .ai-action-input,
[data-theme="dark"] .ai-action-textarea {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(71, 85, 105, 0.6);
  color: #f1f5f9;
}

.ai-action-input:focus,
.ai-action-textarea:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.ai-action-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-action-sep {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.ai-action-unit {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ai-action-desc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ai-action-toggle-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.74rem;
  color: var(--primary, #3b82f6);
  cursor: pointer;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ai-action-textarea {
  resize: vertical;
  line-height: 1.45;
}

/* Footer Buttons */
.ai-action-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.ai-action-btn.primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.ai-action-btn.primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}
.ai-action-btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-action-btn.secondary {
  background: var(--tag-bg, #f1f5f9);
  color: var(--text-muted, #475569);
  border-color: var(--border-subtle);
}
[data-theme="light"] .ai-action-btn.secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}
[data-theme="dark"] .ai-action-btn.secondary {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.6);
  color: #e2e8f0;
}
.ai-action-btn.secondary:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

/* Completed State Styling */
.ai-action-completed-body {
  padding: 12px 14px;
}
.ai-action-completed-box {
  background: var(--tag-bg, rgba(241, 245, 249, 0.5));
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
}
[data-theme="light"] .ai-action-completed-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
[data-theme="dark"] .ai-action-completed-box {
  background: rgba(6, 78, 59, 0.25);
  border-color: rgba(16, 185, 129, 0.35);
}

.ai-action-completed-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.ai-action-completed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-action-completed-meta .meta-tag {
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
[data-theme="light"] .ai-action-completed-meta .meta-tag {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}
[data-theme="dark"] .ai-action-completed-meta .meta-tag {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(71, 85, 105, 0.5);
  color: #cbd5e1;
}

.ai-action-auto-attached-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-left: auto;
}
[data-theme="dark"] .ai-action-auto-attached-pill {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Loading Spinner */
.ai-action-card.loading {
  padding: 12px 14px;
  background: var(--tag-bg, rgba(241, 245, 249, 0.5));
}
.ai-action-loading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.ai-action-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* ==============================================================================
   解析失败文件 - 一键批量重试进度面板与双主题样式 (WCAG AA)
   ============================================================================== */
.failed-retry-progress-panel {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.25s ease;
}

[data-theme="light"] .failed-retry-progress-panel {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--text-main);
}

[data-theme="dark"] .failed-retry-progress-panel {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--text-main);
}

.retry-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.retry-progress-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-main);
}

.retry-spinning {
  display: inline-block;
  animation: spin-retry 1s linear infinite;
}

@keyframes spin-retry {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.retry-progress-badge {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

[data-theme="light"] .retry-progress-badge {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .retry-progress-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.retry-progress-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.retry-stat-pill {
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 600;
}

/* 状态色在浅色与暗色模式下明暗分离 (WCAG AA >= 4.5:1) */
[data-theme="light"] .retry-stat-pill.success {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

[data-theme="dark"] .retry-stat-pill.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .retry-stat-pill.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

[data-theme="dark"] .retry-stat-pill.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .retry-stat-pill.pending {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

[data-theme="dark"] .retry-stat-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.retry-progress-bar-container {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

[data-theme="light"] .retry-progress-bar-container {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .retry-progress-bar-container {
  background: rgba(255, 255, 255, 0.12);
}

.retry-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: width 0.3s ease;
}

.retry-progress-current-file {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 正在重试中的表格行动态效果 */
tr.row-retrying-active {
  transition: background-color 0.25s ease;
}

[data-theme="light"] tr.row-retrying-active {
  background-color: rgba(37, 99, 235, 0.08) !important;
}

[data-theme="dark"] tr.row-retrying-active {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

[data-theme="light"] .row-btn.row-btn-success {
  background: rgba(5, 150, 105, 0.1) !important;
  color: #047857 !important;
  border: 1px solid rgba(5, 150, 105, 0.3) !important;
}

[data-theme="dark"] .row-btn.row-btn-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

/* ========================================================
   🚀 首页招聘流水线工作台 (Recruitment Pipeline Workbench)
   ======================================================== */

.pipeline-workbench-panel {
  position: relative;
  overflow: visible;
}

.pipeline-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.pipeline-step-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pipeline-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pipeline-tab-item:hover {
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.06);
}

.pipeline-tab-item.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: rgba(59, 130, 246, 0.35);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

.pipeline-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.pipeline-tab-item.active .pipeline-tab-num {
  background: var(--primary);
  color: #ffffff;
}

.pipeline-tab-arrow {
  color: var(--text-dim);
  font-size: 0.76rem;
  opacity: 0.7;
  user-select: none;
}

.pipeline-panel-content {
  animation: fadeInPanel 0.25s ease-out;
}

@keyframes fadeInPanel {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* JD 生成 Tab 专属样式 */
.jd-drop-zone {
  border-color: rgba(139, 92, 246, 0.35) !important;
  background: rgba(139, 92, 246, 0.03) !important;
}

.jd-drop-zone:hover,
.jd-drop-zone.dragover {
  border-color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.08) !important;
}

.jd-pipeline-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jd-pipeline-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 人岗匹配 Tab 双卡片网格样式 */
.pipeline-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 680px) {
  .pipeline-match-grid {
    grid-template-columns: 1fr;
  }
}

.pipeline-match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pipeline-match-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pipeline-match-card-header {
  margin-bottom: 8px;
}

.match-card-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.match-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.match-card-desc {
  margin: 2px 0 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.pipeline-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 85px;
  overflow-y: auto;
  padding: 2px 0;
}

.pipeline-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 0.74rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pipeline-quick-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.pipeline-quick-chip .chip-badge {
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.pipeline-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.pipeline-search-item {
  padding: 7px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.pipeline-search-item:last-child {
  border-bottom: none;
}

.pipeline-search-item:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

.pipeline-search-item .item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ========================================================
   首页智能搜索台：核心技能栈快捷标签与双重高光标记
   ======================================================== */
.search-hot-skills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.hot-skills-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.hot-skills-chips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hot-skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

[data-theme="light"] .hot-skill-chip {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .hot-skill-chip:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

[data-theme="dark"] .hot-skill-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .hot-skill-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* 核心技能命中高亮标签 (双主题高对比度 WCAG AA >= 4.5:1) */
.skill-tag-matched {
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  transition: all 0.2s ease;
}

.skill-tag-matched .matched-check {
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
}

[data-theme="light"] .skill-tag-matched {
  background: #ecfdf5 !important;
  color: #047857 !important; /* 对比度 > 6:1 */
  border: 1px solid #10b981 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2) !important;
}

[data-theme="dark"] .skill-tag-matched {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important; /* 对比度 > 5:1 */
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25) !important;
}

/* 专属核心技能命中横条 (卡片头部双重高光) */
.candidate-skill-match-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 10px;
  border-radius: 6px;
  margin: 6px 0 8px 0;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

[data-theme="light"] .candidate-skill-match-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

[data-theme="dark"] .candidate-skill-match-banner {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.candidate-skill-match-banner .skill-match-label {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.candidate-skill-match-banner .skill-match-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hit-skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

[data-theme="light"] .hit-skill-badge {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

[data-theme="dark"] .hit-skill-badge {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.hit-skill-badge .hit-badge-icon {
  font-style: normal;
  font-weight: 700;
  font-size: 0.68rem;
}

.skill-match-ratio-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: auto;
}

[data-theme="light"] .skill-match-ratio-pill {
  background: #bbf7d0;
  color: #14532d;
}

[data-theme="dark"] .skill-match-ratio-pill {
  background: rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

/* 意图栏技能高亮标签 */
.intent-skills-highlighted {
  font-weight: 600 !important;
}

[data-theme="light"] .intent-skills-highlighted {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #10b981 !important;
}

[data-theme="dark"] .intent-skills-highlighted {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
}

/* Tab 3 候选人联想框命中技能标签 */
.pipeline-dropdown-skills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.pipeline-dropdown-skills .pipeline-quick-chip {
  padding: 1px 6px;
  font-size: 0.7rem;
}

[data-theme="light"] .pipeline-dropdown-skills .pipeline-quick-chip.chip-matched {
  background: #ecfdf5;
  color: #047857;
  border-color: #10b981;
  font-weight: 600;
}

[data-theme="dark"] .pipeline-dropdown-skills .pipeline-quick-chip.chip-matched {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.6);
  font-weight: 600;
}

/* ========================================================
   系统更新日志模态弹窗与时间线组件 (Changelog Modal & Cards)
   ======================================================== */
.changelog-modal-content {
  max-width: 740px;
  width: 94%;
  padding: 24px 28px;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.changelog-current-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  padding: 4px 2px;
}

.changelog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.changelog-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.changelog-card.is-current {
  border-left: 4px solid var(--primary);
}

.changelog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.changelog-version-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.changelog-version-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.changelog-latest-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .changelog-latest-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.changelog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.changelog-card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 4px;
  margin-bottom: 4px;
}

.changelog-card-summary {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.changelog-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.changelog-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.changelog-section-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* 分类徽章明暗双主题 WCAG AA 深度适配 */
.changelog-section-badge.badge-feature {
  background: rgba(5, 150, 105, 0.1);
  color: #065f46;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

[data-theme="dark"] .changelog-section-badge.badge-feature {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.changelog-section-badge.badge-optimization {
  background: rgba(37, 99, 235, 0.1);
  color: #1e40af;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .changelog-section-badge.badge-optimization {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.changelog-section-badge.badge-fix {
  background: rgba(217, 119, 6, 0.1);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

[data-theme="dark"] .changelog-section-badge.badge-fix {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.changelog-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.changelog-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.6;
}

.changelog-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .changelog-modal-content {
    padding: 18px 16px;
    width: 96%;
  }

  .changelog-card {
    padding: 14px 14px;
  }

  .changelog-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   左右分屏简历原件在线预览模态框 (Split Resume Preview Modal)
   ========================================================================== */
.modal-content.detail-modal-split {
  max-width: 96vw;
  width: 96vw;
  height: 92vh;
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-split-container {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 左侧：候选人详情画像面板 (黄金分割比 61.8%) */
.detail-split-left {
  flex: 0 0 61.8%;
  max-width: 61.8%;
  height: 100%;
  overflow-y: auto;
  padding: 28px 32px;
  border-right: 1px solid var(--border-subtle);
  background: var(--modal-bg);
  box-sizing: border-box;
}

.detail-split-left.is-preview-mode {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

/* 右侧：简历原件实时在线预览面板 / 操作记录分屏面板 (黄金分割比 38.2%) */
.detail-split-right {
  flex: 1 1 38.2%;
  max-width: 38.2%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  box-sizing: border-box;
  overflow: hidden;
}

/* 当候选人详情页在左、预览简历在右时：不使用黄金比例 (61.8%:38.2%)，而是采用 50%:50% 对等分屏 (类名与 :has() 双重保障) */
.detail-modal-split.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
.detail-split-container.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
.detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-left:not(.is-preview-mode) {
  flex: 0 0 50%;
  max-width: 50%;
}

.detail-modal-split.split-resume-preview-mode .detail-split-right,
.detail-split-container.split-resume-preview-mode .detail-split-right,
.detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-right {
  flex: 0 0 50%;
  max-width: 50%;
}

/* 预览顶部工具栏 */
.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  flex-shrink: 0;
  gap: 10px;
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.preview-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-header-title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-select-slot,
#notes-split-select-slot,
#interviews-split-select-slot,
#audit-split-select-slot,
#preview-select-slot {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* 分屏面板专用精致计数胶囊 (Split Count Badge，彻底杜绝折行或竖版显示) */
.split-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.22);
  user-select: none;
  transition: all 0.2s ease;
}

[data-theme="dark"] .split-count-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
}

.split-count-badge.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .split-count-badge.badge-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.preview-select-resume {
  background: var(--input-bg, var(--bg-card));
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 6px);
  padding: 4px 10px;
  font-size: 0.82rem;
  max-width: 240px;
  cursor: pointer;
  outline: none;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.preview-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.preview-action-btn:hover {
  background: var(--primary-bg, rgba(99, 102, 241, 0.1));
  color: var(--primary);
  border-color: var(--primary);
}

.preview-action-btn.btn-close-split {
  color: var(--text-muted);
}
.preview-action-btn.btn-close-split:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: #ef4444;
}

/* 预览主体容器 */
.preview-body-container {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  position: relative;
  background: var(--bg-main, #f8fafc);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

[data-theme="dark"] .preview-body-container {
  background: #0b0f19;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* DOCX 渲染样式定制与白底黑字纸张保真规范 */
.docx-render-wrapper {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  background: var(--bg-main, #f1f5f9);
}

[data-theme="dark"] .docx-render-wrapper {
  background: #0f172a; /* 深色阅读衬底，防眩光 */
}

/* 核心：Word 文档必须保持真实纸张的“白底深色字”排版保真 */
.docx-render-wrapper .docx-viewer-content {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  background: #ffffff !important;
  color: #1e293b !important;
  min-height: 100%;
  max-width: 920px;
  width: 100%;
  border-radius: 6px;
  box-sizing: border-box;
  padding: 0;
  overflow: visible;
}

[data-theme="dark"] .docx-render-wrapper .docx-viewer-content {
  background: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* 穿透覆盖 docx-preview 生成的 DOM 元素，确保表格、段落与文字排版清晰可辨 */
.docx-viewer-content .docx-wrapper {
  background: transparent !important;
  padding: 0 !important;
}

.docx-viewer-content section.docx {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: none !important;
  margin-bottom: 24px !important;
  border-radius: 4px;
}

.docx-viewer-content .docx p,
.docx-viewer-content .docx span,
.docx-viewer-content .docx td,
.docx-viewer-content .docx th,
.docx-viewer-content .docx div {
  /* 尊重 Word 内部自带的行内颜色（如红字提醒、蓝字链接），若无指定则默认为深黑灰色 */
  color: inherit;
}

.docx-viewer-content .docx table {
  border-color: #cbd5e1 !important;
}

.docx-viewer-content .docx td,
.docx-viewer-content .docx th {
  border-color: #cbd5e1 !important;
}

/* 图片预览样式 */
.image-preview-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.image-preview-wrapper img {
  max-width: 96%;
  max-height: 96%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 文本/代码预览 */
.text-preview-wrapper {
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-main);
}

/* 提示与空状态 */
.preview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
  color: var(--text-dim);
  text-align: center;
  gap: 12px;
}

.preview-empty-icon {
  font-size: 3rem;
  opacity: 0.8;
}

/* 移动端/小屏响应式适配：堆叠或单栏展示 (Narrow screen stacked layout) */
@media (max-width: 1024px) {
  .modal-content.detail-modal-split {
    width: 98vw;
    height: 96vh;
    max-height: 96vh;
  }

  .detail-split-container {
    flex-direction: column;
    overflow-y: hidden;
  }

  /* 上半部分：候选人详情画像面板 (全宽显示，底部加重分界线与立体阴影) */
  .detail-split-left,
  .detail-modal-split.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
  .detail-split-container.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
  .detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-left:not(.is-preview-mode) {
    flex: 0 0 50%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 50%;
    max-height: 50%;
    border-right: none !important;
    border-bottom: 3px solid var(--border-subtle) !important;
    padding: 18px 20px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
    overflow-y: auto;
  }

  /* 下半部分：变为全宽显示，彻底消除窄横宽挤压 */
  .detail-split-right,
  .detail-modal-split.split-resume-preview-mode .detail-split-right,
  .detail-split-container.split-resume-preview-mode .detail-split-right,
  .detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-right {
    flex: 1 1 50%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 50%;
    max-height: 50%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-left: none !important;
    background: var(--bg-card);
    position: relative;
    z-index: 1;
    overflow: hidden;
  }

  /* 上下区分显著：下方面板顶栏强化为主色高亮分界工具栏 */
  .detail-split-right .preview-header-bar {
    background: var(--input-bg, #f1f5f9);
    border-top: 2px solid var(--primary, #2563eb);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  [data-theme="dark"] .detail-split-right .preview-header-bar {
    background: #1e293b;
    border-top: 2px solid var(--primary, #3b82f6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* 下半部分主体容器内边距适配 */
  .detail-split-right .preview-body-container {
    padding: 14px 16px !important;
  }
}

@media (max-width: 768px) {
  .modal-content.detail-modal-split,
  .rep-gen-modal-content.rep-gen-modal-split {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 92vh !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  .detail-split-container {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  /* 上半部分：候选人详情画像面板 (全宽显示，消除任何横向宽度溢出) */
  .detail-split-left,
  .detail-modal-split.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
  .detail-split-container.split-resume-preview-mode .detail-split-left:not(.is-preview-mode),
  .detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-left:not(.is-preview-mode) {
    flex: 0 0 50% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 50% !important;
    max-height: 50% !important;
    border-right: none !important;
    border-bottom: 3px solid var(--border-subtle) !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* 下半部分：跟进备注/面试安排/操作记录/预览面板 (全宽显示，消除任何横向宽度溢出) */
  .detail-split-right,
  .detail-modal-split.split-resume-preview-mode .detail-split-right,
  .detail-split-container.split-resume-preview-mode .detail-split-right,
  .detail-split-container:has(.detail-split-right #preview-body-container) .detail-split-right {
    flex: 1 1 50% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 50% !important;
    max-height: 50% !important;
    box-sizing: border-box !important;
    border-left: none !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  /* 分屏顶栏移动端自适应排版 */
  .detail-split-right .preview-header-bar,
  .detail-split-left .preview-header-bar {
    padding: 8px 10px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .preview-header-left {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .preview-header-title {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important;
  }

  .preview-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .preview-action-btn {
    padding: 3px 7px !important;
    font-size: 0.75rem !important;
  }

  .preview-action-btn .preview-btn-text {
    display: none !important;
  }

  .detail-split-right .preview-body-container {
    padding: 10px 10px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .notes-split-input-card {
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 候选人画像详情左侧卡片与栅格 */
  .cand-detail-topbar {
    padding-right: 0 !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cand-detail-topbar .btn {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
  }

  .candidate-basic-info-box {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
  }

  .candidate-info-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .candidate-info-grid > div {
    min-width: 0 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
}

@media (max-width: 640px) {
  .detail-split-left {
    padding: 10px 10px !important;
  }

  .detail-split-right .preview-header-bar {
    padding: 6px 10px !important;
    gap: 4px;
  }

  .preview-actions {
    gap: 3px;
  }

  .preview-action-btn {
    padding: 3px 6px;
    font-size: 0.74rem;
  }

  .preview-action-btn .preview-btn-text {
    display: none;
  }

  .preview-header-title {
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   搜寻报告与 Excel 名册导入及文件管理样式 (Strict Dual-Theme Parity & WCAG AA)
   ========================================================================== */

/* 工作表选择药丸 */
.excel-sheet-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="light"] .excel-sheet-pill {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .excel-sheet-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .excel-sheet-pill.active {
  background: #047857;
  color: #ffffff;
  border-color: #047857;
  font-weight: 600;
}

[data-theme="dark"] .excel-sheet-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .excel-sheet-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

[data-theme="dark"] .excel-sheet-pill.active {
  background: #10b981;
  color: #064e3b;
  border-color: #10b981;
  font-weight: 600;
}

/* 字段映射配置小卡片 */
.mapping-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .mapping-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .mapping-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mapping-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
}

[data-theme="light"] .mapping-card-label {
  color: #1e293b;
}

[data-theme="dark"] .mapping-card-label {
  color: #f1f5f9;
}

.mapping-card-field {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
}

[data-theme="light"] .mapping-card-field.mapped {
  background: #dcfce7;
  color: #15803d;
}

[data-theme="dark"] .mapping-card-field.mapped {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

[data-theme="light"] .mapping-card-field.unmapped {
  background: #f1f5f9;
  color: #64748b;
}

[data-theme="dark"] .mapping-card-field.unmapped {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.mapping-card-select {
  width: 100%;
  padding: 4px 6px;
  font-size: 0.76rem;
  border-radius: 4px;
  outline: none;
}

[data-theme="light"] .mapping-card-select {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .mapping-card-select:focus {
  border-color: #2563eb;
  background: #ffffff;
}

[data-theme="dark"] .mapping-card-select {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .mapping-card-select:focus {
  border-color: #60a5fa;
  background: #0f172a;
}

/* 扩展徽章 excel */
.resume-ext-badge.excel {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .resume-ext-badge.excel {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

/* 导入文件管理表格操作按钮 */
.imported-file-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
}

[data-theme="light"] .imported-file-action-btn.preview {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

[data-theme="light"] .imported-file-action-btn.preview:hover {
  background: #dbeafe;
}

[data-theme="dark"] .imported-file-action-btn.preview {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .imported-file-action-btn.preview:hover {
  background: rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .imported-file-action-btn.retry {
  color: #6d28d9;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

[data-theme="light"] .imported-file-action-btn.retry:hover {
  background: #ede9fe;
}

[data-theme="dark"] .imported-file-action-btn.retry {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .imported-file-action-btn.retry:hover {
  background: rgba(124, 58, 237, 0.25);
}

[data-theme="light"] .imported-file-action-btn.retry.row-btn-success,
[data-theme="dark"] .imported-file-action-btn.retry.row-btn-success {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .imported-file-action-btn.download {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

[data-theme="light"] .imported-file-action-btn.download:hover {
  background: #d1fae5;
}

[data-theme="dark"] .imported-file-action-btn.download {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .imported-file-action-btn.download:hover {
  background: rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .imported-file-action-btn.delete,
[data-theme="light"] .imported-file-action-btn.archive {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

[data-theme="light"] .imported-file-action-btn.delete:hover,
[data-theme="light"] .imported-file-action-btn.archive:hover {
  background: #fee2e2;
}

[data-theme="dark"] .imported-file-action-btn.delete,
[data-theme="dark"] .imported-file-action-btn.archive {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .imported-file-action-btn.delete:hover,
[data-theme="dark"] .imported-file-action-btn.archive:hover {
  background: rgba(239, 68, 68, 0.25);
}

[data-theme="light"] .imported-file-action-btn.restore {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

[data-theme="light"] .imported-file-action-btn.restore:hover {
  background: #d1fae5;
}

[data-theme="dark"] .imported-file-action-btn.restore {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .imported-file-action-btn.restore:hover {
  background: rgba(16, 185, 129, 0.25);
}




/* ======================================================== */
/* AI 顾问主动人岗匹配提醒气泡卡片 (明暗双主题全面对齐，WCAG AA) */
/* ======================================================== */
.ai-proactive-match-bubble {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  border-radius: 12px;
  padding: 12px 14px 10px 14px;
  z-index: 1045;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
  animation: aiProactiveSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes aiProactiveSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 底部向下的气泡小尾角，指向 AI FAB */
.ai-proactive-bubble-arrow {
  position: absolute;
  bottom: -7px;
  right: 28px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .ai-proactive-match-bubble {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cbd5e1;
  color: #0f172a;
}
[data-theme="light"] .ai-proactive-bubble-arrow {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="dark"] .ai-proactive-match-bubble {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .ai-proactive-bubble-arrow {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(255, 255, 255, 0.16);
}

.ai-proactive-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-proactive-bubble-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

[data-theme="light"] .ai-proactive-bubble-title {
  color: #1e293b;
}
[data-theme="dark"] .ai-proactive-bubble-title {
  color: #f1f5f9;
}

.ai-proactive-entity-badge {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
[data-theme="light"] .ai-proactive-entity-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
[data-theme="dark"] .ai-proactive-entity-badge {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.ai-proactive-close-btn {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
[data-theme="light"] .ai-proactive-close-btn {
  color: #64748b;
}
[data-theme="light"] .ai-proactive-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="dark"] .ai-proactive-close-btn {
  color: #94a3b8;
}
[data-theme="dark"] .ai-proactive-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.ai-proactive-bubble-body {
  margin-bottom: 10px;
}
.ai-proactive-bubble-text {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}
[data-theme="light"] .ai-proactive-bubble-text {
  color: #334155;
}
[data-theme="dark"] .ai-proactive-bubble-text {
  color: #cbd5e1;
}

.ai-proactive-bubble-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-proactive-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.ai-proactive-action-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.ai-proactive-action-btn.primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.ai-proactive-action-btn.secondary {
  border: 1px solid var(--border-subtle);
}
[data-theme="light"] .ai-proactive-action-btn.secondary {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}
[data-theme="light"] .ai-proactive-action-btn.secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="dark"] .ai-proactive-action-btn.secondary {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}
[data-theme="dark"] .ai-proactive-action-btn.secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
}

/* 15秒微缩收拢倒计时进度条 */
.ai-proactive-countdown-bar {
  height: 2px;
  background: rgba(59, 130, 246, 0.4);
  margin-top: 8px;
  border-radius: 2px;
  width: 100%;
  transform-origin: left center;
}
.ai-proactive-countdown-bar.active {
  animation: aiProactiveCountdown 15s linear forwards;
}
@keyframes aiProactiveCountdown {
  from { width: 100%; }
  to { width: 0%; }
}

/* 微缩状态小微标 */
.ai-proactive-mini-pill {
  position: fixed;
  bottom: 86px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 1045;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  animation: aiProactiveSlideUp 0.2s ease;
  transition: all 0.2s ease;
}
[data-theme="light"] .ai-proactive-mini-pill {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
[data-theme="dark"] .ai-proactive-mini-pill {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}
.ai-proactive-mini-pill:hover {
  transform: translateY(-2px);
}

/* ========================================================
   右上角导航栏: 浏览历史 (History) 与 收藏/待办 (Todos)
   ======================================================== */

.nav-icon-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  line-height: 1.2;
}

.nav-icon-menu-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.nav-icon-menu-btn .btn-icon {
  font-size: 0.95rem;
  display: inline-block;
}

.nav-icon-menu-btn .btn-label {
  display: inline-block;
}

@media (max-width: 900px) {
  .nav-icon-menu-btn .btn-label {
    display: none;
  }
  .nav-icon-menu-btn {
    padding: 6px 8px;
  }
}

.nav-todo-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  pointer-events: none;
  border: 1.5px solid var(--modal-bg);
}

/* 下拉浮层面板公共骨架 */
.nav-menu-popover {
  position: absolute;
  right: 0;
  top: 115%;
  width: 380px;
  max-width: 92vw;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-menu-popover .popover-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--card-bg);
}

.nav-menu-popover .popover-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.nav-menu-popover .popover-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu-popover .popover-title-with-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-counter-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
}

[data-theme="light"] .todo-counter-pill {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

[data-theme="dark"] .todo-counter-pill {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.popover-clear-btn,
.popover-add-btn {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.popover-clear-btn {
  background: transparent;
  color: var(--text-dim);
}

.popover-clear-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.popover-add-btn {
  background: var(--primary);
  color: #ffffff;
}

.popover-add-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.popover-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.popover-tabs {
  display: flex;
  gap: 3px;
  background: var(--input-bg);
  padding: 2px;
  border-radius: 6px;
}

.popover-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.popover-tab-btn.active {
  background: var(--modal-bg);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.popover-tools-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.todo-tag-filter-select {
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  max-width: 90px;
}

.todo-sort-btn {
  border: 1px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.todo-sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav-menu-popover .popover-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
}

/* 历史列表项样式 */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-subtle);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: var(--hover-bg, rgba(99, 102, 241, 0.08));
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.history-type-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}

[data-theme="light"] .history-type-candidate {
  background: #eff6ff;
  color: #1d4ed8;
}
[data-theme="dark"] .history-type-candidate {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

[data-theme="light"] .history-type-job {
  background: #f5f3ff;
  color: #7c3aed;
}
[data-theme="dark"] .history-type-job {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

[data-theme="light"] .history-type-interview {
  background: #f0fdf4;
  color: #047857;
}
[data-theme="dark"] .history-type-interview {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

[data-theme="light"] .history-type-view {
  background: #f1f5f9;
  color: #334155;
}
[data-theme="dark"] .history-type-view {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.history-info {
  min-width: 0;
  flex: 1;
}

.history-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.history-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-subtitle {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.history-action-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 待办列表项样式 */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 6px;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item:hover {
  background: var(--hover-bg, rgba(99, 102, 241, 0.05));
}

.todo-item.completed {
  opacity: 0.65;
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .todo-item.completed {
  background: rgba(255, 255, 255, 0.02);
}

.todo-item.completed .todo-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.todo-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  background: var(--input-bg);
  position: relative;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.todo-checkbox:hover {
  border-color: var(--primary);
}

.todo-checkbox:checked {
  background: #10b981;
  border-color: #10b981;
}

.todo-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.todo-content {
  flex: 1;
  min-width: 0;
}

.todo-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.todo-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  line-height: 1.35;
}

.todo-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.73rem;
}

/* 标签样式 (明暗分离 WCAG AA) */
.todo-tag-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

/* 各种业务标签高对比度色 */
[data-theme="light"] .todo-tag-call {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
[data-theme="dark"] .todo-tag-call {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .todo-tag-interview {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
[data-theme="dark"] .todo-tag-interview {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

[data-theme="light"] .todo-tag-report {
  background: #f0fdf4;
  color: #047857;
  border: 1px solid #bbf7d0;
}
[data-theme="dark"] .todo-tag-report {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .todo-tag-email {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .todo-tag-email {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .todo-tag-publish {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
[data-theme="dark"] .todo-tag-publish {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

[data-theme="light"] .todo-tag-favorite {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}
[data-theme="dark"] .todo-tag-favorite {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

[data-theme="light"] .todo-tag-custom {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
[data-theme="dark"] .todo-tag-custom {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* 目标对象跳转超链接 */
.todo-target-link {
  font-size: 0.72rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  background: var(--tag-bg);
  border-radius: 3px;
  cursor: pointer;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-target-link:hover {
  text-decoration: underline;
}

/* 到期时间药丸 */
.todo-due-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

[data-theme="light"] .todo-due-overdue {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
[data-theme="dark"] .todo-due-overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

[data-theme="light"] .todo-due-today {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
[data-theme="dark"] .todo-due-today {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

[data-theme="light"] .todo-due-normal {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
[data-theme="dark"] .todo-due-normal {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.todo-notes-preview {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
  word-break: break-all;
  background: var(--tag-bg);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 2px solid var(--border-subtle);
}

.todo-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.todo-item:hover .todo-item-actions {
  opacity: 1;
}

.todo-action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
}

.todo-action-icon-btn:hover {
  color: var(--primary);
  background: var(--hover-bg, rgba(99, 102, 241, 0.1));
}

.todo-action-icon-btn.delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.popover-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.popover-empty .empty-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

/* ========================================================
   新建/编辑待办弹窗样式 (Todo Modal)
   ======================================================== */

.todo-modal-content {
  width: 540px;
  max-width: 95vw;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  padding: 24px;
}

.todo-form-row {
  margin-bottom: 14px;
}

.todo-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.todo-select,
.todo-input,
.todo-textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.todo-select:focus,
.todo-input:focus,
.todo-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.todo-quick-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.todo-quick-date-btn {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.todo-quick-date-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

.todo-quick-date-btn.clear {
  color: var(--text-dim);
}

.todo-quick-date-btn.clear:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.todo-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.todo-tag-chip {
  font-size: 0.73rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.todo-tag-chip:hover,
.todo-tag-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  font-weight: 600;
}

.todo-target-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-main);
  max-width: 100%;
}

.todo-target-clear-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dim);
  padding: 2px 7px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.todo-target-clear-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* 关联目标搜索下拉框 */
.todo-target-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1080;
}

.todo-target-dropdown-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.todo-target-dropdown-item:last-child {
  border-bottom: none;
}

.todo-target-dropdown-item:hover {
  background: var(--hover-bg, rgba(99, 102, 241, 0.08));
}

.todo-target-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.todo-target-item-title {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-target-item-sub {
  color: var(--text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.highlight-field {
  animation: fieldFlash 0.6s ease;
}

@keyframes fieldFlash {
  0% {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
    border-color: var(--primary);
  }
  100% {
    box-shadow: none;
  }
}

.todo-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Candidate Avatar Styles (Detail Modal, Table View, Card View & Context Menu)
   ========================================================================== */

/* 1. 候选人画像详情大头像 (64x64px) */
.cand-detail-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: var(--tag-bg);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.cand-detail-avatar-wrap:hover,
.cand-detail-avatar-wrap.drag-over {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.cand-detail-avatar-wrap.drag-over {
  border-style: dashed;
}

.cand-detail-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cand-detail-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cand-detail-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(1.5px);
  pointer-events: none;
}

.cand-detail-avatar-wrap:hover .cand-detail-avatar-overlay,
.cand-detail-avatar-wrap.drag-over .cand-detail-avatar-overlay {
  opacity: 1;
}

.cand-detail-avatar-overlay span {
  line-height: 1.1;
}

/* 2. 表格列表中的微缩头像 (28x28px) */
.cand-table-avatar-wrap {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cand-table-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cand-table-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 3. 工作台搜索卡片中的微缩头像 (36x36px) */
.cand-card-avatar-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--border-subtle);
  background: var(--tag-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.cand-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cand-card-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 4. 定制右键快捷菜单 (cand-avatar-menu) */
.cand-avatar-menu {
  position: fixed;
  z-index: 10050;
  min-width: 170px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: none;
  animation: candMenuFadeIn 0.15s ease-out;
  backdrop-filter: blur(10px);
}

@keyframes candMenuFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.cand-avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text-main, #0f172a);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.cand-avatar-menu-item:hover {
  background: var(--primary-glow, rgba(99, 102, 241, 0.12));
  color: var(--primary, #6366f1);
}

.cand-avatar-menu-item.danger {
  color: #ef4444;
}

.cand-avatar-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.cand-avatar-menu-divider {
  height: 1px;
  background: var(--border-subtle, #e2e8f0);
  margin: 4px 0;
}

.cand-avatar-hint-tooltip {
  font-size: 0.74rem;
  color: var(--text-dim);
  padding: 4px 10px 2px 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}

/* 明暗主题对比度对齐 (Theme Parity & WCAG AA) */
[data-theme="dark"] .cand-avatar-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .cand-avatar-menu-item {
  color: #f1f5f9;
}

[data-theme="dark"] .cand-avatar-menu-item:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

[data-theme="dark"] .cand-avatar-menu-item.danger {
  color: #f87171;
}

[data-theme="dark"] .cand-avatar-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

[data-theme="dark"] .cand-avatar-menu-divider {
  background: #334155;
}

[data-theme="dark"] .cand-avatar-hint-tooltip {
  color: #94a3b8;
  border-top-color: #334155;
}

[data-theme="light"] .cand-avatar-menu {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="light"] .cand-avatar-menu-item {
  color: #1e293b;
}

[data-theme="light"] .cand-avatar-hint-tooltip {
  color: #64748b;
  border-top-color: #e2e8f0;
}

/* ==========================================================================
   Candidate Attachments Upload & Management Styles
   ========================================================================== */

.cand-detail-attachments-box {
  margin-bottom: 24px;
}

.cand-attachment-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.cand-attachment-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cand-attach-ai-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  background: var(--tag-bg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.cand-attach-ai-toggle:hover {
  border-color: var(--primary);
}

.cand-attach-ai-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
}

.cand-attachment-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: 10px;
  padding: 16px 20px;
  background: var(--tag-bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
}

.cand-attachment-dropzone:hover,
.cand-attachment-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.cand-attachment-dropzone-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.cand-attachment-dropzone-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.cand-attachment-dropzone-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.cand-attachment-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.cand-attach-del-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.cand-attach-del-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #dc2626;
}

[data-theme="dark"] .cand-attach-del-btn {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.45);
}

[data-theme="dark"] .cand-attach-del-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border-color: #f87171;
}

.cand-attach-ai-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  background: var(--tag-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cand-attach-ai-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.cand-attach-ai-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

[data-theme="dark"] .cand-attach-ai-btn {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}

[data-theme="dark"] .cand-attach-ai-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.cand-attach-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}

.cand-attach-more-btn:hover,
.cand-attach-more-btn.active {
  background: var(--bg-card-hover, rgba(59, 130, 246, 0.08));
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="dark"] .cand-attach-more-btn {
  background: var(--tag-bg);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

[data-theme="dark"] .cand-attach-more-btn:hover,
[data-theme="dark"] .cand-attach-more-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: #93c5fd;
}

.resume-download-modal-upload-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--tag-bg);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.resume-download-modal-upload-bar:hover,
.resume-download-modal-upload-bar.dragover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

/* ==========================================================================
   候选人报告生成与模板管理模块 (Candidate Report Generation & Template Library)
   明暗双主题对齐与 WCAG AA 对比度合规
   ========================================================================== */

/* 模板管理表格单元格与格式徽章 */
.report-template-badge-preset {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .report-template-badge-preset {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

[data-theme="dark"] .report-template-badge-preset {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.4);
}

/* 动态增删行组件 (工作经历与教育经历) */
.rep-dynamic-row {
  transition: border-color 0.15s ease, background 0.15s ease;
}

[data-theme="light"] .rep-dynamic-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .rep-dynamic-row input,
[data-theme="light"] .rep-dynamic-row textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .rep-dynamic-row input:focus,
[data-theme="light"] .rep-dynamic-row textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .rep-dynamic-row {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

[data-theme="dark"] .rep-dynamic-row input,
[data-theme="dark"] .rep-dynamic-row textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .rep-dynamic-row input:focus,
[data-theme="dark"] .rep-dynamic-row textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* 报告在线排版预览容器 */
[data-theme="light"] #report-doc-preview-body {
  background: #e2e8f0 !important;
}

[data-theme="dark"] #report-doc-preview-body {
  background: #0b1120 !important;
}

#report-doc-viewer-content .docx {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
}

/* 确保 Word 预览中页眉/页脚浮动图片（如企业 Logo）排版基准与坐标保真，不被父级段落缩进挤压、负 offset 掩盖或溢出裁切 */
#report-doc-viewer-content section.docx > header,
.docx-viewer-content section.docx > header,
section.docx > header {
  position: relative !important;
  overflow: visible !important;
}

#report-doc-viewer-content header img,
.docx-viewer-content header img {
  max-width: none !important;
  visibility: visible !important;
}

/* 锁定提示弹窗说明 */
[data-theme="light"] #modal-candidate-report-locked .locked-card-info {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

[data-theme="dark"] #modal-candidate-report-locked .locked-card-info {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

/* 报告结果卡片与附件链接按钮 */
[data-theme="light"] #rep-gen-result-card {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

[data-theme="dark"] #rep-gen-result-card {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* 制作候选人报告主弹窗容器样式与展开高度适配 */
.rep-gen-modal-content {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  min-height: 380px;
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 制作候选人报告左右分屏对比模式 (画像/简历 对比态) */
.rep-gen-modal-content.rep-gen-modal-split {
  max-width: 96vw;
  width: 96vw;
  height: 92vh;
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rep-gen-modal-content.rep-gen-modal-split .rep-gen-modal-header {
  margin-bottom: 0 !important;
  padding: 12px 20px !important;
}

/* 顶栏分段式切换胶囊组 (Segmented Control) */
.rep-gen-split-segmented-group {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.rep-gen-split-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rep-gen-split-seg-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .rep-gen-split-seg-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.rep-gen-split-seg-btn.active {
  color: #ffffff !important;
  background: var(--primary) !important;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

.rep-gen-split-seg-btn.active:hover {
  background: var(--primary) !important;
}

/* 左右分屏总容器 */
.rep-gen-split-container {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

/* 左侧对照面板 (画像 / 简历原件预览) */
.rep-gen-split-left {
  flex: 0 0 46%;
  max-width: 46%;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* 右侧报告制作主控台 (始终固定居右) */
.rep-gen-split-right {
  flex: 1 1 54%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 18px 24px;
  box-sizing: border-box;
  background: var(--modal-bg);
}

/* 当非分屏模式时，右侧主控台在原单栏容器中自然撑开 */
.rep-gen-modal-content:not(.rep-gen-modal-split) .rep-gen-split-container {
  display: block;
  overflow: visible;
  height: auto;
}

.rep-gen-modal-content:not(.rep-gen-modal-split) .rep-gen-split-right {
  padding: 0;
  height: auto;
  overflow: visible;
  background: transparent;
}

/* 左侧分屏顶栏工具条 */
.rep-split-left-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--tag-bg);
  flex-shrink: 0;
  gap: 10px;
}

.rep-split-left-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.rep-split-resume-select {
  flex: 1;
  min-width: 0;
  max-width: 220px;
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 4px);
  padding: 4px 8px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.rep-split-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rep-split-tool-btn:hover {
  background: var(--tag-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* 左侧分屏画像面板样式 */
.rep-split-profile-container {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rep-split-profile-card {
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
}

.rep-split-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 左侧预览容器 */
.rep-split-preview-container {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f1f5f9;
}

[data-theme="dark"] .rep-split-preview-container {
  background: #0b1120;
}

@media (max-width: 1024px) {
  .rep-gen-modal-content.rep-gen-modal-split {
    width: 98vw;
    height: 96vh;
    max-height: 96vh;
  }
  .rep-gen-split-container {
    flex-direction: column;
  }
  .rep-gen-split-left {
    flex: 0 0 42%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    border-right: none !important;
    border-bottom: 2px solid var(--border-subtle);
  }
  .rep-gen-split-right {
    flex: 1 1 58%;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

/* 当选择推荐职位展开联想下拉时，加高父窗口以呈现更多在招职位内容 */
.rep-gen-modal-content.rep-gen-job-expanded {
  min-height: 600px;
}

@media (max-height: 720px) {
  .rep-gen-modal-content.rep-gen-job-expanded {
    min-height: 520px;
  }
}

/* 报告生成控制台选项两行栅格与标签同行排版布局 */
.rep-gen-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
  align-items: center;
}

.rep-gen-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rep-gen-option-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 74px;
  margin: 0;
  cursor: pointer;
}

.rep-gen-option-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.rep-gen-option-select:focus {
  border-color: var(--primary);
}

/* 推荐职位联想搜索与下拉选择组件 (Combobox) */
.rep-gen-combobox-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.rep-gen-combobox-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.rep-gen-combobox-input {
  width: 100%;
  padding-right: 50px !important;
  cursor: text;
  text-overflow: ellipsis;
}

.rep-gen-combobox-clear {
  position: absolute;
  right: 28px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}

.rep-gen-combobox-clear:hover {
  color: var(--text-main);
  background: var(--border-subtle);
}

.rep-gen-combobox-arrow {
  position: absolute;
  right: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.rep-gen-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 1050;
  padding: 4px 0;
}

.rep-gen-combobox-option {
  padding: 8px 12px;
  font-size: 0.84rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s ease;
}

.rep-gen-combobox-option:hover,
.rep-gen-combobox-option.active {
  background: var(--input-bg);
  color: var(--primary);
}

.rep-gen-combobox-option.selected {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.rep-gen-combobox-empty {
  padding: 14px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .rep-gen-options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .rep-gen-option-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* 候选人详情页关键字段变动轨迹 Diff 徽章 (严格遵循 WCAG AA 对比度规范) */
.cand-audit-diff-row {
  font-size: 0.82rem;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--bg-main, rgba(0, 0, 0, 0.02));
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.cand-audit-val-old {
  padding: 1px 6px;
  border-radius: 3px;
  text-decoration: line-through;
  word-break: break-all;
}

[data-theme="light"] .cand-audit-val-old {
  background: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .cand-audit-val-old {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.cand-audit-val-new {
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  word-break: break-all;
}

[data-theme="light"] .cand-audit-val-new {
  background: #d1fae5;
  color: #065f46;
}

[data-theme="dark"] .cand-audit-val-new {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* ==========================================================================
   ⚡ 核心技能胶囊标签盒与智能联想补全样式 (Skills Tag Input & Autocomplete)
   严格遵守 WCAG AA 标准与明暗双主题对齐 (Dual-Theme Parity)
   ========================================================================== */

.skills-tag-input-container {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: var(--radius-sm, 6px);
  cursor: text;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.skills-tag-input-container.is-focused {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px var(--primary-glow, rgba(37, 99, 235, 0.18));
}

[data-theme="dark"] .skills-tag-input-container {
  background: #0f172a;
  border: 1.5px solid #475569;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .skills-tag-input-container.is-focused {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.skills-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
}

/* 技能胶囊标签 (Pill Badge) */
.skill-input-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
  user-select: none;
  transition: all 0.15s ease;
}

[data-theme="dark"] .skill-input-pill {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.skill-input-pill-remove {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 0 2px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  color: inherit;
  transition: all 0.15s ease;
}

.skill-input-pill-remove:hover {
  opacity: 1;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* 内嵌原生文本输入框 */
.skill-tag-native-input {
  flex: 1 1 160px;
  min-width: 140px;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 6px;
  font-size: 0.88rem;
  color: var(--text-main);
  font-family: inherit;
}

.skill-tag-native-input::placeholder {
  color: var(--text-dim, #94a3b8);
  font-size: 0.82rem;
}

/* 联想下拉菜单浮层 */
.skills-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 100080;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .skills-autocomplete-dropdown {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.skills-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main, #334155);
  transition: background 0.12s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .skills-dropdown-item {
  color: #cbd5e1;
  border-bottom-color: rgba(255, 255, 255, 0.03);
}

.skills-dropdown-item:last-child {
  border-bottom: none;
}

.skills-dropdown-item:hover,
.skills-dropdown-item.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

[data-theme="dark"] .skills-dropdown-item:hover,
[data-theme="dark"] .skills-dropdown-item.is-active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.skills-dropdown-hint {
  font-size: 0.72rem;
  color: var(--text-dim, #94a3b8);
  opacity: 0.8;
}

.skills-dropdown-item:hover .skills-dropdown-hint,
.skills-dropdown-item.is-active .skills-dropdown-hint {
  color: inherit;
  opacity: 1;
}

/* 关键字高亮标记 */
.skills-highlight {
  background: transparent;
  color: var(--primary, #2563eb);
  font-weight: 700;
  text-decoration: underline;
  padding: 0;
}

[data-theme="dark"] .skills-highlight {
  color: #60a5fa;
}

.skills-dropdown-empty {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-dim, #64748b);
  text-align: center;
}

.skills-dropdown-empty kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.75rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

[data-theme="dark"] .skills-dropdown-empty kbd {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 标签重复闪烁动画 */
@keyframes tag-duplicate-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
    color: #ef4444;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.skill-input-pill.tag-duplicate-pulse {
  animation: tag-duplicate-pulse 0.4s ease;
}

/* ==========================================================================
   超级管理员专属多维表格列与筛选行规范 (Admin-Only Columns & Filters)
   ========================================================================== */

/* 非超级管理员或未登录时，强制彻底隐藏超管专属列 */
body:not(.is-admin) .col-admin-only,
body:not(.is-admin) th.col-admin-only,
body:not(.is-admin) td.col-admin-only {
  display: none !important;
}

/* 超管模式下专属列的高对比度明暗主题样式 */
.col-admin-only {
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="light"] td.col-admin-only {
  color: #475569;
}

[data-theme="dark"] td.col-admin-only {
  color: #94a3b8;
}






