/* ============================================
 * WorkBuddy 求职招聘 - 网页端样式
 * 配色与小程序一致：薄荷绿主色 #00a783
 * ============================================ */
:root {
  --primary: #00a783;
  --primary-dark: #00896d;
  --primary-light: #e5f7f1;
  --primary-gradient: linear-gradient(135deg, #00a783 0%, #24ad8e 100%);
  --orange: #ee7b29;
  --orange-bg: #fff3ea;
  --purple: #7c5cff;
  --purple-bg: #f3eeff;
  --yellow: #f5a623;
  --yellow-bg: #fff6e9;
  --blue: #5b7cfa;
  --text-1: #1a1f36;
  --text-2: #5a6275;
  --text-3: #8a90a2;
  --line: #eef0f5;
  --bg: #f5f6fa;
  --white: #ffffff;
  --shadow-card: 0 2px 8px rgba(20, 30, 60, 0.06);
  --shadow-card-hover: 0 6px 18px rgba(20, 30, 60, 0.10);
  --shadow-modal: 0 20px 60px rgba(20, 30, 60, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

/* ====== 顶栏 ====== */
.topbar {
  background: var(--primary-gradient);
  color: #fff;
  padding: 18px 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}
.topbar .brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.topbar .brand-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
  font-weight: 400;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-actions .badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}
.btn-refresh {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 12px;
  transition: background 0.2s;
}
.btn-refresh:hover { background: rgba(255,255,255,0.35); }
.btn-refresh:disabled { opacity: 0.6; cursor: not-allowed; }

/* ====== 主体布局 ====== */
.layout {
  max-width: 1280px;
  margin: -12px auto 32px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 0 16px; }
  .topbar { padding: 16px; }
}

/* ====== 侧边导航 ====== */
.sidenav {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 0;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 16px;
  align-self: flex-start;
}
.sidenav-section { padding: 8px 16px; font-size: 11px; color: var(--text-3); letter-spacing: 0.5px; text-transform: uppercase; }
.sidenav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  color: var(--text-2);
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidenav-item:hover { background: var(--primary-light); color: var(--primary); }
.sidenav-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.sidenav-item .ico { width: 18px; text-align: center; font-size: 16px; }
.sidenav-item .count {
  margin-left: auto;
  background: var(--bg);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-3);
}
.sidenav-item.active .count { background: #fff; color: var(--primary); }

/* ====== 主区 ====== */
.main { min-width: 0; }
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ====== 工具条 ====== */
.toolbar {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.toolbar .search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 24px;
  padding: 0 14px;
  height: 38px;
}
.toolbar .search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text-1);
}
.toolbar select, .toolbar .btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--text-2);
  outline: none;
}
.toolbar select:focus { border-color: var(--primary); }
.toolbar .btn { cursor: pointer; transition: all 0.15s; }
.toolbar .btn:hover { border-color: var(--primary); color: var(--primary); }
.toolbar .btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.toolbar .btn.primary:hover { background: var(--primary-dark); }
.toolbar .btn.warn { background: var(--orange); color: #fff; border-color: var(--orange); }
.toolbar .btn.warn:hover { background: #d96d1f; }

/* ====== 分类网格 ====== */
.cat-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.cat-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.cat-tab {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg);
  cursor: pointer;
  border: none;
}
.cat-tab:hover { background: var(--primary-light); color: var(--primary); }
.cat-tab.active { background: var(--primary); color: #fff; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.cat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.cat-cell:hover { background: var(--primary-light); border-color: var(--primary); }
.cat-cell.active { background: var(--primary-light); border-color: var(--primary); }
.cat-cell .ico {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
}
.cat-cell .name { font-size: 12px; color: var(--text-2); text-align: center; }
.cat-cell.active .name { color: var(--primary); font-weight: 600; }

/* ====== 卡片列表 ====== */
.job-list { display: grid; gap: 12px; }
.job-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.job-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); border-color: var(--primary-light); }
.job-card .row1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-card .title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.job-card .salary { color: var(--orange); font-weight: 700; font-size: 16px; margin-left: auto; }
.job-card .row2 { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.job-card .row2 .dot { width: 3px; height: 3px; background: var(--text-3); border-radius: 50%; }
.job-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-2);
}
.tag.retired { background: var(--orange-bg); color: var(--orange); font-weight: 600; }
.tag.parttime { background: var(--purple-bg); color: var(--purple); font-weight: 600; }
.tag.urgent { background: #ffe9e9; color: #d96d6d; font-weight: 600; }
.job-card .row3 { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text-3); font-size: 12px; }
.job-card .company-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; }
.job-card .company-name { color: var(--text-2); font-weight: 500; }
.job-card .pubtime { margin-left: auto; }

