/* 人才输送管理系统 - 全局样式（浅色主题） */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-light: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }

/* ===== 布局 ===== */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}
.brand { font-size: 17px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.brand .sub { font-size: 12px; color: var(--text-light); font-weight: 400; margin-left: 6px; }
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-light);
  white-space: nowrap;
  font-weight: 500;
}
.nav a.active { background: var(--primary-light); color: var(--primary-dark); }
.nav a:hover { color: var(--primary); }
.topbar .user-box { white-space: nowrap; font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 10px; }
.role-tag { background: var(--primary-light); color: var(--primary-dark); padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

/* ===== 卡片 & 通用 ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card h3 .actions { display: flex; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: #fef2f2; color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
input:disabled { background: #f9fafb; }
label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 4px; font-weight: 500; }
.field { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-section { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 12px; }
.form-section h4 { font-size: 13px; color: var(--primary); margin-bottom: 10px; }

/* ===== 徽章 ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 10px 12px; color: var(--text-light); font-weight: 500; border-bottom: 1px solid var(--border); background: #f9fafb; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8faff; }

/* ===== 筛选条 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 130px; }
.filter-bar .search-input { flex: 1; min-width: 180px; }

/* ===== 漏斗 ===== */
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.funnel-label { width: 84px; text-align: right; font-size: 13px; color: var(--text-light); flex-shrink: 0; }
.funnel-bar-wrap { flex: 1; background: #f3f4f6; border-radius: 6px; height: 26px; position: relative; overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s; }
.funnel-count { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--text); }
.funnel-pct { width: 60px; font-size: 12px; color: var(--text-light); flex-shrink: 0; }

/* ===== 统计卡片 ===== */
.stat-card { text-align: center; padding: 16px 8px; }
.stat-num { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ===== 登录页 ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff 0%, #f5f7fa 60%); padding: 16px; }
.login-box { width: 400px; max-width: 100%; background: #fff; border-radius: 16px; border: 1px solid var(--border); padding: 32px; box-shadow: 0 10px 40px rgba(37,99,235,.08); }
.login-box h2 { text-align: center; font-size: 20px; margin-bottom: 4px; }
.login-box .login-sub { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 22px; }
.login-error { background: #fef2f2; color: var(--danger); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.login-tip { font-size: 12px; color: var(--text-light); margin-top: 14px; line-height: 1.6; text-align: center; }

/* ===== 状态流转条 ===== */
.stage-flow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.stage-dot { padding: 4px 10px; border-radius: 14px; font-size: 12px; border: 1px solid var(--border); color: var(--text-light); background: #fff; }
.stage-dot.done { border-color: transparent; color: #fff; }
.stage-dot.current { outline: 2px solid rgba(37,99,235,.4); outline-offset: 1px; }
.stage-dot:not(.done) { cursor: pointer; }

/* ===== 详情页 ===== */
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-head h2 { font-size: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; }
.info-item .k { font-size: 12px; color: var(--text-light); }
.info-item .v { font-size: 14px; font-weight: 500; margin-top: 2px; word-break: break-all; }
.masked { display: inline-flex; align-items: center; gap: 6px; }
.masked a { font-size: 12px; cursor: pointer; }
.timeline { list-style: none; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); position: absolute; left: -5px; top: 13px; }
.timeline .t-time { font-size: 12px; color: var(--text-light); }
.timeline .t-body { font-size: 13px; margin-top: 2px; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 16px; }
.modal { background: #fff; border-radius: 14px; width: 760px; max-width: 100%; padding: 24px; }
.modal h3 { font-size: 16px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal .close-x { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 300; padding: 10px 20px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.12); max-width: 90vw; }
.toast.err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.toast.ok { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

.empty-tip { text-align: center; color: var(--text-light); padding: 32px 0; font-size: 13px; }
.checkbox-cell { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.checkbox-cell input { width: 16px; height: 16px; }
.loading-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--text-light); }
.muted { color: var(--text-light); }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.text-right { text-align: right; }
.file-label { font-size: 12px; color: var(--text-light); }
.att-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.att-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-note { font-size: 12px; color: var(--warning); background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; line-height: 1.6; }
