/* ═══════════════════════════════════════════════
   应聘登记表 · 样式（移动端优先）
   ═══════════════════════════════════════════════ */

:root {
  --blue: #1f6feb;
  --blue-dark: #1858c4;
  --ink: #1a1d21;
  --ink-2: #4a5568;
  --ink-3: #8b95a5;
  --line: #e4e8ee;
  --bg: #f4f6f9;
  --white: #fff;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --err: #d33;
  --ok: #15803d;
  --radius: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }

/* ─────────── 页头 ─────────── */
.hd {
  background: linear-gradient(135deg, #2b7bf3 0%, #1a5fd0 100%);
  color: #fff;
  padding: calc(20px + env(safe-area-inset-top)) 18px 22px;
}
.hd-inner { max-width: 640px; margin: 0 auto; }
.hd h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.hd-sub { margin: 6px 0 0; font-size: 13px; opacity: .85; }

/* ─────────── 步骤条 ─────────── */
.steps {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.steps::-webkit-scrollbar { display: none; }
.step-dot {
  flex: 1 0 auto;
  min-width: 62px;
  text-align: center;
  color: var(--ink-3);
  cursor: default;
}
.step-dot span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #eef1f5;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  transition: all .2s;
}
.step-dot em {
  display: block;
  font-style: normal;
  font-size: 11px;
  margin-top: 3px;
  white-space: nowrap;
}
.step-dot.on span { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(31,111,235,.35); }
.step-dot.on em { color: var(--blue); font-weight: 600; }
.step-dot.done span { background: #d6e6ff; color: var(--blue-dark); }
.step-dot.done { cursor: pointer; }
.step-dot.done em { color: var(--ink-2); }

/* ─────────── 内容区 ─────────── */
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 12px calc(90px + env(safe-area-inset-bottom));
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f5;
}

/* ─────────── 表单 ─────────── */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.req { color: var(--err); font-style: normal; margin-left: 2px; }

input[type=text], input[type=tel], input[type=email], input[type=date],
input[type=month], input[type=number], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 15px;          /* ≥16px 会阻止 iOS 缩放，15px 兼顾观感 */
  color: var(--ink);
  background: #fbfcfd;
  font-family: inherit;
  transition: border-color .15s, background .15s;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b95a5' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
textarea { resize: vertical; min-height: 76px; line-height: 1.55; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31,111,235,.1);
}
input.bad, select.bad, textarea.bad {
  border-color: var(--err);
  background: #fff6f6;
}

/* 两列布局 */
.row2 { display: flex; gap: 12px; }
.row2 > .field { flex: 1; min-width: 0; }

.hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 6px 0 0;
  line-height: 1.5;
}
.hint.warn {
  color: var(--warn);
  background: var(--warn-bg);
  padding: 9px 11px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 12.5px;
}
.privacy-note {
  background: #f7f9fc;
  border-left: 3px solid #c9d6e8;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 14px;
}

