:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --info-bg: #e0f2fe;
  --mark-bg: #fef08a;
  --mark-focus: #fde047;
  --mark-ring: #ca8a04;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

.mt-xs {
  margin-top: 4px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 12px;
}

.mb-sm {
  margin-bottom: 8px;
}

.mb-md {
  margin-bottom: 10px;
}

.w-full {
  width: 100%;
}

.sub-lead {
  margin: 2px 0 0;
}

body:not(.dev-mode) .dev-only {
  display: none !important;
}

body.dev-mode #toggle-dev-mode-btn {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

/* ==================== 按钮与基础控件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-sm {
  padding: 6px 11px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}

.btn-secondary:hover:not(:disabled) {
  background: #dbeafe;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #166534;
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.section-heading {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

/* ==================== 表单 ==================== */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.field-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="url"],
.field input[type="search"],
.field select,
.field textarea,
.search-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field textarea {
  resize: vertical;
  line-height: 1.55;
}

.field-span-2 {
  grid-column: span 2;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.checkbox-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.form-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

/* ==================== 登录页 ==================== */
.auth-backdrop {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(155deg, #eef2ff 0%, #f8fafc 55%, #ecfeff 100%);
}

.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-header h1 {
  margin: 0;
  font-size: 20px;
}

.subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border-radius: 8px;
}

.subtle-details {
  font-size: 12.5px;
  color: var(--muted);
}

.subtle-details summary {
  cursor: pointer;
  user-select: none;
}

/* ==================== 顶部导航栏 ==================== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.main-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  background: #f1f5f9;
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-chip {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.pill-peak {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-offpeak {
  background: var(--success-bg);
  color: var(--success);
}

.pill-running {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ==================== 主内容容器与卡片 ==================== */
.workspace {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 20px 32px;
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.panel-subhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ==================== 徽章与提示条 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

.badge-ok {
  background: var(--success-bg);
  color: var(--success);
}

.badge-verified {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-fit-strong {
  background: #dcfce7;
  color: #166534;
}

.badge-fit-stretch {
  background: #fef3c7;
  color: #92400e;
}

.badge-fit-mismatch {
  background: #fee2e2;
  color: #991b1b;
}

.badge-fit-unmatched {
  background: #f1f5f9;
  color: #64748b;
}

.badge-apply-queued {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-apply-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-apply-submitted {
  background: #dcfce7;
  color: #15803d;
}

.badge-apply-skipped {
  background: #f1f5f9;
  color: #475569;
}

.badge-apply-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-source {
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--border);
}

.alert {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.alert-error {
  background: var(--danger-bg);
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.alert-warn {
  background: var(--warn-bg);
  color: #78350f;
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--primary-soft);
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  background: #0f172a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px);
}

/* ==================== 首页简历匹配引导条 ==================== */
.hero-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-color: #dbeafe;
}

.hero-banner-info {
  min-width: 0;
  flex: 1;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.hero-banner-info p {
  margin: 0;
}

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

/* ==================== 筛选面板 ==================== */
.filter-primary-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  flex: 1;
  min-width: 0;
}

.filter-primary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filter-collapsible {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.filter-collapsible.is-open {
  display: block;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.filter-expr-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.expr-field {
  flex: 1;
  min-width: 240px;
}

.filter-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.preset-group,
.export-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== 统计芯片条 ==================== */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.stat-chip:hover {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.stat-chip strong {
  color: var(--text);
}

/* ==================== 表格与可调列宽（桌面端） ==================== */
.table-card {
  padding: 0;
  overflow: hidden;
}

.apply-selection-bar {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.apply-selection-info,
.apply-selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-toolbar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  position: relative;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.data-table tbody tr.row-selected {
  background: #eff6ff;
}

.data-table.has-col-widths {
  table-layout: fixed;
}

.data-table.has-col-widths th,
.data-table.has-col-widths td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resizable-th {
  padding-right: 18px;
}

.th-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  z-index: 2;
}

.col-resizer-grip {
  font-size: 10px;
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.col-resizer:hover .col-resizer-grip,
.col-resizer.is-active .col-resizer-grip {
  color: var(--primary);
}

body.is-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

.col-select {
  width: 40px;
  text-align: center !important;
}

.cell-title-main {
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.cell-salary {
  color: #dc2626;
  font-weight: 700;
  font-size: 12.5px;
  margin-top: 2px;
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-chip {
  background: #f1f5f9;
  color: #334155;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
}

/* ==================== 移动端专属岗位卡片流 ==================== */
.jobs-cards-list {
  display: none;
  padding: 12px;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.job-card.is-selected {
  border-color: var(--primary);
  background: #f8fbff;
}

.job-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.job-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.job-card-salary {
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  white-space: nowrap;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12.5px;
  color: #475569;
}

.job-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.job-card-summary {
  font-size: 13px;
  color: #1e293b;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.job-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

/* ==================== 找岗位（多数据源切换） ==================== */
.source-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.source-pill {
  position: relative;
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.source-pill:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.source-pill.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.14);
}

.source-pill.active::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
}

.source-pill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.source-pill-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.source-pill.active .source-pill-title {
  color: var(--primary);
}

.source-pill-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

.source-pill-tag.tag-free {
  background: var(--success-bg);
  color: var(--success);
}

.source-pill.active .source-pill-tag:not(.tag-free) {
  background: #dbeafe;
  color: #1d4ed8;
}

.source-pill-desc {
  font-size: 12px;
  color: var(--muted);
}

.source-panel {
  display: none;
  padding: 16px 18px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.source-panel.active {
  display: block;
}

.source-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.source-panel-head p {
  margin: 0;
}

.chip-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.chip-check:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.chip-check input {
  accent-color: var(--primary);
}

/* ==================== 实时进度条 ==================== */
.progress-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.25s ease;
}

.progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.metric-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.metric-box .label {
  font-size: 11.5px;
  color: var(--muted);
}

.metric-box .val {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

.sse-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sse-controls input,
.sse-controls select {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.subtle-card-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
  user-select: none;
}

/* ==================== 简历页 ==================== */
.resume-editor-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.resume-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ==================== 投递清单与复核工作台 ==================== */
.review-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 14px;
  align-items: start;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 16px;
}

.review-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 68vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.review-item:hover {
  border-color: #93c5fd;
}

.review-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.review-item-title {
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.review-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

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

.apply-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.review-form-panel {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.review-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}

.apply-snippet-box,
.markdown-box {
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
  font-family: inherit;
}

.markdown-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
}

.review-text-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.text-box h3 {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--muted);
}

.jd-text {
  white-space: pre-wrap;
  word-break: break-word;
  background: #fcfdff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  max-height: 440px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
}

.jd-text-compact {
  max-height: 200px;
}

mark.ev-mark {
  background: var(--mark-bg);
  color: inherit;
  padding: 1px 3px;
  border-radius: 3px;
  border-bottom: 2px solid var(--mark-ring);
}

mark.ev-mark-focus {
  background: var(--mark-focus);
  outline: 2px solid var(--mark-ring);
}

.trace-mini {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

/* ==================== 右侧详情抽屉与弹窗 ==================== */
.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  justify-content: flex-end;
}

.modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.drawer {
  width: min(760px, 100vw);
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.drawer-title-group {
  min-width: 0;
}

.drawer-header h2 {
  margin: 0 0 3px;
  font-size: 17px;
  line-height: 1.35;
}

.drawer-header p {
  margin: 0;
}

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

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.drawer-section summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 8px;
}

.evidence-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.ev-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--surface-subtle);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ev-card:hover {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.ev-card.active {
  border-color: var(--primary);
  background: #dbeafe;
}

.ev-card-static {
  cursor: default;
}

.ev-card-static:hover {
  border-color: var(--border);
  background: var(--surface-subtle);
}

.ev-card-label {
  font-size: 11.5px;
  color: var(--muted);
}

.ev-card-val {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
  word-break: break-word;
}

.match-box {
  border: 1px solid #bfdbfe;
  background: #f8fbff;
  border-radius: var(--radius);
  padding: 12px 14px;
}

.match-points-list,
.match-gaps-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
}

.match-gap-item {
  margin-bottom: 6px;
}

.gap-ev-btn {
  border: none;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}

.trace-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}

.trace-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--surface-subtle);
}

.modal-card {
  width: min(620px, 100%);
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.apply-modal-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apply-modal-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--surface-subtle);
  font-size: 13px;
}

.apply-confirm-guard {
  padding: 10px 12px;
  background: var(--warn-bg);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  width: 100%;
}

/* ==================== 移动端底部固定导航栏 ==================== */
.bottom-nav {
  display: none;
}

/* ==================== 平板与手机深度响应式适配 ==================== */
@media (max-width: 1024px) {
  .review-layout,
  .review-text-columns,
  .resume-editor-grid {
    grid-template-columns: 1fr;
  }

  .source-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  /* 顶栏瘦身：隐藏横向 Tab，彻底避免竖排单字挤爆 */
  .topbar {
    padding: 0 12px;
    height: 54px;
  }

  .main-tabs {
    display: none;
  }

  .user-chip {
    display: none;
  }

  #toggle-dev-mode-btn {
    padding: 5px 8px;
    font-size: 12px;
  }

  /* 底部原生 App 风格导航栏 */
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
  }

  body.dev-mode .bottom-nav {
    grid-template-columns: repeat(6, 1fr);
  }

  .bottom-nav-btn {
    position: relative;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
  }

  .bottom-nav-btn.active {
    color: var(--primary);
    font-weight: 700;
  }

  .bnav-icon {
    font-size: 18px;
    line-height: 1.1;
  }

  .bnav-badge {
    position: absolute;
    top: 1px;
    right: calc(50% - 22px);
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 主工作区为底部导航留空间 */
  .workspace {
    padding: 12px 12px calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  /* 手机端表格切换为专属高可读卡片流 */
  .desktop-table-wrap {
    display: none;
  }

  .jobs-cards-list {
    display: flex;
  }

  .filter-primary-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-primary-actions {
    justify-content: space-between;
  }

  .filter-primary-actions .btn {
    flex: 1;
  }

  /* 所有两列表单在手机端自动转单列，杜绝挤压截断 */
  .form-grid-2,
  .filter-grid,
  .review-form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }

  /* 防止 iOS Safari 聚焦输入框自动放大 */
  .field input[type="text"],
  .field input[type="password"],
  .field input[type="number"],
  .field input[type="url"],
  .field input[type="search"],
  .field select,
  .field textarea,
  .search-input-wrap input {
    font-size: 16px;
    padding: 10px 12px;
  }

  .btn {
    min-height: 40px;
  }

  .btn-sm {
    min-height: 36px;
  }

  .form-submit-row .btn {
    width: 100%;
  }

  .hero-banner-actions {
    width: 100%;
  }

  .hero-banner-actions .btn {
    flex: 1;
  }

  .apply-selection-bar {
    padding: 10px 12px;
  }

  .apply-selection-actions {
    width: 100%;
  }

  .apply-selection-actions .btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 12.5px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  .drawer-header {
    padding: 12px 14px;
  }

  .drawer-body {
    padding: 14px 14px 28px;
  }

  .evidence-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .source-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .source-pill {
    padding: 10px;
  }

  .source-pill-title {
    font-size: 13px;
  }

  .source-pill-desc {
    font-size: 11px;
  }
}