/* ====== 工作台统计 ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.stat-card .label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--text-1); }
.stat-card .unit { font-size: 13px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.stat-card .bar { height: 4px; border-radius: 2px; margin-top: 10px; background: var(--bg); position: relative; overflow: hidden; }
.stat-card .bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 60%); background: var(--c, var(--primary)); border-radius: 2px; }

/* ====== 待办 ====== */
.todo-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.todo-card h3 { margin: 0 0 12px; font-size: 15px; }
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.todo-row:last-child { border-bottom: none; }
.todo-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.todo-row .text { flex: 1; font-size: 13px; color: var(--text-1); }
.todo-row .action { font-size: 12px; color: var(--primary); cursor: pointer; padding: 4px 10px; border-radius: 12px; background: var(--primary-light); }
.todo-row .action:hover { background: var(--primary); color: #fff; }

/* ====== 候选人卡片 ====== */
.cand-list { display: grid; gap: 10px; }
.cand-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.cand-card:hover { box-shadow: var(--shadow-card-hover); }
.cand-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 600; flex-shrink: 0; }
.cand-info { flex: 1; min-width: 0; }
.cand-info .name { font-weight: 600; }
.cand-info .name .match { background: var(--primary-light); color: var(--primary); padding: 1px 8px; border-radius: 10px; font-size: 11px; margin-left: 8px; }
.cand-info .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.cand-info .tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.cand-info .tag { font-size: 11px; padding: 1px 6px; background: var(--bg); border-radius: 4px; color: var(--text-2); }
.cand-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; flex-shrink: 0; }
.cand-status.pending { background: var(--yellow-bg); color: var(--yellow); }
.cand-status.interview { background: var(--purple-bg); color: var(--purple); }
.cand-status.offer { background: var(--primary-light); color: var(--primary); }
.cand-status.rejected { background: #f5f5f5; color: var(--text-3); }

/* ====== 详情 Modal ====== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(20, 30, 60, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: maskIn 0.2s;
}
.modal-mask.show { display: flex; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: modalIn 0.2s;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: none; font-size: 18px;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--line); }
.modal-body { padding: 22px 24px; }
.modal-section { margin-bottom: 18px; }
.modal-section h4 { margin: 0 0 8px; font-size: 14px; color: var(--text-1); }
.modal-section .text { color: var(--text-2); white-space: pre-wrap; line-height: 1.7; font-size: 13px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tags .tag { background: var(--primary-light); color: var(--primary); }
.modal-company {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 16px;
}
.modal-company .logo { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 16px; }
.modal-company .info { flex: 1; min-width: 0; }
.modal-company .name { font-weight: 600; }
.modal-company .meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.modal-actions {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex; gap: 12px;
  position: sticky; bottom: 0; background: #fff;
}
.modal-actions .btn { flex: 1; height: 42px; border-radius: 21px; border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--text-2); cursor: pointer; }
.modal-actions .btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-actions .btn.primary:hover { background: var(--primary-dark); }

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 30, 60, 0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====== 实用 ====== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty .ico { font-size: 40px; opacity: 0.4; }
.empty .text { margin-top: 12px; font-size: 13px; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-1);
}
.section-title .badge {
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 500;
}

.pager {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 16px;
  color: var(--text-3); font-size: 12px;
}
.pager .more {
  background: #fff; border: 1px solid var(--line);
  padding: 6px 18px; border-radius: 18px;
  font-size: 12px; color: var(--primary);
  cursor: pointer;
}
.pager .more:hover { border-color: var(--primary); }

/* ====== 表单 ====== */
.form-grid {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
}
.form-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-row label { font-size: 13px; color: var(--text-2); min-width: 80px; }
.form-row input, .form-row select, .form-row textarea {
  flex: 1;
  min-width: 180px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.form-row textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ====== 消息会话 ====== */
.msg-list { display: grid; gap: 8px; }
.msg-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.msg-card:hover { box-shadow: var(--shadow-card-hover); }
.msg-card .avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; flex-shrink: 0; }
.msg-card .info { flex: 1; min-width: 0; }
.msg-card .info .row1 { display: flex; align-items: center; gap: 6px; }
.msg-card .info .name { font-weight: 600; font-size: 14px; }
.msg-card .info .job { font-size: 11px; color: var(--text-3); background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.msg-card .info .last { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-card .right { text-align: right; flex-shrink: 0; }
.msg-card .right .time { font-size: 11px; color: var(--text-3); }
.msg-card .right .unread { background: var(--orange); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-top: 4px; display: inline-block; }

/* ===== 站点底部 footer ===== */
.site-footer {
  margin: 32px auto 24px;
  padding: 24px 20px 16px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-width: 800px;
}
.site-footer .sf-line {
  margin: 4px 0;
}
.site-footer .sf-link {
  color: var(--text-2);
  text-decoration: none;
}
.site-footer .sf-link:hover {
  color: var(--primary);
}
.site-footer .sf-sep {
  color: #d0d0cc;
  margin: 0 8px;
}
.site-footer .sf-pending {
  color: #a8a8a3;
  font-style: italic;
}
.site-footer .sf-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 11px;
  background: #FFF2EC;
  color: #C95F1B;
}
.site-footer .sf-badge.ok {
  background: #E5F7F1;
  color: #00896d;
}
.site-footer .sf-badge.warn {
  background: #FFF8E1;
  color: #B0790B;
}
.site-footer .sf-policy {
  margin-top: 10px;
  padding: 0 24px;
  font-size: 11px;
  color: #a8a8a3;
  line-height: 1.6;
}