/* ============================================================================
 * 秋招进度专栏 样式
 * 说明:
 *   - 优先使用 Redefine 主题暴露的 CSS 变量(--second-background-color 等),
 *     自动适配明暗模式;非 Redefine 主题回退到内置色值(portability)。
 *   - 桌面端表格 / 移动端卡片,由断点切换。
 * ==========================================================================*/

.recruit-app {
  --rc-bg: var(--second-background-color, #ffffff);
  --rc-bg-soft: var(--third-background-color, #f6f6f8);
  --rc-text: var(--first-text-color, #222831);
  --rc-text-2: var(--second-text-color, #4b5563);
  --rc-text-3: var(--third-text-color, #8a8f98);
  --rc-border: var(--border-color, #e7e9ee);
  --rc-primary: var(--primary-color, #a31f34);
  --rc-shadow: var(--redefine-box-shadow-flat, 0 1px 4px rgba(0, 0, 0, 0.06));
  color: var(--rc-text);
}

.recruit-app *,
.recruit-app *::before,
.recruit-app *::after {
  box-sizing: border-box;
}

/* ---------- 头部 ---------- */
.rc-head {
  margin-bottom: 1rem;
}
.rc-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--rc-text);
}
.rc-intro {
  margin: 0;
  color: var(--rc-text-3);
  font-size: 0.95rem;
}

/* ---------- 统计卡 ---------- */
.rc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.rc-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 0.75rem;
  box-shadow: var(--rc-shadow);
  padding: 0.6rem 0.85rem;
}
.rc-stat-icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.rc-stat-total .rc-stat-icon { color: #2563eb; background: rgba(37, 99, 235, 0.12); }
.rc-stat-active .rc-stat-icon { color: #059669; background: rgba(5, 150, 105, 0.12); }
.rc-stat-failed .rc-stat-icon { color: #6b7280; background: rgba(107, 114, 128, 0.14); }
.rc-stat-offer .rc-stat-icon { color: #d97706; background: rgba(217, 119, 6, 0.14); }
.dark-mode .rc-stat-total .rc-stat-icon { color: #93c5fd; background: rgba(147, 197, 253, 0.14); }
.dark-mode .rc-stat-active .rc-stat-icon { color: #6ee7b7; background: rgba(110, 231, 183, 0.14); }
.dark-mode .rc-stat-failed .rc-stat-icon { color: #9ca3af; background: rgba(156, 163, 175, 0.16); }
.dark-mode .rc-stat-offer .rc-stat-icon { color: #fcd34d; background: rgba(252, 211, 77, 0.16); }
.rc-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--rc-text);
}
.rc-stat-label {
  font-size: 0.78rem;
  color: var(--rc-text-3);
}

/* ---------- 筛选 chips ---------- */
.rc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.rc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid var(--rc-border);
  background: var(--rc-bg);
  color: var(--rc-text-2);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.5;
}
.rc-chip:hover {
  border-color: var(--rc-primary);
  color: var(--rc-primary);
}
.rc-chip-on {
  background: var(--rc-primary);
  border-color: var(--rc-primary);
  color: #fff;
}
.rc-chip-on:hover {
  color: #fff;
}
.rc-chip-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}
.rc-chip-count {
  font-size: 0.72rem;
  padding: 0 0.3rem;
  border-radius: 9999px;
  background: rgba(128, 128, 128, 0.15);
}

/* ---------- 工具栏 ---------- */
.rc-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}
.rc-sort {
  display: inline-flex;
  border: 1px solid var(--rc-border);
  border-radius: 0.6rem;
  overflow: hidden;
  background: var(--rc-bg);
}
.rc-sort-btn {
  border: none;
  background: transparent;
  color: var(--rc-text-2);
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rc-sort-btn + .rc-sort-btn {
  border-left: 1px solid var(--rc-border);
}
.rc-sort-btn:hover {
  color: var(--rc-primary);
}
.rc-sort-on {
  background: var(--rc-primary);
  color: #fff !important;
}

/* ---------- 表格 ---------- */
.rc-table-wrap {
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 0.75rem;
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}
.rc-table {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 0.95fr 1.05fr 1.3fr;
}
.rc-row {
  display: contents;
}
.rc-col {
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--rc-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.rc-row:last-of-type .rc-col {
  border-bottom: none;
}
.rc-head .rc-col {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rc-text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--rc-bg-soft);
}
.rc-company {
  font-weight: 600;
  color: var(--rc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-date {
  color: var(--rc-text-2);
  white-space: nowrap;
}
.rc-note {
  color: var(--rc-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-muted {
  color: var(--rc-text-3);
}
.rc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--rc-primary);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.rc-link:hover {
  text-decoration: underline;
}

/* ---------- 徽章 ---------- */
.rc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
}
.rc-badge::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

/* 徽章配色: 浅色 / 深色两套 */
.rc-c-default { color: #6b7280; background: rgba(107, 114, 128, 0.13); }
.rc-c-blue    { color: #2563eb; background: rgba(37, 99, 235, 0.10); }
.rc-c-sky     { color: #0284c7; background: rgba(2, 132, 199, 0.10); }
.rc-c-gray    { color: #6b7280; background: rgba(107, 114, 128, 0.13); }
.rc-c-indigo  { color: #4f46e5; background: rgba(79, 70, 229, 0.10); }
.rc-c-slate   { color: #64748b; background: rgba(100, 116, 139, 0.13); }
.rc-c-cyan    { color: #0891b2; background: rgba(8, 145, 178, 0.10); }
.rc-c-zinc    { color: #71717a; background: rgba(113, 113, 122, 0.13); }
.rc-c-teal    { color: #0d9488; background: rgba(13, 148, 136, 0.10); }
.rc-c-stone   { color: #78716c; background: rgba(120, 113, 108, 0.13); }
.rc-c-green   { color: #16a34a; background: rgba(22, 163, 74, 0.10); }
.rc-c-lime    { color: #65a30d; background: rgba(101, 163, 13, 0.12); }
.rc-c-emerald { color: #059669; background: rgba(5, 150, 105, 0.10); }
.rc-c-amber   { color: #d97706; background: rgba(217, 119, 6, 0.12); }
.rc-c-orange  { color: #ea580c; background: rgba(234, 88, 12, 0.11); }
.rc-c-red     { color: #dc2626; background: rgba(220, 38, 38, 0.10); }

.dark-mode .rc-c-default { color: #9ca3af; background: rgba(156, 163, 175, 0.16); }
.dark-mode .rc-c-blue    { color: #93c5fd; background: rgba(147, 197, 253, 0.14); }
.dark-mode .rc-c-sky     { color: #7dd3fc; background: rgba(125, 211, 252, 0.14); }
.dark-mode .rc-c-gray    { color: #9ca3af; background: rgba(156, 163, 175, 0.16); }
.dark-mode .rc-c-indigo  { color: #a5b4fc; background: rgba(165, 180, 252, 0.14); }
.dark-mode .rc-c-slate   { color: #94a3b8; background: rgba(148, 163, 184, 0.16); }
.dark-mode .rc-c-cyan    { color: #67e8f9; background: rgba(103, 232, 249, 0.14); }
.dark-mode .rc-c-zinc    { color: #a1a1aa; background: rgba(161, 161, 170, 0.16); }
.dark-mode .rc-c-teal    { color: #5eead4; background: rgba(94, 234, 212, 0.14); }
.dark-mode .rc-c-stone   { color: #a8a29e; background: rgba(168, 162, 158, 0.16); }
.dark-mode .rc-c-green   { color: #86efac; background: rgba(134, 239, 172, 0.14); }
.dark-mode .rc-c-lime    { color: #bef264; background: rgba(190, 242, 100, 0.15); }
.dark-mode .rc-c-emerald { color: #6ee7b7; background: rgba(110, 231, 183, 0.14); }
.dark-mode .rc-c-amber   { color: #fcd34d; background: rgba(252, 211, 77, 0.15); }
.dark-mode .rc-c-orange  { color: #fdba74; background: rgba(253, 186, 116, 0.15); }
.dark-mode .rc-c-red     { color: #fca5a5; background: rgba(252, 165, 165, 0.14); }

/* ---------- 移动端卡片 ---------- */
.rc-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.6rem;
}
.rc-card {
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 0.75rem;
  box-shadow: var(--rc-shadow);
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.rc-card-company {
  font-weight: 600;
  color: var(--rc-text);
}
.rc-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: var(--rc-text-3);
  font-size: 0.8rem;
}
.rc-card-note {
  font-size: 0.8rem;
  color: var(--rc-text-2);
}

/* ---------- 空 / 错误状态 ---------- */
.rc-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--rc-text-3);
}
.rc-state i {
  font-size: 1.8rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.6rem;
}
.rc-state code {
  background: var(--rc-bg-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
}
.recruit-tip {
  color: var(--rc-text-3);
  text-align: center;
  padding: 2rem 0;
}

/* ---------- 断点 ---------- */
@media (max-width: 767px) {
  .rc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .rc-table-wrap {
    display: none;
  }
  .rc-cards {
    display: flex;
    flex-direction: column;
  }
  .rc-toolbar {
    justify-content: flex-start;
  }
}
