/* ============================================================
   三易人力 · 全站样式
   移动端优先；配色以稳重的蓝绿为主（人力资源行业偏可信感）
   ============================================================ */

:root {
  --primary: #0E7490;          /* 主色：深青 */
  --primary-dark: #155E75;
  --primary-light: #22D3EE;
  --accent: #F59E0B;           /* 强调色：琥珀（薪资、热门标记） */
  --success: #16A34A;
  --danger: #DC2626;

  --text: #0F172A;
  --text-2: #475569;
  --text-3: #94A3B8;
  --line: #E2E8F0;
  --bg: #F1F5F9;
  --card: #FFFFFF;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --maxw: 1160px;
}

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  height: 58px; display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: grid; place-items: center; font-size: 15px;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px;
  color: var(--text-2); white-space: nowrap;
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { color: var(--primary); font-weight: 600; background: #ECFEFF; }
.nav .btn { padding: 8px 14px; }

/* 移动端：导航可横向滚动 */
@media (max-width: 720px) {
  .site-header .inner { height: auto; padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .nav { width: 100%; overflow-x: auto; margin-left: 0; padding-bottom: 2px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: .18s; white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #D97706; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #B91C1C; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }

/* ---------------- 卡片 / 区块 ---------------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.section { padding: 34px 0; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.section-title h2 { margin: 0; font-size: 20px; font-weight: 700; }
.section-title .more { font-size: 14px; color: var(--primary); }

/* ---------------- 英雄区 ---------------- */
.hero {
  background: linear-gradient(135deg, #0E7490 0%, #0891B2 55%, #06B6D4 100%);
  color: #fff; padding: 42px 0 34px;
}
.hero h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.35; }
.hero p { margin: 0 0 20px; opacity: .92; max-width: 640px; }
.hero .hero-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 22px; }
.hero .hero-stats .n { font-size: 24px; font-weight: 700; }
.hero .hero-stats .l { font-size: 13px; opacity: .85; }

/* ---------------- 岗位卡片 ---------------- */
.job-list { display: grid; gap: 12px; }
.job-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  display: block; transition: .18s;
}
.job-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.job-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-card .title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.job-card .salary { color: var(--accent); font-weight: 700; font-size: 16px; white-space: nowrap; }
.job-card .meta { color: var(--text-2); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.job-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.tag {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg); color: var(--text-2);
}
.tag.hot { background: #FEF3C7; color: #B45309; }
.tag.type { background: #ECFEFF; color: var(--primary-dark); }

/* 岗位栅格（宽屏两列） */
@media (min-width: 860px) {
  .job-list.grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-2); }
.field label .req { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--card); outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 116, 144, .1);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.grid2 { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* 蜜罐字段：真人看不见，机器人会填 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- 徽标 ---------------- */
.badge {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--bg); color: var(--text-2); white-space: nowrap;
}
.badge.new { background: #DBEAFE; color: #1D4ED8; }
.badge.contacted { background: #FEF3C7; color: #B45309; }
.badge.interview { background: #EDE9FE; color: #6D28D9; }
.badge.placed, .badge.deal { background: #DCFCE7; color: #15803D; }
.badge.rejected, .badge.closed { background: #FEE2E2; color: #B91C1C; }
.badge.following { background: #FEF3C7; color: #B45309; }
.badge.quoted { background: #E0E7FF; color: #4338CA; }
.badge.on { background: #DCFCE7; color: #15803D; }
.badge.off { background: #F1F5F9; color: #64748B; }

/* ---------------- 表格（后台） ---------------- */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #F8FAFC; font-weight: 600; font-size: 13px; color: var(--text-2); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }
td.wrap-cell { white-space: normal; min-width: 200px; }

/* ---------------- 弹层 / 提示 ---------------- */
.modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px;
}
.modal.show { display: flex; }
.modal .box {
  background: var(--card); border-radius: var(--radius); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal .box .head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal .box .head h3 { margin: 0; font-size: 16px; }
.modal .box .body { padding: 18px; }
.modal .box .foot {
  padding: 14px 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
}
.modal .close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-3); }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(15, 23, 42, .92); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 14px; z-index: 300;
  opacity: 0; transition: opacity .2s, bottom .2s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; bottom: 56px; }
.toast.err { background: rgba(185, 28, 28, .95); }

/* ---------------- 空状态 / 加载 ---------------- */
.empty { text-align: center; padding: 48px 16px; color: var(--text-3); }
.loading { text-align: center; padding: 36px; color: var(--text-3); font-size: 14px; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #EEF2F7 25%, #E2E8F0 37%, #EEF2F7 63%);
  background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: var(--radius-sm);
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 筛选栏 ---------------- */
.filters { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.filters .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 999px; background: var(--bg);
  font-size: 13px; cursor: pointer; border: 1px solid transparent; transition: .15s;
}
.chip:hover { border-color: var(--primary-light); }
.chip.active { background: var(--primary); color: #fff; }

/* ---------------- 详情页 ---------------- */
.detail-head { background: var(--card); padding: 22px 0; border-bottom: 1px solid var(--line); }
.detail-head h1 { margin: 0 0 10px; font-size: 22px; }
.kv { display: grid; gap: 10px 20px; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(2, 1fr); } }
.kv .k { font-size: 13px; color: var(--text-3); }
.kv .v { font-weight: 500; }
.prose { line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.prose h3 { font-size: 16px; margin: 18px 0 8px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #0F172A; color: #94A3B8; padding: 30px 0; margin-top: 40px; font-size: 13px; }
.site-footer a { color: #CBD5E1; }
.site-footer .cols { display: grid; gap: 20px; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: #E2E8F0; margin: 0 0 10px; font-size: 14px; }

/* ---------------- 后台布局 ---------------- */
.admin-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 208px; flex: none; background: #0F172A; color: #94A3B8;
  display: flex; flex-direction: column;
}
.sidebar .logo { padding: 18px 20px; color: #fff; font-size: 16px; }
.sidebar-menu { padding: 6px 0; flex: 1; }
.sidebar-menu a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  color: #94A3B8; font-size: 14px; transition: .15s;
}
.sidebar-menu a:hover { background: #1E293B; color: #fff; }
.sidebar-menu a.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }
.sidebar-menu .icon { width: 20px; text-align: center; }
.sidebar-menu a.soon { opacity: .4; cursor: not-allowed; }
.sidebar-footer { padding: 16px 20px; font-size: 12px; color: #64748B; border-top: 1px solid #1E293B; }

.main { flex: 1; min-width: 0; padding: 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 21px; }

.stats-grid { display: grid; gap: 14px; margin-bottom: 22px; }
@media (min-width: 700px) { .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; }
.stat-card .value small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }

/* 移动端后台：侧栏收到顶部 */
@media (max-width: 780px) {
  .admin-body { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar-menu { display: flex; overflow-x: auto; padding: 0; }
  .sidebar-menu a { padding: 10px 14px; white-space: nowrap; }
  .sidebar-footer { display: none; }
  .main { padding: 14px; }
}
