/* ===== 重置 & 基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 28px; }

/* ===== Header ===== */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 22px; color: var(--primary); }
.logo-text {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: #2563eb;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
.nav { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 24px; }
.nav-btn {
  padding: 6px 20px; border: none; background: transparent;
  border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: all .2s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { background: var(--surface); color: var(--primary); font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ===== Hero ===== */
.hero { text-align: center; padding: 64px 0 44px; }
.hero-title { font-size: 34px; font-weight: 900; letter-spacing: -.8px; line-height: 1.15;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { margin-top: 14px; color: var(--text-muted); font-size: 16px; max-width: 520px; margin-inline: auto; line-height: 1.7; }

/* ===== Panel ===== */
.panel { padding-bottom: 40px; }
.panel-collapsed { max-height: 0; overflow: hidden; padding: 0; margin: 0; opacity: 0; transition: all .4s ease; }
.hidden { display: none !important; }

/* ===== Card Grid ===== */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.09); }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.card-num {
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  color: var(--primary); background: #eff6ff; padding: 3px 9px; border-radius: 20px;
}
.card-title { font-size: 15px; font-weight: 700; }
.optional { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.card-inline { margin-top: 16px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .inline-fields { grid-template-columns: 1fr; } }

/* ===== Upload Zone ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 32px 20px; text-align: center; cursor: pointer; transition: all .15s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: #eff6ff; }
.upload-icon { font-size: 32px; margin-bottom: 10px; }
.upload-main { font-size: 14px; font-weight: 500; color: var(--text); }
.upload-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.file-info {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 8px 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
}
.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { font-size: 13px; color: #15803d; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-remove { background: none; border: none; color: #64748b; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; flex-shrink: 0; }
.file-remove:hover { color: #ef4444; }

/* ===== JD Tabs ===== */
.jd-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.jd-tab {
  padding: 5px 14px; border: 1px solid var(--border); background: transparent;
  border-radius: 20px; font-size: 13px; cursor: pointer; color: var(--text-muted); transition: all .15s;
}
.jd-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.jd-panel { display: none; }
.jd-panel.active { display: block; }

.url-input-wrap { display: flex; gap: 8px; }
.url-input-wrap .input { flex: 1; }
.btn-fetch {
  padding: 10px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn-fetch:hover { background: var(--primary-hover); }
.btn-fetch:disabled { opacity: .6; cursor: not-allowed; }

.url-status {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; line-height: 1.5;
}
.url-status.loading { background: #eff6ff; color: var(--primary); }
.url-status.error { background: #fef2f2; color: #dc2626; }
.url-status.success { background: #f0fdf4; color: #15803d; }

/* ===== Inputs ===== */
.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); outline: none; transition: border-color .15s; font-family: inherit;
}
.input:focus { border-color: var(--primary); }
.input-lg { font-size: 16px; padding: 14px 18px; border-radius: 10px; }
.textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); resize: vertical; outline: none;
  transition: border-color .15s; font-family: inherit; line-height: 1.6;
}
.textarea:focus { border-color: var(--primary); }

/* ===== Buttons ===== */
.action-row { display: flex; justify-content: center; margin-top: 28px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 44px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff; border: none; border-radius: 30px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all .2s; letter-spacing: .2px;
  box-shadow: 0 4px 18px rgba(37,99,235,.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(37,99,235,.5); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 14px; }
.btn-secondary {
  padding: 7px 16px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text); transition: background .15s;
}
.btn-secondary:hover { background: var(--bg); }
.btn-dl { color: var(--primary); border-color: var(--primary); }
.btn-dl:hover { background: #eff6ff; }

/* ===== Wizard ===== */
.wizard-progress {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
}
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.progress-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.wizard-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 40px; box-shadow: var(--shadow);
  min-height: 320px;
}
@media (max-width: 640px) { .wizard-wrap { padding: 32px 24px; } }

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.step-icon { font-size: 40px; margin-bottom: 16px; }
.step-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.step-desc { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }

.field-group { display: flex; flex-direction: column; gap: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.field-tip { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* 动态经历块 */
.entry-block {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; background: var(--surface);
}
.entry-block-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.entry-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.btn-remove-entry {
  font-size: 12px; color: #ef4444; background: none; border: none;
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.btn-remove-entry:hover { background: #fef2f2; }
.btn-add-entry {
  width: 100%; padding: 10px; border: 1.5px dashed var(--border);
  border-radius: 8px; background: none; color: var(--text-muted);
  font-size: 13px; cursor: pointer; transition: all 0.15s;
  margin-top: 4px;
}
.btn-add-entry:hover { border-color: var(--primary); color: var(--primary); background: #f5f3ff; }

.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 8px;
}

/* ===== Result ===== */
.result-section { margin-top: 24px; }

/* 分析卡片单列横向（全宽） */
.analysis-grid {
  display: flex; flex-direction: column;
  gap: 10px; margin-bottom: 16px;
}


.analysis-card {
  border-radius: 10px; padding: 10px 14px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 12px;
}
.card-green { background: #f0fdf4; border-color: #bbf7d0; }
.card-orange { background: #fff7ed; border-color: #fed7aa; }
.card-blue { background: #eff6ff; border-color: #bfdbfe; }

.analysis-card-title {
  font-size: 12px; font-weight: 700; white-space: nowrap;
  min-width: 80px; padding-top: 2px;
}
.card-green .analysis-card-title { color: #15803d; }
.card-orange .analysis-card-title { color: #c2410c; }
.card-blue .analysis-card-title { color: #1d4ed8; }

.analysis-card-body { font-size: 12px; line-height: 1.6; color: var(--text); flex: 1; }
.analysis-card-body ul { padding-left: 12px; }
.analysis-card-body li { margin-bottom: 3px; }
.analysis-card-body strong { font-weight: 700; }
.analysis-card-body p { margin-bottom: 4px; }

/* 评分 */
.score-main { font-size: 28px; font-weight: 800; color: #1d4ed8; margin-bottom: 10px; }
.score-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.score-table td { padding: 4px 6px; }
.score-table tr:not(:last-child) td { border-bottom: 1px solid #dbeafe; }
.score-table td:last-child { text-align: right; font-weight: 700; color: #1d4ed8; }
.score-table caption { font-size: 11px; color: #64748b; text-align: left; margin-bottom: 4px; }

/* Markdown 表格（分析卡片内通用）*/
.md-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.md-table th { font-weight: 700; background: rgba(0,0,0,0.04); padding: 5px 8px; text-align: left; border-bottom: 2px solid rgba(0,0,0,0.1); }
.md-table td { padding: 4px 8px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.md-table tr:last-child td { border-bottom: none; }
.md-table td:last-child, .md-table th:last-child { text-align: right; }

/* 优化前后对比 */
.score-compare {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 12px;
  background: #fff; border-radius: 8px; padding: 10px 8px;
  border: 1px solid #dbeafe;
}
.score-compare-item { text-align: center; }
.score-compare-label { font-size: 11px; color: #64748b; margin-bottom: 2px; }
.score-compare-val { font-size: 22px; font-weight: 800; line-height: 1; }
.score-compare-val span { font-size: 12px; font-weight: 400; color: #64748b; }
.score-val-before { color: #94a3b8; }
.score-val-after { color: #1d4ed8; }
.score-compare-arrow { font-size: 18px; color: #22c55e; font-weight: 700; }

/* PDF 叠加 + diff 侧边栏 */
.pdf-overlay-wrap { display: flex; gap: 16px; align-items: flex-start; }
.pdf-pages { flex: 1; min-width: 0; }
.docx-preview { padding: 20px 24px; font-size: 13px; line-height: 1.8; }

.pdf-diff-sidebar {
  flex: 0 0 240px; border-left: 2px solid var(--border);
  padding: 12px 14px; font-size: 12px; position: sticky; top: 72px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}
.pdf-diff-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}

.pdf-diff-item {
  display: flex; align-items: flex-start; gap: 8px;
  border-radius: 6px; padding: 8px 10px; margin-bottom: 7px;
  border: 1px solid transparent; cursor: pointer;
}
.pdf-diff-item input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; cursor: pointer;
  accent-color: var(--primary);
}
.diff-item-body { flex: 1; min-width: 0; }
.diff-modified { background: #fef9c3; border-color: #fde68a; }
.diff-added    { background: #f0fdf4; border-color: #bbf7d0; }
.diff-deleted  { background: #fef2f2; border-color: #fecaca; }

.diff-type-tag {
  display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; color: #fff; margin-bottom: 5px;
}
.diff-modified .diff-type-tag { background: #d97706; }
.diff-added .diff-type-tag    { background: #16a34a; }
.diff-deleted .diff-type-tag  { background: #dc2626; }

.diff-orig { text-decoration: line-through; color: #94a3b8; margin-bottom: 3px; line-height: 1.5; font-size: 11px; }
.diff-new  { color: #0f172a; line-height: 1.5; }

.diff-confirm-btn {
  margin-top: 12px; width: 100%; padding: 10px;
  font-size: 13px; font-weight: 700; border-radius: 8px;
  position: sticky; bottom: 0; color: #fff !important;
}

@media (max-width: 700px) {
  .pdf-overlay-wrap { flex-direction: column; }
  .pdf-diff-sidebar { flex: none; width: 100%; position: static; border-left: none; border-top: 2px solid var(--border); }
}

/* 照片提示栏 */
.photo-hint-bar {
  margin: 0 16px 0; padding: 10px 14px;
  background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px;
  font-size: 13px; color: #92400e;
}

/* 简历下载栏 */
.resume-download-bar {
  display: flex; gap: 12px; justify-content: center;
  padding: 16px 20px; border-top: 1px solid var(--border);
  background: #f8fafc;
}
.resume-download-bar .btn-dl {
  padding: 10px 32px; font-size: 14px; font-weight: 700;
}

/* AI 修改说明面板 */
.change-log-panel {
  margin: 0 16px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow: hidden;
}
.cl-title {
  padding: 12px 16px;
  font-size: 13px; font-weight: 700; color: #1e293b;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 8px;
}
.cl-count {
  font-size: 11px; font-weight: 500; color: #64748b;
  background: #e2e8f0; border-radius: 20px; padding: 1px 8px;
}
.cl-list { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.cl-item {
  border-radius: 8px; padding: 10px 12px;
  border-left: 3px solid transparent;
  background: #fff; font-size: 12px; line-height: 1.6;
}
.cl-modified { border-color: #f59e0b; }
.cl-added { border-color: #10b981; }
.cl-deleted { border-color: #ef4444; }
.cl-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.cl-tag {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; color: #fff;
}
.cl-modified .cl-tag { background: #f59e0b; }
.cl-added .cl-tag { background: #10b981; }
.cl-deleted .cl-tag { background: #ef4444; }
.cl-deleted .cl-orig { text-decoration: line-through; color: #ef4444; opacity: 0.7; }
.cl-section { font-size: 11px; color: #64748b; }
.cl-orig { color: #94a3b8; text-decoration: line-through; margin-bottom: 3px; }
.cl-new { color: #0f172a; font-weight: 500; margin-bottom: 4px; }
.cl-reason { color: #2563eb; font-size: 11px; }

/* 简历结果区 */
.resume-result-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.resume-result-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: #f8fafc; flex-wrap: wrap; gap: 10px;
}
.resume-result-title { font-size: 15px; font-weight: 700; }
.resume-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.resume-columns { display: flex; gap: 0; }
.resume-col { flex: 1; padding: 20px; min-width: 0; }
.resume-col + .resume-col { border-left: 1px solid var(--border); }

.resume-col-label-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.resume-col-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.resume-col-label-wrap .resume-col-label { margin-bottom: 0; }

.score-badge {
  font-size: 12px; font-weight: 700; padding: 2px 10px;
  background: var(--primary); color: #fff; border-radius: 20px;
}

/* ===== Loading ===== */
.result-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px; color: var(--text-muted); font-size: 14px;
}
.loading-dots { display: flex; gap: 6px; }
.loading-dots span {
  width: 8px; height: 8px; background: var(--primary);
  border-radius: 50%; animation: bounce .8s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-8px); opacity: 1; }
}

/* ===== Footer ===== */
.footer { margin-top: auto; padding: 24px 0; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 13px; }
.footer-links { margin-top: 6px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-sep { margin: 0 8px; }

/* ===== 照片提示 ===== */
.photo-tip { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

/* ===== 简历预览框 ===== */
.resume-preview-box {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0; background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
}
.resume-preview-box pre {
  padding: 24px 28px;
  max-height: 700px;
  overflow-y: auto;
}

/* ===== 模版弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 660px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.template-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 20px 24px;
}
@media (max-width: 500px) { .template-grid { grid-template-columns: repeat(2, 1fr); } }

.template-card {
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  overflow: hidden; transition: all .15s;
}
.template-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.template-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

.template-preview {
  height: 90px; padding: 8px; display: flex; flex-direction: column; gap: 4px;
}
.tp-name-line { height: 8px; border-radius: 3px; width: 60%; }
.tp-bar { height: 3px; border-radius: 2px; width: 100%; margin: 2px 0; }
.tp-line { height: 5px; border-radius: 2px; }
.tp-line-short { height: 5px; border-radius: 2px; width: 70%; }

.template-info { padding: 8px 10px 10px; border-top: 1px solid var(--border); }
.template-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.template-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--border); background: #f8fafc;
}

/* ===== 照片上传行 ===== */
.photo-upload-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  gap: 8px; flex-wrap: wrap;
}
.photo-upload-label { font-size: 13px; color: var(--text-muted); }
.photo-upload-right { display: flex; align-items: center; gap: 8px; }
.btn-photo-upload {
  padding: 5px 14px; border: 1px dashed var(--primary); background: #eff6ff;
  border-radius: 6px; font-size: 13px; color: var(--primary); cursor: pointer;
  transition: all .15s;
}
.btn-photo-upload:hover { background: #dbeafe; }
.photo-name { font-size: 12px; color: #15803d; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 分析卡片四列 ===== */
.analysis-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .analysis-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .analysis-grid { grid-template-columns: 1fr; } }
.card-purple { background: #faf5ff; border-color: #e9d5ff; }
.card-purple .analysis-card-title { color: #7c3aed; white-space: nowrap; }
.card-teal { background: #f0fdfa; border-color: #99f6e4; }
.card-teal .analysis-card-title { color: #0f766e; }

/* ===== diff 图例 ===== */
.resume-result-title-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.diff-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.legend-item {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.legend-added { background: #dcfce7; color: #16a34a; }
.legend-modified { background: #fef9c3; color: #d97706; }
.legend-deleted { background: #fee2e2; color: #dc2626; }

/* ===== 模版快速切换 ===== */
.template-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
}
.template-hint-icon { font-size: 16px; }
.template-quick-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tql-btn {
  padding: 4px 12px; border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); transition: all .15s;
}
.tql-btn:hover { border-color: var(--tpl-color, var(--primary)); color: var(--tpl-color, var(--primary)); }
.tql-btn.active { background: var(--tpl-color, var(--primary)); border-color: var(--tpl-color, var(--primary)); color: #fff; }

/* ===== 模版弹窗实时预览 ===== */
.template-live-preview {
  height: 140px; overflow: hidden; position: relative; background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.tpl-iframe { width: 100%; border: none; display: block; overflow: hidden; pointer-events: none; }

/* ===== 打印样式（PDF 导出用）===== */
@media print {
  body { background: #fff; }
  .header, .hero, .panel, .footer, .result-header { display: none !important; }
  .result-section {
    border: none !important; box-shadow: none !important;
    margin: 0 !important; border-radius: 0 !important;
  }
  .result-box { padding: 0 !important; }
  .result-content { font-size: 11pt; line-height: 1.7; }
  .result-content h3 { font-size: 12pt; color: #000; margin: 14pt 0 6pt; }
  .result-content hr { border-top: 1px solid #999; margin: 10pt 0; }
}
