* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #24292f;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { font-size: 18px; font-weight: 700; }

.top-actions { display: flex; gap: 10px; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.btn.primary { background: #2f6fed; color: #fff; }
.btn.primary:hover { background: #1f5cd6; }
.btn.ghost { background: #fff; border-color: #d0d5dd; color: #374151; }
.btn.ghost:hover { background: #f3f4f6; }
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger:hover { background: #b91c1c; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.search {
  flex: 1;
  min-width: 220px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
.search:focus { border-color: #2f6fed; }
.filter {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
.count { align-self: center; font-size: 12px; color: #6b7280; }

/* 热门关键词 */
.keywords-panel {
  background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
  border: 1px solid #e3e8f5;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(47, 111, 237, .05);
}
.keywords-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.keywords-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
}
.keywords-title-icon {
  font-size: 16px;
}
.keywords-title-hint {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  background: #f0f3fa;
  padding: 2px 8px;
  border-radius: 999px;
}
.keywords-input {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}
.keywords-input input {
  flex: 1;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.keywords-input input:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.keyword-add-btn {
  background: #2f6fed;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.keyword-add-btn:hover { background: #1f5cd6; }
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #2f6fed;
  border: 1px solid #dbe4f7;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 1px 3px rgba(47, 111, 237, .06);
}
.keyword-tag:hover {
  background: #eef4ff;
  border-color: #2f6fed;
  transform: translateY(-1px);
}
.keyword-tag.active {
  background: #2f6fed;
  color: #fff;
  border-color: #2f6fed;
  box-shadow: 0 3px 10px rgba(47, 111, 237, .3);
}
.keyword-tag .keyword-count {
  font-size: 11px;
  opacity: .7;
  font-weight: 400;
}
.keyword-tag .keyword-del {
  background: none;
  border: 0;
  color: inherit;
  opacity: .5;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 2px;
  border-radius: 50%;
}
.keyword-tag .keyword-del:hover { opacity: 1; background: rgba(0,0,0,.08); }
.keyword-empty { font-size: 12px; color: #9ca3af; padding: 4px 2px; }

.job-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.job-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.job-card:hover { border-color: #2f6fed; box-shadow: 0 4px 16px rgba(47, 111, 237, .12); }
.job-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-card-name { font-size: 15px; font-weight: 700; line-height: 1.4; }
.job-card-salary { color: #e5484d; font-size: 14px; font-weight: 700; white-space: nowrap; }
.job-card-company { color: #374151; font-size: 13px; margin-top: 6px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}
.job-status-badge.hiring {
  color: #15803d;
  background: #e7f6ec;
  border: 1px solid #bfe6cb;
}
.job-status-badge.active {
  color: #1d4ed8;
  background: #eef2ff;
  border: 1px solid #dbe3ff;
}
.job-status-badge.closed {
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.job-card-area { color: #6b7280; font-size: 12px; margin-top: 4px; }
.job-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  background: #f0f2f5;
  color: #4b5563;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
}
.tag.primary { background: #eaf1fe; color: #1d4ed8; }

.empty {
  text-align: center;
  padding: 80px 20px;
  color: #6b7280;
  font-size: 14px;
  border: 2px dashed #d0d5dd;
  border-radius: 12px;
  background: #fff;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  z-index: 50;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(680px, 100%);
  background: #fff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  animation: slideIn .25s ease;
}
@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.drawer-head {
  padding: 16px 22px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 14px;
}
.drawer-head h2 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.drawer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
  margin-left: auto;
}
.open-job-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  min-height: 34px;
  padding: 0 14px;
}
.copy-all-btn { white-space: nowrap; }
.detail-body { flex: 1; overflow-y: auto; padding: 22px; }

.detail-salary { color: #e5484d; font-size: 22px; font-weight: 700; margin: 6px 0 12px; }
.detail-section {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}
.detail-section h3 { font-size: 14px; margin-bottom: 10px; color: #111827; }
.detail-section p { font-size: 13px; line-height: 1.7; color: #374151; white-space: pre-wrap; word-break: break-word; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.info-grid .item { display: flex; flex-direction: column; gap: 3px; }
.info-grid .label { font-size: 11px; color: #9ca3af; }
.info-grid .value { font-size: 13px; color: #111827; }

/* 通用弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  width: min(420px, calc(100vw - 40px));
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  text-align: center;
}
.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.modal-icon.info { background: #eaf1fe; color: #1d4ed8; }
.modal-icon.success { background: #e6f8ef; color: #16a34a; }
.modal-icon.error { background: #feeceb; color: #dc2626; }
.modal-icon.warn { background: #fff6e6; color: #d97706; }
.modal-box h3 { font-size: 17px; margin: 0 0 10px; color: #111827; }
.modal-box > p { font-size: 13px; line-height: 1.7; color: #4b5563; margin: 0 0 18px; white-space: pre-wrap; word-break: break-word; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions .btn { min-width: 96px; }

/* 进度条 */
.modal-progress { margin: 4px 0 18px; }
.modal-progress-track {
  height: 8px;
  border-radius: 8px;
  background: #eef0f3;
  overflow: hidden;
}
.modal-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2f6fed, #5b8def);
  border-radius: 8px;
  transition: width .2s ease;
}
.modal-progress-text { display: block; margin-top: 8px; font-size: 12px; color: #6b7280; }

@media (max-width: 520px) {
  .drawer-head { flex-wrap: wrap; gap: 10px; }
  .drawer-head h2 { flex-basis: 100%; order: -1; }
  .drawer-actions { margin-left: 0; width: 100%; }
  .drawer-actions .btn { flex: 1; justify-content: center; text-align: center; }
}