html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== 面试操作台自定义样式 ===== */

/* 顶部固定评分摘要栏 */
.score-summary-bar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #fff;
  border-bottom: 2px solid #dee2e6;
  padding: 0.5rem 0;
}

/* 维度导航标签 */
.dimension-nav {
  position: sticky;
  top: 60px;
  z-index: 1010;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.dimension-nav .nav-link {
  padding: 0.5rem 1rem;
  color: #495057;
  border-radius: 0;
  border-bottom: 2px solid transparent;
}

.dimension-nav .nav-link.active,
.dimension-nav .nav-link:hover {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  background: transparent;
}

/* 评分按钮组 */
.score-btn-group .btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  line-height: 2.5rem;
  font-weight: 600;
  border-radius: 50%;
}

.score-btn-group .btn.active,
.score-btn-group .btn.btn-primary {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* 维度区域卡片 */
.dimension-section {
  scroll-margin-top: 120px;
}

.dimension-header {
  background: #f8f9fa;
  border-left: 4px solid #0d6efd;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* 问题卡片 */
.question-card {
  border-left: 3px solid #dee2e6;
  transition: border-color 0.2s;
}

.question-card.scored {
  border-left-color: #198754;
}

.question-card.excluded {
  opacity: 0.6;
}

/* 维度得分显示 */
.dimension-score-display {
  font-size: 1.5rem;
  font-weight: 700;
}

.dimension-score-display.manual-override {
  color: #fd7e14;
}

/* 综合评估区域 */
.assessment-section {
  border-top: 3px solid #0d6efd;
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* 导航栏活跃状态 */
.navbar .nav-link.active {
  font-weight: 600;
}

/* ===== 面试列表页样式 ===== */

/* 页面标题 */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* 筛选栏 — 低调不抢 */
.filter-bar {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.filter-input {
  width: 180px;
  background: #f8f9fa;
  border-color: #e9ecef;
}

.filter-input:focus {
  background: #fff;
}

.filter-select {
  width: 120px;
  background: #f8f9fa;
  border-color: #e9ecef;
}

/* 空状态 */
.empty-state {
  color: #adb5bd;
}

/* 表格整体 */
.session-table {
  --bs-table-hover-bg: rgba(0, 0, 0, 0.015);
}

.session-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8c8c8c;
  border-bottom: 1px solid #e9ecef;
  padding: 0.6rem 0.75rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.session-table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #f5f5f5;
}

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

/* 候选人列 — 主信息 + 副信息 */
.cell-candidate {
  min-width: 180px;
}

.candidate-name {
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 0.925rem;
}

.candidate-name:hover {
  color: #0d6efd;
}

.candidate-meta {
  font-size: 0.78rem;
  color: #adb5bd;
  margin-top: 2px;
  line-height: 1.3;
}

.meta-sep {
  margin: 0 0.3em;
  color: #d0d0d0;
}

/* 已入职标签 */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

.tag-hired {
  background: #d1fae5;
  color: #065f46;
}

/* 已入职行 */
.row-hired {
  background: rgba(209, 250, 229, 0.15);
}

/* 状态点 */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-progress {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-done {
  background: #10b981;
}

.status-label {
  font-size: 0.82rem;
  color: #6b7280;
}

/* 得分 — 视觉主角 */
.score-number {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.score-high {
  color: #059669;
}

.score-mid {
  color: #2563eb;
}

.score-low {
  color: #9ca3af;
}

/* 录用建议 — 决策标签 */
.result-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.result-hire {
  background: #ecfdf5;
  color: #065f46;
}

.result-pending {
  background: #fffbeb;
  color: #92400e;
}

.result-reject-v2 {
  background: #f3f4f6;
  color: #9ca3af;
}

/* 时间列 */
.cell-time {
  font-size: 0.82rem;
  color: #9ca3af;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 操作列 — hover 显示更多 */
.cell-actions {
  min-width: 120px;
}

.btn-action-main {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
}

.actions-more {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.session-row:hover .actions-more {
  opacity: 1;
}

/* 三点按钮 */
.btn-ghost {
  background: none;
  border: none;
  color: #9ca3af;
  padding: 0.2rem 0.35rem;
  line-height: 1;
}

.btn-ghost:hover {
  color: #374151;
  background: #f3f4f6;
  border-radius: 4px;
}

/* 列宽提示 */
.col-candidate { width: 30%; }
.col-status { width: 10%; }
.col-score { width: 12%; }
.col-result { width: 14%; }
.col-time { width: 12%; }
.col-actions { width: 14%; }

/* ===== 面试评估报告页样式 ===== */

/* 报告卡片统一体系 */
.report-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.report-card-header {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}

.report-card-body {
  padding: 1.25rem;
}

/* P1: 决策头部 — 摘要区 */
.report-hero {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.report-hero-left .hero-candidate-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.report-hero-left .hero-position {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem 1.5rem;
}

.hero-meta-item {
  font-size: 0.82rem;
  color: #9ca3af;
}

.hero-meta-item span {
  color: #374151;
  font-weight: 500;
}

/* 右侧决策区 */
.report-hero-right {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.hero-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.hero-score-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
}

.hero-result-tag {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.hero-result-hire {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.hero-result-pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.hero-result-reject {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.hero-result-reason {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.35rem;
  max-width: 220px;
}

/* 得分颜色 */
.score-color-high { color: #059669; }
.score-color-mid  { color: #2563eb; }
.score-color-low  { color: #dc2626; }

/* P4: 亮点 / 顾虑 / 总结 摘要卡片 */
.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.insight-card {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  border: 1px solid;
}

.insight-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.insight-card-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-line;
}

.insight-highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.insight-highlight .insight-card-title {
  color: #166534;
}

.insight-concern {
  background: #fff7ed;
  border-color: #fed7aa;
}

.insight-concern .insight-card-title {
  color: #9a3412;
}

.insight-summary {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.insight-summary .insight-card-title {
  color: #475569;
}

/* P5: 维度得分汇总 — 进度条样式 */
.dim-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dim-summary-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dim-summary-label {
  min-width: 140px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

.dim-summary-bar-wrap {
  flex: 1;
  height: 10px;
  background: #f3f4f6;
  border-radius: 5px;
  overflow: hidden;
}

.dim-summary-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.dim-summary-score {
  min-width: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dim-summary-weight {
  min-width: 60px;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: right;
}

.dim-summary-note {
  font-size: 0.72rem;
  color: #f59e0b;
  min-width: 50px;
}

/* P5: 题目明细表优化 */
.report-dim-section {
  margin-bottom: 1.25rem;
}

.report-dim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  user-select: none;
}

.report-dim-header:hover {
  background: #f1f5f9;
}

.report-dim-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.report-dim-weight-tag {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 0.5rem;
}

.report-dim-toggle {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.2s;
}

.report-q-table {
  width: 100%;
  border-collapse: collapse;
}

.report-q-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}

.report-q-table tbody td {
  padding: 0.65rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid #f8f8f8;
  font-size: 0.85rem;
  color: #374151;
}

.report-q-table tbody tr:last-child td {
  border-bottom: none;
}

.report-q-table tbody tr:hover {
  background: #fafbfc;
}

.report-q-table .q-text {
  max-width: 360px;
}

.report-q-table .q-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.report-q-table .q-include {
  text-align: center;
}

.q-include-yes {
  color: #059669;
  font-weight: 600;
}

.q-include-no {
  color: #d1d5db;
}

.report-q-table .q-note {
  font-size: 0.8rem;
  color: #6b7280;
  max-width: 300px;
}

/* P6: 模板说明折叠 */
.template-desc-toggle {
  font-size: 0.82rem;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.template-desc-toggle:hover {
  color: #374151;
}

.template-desc-content {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.7;
  white-space: pre-line;
  padding-top: 0.75rem;
}

/* 返回按钮 */
.report-back-btn {
  font-size: 0.82rem;
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0;
}

.report-back-btn:hover {
  color: #374151;
}

/* 响应式 */
@media (max-width: 768px) {
  .report-hero {
    flex-direction: column;
  }
  .report-hero-right {
    margin-top: 1rem;
    align-items: flex-start;
    text-align: left;
  }
  .hero-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dim-summary-label {
    min-width: 100px;
    font-size: 0.8rem;
  }
}

/* 全局密码验证状态指示器 */
.auth-status-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: #10b981;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1050;
    cursor: default;
    user-select: none;
}
