/* =====================================================================
 * 央国企招聘信息聚合 — 样式（浅色主题）
 * ===================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #c81428;        /* 央企红 */
  --primary-dark: #a01020;
  --blue: #1a56db;
  --ink: #1f2329;
  --muted: #646a73;
  --line: #e5e6eb;
  --bg: #f5f6f7;
  --card: #ffffff;
  --green: #0e8a4d;
  --orange: #d97706;
  --gray-badge: #86909c;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(135deg, #b90f22 0%, #d81e06 100%);
  color: #fff; padding: 14px 0 0;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.brand h1 { font-size: 22px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.brand .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.user-box { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.user-box .vip-tag {
  background: #ffdd57; color: #7a5800; font-weight: 700; font-size: 11px;
  padding: 2px 8px; border-radius: 999px;
}
.btn {
  border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; font-weight: 600;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-white { background: #fff; color: var(--primary); }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-red { background: var(--primary); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-small { padding: 4px 10px; font-size: 12px; border-radius: 5px; }

/* ---------- 统计条 ---------- */
.stats-bar {
  max-width: 1200px; margin: 14px auto 0; padding: 0 16px;
  display: flex; gap: 10px; flex-wrap: wrap; color: #fff; font-size: 13px;
}
.stat-chip {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px; padding: 6px 14px;
}
.stat-chip b { font-size: 15px; margin-right: 4px; }

/* ---------- 筛选区 ---------- */
.filter-wrap { max-width: 1200px; margin: 16px auto 0; padding: 0 16px; }
.filters {
  background: var(--card); border-radius: 10px; padding: 14px 16px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.filters input[type="search"], .filters select {
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px;
  background: #fff; color: var(--ink); outline: none; min-width: 0;
}
.filters input[type="search"] { flex: 1 1 220px; }
.filters select { flex: 0 1 auto; }
.filters select:focus, .filters input:focus { border-color: var(--primary); }
.reset-link { font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.reset-link:hover { color: var(--primary); }

/* ---------- 卡片区 ---------- */
.main { max-width: 1200px; margin: 16px auto 40px; padding: 0 16px; }
.result-tip { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } }
.job-card {
  background: var(--card); border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid transparent; transition: box-shadow .15s, border-color .15s;
}
.job-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: #f3c2c8; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.group-name {
  font-size: 12px; color: var(--primary); font-weight: 700;
  background: #fdeef0; padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge-open { background: #e6f6ec; color: var(--green); }
.badge-soon { background: #fff4e0; color: var(--orange); }
.badge-closed { background: #f0f1f2; color: var(--gray-badge); }
.badge-roll { background: #e8f0fe; color: var(--blue); }
.job-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.job-unit { font-size: 13px; color: var(--muted); }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.job-meta b { color: var(--ink); font-weight: 600; }
.job-note {
  font-size: 12px; color: var(--muted); background: var(--bg);
  border-radius: 6px; padding: 8px 10px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.job-note.expanded { -webkit-line-clamp: unset; }
.note-toggle { font-size: 12px; color: var(--blue); cursor: pointer; background: none; border: none; padding: 0; align-self: flex-start; }
.card-actions { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.btn-apply { flex: 1; text-align: center; }
.countdown { font-size: 12px; color: var(--primary); font-weight: 700; }

/* ---------- 快捷视图：Tab + 省份胶囊 ---------- */
.quick-bar { max-width: 1200px; margin: 10px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.view-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.vtab {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600;
  transition: all .15s; user-select: none;
}
.vtab:hover { border-color: var(--primary); color: var(--primary); }
.vtab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.vtab .vtab-n { font-weight: 400; opacity: .8; font-size: 12px; }

/* ---------- 倒计时徽标 ---------- */
.countdown-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; align-self: flex-start; white-space: nowrap;
}
.cd-late { background: #e6f6ec; color: var(--green); }
.cd-warn { background: #fff4e0; color: var(--orange); }
.cd-urgent { background: #fdeef0; color: var(--primary); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; max-width: 420px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 24px; position: relative;
}
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 20px; color: var(--muted); line-height: 1;
}
.form-item { margin-bottom: 12px; }
.form-item label { display: block; font-size: 13px; margin-bottom: 5px; font-weight: 600; }
.form-item input {
  width: 100%; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-size: 14px; outline: none;
}
.form-item input:focus { border-color: var(--primary); }
.form-error { color: var(--primary); font-size: 12px; min-height: 16px; margin-bottom: 6px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; font-size: 13px; padding: 8px 12px; }
.btn-full { width: 100%; padding: 11px; font-size: 15px; }

/* 支付弹窗 */
.pay-price { text-align: center; margin-bottom: 12px; }
.pay-price .num { font-size: 32px; color: var(--primary); font-weight: 800; }
.pay-price .per { font-size: 13px; color: var(--muted); }
.qr-box {
  width: 220px; height: 220px; margin: 0 auto 10px; border: 1px dashed var(--line);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fafafa;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-box .qr-placeholder { text-align: center; font-size: 12px; color: var(--gray-badge); padding: 14px; line-height: 1.7; }
.pay-steps { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.pay-steps li { margin-left: 18px; margin-bottom: 3px; }
.pay-tip { font-size: 11px; color: var(--gray-badge); text-align: center; margin-top: 8px; line-height: 1.6; }
.pay-success { text-align: center; padding: 10px 0; }
.pay-success .icon { font-size: 44px; }
.pay-success h4 { font-size: 17px; margin: 8px 0 4px; color: var(--green); }

/* ---------- 页脚 ---------- */
footer { background: #fff; border-top: 1px solid var(--line); padding: 24px 16px 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; font-size: 12px; color: var(--muted); }
.footer-inner h4 { font-size: 13px; color: var(--ink); margin: 12px 0 6px; }
.footer-inner p { margin-bottom: 6px; line-height: 1.7; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px);
  background: rgba(31,35,41,.92); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 200; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
