/* 工信就业 · 招聘工作台  共用样式（浅色主题） */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --line: #e3e8ef;
  --line-strong: #cdd5e0;
  --text: #1f2937;
  --text-2: #55606e;
  --text-3: #8a94a3;
  --brand: #0b5fa5;
  --brand-dark: #084b82;
  --brand-soft: #e8f1fa;
  --brand-soft-2: #d7e8f7;
  --ok: #12855b;
  --ok-soft: #e6f5ee;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --danger: #c23b3b;
  --danger-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 6px 18px rgba(16, 32, 56, .05);
  --shadow-lg: 0 12px 40px rgba(16, 32, 56, .16);
}

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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.topbar {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(8, 43, 74, .18);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; min-height: 58px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand .dot {
  width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.18);
  display: grid; place-items: center; font-size: 14px;
}
.topbar .spacer { flex: 1; }
.topbar .role-tag {
  font-size: 12px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 18px 64px; }
.wrap-narrow { max-width: 760px; }

/* ---------------- 通用件 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px; overflow: hidden;
}
.card-head {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel-2);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 12px; }

.muted { color: var(--text-3); font-size: 13px; }
.text2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #f7f9fc; border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #0e6f4b; }
.btn-danger { color: var(--danger); border-color: #eecccc; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 用 .field 而不限定 label：学生端「简历文件」那一块为了避开
   <label> 包裹 file input 导致的重复触发，已改用 <div class="field">。 */