/* ─────────── 子表单（工作经历） ─────────── */
.sub-card {
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.sub-card:last-child { margin-bottom: 0; }
.sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.bad-box { border-color: var(--err); background: #fff8f8; }

/* ─────────── 小按钮 ─────────── */
.btn-mini {
  background: #eef4ff;
  color: var(--blue);
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
}
.btn-mini:active { background: #dde9ff; }

.btn-del {
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}
.btn-del:active { color: var(--err); }

.btn-text {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}

/* ─────────── 上传 ─────────── */
.upload-box {
  border: 1.5px dashed #c3cddc;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  background: #fbfcfe;
  cursor: pointer;
  transition: all .15s;
}
.upload-box:active { border-color: var(--blue); background: #f4f8ff; }
.up-icon { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.up-main { font-size: 14px; color: var(--blue); font-weight: 500; }
.up-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.up-done {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: #14532d;
  word-break: break-all;
}
.up-ok {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.up-done .btn-text { margin-left: auto; flex: 0 0 auto; }

.progress {
  height: 4px;
  background: #e8edf4;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.progress .bar {
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 3px;
  transition: width .2s;
}

/* ─────────── 勾选项 ─────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
  border-color: var(--blue);
  background: #eef4ff;
  color: var(--blue);
  font-weight: 500;
}

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
  cursor: pointer;
}
.agree input[type=checkbox] {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}
.agree.small { font-size: 13px; margin-top: 4px; }

/* ─────────── 底部操作条 ─────────── */
.foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .05s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 10px rgba(31,111,235,.28); }
.btn-primary:active { background: var(--blue-dark); }
.btn-primary:disabled { opacity: .6; box-shadow: none; }
.btn-ghost { background: #eef1f5; color: var(--ink-2); flex: 0 0 96px; }
.btn-block { width: 100%; flex: none; }

/* ─────────── 成功页 ─────────── */
.done-mask {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.done-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px 24px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: pop .25s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 30px;
  line-height: 56px;
  margin: 0 auto 16px;
}
.done-icon.replace { background: var(--blue); }
.done-card h2 { margin: 0 0 16px; font-size: 19px; color: var(--ink); }
.done-no {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 16px;
}
.done-no b {
  display: inline-block;
  margin-top: 6px;
  font-size: 21px;
  color: var(--blue);
  letter-spacing: 1px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.done-tip { font-size: 13.5px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.6; }
.done-tip.dim { color: var(--ink-3); font-size: 12.5px; margin-bottom: 20px; }

/* ─────────── 提示条 ─────────── */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(26,29,33,.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13.5px;
  max-width: 86vw;
  text-align: center;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(180,38,38,.94); }

/* ─────────── 隐私政策页 ─────────── */
.doc { max-width: 720px; margin: 0 auto; padding: 20px 18px 60px; }
.doc h1 { font-size: 21px; margin: 0 0 6px; }
.doc .meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 22px; }
.doc h2 {
  font-size: 16px;
  margin: 26px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--blue);
  line-height: 1.3;
}
.doc p, .doc li { font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.doc th, .doc td {
  border: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}
.doc th { background: #f7f9fc; font-weight: 600; color: var(--ink); }
.doc .box {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
}
.doc .box p:first-child { margin-top: 0; }
.doc .box p:last-child { margin-bottom: 0; }

/* ─────────── HR 后台 ─────────── */
.hr-wrap { max-width: 1200px; margin: 0 auto; padding: 16px 14px 60px; }
.hr-hd {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
}
.hr-hd h1 { margin: 0; font-size: 17px; }
.hr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hr-actions .btn { flex: none; padding: 9px 16px; font-size: 14px; }

.stat-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 110px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
}
.stat b { display: block; font-size: 24px; color: var(--blue); line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

.filters {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
}
.filters .field { margin: 0; flex: 1 1 150px; min-width: 130px; }
.filters .field label { font-size: 12px; }
.filters input, .filters select { padding: 9px 10px; font-size: 14px; }
.filters .btn { flex: 0 0 auto; padding: 10px 18px; font-size: 14px; }

.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}
table.data th {
  background: #f7f9fc;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid #f2f4f7;
  color: var(--ink-2);
}
table.data tr:hover td { background: #fafbfd; }
table.data .no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--blue); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  background: #eef4ff;
  color: var(--blue);
}
.badge.update { background: var(--warn-bg); color: var(--warn); }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  font-size: 14px;
  color: var(--ink-2);
}
.empty { padding: 50px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ─────────── 页签 ─────────── */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: #fff;
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(20,30,50,.06);
  width: fit-content;
}
.tab {
  border: none;
  background: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.tab:hover { background: #f2f5f9; }
.tab.on { background: var(--blue); color: #fff; }

/* 岗位管理里的行内编辑 */
.job-name-input, .job-dept-input {
  padding: 6px 9px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  width: 100%;
  min-width: 110px;
  font-family: inherit;
}
.job-name-input:focus, .job-dept-input:focus {
  outline: none; border-color: var(--blue); background: #fff;
}
.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.status-pill.on { background: #dcfce7; color: #15803d; }
.status-pill.off { background: #f1f3f6; color: #8b95a5; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-xs {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-xs:hover { border-color: var(--blue); color: var(--blue); }
.btn-xs.danger:hover { border-color: var(--err); color: var(--err); }
.btn-xs.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-xs.primary:hover { background: var(--blue-dark); color: #fff; }

.login-box {
  max-width: 340px;
  margin: 18vh auto;
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(20,30,50,.09);
}
.login-box h1 { margin: 0 0 6px; font-size: 18px; text-align: center; }
.login-box p { margin: 0 0 20px; font-size: 13px; color: var(--ink-3); text-align: center; }

@media (max-width: 480px) {
  .row2 { gap: 10px; }
  .wrap { padding-left: 10px; padding-right: 10px; }
  .step-dot { min-width: 56px; }
  .step-dot em { font-size: 10px; }
}
