:root {
  --bg: #eef2f9;
  --card: #ffffff;
  --ink: #1f2430;
  --sub: #6b7280;
  --line: #e7eaf2;
  --brand: #2563eb;
  --brand2: #4f46e5;
  --brand-soft: #eef3ff;
  --green: #16a34a;
  --green-soft: #e7f7ed;
  --orange: #f97316;
  --orange-soft: #fff1e6;
  --gray: #94a3b8;
  --blue: #2563eb;
  --red: #ef4444;
  --red-soft: #fdecec;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
  --shadow: 0 6px 18px rgba(16,24,40,.07);
  --shadow-lg: 0 14px 34px rgba(16,24,40,.10);
  --radius: 16px;

  /* 工种专属配色 */
  --c-weld: #f97316;   /* 焊工 · 橙 */
  --c-weld-soft: #fff1e6;
  --c-elec: #2563eb;   /* 电工 · 蓝 */
  --c-elec-soft: #e8f0ff;
  --c-fit: #10b981;    /* 钳工 · 绿 */
  --c-fit-soft: #e6f7f0;
  --c-cnc: #8b5cf6;    /* CNC · 紫 */
  --c-cnc-soft: #f1ebff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eaf0fb 0%, #f3f6fc 38%, #f7f8fa 100%);
  background-attachment: fixed;
  color: var(--ink); line-height: 1.5; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 14px 48px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16,24,40,.03);
}
.topbar .inner { max-width: 1100px; margin: 0 auto; padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 9px; letter-spacing: .3px; }
.logo .dot { width: 12px; height: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: 0 2px 6px rgba(37,99,235,.4); }
.search { flex: 1; min-width: 180px; position: relative; }
.search input {
  width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 11px;
  font-size: 15px; background: #fff; outline: none; transition: .15s; box-shadow: var(--shadow-sm);
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: .45; color: var(--brand); }
.topbar .links { display: flex; gap: 8px; }
.topbar .links a { font-size: 13px; padding: 8px 13px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(37,99,235,.25); transition: .15s; }
.topbar .links a:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* Hero Banner */
.hero {
  margin: 18px 0 8px; border-radius: 20px; padding: 26px 26px 22px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #7c3aed 100%);
  color: #fff; box-shadow: 0 16px 38px rgba(79,70,229,.30); position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); border-radius: 50%;
}
.hero h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.hero p { margin: 8px 0 0; opacity: .92; font-size: 14px; }
.hero-cats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.catbtn {
  display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); transition: .15s;
}
.catbtn:hover { background: rgba(255,255,255,.30); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.catbtn .ic { width: 11px; height: 11px; border-radius: 3px; }
.catbtn[data-cat="焊工"] .ic { background: #fb923c; }
.catbtn[data-cat="电工"] .ic { background: #60a5fa; }
.catbtn[data-cat="钳工"] .ic { background: #34d399; }
.catbtn[data-cat="CNC"] .ic { background: #c4b5fd; }

/* 统计条 */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; flex: 1; min-width: 120px; box-shadow: var(--shadow); position: relative; overflow: hidden; border-left: 4px solid var(--brand); }
.stat:nth-child(1) { border-left-color: #3b82f6; }
.stat:nth-child(2) { border-left-color: #22c55e; }
.stat:nth-child(3) { border-left-color: #f97316; }
.stat:nth-child(4) { border-left-color: #ef4444; }
.stat b { display: block; font-size: 24px; font-weight: 800; }
.stat span { color: var(--sub); font-size: 13px; }

/* 分类标签 */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.tab { padding: 8px 17px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 15px; cursor: pointer; font-weight: 700; color: var(--sub); transition: .15s; box-shadow: var(--shadow-sm); }
.tab:hover { color: var(--ink); transform: translateY(-1px); }
.tab.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(37,99,235,.32); }

/* 状态筛选 */
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 18px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; color: var(--sub); font-weight: 600; transition: .15s; }
.chip:hover { transform: translateY(-1px); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 17px 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gray); }
.card.cat-weld::before { background: var(--c-weld); }
.card.cat-elec::before { background: var(--c-elec); }
.card.cat-fit::before { background: var(--c-fit); }
.card.cat-cnc::before { background: var(--c-cnc); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card .title { font-weight: 800; font-size: 16px; line-height: 1.35; }
.card .cat { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 7px; white-space: nowrap; }
.card.cat-weld .cat { background: var(--c-weld-soft); color: var(--c-weld); }
.card.cat-elec .cat { background: var(--c-elec-soft); color: var(--c-elec); }
.card.cat-fit  .cat { background: var(--c-fit-soft);  color: var(--c-fit); }
.card.cat-cnc  .cat { background: var(--c-cnc-soft);  color: var(--c-cnc); }
.badge { font-size: 12px; font-weight: 800; padding: 3px 11px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.招聘中 { background: var(--green-soft); color: var(--green); }
.badge.暂停 { background: var(--orange-soft); color: var(--orange); }
.badge.已结束 { background: #f1f2f4; color: var(--gray); }
.badge.已结束::before { background: var(--gray); }
.badge.待确认 { background: #eaf1ff; color: var(--blue); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 14px; }
.meta .k { color: var(--sub); white-space: nowrap; }
.meta .v { color: var(--ink); }
.salary { font-weight: 800; color: var(--red); }
.req { font-size: 13px; color: #4b5563; background: #f6f8fc; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; line-height: 1.5; }
.certs { font-size: 12.5px; color: var(--brand); font-weight: 600; }
.foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--gray); border-top: 1px dashed var(--line); padding-top: 9px; }
.foot .src { padding: 2px 9px; border-radius: 6px; background: #f1f2f4; font-weight: 600; }
.empty { text-align: center; color: var(--sub); padding: 56px 0; font-size: 15px; }

/* 移动端 */
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .topbar .inner { padding: 10px; }
  .logo { font-size: 16px; }
  .hero { padding: 20px 18px; border-radius: 16px; }
  .hero h1 { font-size: 21px; }
}

/* 卡片可点击 + 媒体角标 */
.card { cursor: pointer; }
.card .media-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 9px; border-radius: 999px; }

/* 详情弹窗 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.modal-box { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 720px; max-height: 88vh; overflow: auto; box-shadow: 0 30px 80px rgba(15,23,42,.35); animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.detail-head { padding: 22px 24px 16px; position: relative; border-bottom: 1px solid var(--line); }
.detail-head .x { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; border: none; background: #f1f2f4; color: #475569; font-size: 20px; cursor: pointer; line-height: 1; }
.detail-head .x:hover { background: #e5e7eb; }
.detail-head h2 { margin: 0 36px 8px 0; font-size: 21px; font-weight: 800; }
.detail-head .tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-body { padding: 18px 24px 24px; }
.detail-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.5px; margin: 6px 0 14px; }
.detail-meta .k { color: var(--sub); white-space: nowrap; }
.detail-meta .v { color: var(--ink); }
.detail-sec-title { font-size: 14px; font-weight: 800; color: var(--ink); margin: 18px 0 10px; display: flex; align-items: center; gap: 7px; }
.detail-desc { font-size: 14px; color: #475569; background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; line-height: 1.6; }

/* 媒体画廊 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 6px; }
.gitem { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f3f4f6; aspect-ratio: 4/3; }
.gitem img, .gitem video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gitem .del { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(15,23,42,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; transition: .15s; }
.gitem:hover .del { opacity: 1; }
.gitem .fname { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); padding: 14px 8px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-empty { font-size: 13px; color: var(--sub); padding: 14px 0; }

/* 二维码区块 */
.qr-block { display: flex; gap: 16px; align-items: center; margin: 16px 0 4px; padding: 14px 16px; background: linear-gradient(135deg, #f5f8ff, #eef2ff); border: 1px solid #dbe4ff; border-radius: 14px; flex-wrap: wrap; }
.qr-img { width: 124px; height: 124px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); padding: 7px; flex-shrink: 0; }
.qr-info { flex: 1; min-width: 200px; }
.qr-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.qr-d { font-size: 13px; color: var(--sub); margin: 6px 0 10px; line-height: 1.5; }
.qr-copy { background: #fff; border: 1.5px solid var(--brand); color: var(--brand); border-radius: 9px; font-weight: 700; font-size: 13px; padding: 8px 14px; cursor: pointer; transition: .15s; }
.qr-copy:hover { background: var(--brand); color: #fff; }
.qr-tip { font-size: 12px; color: var(--gray); margin-top: 8px; }

/* 上传区 */
.upload-zone { margin-top: 14px; border: 1.5px dashed #c7d2fe; border-radius: 12px; padding: 14px; background: #fafbff; }
.upload-zone .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-zone input[type=file] { font-size: 13px; flex: 1; min-width: 180px; }
.upload-zone .tok { max-width: 200px; }
.upload-zone .hint { font-size: 12px; color: var(--sub); margin-top: 8px; }
.btn-up { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border: none; border-radius: 9px; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.btn-up:hover { filter: brightness(1.06); }
.btn-up:disabled { opacity: .6; cursor: default; }
.login-tip { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: var(--orange); font-size: 13px; }
.login-tip a { color: var(--brand); font-weight: 700; text-decoration: none; }

/* 图片大图预览 */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }
.lightbox .x { position: absolute; right: 22px; top: 18px; color: #fff; font-size: 30px; cursor: pointer; background: none; border: none; }
