/* 招聘管理工具 - 移动优先样式 */
:root {
  --primary: #1f6feb;
  --primary-dark: #1857c4;
  --bg: #f2f4f8;
  --card: #fff;
  --line: #e5e8ef;
  --text: #1c2430;
  --text2: #6b7280;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}
.hidden { display: none !important; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #1f6feb 0%, #4f46e5 55%, #7c3aed 100%); }
.login-card { background: var(--card); border-radius: 20px; padding: 30px 24px; width: 100%; max-width: 380px; box-shadow: 0 16px 40px rgba(20, 30, 60, .25); }
.login-logo { width: 78px; height: 78px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 6px 16px rgba(31, 111, 235, .25); overflow: hidden; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-card h1 { font-size: 22px; text-align: center; color: var(--primary); }
.login-sub { text-align: center; color: var(--text2); font-size: 13px; margin: 8px 0 24px; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; font-size: 15px; }
.login-tip { margin-top: 14px; font-size: 12px; color: var(--text2); text-align: center; line-height: 1.6; }
.login-quick { display: flex; gap: 8px; margin: 12px 0 2px; }
.lq { flex: 1; text-align: center; font-size: 13px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 8px; color: var(--primary); cursor: pointer; background: #fff; }
.lq:active { background: var(--primary); color: #fff; }
.cand-check { display: inline-flex; margin: 0 8px 0 0; align-items: center; }
.cand-check input { width: 18px; height: 18px; }
.batch-bar { position: fixed; left: 0; right: 0; bottom: 58px; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px; display: flex; gap: 6px; align-items: center; z-index: 20; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.batch-count { font-size: 13px; color: var(--text2); margin-right: auto; white-space: nowrap; }
.form-sec { font-size: 13px; font-weight: 600; color: var(--primary); margin: 14px 0 6px; border-left: 3px solid var(--primary); padding-left: 8px; }
.kv { display: flex; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv span { width: 92px; color: var(--text2); flex-shrink: 0; }
.kv b { flex: 1; font-weight: normal; word-break: break-all; }

/* 顶栏 */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 52px; background: linear-gradient(135deg, #1f6feb, #4f46e5); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; z-index: 20; box-shadow: 0 2px 12px rgba(31, 111, 235, .28); }
.topbar-title { font-size: 17px; font-weight: 600; display: flex; align-items: center; }
.topbar-logo { height: 28px; width: auto; margin-right: 8px; border-radius: 6px; background: rgba(255,255,255,.95); padding: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.topbar-refresh { width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; transition: background .15s, transform .15s; }
.topbar-refresh:active { background: rgba(255,255,255,.35); transform: rotate(180deg); }
.topbar-user { font-size: 12px; opacity: .95; max-width: 42%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-logout { border: none; background: rgba(255,255,255,.18); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 8px; cursor: pointer; flex: none; transition: background .15s; }
.topbar-logout:active { background: rgba(255,255,255,.38); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 0 4px; font-size: 13px; color: var(--text2); }

/* 内容区 */
.view { padding: 64px 12px 76px; max-width: 720px; margin: 0 auto; }

/* 底部导航 */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 20; }
.tabbar .tab { flex: 1; text-align: center; padding: 9px 0 10px; font-size: 12px; color: var(--text2); cursor: pointer; user-select: none; position: relative; }
.tabbar .tab.active { color: var(--primary); font-weight: 600; }
.tabbar .tab.active::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 4px; width: 16px; height: 3px; border-radius: 2px; background: var(--primary); }
.tabbar .tab .ic { font-size: 19px; display: block; margin-bottom: 2px; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.cand-card { border-left: 4px solid transparent; }
.cand-card.st-applied { border-left-color: #9ca3af; }
.cand-card.st-screening_pass { border-left-color: #2563eb; }
.cand-card.st-interviewing { border-left-color: #d97706; }
.cand-card.st-offered { border-left-color: #7c3aed; }
.cand-card.st-offer_accepted, .cand-card.st-onboarded { border-left-color: #16a34a; }
.cand-card.st-rejected { border-left-color: #dc2626; }

/* 按钮 */
.btn { display: inline-block; border: none; background: var(--line); color: var(--text); padding: 8px 14px; border-radius: 9px; font-size: 14px; cursor: pointer; transition: opacity .15s; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(31, 111, 235, .25); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.warn { background: var(--warn); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 111, 235, .12); }
.field textarea { min-height: 60px; resize: vertical; }
.row2 { display: flex; gap: 10px; }
.row2 .field { flex: 1; }

/* 标签 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; background: #eef2ff; color: var(--primary); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.bad { background: #fee2e2; color: var(--bad); }
.badge.gray { background: #f1f2f4; color: var(--text2); }

/* 列表 */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.muted { color: var(--text2); font-size: 12px; }
.warn { color: #dc2626; font-size: 13px; margin-bottom: 10px; }
.small { font-size: 12px; }

/* 进度漏斗（占比条形） */
.funnel-bars { margin-top: 6px; }
.fstep { margin-bottom: 10px; }
.flabel { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; color: var(--text2); }
.flabel b { color: var(--text); }
.ftrack { height: 10px; background: #eef0f4; border-radius: 6px; overflow: hidden; }
.ffill { height: 100%; border-radius: 6px; transition: width .4s ease; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 720px; max-height: 88vh; display: flex; flex-direction: column; animation: modalup .28s ease; }
@keyframes modalup { from { transform: translateY(60px); opacity: .6; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-close { border: none; background: none; font-size: 24px; color: var(--text2); cursor: pointer; }
.modal-body { padding: 16px; overflow-y: auto; }

/* Toast */
.toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(20,30,45,.92); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 60; max-width: 85%; text-align: center; animation: toastin .25s ease; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -10px); } }

/* 指标卡 */
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.metric { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.05); display: flex; align-items: center; gap: 10px; }
.m-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.metric.c1 .m-ic { background: #eef2ff; }
.metric.c2 .m-ic { background: #e0f2fe; }
.metric.c3 .m-ic { background: #dcfce7; }
.metric.c4 .m-ic { background: #fef3c7; }
.metric .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.metric .lbl { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* 加载 */
.loading { display: flex; justify-content: center; padding: 46px 0; }
.spinner { width: 26px; height: 26px; border: 3px solid #dbe1ea; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 图表 */
.legend { font-size: 11px; color: var(--text2); font-weight: normal; }
.chip { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 3px 0 8px; vertical-align: -1px; }
.gchart { display: flex; align-items: flex-end; gap: 8px; height: 96px; margin: 4px 0 2px; }
.gcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.gcol i { display: block; width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; min-height: 2px; }
.gcol em { font-style: normal; font-size: 11px; color: var(--text); }
.gcol span { font-size: 11px; color: var(--text2); }
.cbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #eef0f4; }
.cseg { height: 100%; }
.vchart { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin-top: 6px; }
.vcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.vcol em { font-style: normal; font-size: 11px; color: var(--text); }
.vcol i { width: 100%; max-width: 40px; background: linear-gradient(180deg, #1f6feb, #4f46e5); border-radius: 5px 5px 0 0; }
.vcol span { font-size: 11px; color: var(--text2); }

/* 导入预览 */
.ip-list { margin-top: 8px; max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ip-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 13px; border-bottom: 1px dashed var(--line); }
.ip-row:last-child { border-bottom: none; }
.ip-row em { font-style: normal; }
.ip-row.ok em { color: var(--ok); }
.ip-row.bad { background: #fef2f2; }
.ip-row.bad em, .ip-row.bad span { color: var(--bad); }

/* 筛选条 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select, .filters input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--primary); }

/* 表格（报表） */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { color: var(--text2); font-weight: 500; background: #fafbfc; }
.tbl-wrap { overflow-x: auto; }

/* 标签页内切换 */
.subtabs { display: flex; background: #e8ebf1; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.subtabs .st { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; font-size: 13px; color: var(--text2); cursor: pointer; }
.subtabs .st.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.sec-title { font-size: 14px; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.divider { border: none; border-top: 1px dashed var(--line); margin: 10px 0; }
.urg-high { color: var(--bad); font-weight: 600; }
.empty { text-align: center; color: var(--text2); padding: 34px 0; font-size: 13px; }
.avatar { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: #e0e9fb; color: var(--primary); align-items: center; justify-content: center; font-weight: 600; margin-right: 10px; flex: none; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.radio-line { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.radio-line label { font-size: 14px; }
.score-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.score-line label { width: 84px; font-size: 13px; color: var(--text2); flex: none; }
.score-line input { flex: 1; }
.score-val { width: 40px; text-align: right; font-size: 13px; color: var(--primary); font-weight: 600; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline .tl-item { position: relative; padding-bottom: 12px; }
.timeline .tl-item::before { content: ''; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
