/* =========================================================
   面试台账 · 全局样式
   设计方向：现代简约 / 卡片式仪表盘 / 状态色语义化 / 清爽浅色
   ========================================================= */

:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-soft: #EEF2FF;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;

  --text: #0F172A;
  --text-sub: #475569;
  --text-muted: #94A3B8;

  --border: #E2E8F0;
  --border-soft: #EEF2F6;

  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --neutral: #6B7280;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow: 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, .16);

  --grad-primary: linear-gradient(135deg, #3B82F6 0%, #2563EB 55%, #1D4ED8 100%);
  --grad-bg: radial-gradient(1200px 600px at 12% -10%, #DBEAFE 0%, transparent 60%),
             radial-gradient(900px 500px at 100% 0%, #E0E7FF 0%, transparent 55%);

  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --topbar-h: 62px;
}

/* 关键：作者样式的 display 会覆盖 hidden，需强制兜底 */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

/* 全站隐藏上下/左右滚动条（保留滚动能力，仅不显示滚动条） */
* {
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* 旧版 Edge / IE */
}
*::-webkit-scrollbar {             /* Chrome / Safari / Edge */
  width: 0;
  height: 0;
  display: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* 禁止缩放：touch-action 只放行平移，屏蔽双指缩放与双击放大 */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* PWA 独立窗口下，隐藏仅在浏览器环境才有意义的入口 */
body.is-standalone .browser-only { display: none !important; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.spacer { flex: 1; }

/* =========================================================
   登录视图
   ========================================================= */
.login-view {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--grad-bg), linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 100%);
  overflow: hidden;
  z-index: 100;
}

.login-decor {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
}
.login-decor-a {
  width: 420px; height: 420px;
  background: linear-gradient(135deg, #93C5FD, #3B82F6);
  top: -140px; left: -120px;
  animation: floatY 14s ease-in-out infinite;
}
.login-decor-b {
  width: 360px; height: 360px;
  background: linear-gradient(135deg, #A5B4FC, #6366F1);
  bottom: -140px; right: -100px;
  animation: floatY 18s ease-in-out infinite reverse;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28px) scale(1.05); }
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 38px 32px 30px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  animation: cardIn .5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.login-brand { text-align: center; margin-bottom: 26px; }

.login-logo {
  width: 64px; height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
  margin-bottom: 14px;
}

.login-title {
  font-size: 24px;
  letter-spacing: .5px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub { margin-top: 6px; font-size: 13px; color: var(--text-muted); }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-error {
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  padding: 8px 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-xs);
}

.login-tip { margin-top: 20px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* =========================================================
   通用控件
   ========================================================= */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--text-sub); font-weight: 500; }
.field-label em { color: var(--danger); font-style: normal; }

.input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:hover { border-color: #CBD5E1; }
.input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, .16);
}
.input::placeholder { color: var(--text-muted); }
.textarea { resize: vertical; min-height: 60px; }
.input-mini { width: 82px; }

select.input { appearance: none; background-image: none; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

.btn-primary {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(37, 99, 235, .38); }

.btn-ghost {
  color: var(--text-sub);
  background: var(--surface);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: #CBD5E1; }

.btn-danger { color: #fff; background: var(--danger); box-shadow: 0 6px 16px rgba(239, 68, 68, .26); }
.btn-danger:hover { background: #DC2626; }

.btn-danger-ghost { color: var(--danger); background: transparent; border-color: #FECACA; }
.btn-danger-ghost:hover { background: #FEF2F2; }

.file-picker { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.file-name {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-name.has-file { color: var(--text-sub); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  font-size: 18px;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background .18s, color .18s, transform .14s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn:active { transform: scale(.94); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   顶部导航
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.nav-btn {
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sub);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.nav-btn:hover { color: var(--primary); }
.nav-btn.is-active {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.plus { font-size: 16px; line-height: 1; margin-top: -1px; }

/* =========================================================
   视图容器
   ========================================================= */
.main { max-width: 1360px; margin: 0 auto; padding: 22px 20px 60px; }
.view { display: none; animation: viewIn .28s ease; }
.view.is-active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   日历
   ========================================================= */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.calendar-card { padding: 18px 18px 20px; }

.calendar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.calendar-title { font-size: 18px; font-weight: 600; min-width: 130px; }
.calendar-head .btn-sm { margin-left: 0; }

/* 月 / 周 切换 */
.cal-mode {
  margin-left: auto;
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border-radius: 999px;
}
.cal-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.cal-mode-btn:hover { color: var(--text); }
.cal-mode-btn.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-cell {
  position: relative;
  min-height: 74px;
  padding: 7px 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .14s, box-shadow .18s;
}
.cal-cell:hover { background: #F8FAFF; border-color: #C7D9FB; transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.cal-cell.is-out { background: #FBFCFE; opacity: .45; }
.cal-cell.is-today { border-color: var(--primary-light); box-shadow: 0 0 0 2px rgba(59, 130, 246, .14); }
.cal-cell.is-selected { background: var(--primary-soft); border-color: var(--primary-light); }

.cal-day { font-size: 13px; font-weight: 600; color: var(--text-sub); }
.cal-cell.is-today .cal-day { color: var(--primary); }

.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-light); }
.cal-dot.status-pending { background: var(--primary-light); }
.cal-dot.status-attended { background: var(--success); }
.cal-dot.status-no_show { background: var(--danger); }
.cal-dot.status-cancelled { background: var(--neutral); }

.cal-more { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 周历：一行 7 天，单元格内展示候选人姓名 */
.calendar-grid.is-week { gap: 8px; }
.cal-cell-week {
  min-height: 132px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-week-head { display: flex; align-items: center; justify-content: space-between; }
.cal-week-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 1px 7px;
}
.cal-names { display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.cal-name {
  font-size: 11.5px;
  line-height: 1.5;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-sub);
  border-left: 3px solid var(--primary-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-name.status-attended { border-left-color: var(--success); }
.cal-name.status-no_show { border-left-color: var(--danger); }
.cal-name.status-cancelled { border-left-color: var(--neutral); }

/* 当日列表 */
.day-card { padding: 18px; position: sticky; top: calc(var(--topbar-h) + 18px); }
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.day-head h3 { font-size: 16px; }
.day-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }

.empty-tip { padding: 26px 10px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 面试卡片（日历 / 看板共用） */
.iv-card {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  overflow: hidden;
  transition: transform .16s, box-shadow .2s, border-color .2s;
}
.iv-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--status-color, var(--primary-light));
}
.iv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #DCE5F5; }

.iv-card[data-status="pending"] { --status-color: var(--primary-light); }
.iv-card[data-status="attended"] { --status-color: var(--success); }
.iv-card[data-status="no_show"] { --status-color: var(--danger); }
.iv-card[data-status="cancelled"] { --status-color: var(--neutral); }

.iv-top { display: flex; align-items: flex-start; gap: 8px; }
.iv-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.iv-pos { font-size: 12.5px; color: var(--text-sub); margin-top: 1px; }
.iv-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.iv-time { display: inline-flex; align-items: center; gap: 4px; }

.iv-status {
  margin-left: auto;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.iv-status[data-status="pending"] { color: #1D4ED8; background: #DBEAFE; }
.iv-status[data-status="attended"] { color: #047857; background: #D1FAE5; }
.iv-status[data-status="no_show"] { color: #B91C1C; background: #FEE2E2; }
.iv-status[data-status="cancelled"] { color: #4B5563; background: #E5E7EB; }

.iv-rate { color: var(--warning); font-size: 12px; letter-spacing: 1px; }

/* =========================================================
   看板
   ========================================================= */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.board-col {
  --accent: #3B82F6;
  --accent-soft: #DBEAFE;
  --accent-text: #1D4ED8;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .22s, border-color .22s;
}
.board-col[data-status="attended"] { --accent: #10B981; --accent-soft: #D1FAE5; --accent-text: #047857; }
.board-col[data-status="no_show"] { --accent: #EF4444; --accent-soft: #FEE2E2; --accent-text: #B91C1C; }
.board-col[data-status="cancelled"] { --accent: #94A3B8; --accent-soft: #E2E8F0; --accent-text: #475569; }

/* 顶部状态色条 */
.board-col::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--accent);
}

.board-col.is-drop {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.board-col-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.board-col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex-shrink: 0;
}
.board-col-title { font-size: 14px; font-weight: 600; color: var(--text); }
.board-col-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 999px;
}

.board-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 150px;
  max-height: 68vh;
  overflow-y: auto;
}

/* 看板日期分组 */
.board-group + .board-group { margin-top: 4px; }
.board-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  margin-bottom: 9px;
  border: none;
  background: var(--surface-2);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  transition: background .18s, color .18s, margin-bottom .3s ease;
}
.board-group-head:hover { background: #E8EEF9; color: var(--text); }
.board-group-count {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
  background: var(--surface);
  border-radius: 999px;
}
.board-group-chevron { display: inline-flex; color: var(--text-muted); transition: transform .3s ease; }
.board-group-chevron svg { width: 15px; height: 15px; }
.board-group.is-collapsed .board-group-chevron { transform: rotate(-90deg); }
.board-group.is-collapsed .board-group-head { margin-bottom: 0; }

/* 折叠动画：用 grid-template-rows 做高度过渡 */
.board-group-wrap {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  transition: grid-template-rows .3s ease, opacity .25s ease;
}
.board-group.is-collapsed .board-group-wrap { grid-template-rows: 0fr; opacity: 0; }
.board-group-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }

.board-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* 看板卡片 */
.board-card {
  position: relative;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
  cursor: grab;
  transition: transform .16s, box-shadow .2s, border-color .2s;
}
.board-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #C7D9FB;
}
.board-card.is-dragging { opacity: .4; cursor: grabbing; transform: scale(.98); }

.bc-head { display: flex; align-items: flex-start; gap: 10px; }

.bc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #93C5FD, #2563EB);
}
.board-card[data-status="attended"] .bc-avatar { background: linear-gradient(135deg, #6EE7B7, #059669); }
.board-card[data-status="no_show"] .bc-avatar { background: linear-gradient(135deg, #FCA5A5, #DC2626); }
.board-card[data-status="cancelled"] .bc-avatar { background: linear-gradient(135deg, #CBD5E1, #64748B); }

.bc-info { min-width: 0; flex: 1; }
.bc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-pos {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-rate { font-size: 11.5px; color: var(--warning); flex-shrink: 0; letter-spacing: .5px; }

.bc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11.5px;
  color: var(--text-sub);
  background: var(--surface-2);
  border-radius: 999px;
  white-space: nowrap;
}
.bc-chip.is-time { color: var(--primary-dark); background: var(--primary-soft); font-weight: 600; }

/* 看板卡片时间：重点突出 */
.bc-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 7px 11px;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary-dark);
}
.bc-time-icon { display: inline-flex; flex-shrink: 0; color: var(--primary); }
.bc-time-icon svg { width: 16px; height: 16px; }
.bc-time-date { font-size: 12px; font-weight: 600; color: var(--primary); }
.bc-time-text { margin-left: auto; font-size: 16px; font-weight: 700; letter-spacing: .5px; }

.bc-notes {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bc-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .26s ease, opacity .2s ease, margin-top .26s ease;
}
.board-card:hover .bc-actions,
.board-card:focus-within .bc-actions {
  max-height: 60px;
  opacity: 1;
  margin-top: 11px;
}

.mini-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s;
}
.mini-btn:hover { color: var(--primary); border-color: var(--primary-light); background: var(--primary-soft); }

/* =========================================================
   统计
   ========================================================= */
.stats-wrap { display: flex; flex-direction: column; gap: 18px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.stat-card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.stat-card:nth-child(1) { background: linear-gradient(135deg, #60A5FA, #2563EB); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #34D399, #059669); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #FBBF24, #D97706); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #A78BFA, #7C3AED); }

.stat-label { font-size: 12.5px; opacity: .9; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.stat-unit { font-size: 14px; font-weight: 500; opacity: .85; margin-left: 2px; }

.stat-panel { padding: 18px; }
.stat-panel h3 { font-size: 15px; margin-bottom: 14px; }

.status-bars { display: flex; flex-direction: column; gap: 12px; }
.status-bar-row { display: flex; align-items: center; gap: 12px; }
.status-bar-name { width: 74px; font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.status-bar-track { flex: 1; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.status-bar-fill[data-status="pending"] { background: linear-gradient(90deg, #93C5FD, #3B82F6); }
.status-bar-fill[data-status="attended"] { background: linear-gradient(90deg, #6EE7B7, #10B981); }
.status-bar-fill[data-status="no_show"] { background: linear-gradient(90deg, #FCA5A5, #EF4444); }
.status-bar-fill[data-status="cancelled"] { background: linear-gradient(90deg, #D1D5DB, #9CA3AF); }
.status-bar-num { width: 30px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-sub); }

.trend { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.trend-bar {
  width: 100%;
  max-width: 44px;
  min-height: 4px;
  background: var(--grad-primary);
  border-radius: 8px 8px 4px 4px;
  transition: height .5s cubic-bezier(.2, .8, .2, 1);
}
.trend-val { font-size: 12px; font-weight: 600; color: var(--primary); }
.trend-day { font-size: 11.5px; color: var(--text-muted); }

/* =========================================================
   设置
   ========================================================= */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .22s;
}
.settings-card:hover { box-shadow: var(--shadow-sm); }

.sc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}
.sc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sc-icon svg { width: 19px; height: 19px; }
.sc-icon-blue { color: #2563EB; background: #DBEAFE; }
.sc-icon-green { color: #059669; background: #D1FAE5; }
.sc-icon-amber { color: #D97706; background: #FEF3C7; }
.sc-icon-violet { color: #7C3AED; background: #EDE9FE; }
.sc-icon-slate { color: #475569; background: #E2E8F0; }

.sc-head-text { min-width: 0; }
.sc-title { font-size: 15px; font-weight: 600; color: var(--text); }
.sc-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.sc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  font-size: 13.5px;
  color: var(--text-sub);
  background: var(--surface-2);
  border-radius: 11px;
}

.settings-tip { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

.settings-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-ok { color: #047857; background: #D1FAE5; }
.pill-warn { color: #B45309; background: #FEF3C7; }
.pill-off { color: #4B5563; background: #E5E7EB; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-sub); cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.reminder-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 4px; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }

/* =========================================================
   弹窗
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; overscroll-behavior: contain; }
.modal-top { align-items: flex-start; padding-top: 12vh; }

/* 弹窗打开时锁定背后页面滚动，避免滚动穿透 */
body.modal-open { overflow: hidden; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .26s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.modal-card-wide { max-width: 720px; }
.modal-card-sm { max-width: 400px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-size: 16.5px; }
.modal-head .icon-btn { margin-left: auto; border: none; background: transparent; }

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-soft);
}

.confirm-text { font-size: 14px; color: var(--text-sub); }

/* 详情内容 */
.detail-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #F0F6FF, #EEF2FF);
  border-radius: 14px;
}
.detail-avatar {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #fff;
  background: var(--grad-primary);
  flex-shrink: 0;
}
.detail-hero-info { min-width: 0; }
.detail-hero-name { font-size: 16.5px; font-weight: 600; }
.detail-hero-sub { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }

.detail-status-group { display: flex; gap: 8px; flex-wrap: wrap; }
.status-chip {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
}
.status-chip:hover { border-color: var(--primary-light); color: var(--primary); }
.status-chip.is-active[data-status="pending"] { color: #fff; background: var(--primary-light); border-color: var(--primary-light); }
.status-chip.is-active[data-status="attended"] { color: #fff; background: var(--success); border-color: var(--success); }
.status-chip.is-active[data-status="no_show"] { color: #fff; background: var(--danger); border-color: var(--danger); }
.status-chip.is-active[data-status="cancelled"] { color: #fff; background: var(--neutral); border-color: var(--neutral); }

.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-meta-item { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }

/* 简历富文本编辑器 */
.rte {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.rte:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 3.5px rgba(59, 130, 246, .16); }

.rte-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}
.rte-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 13px;
  transition: background .16s, color .16s;
}
.rte-btn:hover { background: var(--surface); color: var(--text); }
.rte-btn.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.rte-size {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-sub);
  font-size: 12.5px;
  cursor: pointer;
}
.rte-editor {
  min-height: 96px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  outline: none;
  word-break: break-word;
}
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); }

/* 简历只读展示（面试详情）：完整展开、绝不产生自身滚动条，交由弹窗整体滚动 */
.resume-view {
  flex: 0 0 auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.resume-view.is-empty { color: var(--text-muted); border-style: dashed; }
.detail-meta-label { font-size: 11.5px; color: var(--text-muted); }
.detail-meta-value { font-size: 13.5px; color: var(--text); margin-top: 3px; word-break: break-all; }

.stars { display: inline-flex; gap: 4px; }
.star {
  font-size: 24px;
  line-height: 1;
  color: #D8DEE9;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform .14s, color .18s;
}
.star:hover { transform: scale(1.18); }
.star.is-on { color: var(--warning); }

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(12px);
  z-index: 300;
  max-width: 88vw;
  padding: 11px 20px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(15, 23, 42, .9);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s, transform .24s;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { background: rgba(185, 28, 28, .94); }
.toast.is-success { background: rgba(5, 122, 85, .94); }

/* =========================================================
   分享（短链 + 有效期）
   ========================================================= */
.share-desc { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.share-alert {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #B45309;
  background: #FEF3C7;
  border-radius: var(--radius-xs);
}

.share-expire-group { display: flex; gap: 8px; flex-wrap: wrap; }
.share-expire-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s;
}
.share-expire-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.share-expire-btn.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .26);
}

.share-link-row { display: flex; gap: 8px; align-items: center; }
.share-link-input { flex: 1; min-width: 0; font-size: 13px; color: var(--text-sub); }

.share-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-meta-item { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.share-meta-label { font-size: 11.5px; color: var(--text-muted); }
.share-meta-value { font-size: 13px; color: var(--text); margin-top: 3px; word-break: break-all; }
.share-tip { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 760px) {
  .share-meta { grid-template-columns: 1fr; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1024px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .day-card { position: static; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { height: auto; }
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .brand-name { display: none; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav-btn { flex: 1; padding: 7px 6px; font-size: 13px; }
  .topbar-actions { margin-left: auto; }

  .main { padding: 16px 14px 50px; }
  .board { grid-template-columns: 1fr; }
  .board-col-body { max-height: none; }
  /* 移动端无 hover，操作按钮常显 */
  .bc-actions { max-height: 60px; opacity: 1; margin-top: 11px; }
  .stat-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr; }

  .cal-cell { min-height: 62px; padding: 5px 6px; }
  .cal-day { font-size: 12px; }
  .calendar-title { font-size: 16px; min-width: 0; }
  .cal-mode-btn { padding: 5px 11px; }
  .cal-cell-week { min-height: 104px; padding: 6px 5px; }
  .cal-name { font-size: 10.5px; padding: 1px 4px; border-left-width: 2px; }

  .modal { padding: 0; align-items: flex-end; }
  .modal-top { align-items: flex-end; padding-top: 0; }
  .modal-card {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: sheetIn .28s cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes sheetIn {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .calendar-grid, .calendar-weekdays { gap: 4px; }
  .cal-cell { min-height: 54px; }
}