.field { display: block; margin-bottom: 13px; }
.field > span.lb {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-2);
  margin-bottom: 5px;
}
.field > span.lb em { color: var(--danger); font-style: normal; margin-left: 2px; }
input[type=text], input[type=password], input[type=tel], input[type=email],
input[type=number], input[type=search], select, textarea {
  width: 100%; font-size: 16px; font-family: inherit; color: var(--text);
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 620px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-gray { background: #eef1f5; color: var(--text-2); }

.empty {
  padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 14px;
}
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }

.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td {
  padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left;
  vertical-align: top;
}
table.tbl th {
  background: var(--panel-2); font-size: 13px; color: var(--text-2);
  font-weight: 700; white-space: nowrap;
}
table.tbl tbody tr:hover { background: #f8fafc; }
.table-scroll { overflow-x: auto; }

.stack > * + * { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

/* ---------------- 提示条 ---------------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #22303f; color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 14px; box-shadow: var(--shadow-lg); max-width: 90vw;
  animation: tin .22s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- 弹层 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(18, 30, 45, .48);
  z-index: 120; display: flex; align-items: flex-start; justify-content: center;
  padding: 26px 14px; overflow-y: auto;
}
.modal {
  background: var(--panel); border-radius: 12px; width: 100%; max-width: 700px;
  box-shadow: var(--shadow-lg); animation: tin .2s ease;
}
.modal-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 18px; max-height: 68vh; overflow-y: auto; }
.modal-foot {
  padding: 13px 18px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; background: var(--panel-2);
  border-radius: 0 0 12px 12px;
}
.x-btn {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--text-3); padding: 0 4px;
}
.x-btn:hover { color: var(--text); }

/* ---------------- 应聘者端 ---------------- */
.hero {
  background: linear-gradient(135deg, #0b5fa5 0%, #0a4a80 55%, #072f52 100%);
  color: #fff; border-radius: 12px; padding: 24px 22px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: .3px; }
.hero .slogan { color: #c9e0f5; font-size: 14px; margin-bottom: 14px; }
.hero .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: #d8e8f8; }
.hero .meta b { color: #fff; font-weight: 700; }
.intro-text {
  white-space: pre-wrap; color: var(--text-2); line-height: 1.85; font-size: 14px;
}

.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin-bottom: 16px; overflow-x: auto;
}
.tabs button {
  border: 0; background: transparent; font-family: inherit; font-size: 14px;
  font-weight: 600; color: var(--text-3); padding: 10px 16px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px;
}
.tabs button:hover { color: var(--brand); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px;
  padding: 0 5px; margin-left: 5px; vertical-align: 1px; text-align: center;
}

.job-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.job-card:hover { border-color: var(--brand-soft-2); box-shadow: 0 4px 16px rgba(11,95,165,.10); }
.job-card h3 { margin: 0 0 6px; font-size: 16px; }
.job-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.chip {
  font-size: 12.5px; color: var(--text-2); background: #f2f5f9;
  padding: 3px 9px; border-radius: 6px;
}
.chip.salary { color: var(--warn); background: var(--warn-soft); font-weight: 700; }
.job-card .foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 11px; border-top: 1px dashed var(--line);
}

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); }
.pre { white-space: pre-wrap; line-height: 1.85; }
.job-section { margin-top: 16px; }
.job-section h4 {
  margin: 0 0 7px; font-size: 14px; color: var(--brand);
  padding-left: 9px; border-left: 3px solid var(--brand);
}

.file-line {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  font-size: 13.5px; margin-bottom: 8px;
}
.file-line .ico { font-size: 17px; }
.file-line .nm { flex: 1; word-break: break-all; }
.file-line .sz { color: var(--text-3); font-size: 12px; }

.chat { max-height: 340px; overflow-y: auto; padding: 4px; }
.msg { display: flex; margin-bottom: 10px; }
.msg .bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 14px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}
.msg.hr { justify-content: flex-start; }
.msg.hr .bubble { background: var(--brand-soft); color: #123a5c; border-top-left-radius: 4px; }
.msg.cand { justify-content: flex-end; }
.msg.cand .bubble { background: #eef1f5; color: var(--text); border-top-right-radius: 4px; }
.msg .who { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.chat-send { display: flex; gap: 8px; margin-top: 10px; }
.chat-send textarea { min-height: 44px; }

/* ---------------- HR 端 ---------------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .lb { font-size: 13px; color: var(--text-3); }
.stat .n { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.25; }
.stat .n.warn { color: var(--warn); }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(140deg, #0f4c7f, #072c4d 70%);
}
.login-box {
  background: #fff; border-radius: 14px; padding: 30px 26px; width: 100%;
  max-width: 400px; box-shadow: var(--shadow-lg);
}
.login-box h1 { margin: 0 0 6px; font-size: 20px; }
.login-box .sub { color: var(--text-3); font-size: 13px; margin-bottom: 20px; }

.pill-filter { display: flex; gap: 7px; flex-wrap: wrap; }
.pill-filter button {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px;
  padding: 5px 13px; font-size: 13px; cursor: pointer; min-height: 32px;
  font-family: inherit; font-weight: 600; color: var(--text-2);
}
.pill-filter button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.toolbar .grow { flex: 1; min-width: 160px; }

.drop-zone {
  position: relative;
  border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 20px 16px;
  text-align: center; background: var(--panel-2); cursor: pointer;
  font-size: 13.5px; color: var(--text-2);
  -webkit-tap-highlight-color: transparent;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-zone b { color: var(--brand); }
.drop-zone .dz-main { font-size: 14px; font-weight: 600; color: var(--text); }
.drop-zone .dz-sub { font-size: 12.5px; line-height: 1.65; margin-top: 6px; }
/* 把 <input type="file"> 透明铺满整块：点击完全由原生控件触发，不依赖 JS 调 click()。
   安卓 / 微信内置浏览器对「display:none 的 input 被脚本 click()」支持不一，
   原生点击是最稳的路径。
   往外扩 2px 是为了盖住 drop-zone 自己那 1.5px 的虚线边框 ——
   否则点在边框上唤不出选择器（自动化用例量到过这 2px 的缝）。 */
.drop-zone .dz-input {
  position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  width: calc(100% + 4px); height: calc(100% + 4px);
  opacity: 0; cursor: pointer; font-size: 0;
}

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; font-size: 14px; }
.detail-grid .k { color: var(--text-3); font-size: 12.5px; }
.detail-grid .v { font-weight: 600; word-break: break-all; }

.note {
  background: var(--warn-soft); border: 1px solid #f2ddb4; color: #7a4a06;
  padding: 10px 13px; border-radius: 8px; font-size: 13px; line-height: 1.7;
}
.note.blue { background: var(--brand-soft); border-color: #cfe2f3; color: #14486f; }
.note b { font-weight: 700; }

.hint-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.9; }

.side { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---------------- 简历库：批量操作 ---------------- */
.batch-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 11px 16px; background: var(--brand-soft);
  border-bottom: 1px solid #cfe2f3; font-size: 13.5px;
}
.batch-bar b { color: var(--brand); }
.batch-bar .spacer { flex: 1; }

table.tbl th.ck, table.tbl td.ck { width: 38px; padding-left: 14px; padding-right: 0; }
table.tbl input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }
table.tbl tr.row-sel { background: var(--brand-soft); }
table.tbl tr.row-sel:hover { background: var(--brand-soft-2); }

/* ---------------- 简历预览 ---------------- */
.modal.modal-wide { max-width: 1040px; }
.preview-body { min-height: 58vh; }
.pv-frame { text-align: center; }
.pv-frame img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.pv-frame iframe {
  width: 100%; height: 68vh; border: 1px solid var(--line);
  border-radius: 8px; background: #fff;
}
.pv-doc {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 24px; font-size: 14px; line-height: 1.85; color: var(--text);
  max-width: 860px; margin: 0 auto;
}
.pv-doc .pv-h {
  margin: 20px 0 8px; font-size: 15px; color: var(--brand);
  padding-left: 9px; border-left: 3px solid var(--brand);
}
.pv-doc .pv-h:first-child { margin-top: 0; }
.pv-doc .pv-p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-tablewrap { overflow-x: auto; margin: 12px 0; }
table.pv-table { border-collapse: collapse; font-size: 13px; width: 100%; }
table.pv-table th, table.pv-table td {
  border: 1px solid var(--line-strong); padding: 6px 9px;
  text-align: left; vertical-align: top; overflow-wrap: anywhere;
}
table.pv-table th { background: var(--panel-2); font-weight: 700; color: var(--text-2); }
.pv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-bar .spacer { flex: 1; }
.pv-pos { font-size: 13px; color: var(--text-3); }

@media (max-width: 720px) {
  .wrap { padding: 14px 12px 60px; }
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 19px; }
  .modal-body { max-height: 74vh; }
  .pv-doc { padding: 16px 14px; }
  .pv-frame iframe { height: 62vh; }
}
