/* ===== COMPONENTS.CSS — 可复用组件 ===== */

/* === 文件上传区 === */
.upload-zone {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.upload-zone:hover { border-color: var(--color-brand); }
.upload-zone__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-1); padding: var(--space-6) var(--space-4);
  cursor: pointer; text-align: center;
}
.upload-zone__icon { font-size: 28px; }
.upload-zone__text {
  font-size: var(--text-sm); color: var(--color-text-secondary); font-weight: 500;
}
.upload-zone__hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.upload-file-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
}
.upload-file-item__name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--color-text-primary);
}
.upload-file-item__size { color: var(--color-text-muted); font-size: var(--text-xs); flex-shrink: 0; }
.upload-file-item__remove {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 16px; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.upload-file-item__remove:hover { color: var(--color-rejected); }
.upload-uploading {
  font-size: var(--text-xs); color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: all var(--transition-fast);
  cursor: pointer; border: none;
  white-space: nowrap; line-height: 1;
}
.btn--primary {
  background: var(--color-brand); color: var(--color-text-inverse);
}
.btn--primary:hover { background: var(--color-brand-light); }
.btn--primary:disabled { background: var(--color-text-muted); cursor: not-allowed; }

.btn--ghost {
  background: transparent; color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover { background: var(--color-surface-warm); border-color: var(--color-text-muted); }

.btn--outline {
  background: transparent; color: var(--color-brand);
  border: 1.5px solid var(--color-brand);
}
.btn--outline:hover { background: var(--color-brand-pale); }

.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn--full { width: 100%; }

.btn--loading { pointer-events: none; opacity: 0.75; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* === 标签 === */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1.6;
}
.tag--category { background: var(--color-surface-warm); color: var(--color-text-secondary); }
.tag--open     { background: var(--color-brand-pale); color: var(--color-brand); }
.tag--closed   { background: #F0F0F0; color: var(--color-text-muted); }
.tag--draft    { background: #FFF3E0; color: var(--color-status-draft); }
.tag--pending  { background: #FFF8E8; color: var(--color-pending); }
.tag--read     { background: #E8F5EE; color: var(--color-read); }
.tag--hired    { background: var(--color-brand-pale); color: var(--color-hired); }
.tag--rejected { background: #FDECEA; color: var(--color-rejected); }

/* === 岗位卡片 === */
.job-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex; flex-direction: column;
}
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.job-card__cover {
  height: 110px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--space-4);
  position: relative;
}
.job-card__icon {
  font-size: 2rem;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -65%);
  opacity: 0.55;
}
.job-card__body {
  padding: var(--space-5);
  flex: 1; display: flex; flex-direction: column; gap: var(--space-3);
}
.job-card__meta {
  display: flex; align-items: center; justify-content: space-between;
}
.job-card__slots {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.job-card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}
.job-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.job-card__footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
  display: flex; justify-content: space-between; align-items: center;
}
.fee-label, .deadline-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-right: var(--space-1);
}
.fee-value {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-brand);
}
.deadline--passed { color: var(--color-text-muted); text-decoration: line-through; }
.deadline--urgent { color: #C0392B; font-weight: var(--weight-medium); }
.deadline--soon   { color: #D4803A; }
.deadline--normal { color: var(--color-text-secondary); }

/* === 表单 === */
.form-section { margin-bottom: var(--space-10); }
.form-section__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.form-field { margin-bottom: var(--space-5); }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.form-optional {
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  margin-left: var(--space-2);
}
.form-required { color: var(--color-rejected); margin-left: 2px; }
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-input:focus {
  border-color: var(--color-brand-light);
  box-shadow: 0 0 0 3px rgba(44,74,62,0.08);
}
.form-input.error {
  border-color: var(--color-rejected);
  box-shadow: 0 0 0 3px rgba(160,72,64,0.08);
}
.form-input--sm { flex: 1; min-width: 0; }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-hint { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.form-error { display: block; font-size: var(--text-xs); color: var(--color-rejected); margin-top: var(--space-1); }
.char-count { float: right; font-size: var(--text-xs); color: var(--color-text-muted); }
.form-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-3); padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* 作品集链接行 */
.portfolio-link-row {
  display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3);
}
.portfolio-link-index {
  width: 52px;
  flex: 0 0 52px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.portfolio-link-row .form-input[type="url"] { flex: 2; }
.portfolio-link-row .form-input:last-of-type { flex: 1; }
.btn-remove-link {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--color-text-muted);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}
.btn-remove-link:hover { background: #FDECEA; color: var(--color-rejected); border-color: var(--color-rejected); }

/* 颜色选择器 */
.color-picker {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
}
.color-swatch {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition-fast);
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(44,74,62,0.2); }

/* === 单选组 === */
.radio-group { display: flex; gap: var(--space-5); }
.radio-group label {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); cursor: pointer; color: var(--color-text-secondary);
}
.radio-group input[type=radio] { accent-color: var(--color-brand); }

/* === 详情页布局 === */
.detail-layout {
  display: flex; gap: var(--space-10); align-items: flex-start;
  padding: var(--space-10) 0;
}
.detail-main { flex: 1; min-width: 0; }
.detail-sidebar {
  width: 300px; flex-shrink: 0;
  position: sticky; top: 80px;
}
.detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.detail-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}
.detail-tags,
.detail-hashtags { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.detail-hashtags span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.detail-desc {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  white-space: pre-line;
}
.detail-section { margin-bottom: var(--space-8); }
.detail-section-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}
.req-list { display: flex; flex-direction: column; gap: var(--space-3); }
.req-item {
  display: flex; align-items: flex-start; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}
.req-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-brand-light);
  flex-shrink: 0; margin-top: 6px;
}
.sidebar-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-light);
}
.sidebar-row:last-of-type { border-bottom: none; }
.sidebar-label { font-size: var(--text-xs); color: var(--color-text-muted); }
.sidebar-value {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  text-align: right;
}
.sidebar-value--fee {
  font-size: var(--text-xl);
  color: var(--color-brand);
}
.sidebar-share-row {
  display: flex; gap: var(--space-4); margin-top: var(--space-2);
  border-top: 1px solid var(--color-border-light); padding-top: var(--space-3);
}
.sidebar-share {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--color-text-muted);
  cursor: pointer; padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}
.sidebar-share:hover { color: var(--color-brand); }
.apply-btn-wrap { margin-top: var(--space-5); }

/* 投递成功状态 */
.success-state {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  display: none;
}
.success-state.visible { display: block; animation: pageEnter 0.4s ease; }
@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.success-icon {
  font-size: 3.5rem;
  animation: bounceIn 0.5s ease forwards;
  display: block; margin-bottom: var(--space-5);
}
.success-title {
  font-size: var(--text-2xl); font-weight: var(--weight-bold);
  color: var(--color-text-primary); margin-bottom: var(--space-3);
}
.success-desc { font-size: var(--text-sm); color: var(--color-text-secondary); margin-bottom: var(--space-2); }
.success-id {
  display: inline-block;
  font-size: var(--text-xs); font-family: monospace;
  background: var(--color-surface-warm);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4); margin-bottom: var(--space-8);
}

/* 岗位摘要卡（投递页顶部） */
.job-summary-card {
  background: var(--color-surface-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.job-summary-cover {
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.job-summary-title { font-weight: var(--weight-semibold); font-size: var(--text-base); margin-bottom: var(--space-1); }
.job-summary-meta { font-size: var(--text-xs); color: var(--color-text-muted); display: flex; gap: var(--space-4); flex-wrap: wrap; }
.job-summary-meta span { white-space: nowrap; }

/* 相关岗位 */
.related-section { border-top: 1px solid var(--color-border); padding-top: var(--space-10); margin-top: var(--space-10); }
.related-title {
  font-size: var(--text-xl); font-weight: var(--weight-semibold);
  margin-bottom: var(--space-6); color: var(--color-text-primary);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }

/* 星级评分 */
.star-rating { display: flex; gap: 2px; }
.star { font-size: 1rem; cursor: pointer; transition: transform var(--transition-fast); }
.star:hover { transform: scale(1.2); }
.star--filled { color: #F4B942; }
.star--empty  { color: var(--color-border); }

/* 头像占位 */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-base); font-weight: var(--weight-bold);
  color: var(--color-text-primary); flex-shrink: 0;
}
.avatar--lg { width: 52px; height: 52px; font-size: var(--text-xl); }

/* === 海报弹窗 === */
.poster-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: block;
  overflow: visible;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.poster-overlay.active {
  opacity: 1; pointer-events: auto;
}
.poster-modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4);
  width: min(90vw, 420px);
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-hover);
  box-sizing: border-box;
  min-width: 0;
}
.poster-modal canvas {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: min(66dvh, 720px);
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: var(--radius-lg);
  display: block;
}
.poster-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-surface-warm); border: none;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition-fast);
}
.poster-close:hover { background: var(--color-border); }
.poster-tip {
  font-size: var(--text-xs); color: var(--color-text-muted);
  text-align: center;
}
.poster-controls {
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 4px;
  background: var(--color-surface);
}
.poster-modal .btn--primary {
  border-radius: 999px;
}

/* 响应式 */
@media (max-width: 768px) {
  .detail-layout { flex-direction: column; }
  .detail-sidebar {
    width: 100%; position: static;
    order: -1;
  }
  .detail-sidebar .apply-btn-wrap { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .portfolio-link-row { flex-wrap: wrap; }
  .portfolio-link-index { flex-basis: 100%; width: 100%; }
  .portfolio-link-row .form-input[type="url"] { flex: 1 1 100%; }
}

/* === 详情页新版 === */
.detail-page {
  --color-brand: #111111;
  --color-brand-light: #3a3a38;
  --color-brand-pale: #eee7dc;
  --color-status-open: #111111;
  --color-hired: #111111;
  background:
    linear-gradient(90deg, rgba(17,17,17,0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17,17,17,0.026) 1px, transparent 1px),
    #f7f3ea;
  background-size: 56px 56px;
  overflow-x: hidden;
}
.detail-page .nav {
  background: rgba(31,32,33,0.86);
  border-bottom-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(18px);
}
.detail-page .nav__logo {
  color: #fbf8f1;
}
.detail-page .nav__logo-dot {
  background: #ded4c2;
}
.detail-page .breadcrumb a:hover {
  color: #b84a36;
}
.detail-page .container {
  max-width: 1180px;
}
.detail-page main.container {
  padding-top: 88px;
}
.detail-page .detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(30px, 5vw, 64px) 0 0;
}
.detail-page .detail-main {
  border-top: 1px solid rgba(17,17,17,0.78);
  padding-top: 22px;
}
.detail-page .detail-title {
  max-width: 920px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 720;
  margin: 22px 0 34px;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.detail-page .detail-section {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 42px);
  padding: 24px 0;
  margin: 0;
  border-top: 1px solid rgba(17,17,17,0.18);
}
.detail-page .detail-section:last-child {
  border-bottom: 1px solid rgba(17,17,17,0.78);
}
.detail-page .detail-section-title {
  margin: 0;
  color: #b84a36;
  letter-spacing: 0.08em;
}
.detail-page .tag {
  border-radius: 999px;
}
.detail-page .detail-hashtags {
  gap: 12px;
  margin-bottom: 18px;
}
.detail-page .detail-hashtags span {
  color: #6f6a60;
  font-size: 14px;
  line-height: 1.6;
}
.detail-page .tag--category {
  background: transparent;
  border: 1px solid rgba(17,17,17,0.24);
  color: #3f3b34;
}
.detail-page .tag--open {
  background: #111111;
  color: #fbf8f1;
}
.detail-page .sidebar-value--fee {
  color: #b84a36;
}
.detail-page .detail-desc,
.detail-page .req-item,
.detail-page .detail-ordered-item {
  font-size: 16px;
  line-height: 1.9;
  color: #3f3b34;
}
.detail-page .detail-desc {
  margin: 0;
}
.detail-page .req-list {
  margin: 0;
}
.detail-page .detail-ordered-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.detail-page .detail-ordered-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}
.detail-page .detail-ordered-item__no {
  color: #b84a36;
  font-variant-numeric: tabular-nums;
}
.detail-page .req-dot {
  background: #111111;
  margin-top: 10px;
}
.detail-page .detail-sidebar {
  width: auto;
}
.detail-page .detail-card {
  border-radius: 0;
  border: 1px solid rgba(17,17,17,0.78);
  background: rgba(251,248,241,0.72);
  box-shadow: none;
  padding: 22px;
}
.detail-page .sidebar-row {
  border-bottom-color: rgba(17,17,17,0.18);
  padding: 14px 0;
}
.detail-page .detail-cta-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0 6px;
}
.detail-page .btn--primary {
  background: #111111;
  color: #fbf8f1;
  border-radius: 999px;
}
.detail-page .btn--primary:hover {
  background: #3a3a38;
}
.detail-page .btn--ghost {
  border-radius: 999px;
}
.detail-page .detail-share-btn {
  border-color: rgba(17,17,17,0.32);
  color: #111111;
}
.detail-share {
  position: relative;
}
.detail-share-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 168px;
  border: 1px solid rgba(17,17,17,0.78);
  background: #fbf8f1;
  box-shadow: 0 22px 54px rgba(0,0,0,0.16);
  padding: 6px;
}
.detail-share-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.detail-share-menu button:hover {
  background: #111111;
  color: #fbf8f1;
}
.detail-page .related-section {
  border-top-color: rgba(17,17,17,0.78);
  margin-top: 48px;
  padding-top: 34px;
}
.detail-page .related-grid .job-card {
  border-radius: 0;
  box-shadow: none;
  background: rgba(251,248,241,0.68);
  border-color: rgba(17,17,17,0.22);
}
.detail-page .related-grid .job-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}
.detail-page .related-grid .job-card__cover {
  height: 136px;
  background: var(--job-accent, #ded4c2) !important;
  color: #111111;
  display: block;
  padding: 18px 18px 16px;
  overflow: hidden;
  border-bottom: 1px solid rgba(17,17,17,0.18);
}
.detail-page .related-grid .job-card__cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: #b84a36;
}
.detail-page .related-grid .job-card__cover-dept {
  position: absolute;
  right: 18px;
  top: 17px;
  max-width: calc(100% - 118px);
  color: rgba(17,17,17,0.7);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-align: right;
}
.detail-page .related-grid .job-card__cover-type {
  position: absolute;
  left: 22px;
  bottom: 16px;
  max-width: calc(100% - 44px);
  color: rgba(17,17,17,0.54);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.detail-page .related-grid .job-card__cover .tag--open {
  position: absolute;
  left: 22px;
  top: 18px;
}
.detail-page .fee-value {
  color: #b84a36;
}
.poster-overlay {
  display: block;
  padding: 0;
}
.poster-modal {
  gap: 12px;
  padding: 20px;
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.poster-modal canvas {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: min(66dvh, 720px);
  object-fit: contain;
  flex: 0 0 auto;
}
@media (max-width: 860px) {
  .detail-page .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .detail-page main.container {
    padding-top: 68px;
  }
  .detail-page .detail-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 24px;
  }
  .detail-page .detail-main {
    padding-top: 16px;
  }
  .detail-page .detail-title {
    font-size: clamp(32px, 8.6vw, 44px);
    line-height: 1.08;
    margin: 18px 0 26px;
  }
  .detail-page .detail-sidebar {
    order: 0;
  }
  .detail-page .detail-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }
  .detail-page .detail-desc,
  .detail-page .req-item,
  .detail-page .detail-ordered-item {
    font-size: 15px;
    line-height: 1.72;
  }
  .detail-page .detail-card {
    padding: 18px;
    min-width: 0;
  }
  .detail-page .sidebar-row {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) minmax(0, 1.55fr);
    align-items: center;
    gap: 16px;
    padding: 12px 0;
  }
  .detail-page .sidebar-value {
    justify-self: end;
    min-width: 0;
    max-width: none;
    overflow-wrap: anywhere;
  }
  .detail-page .sidebar-value--fee {
    font-size: clamp(22px, 7vw, 28px);
  }
  .detail-page .detail-cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    padding: 16px 0 28px;
  }
  .detail-page .detail-cta-row > .btn,
  .detail-share-btn {
    min-height: 54px;
    width: 100%;
  }
  .detail-share {
    width: auto;
    min-width: 0;
  }
  .detail-share-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
  .poster-overlay {
    padding: 0;
  }
  .poster-modal {
    width: min(calc(100vw - 24px), 360px);
    padding: 14px;
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
  }
  .poster-modal canvas {
    max-height: 58dvh;
  }
  .detail-page .related-section {
    margin-top: 24px;
    padding-top: 22px;
  }
}

/* === 投递页新版 === */
.apply-page {
  background:
    linear-gradient(90deg, rgba(17,17,17,0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17,17,17,0.026) 1px, transparent 1px),
    #f7f3ea;
  background-size: 56px 56px;
}
.apply-shell {
  max-width: 880px;
  padding-top: 96px;
  padding-bottom: var(--space-16);
}
.apply-page .job-summary-card {
  border-radius: 0;
  border: 1px solid rgba(17,17,17,0.78);
  background: rgba(251,248,241,0.72);
  box-shadow: none;
}
.apply-page #apply-form {
  border-top: 1px solid rgba(17,17,17,0.78);
}
.apply-page .form-section {
  margin: 0;
  padding: 30px 0 12px;
  border-bottom: 1px solid rgba(17,17,17,0.18);
}
.apply-page .form-section__title {
  border: 0;
  padding: 0;
  color: #111111;
  font-size: 22px;
  letter-spacing: 0;
}
.apply-page .form-label {
  color: #514c43;
}
.apply-page .form-input {
  border-radius: 0;
  border-color: rgba(17,17,17,0.28);
  background: rgba(251,248,241,0.66);
}
.apply-page .form-input:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}
.apply-page .upload-zone {
  border-radius: 0;
  border-color: rgba(17,17,17,0.32);
  background: rgba(251,248,241,0.56);
}
.apply-page .upload-zone__inner {
  min-height: 116px;
}
.apply-page .upload-zone__text {
  color: #111111;
}
.apply-page .form-actions {
  border-top: 1px solid rgba(17,17,17,0.78);
  margin-top: 10px;
}
.apply-page .success-state {
  border-top: 1px solid rgba(17,17,17,0.78);
  border-bottom: 1px solid rgba(17,17,17,0.78);
  margin-top: 32px;
}
@media (max-width: 720px) {
  .apply-shell {
    padding-top: 76px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ===== PWA 安装引导 ===== */

.pwa-install {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 160;
  color: #171b18;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", sans-serif;
}
.pwa-install__panel {
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  border: 1px solid rgba(23,27,24,0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23,27,24,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,27,24,0.035) 1px, transparent 1px),
    rgba(248,247,241,0.96);
  background-size: 28px 28px;
  backdrop-filter: blur(22px);
  box-shadow: 0 26px 70px rgba(23,27,24,0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 180ms ease, transform 220ms ease;
}
.pwa-install.is-open .pwa-install__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pwa-install__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
}
.pwa-install__close::before,
.pwa-install__close::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  width: 14px;
  height: 1px;
  background: rgba(23,27,24,0.7);
}
.pwa-install__close::before { transform: rotate(45deg); }
.pwa-install__close::after { transform: rotate(-45deg); }
.pwa-install__head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 28px;
}
.pwa-install__head img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
.pwa-install__head span {
  display: block;
  color: rgba(23,27,24,0.54);
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 4px;
}
.pwa-install__head strong {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}
.pwa-install__desc {
  margin: 16px 0 18px;
  color: rgba(23,27,24,0.66);
  font-size: 13px;
  line-height: 1.65;
}
.pwa-install__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwa-install__primary,
.pwa-install__secondary {
  min-height: 38px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 650;
}
.pwa-install__primary {
  border-radius: 999px;
  background: #171b18;
  color: #fffdf7;
}
.pwa-install__secondary {
  color: rgba(23,27,24,0.58);
}
.pwa-install__steps {
  border-top: 1px solid rgba(23,27,24,0.14);
  margin-top: 18px;
  padding-top: 16px;
}
.pwa-install__steps p {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}
.pwa-install__steps ol {
  list-style: none;
  counter-reset: pwa-step;
  display: grid;
  gap: 8px;
}
.pwa-install__steps li {
  counter-increment: pwa-step;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  color: rgba(23,27,24,0.68);
  font-size: 12px;
  line-height: 1.55;
}
.pwa-install__steps li::before {
  content: counter(pwa-step);
  width: 18px;
  height: 18px;
  border: 1px solid rgba(23,27,24,0.32);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #171b18;
  font-size: 10px;
}
.pwa-install__other-toggle {
  margin-top: 14px;
  color: rgba(23,27,24,0.56);
  font-size: 12px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pwa-install__other {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(23,27,24,0.1);
}
.pwa-install__other[hidden] {
  display: none;
}
.pwa-install__other-item p {
  margin-bottom: 8px;
  color: #171b18;
  font-size: 12px;
  font-weight: 700;
}
.pwa-install.is-installed .pwa-install__panel {
  border-color: rgba(65,111,84,0.42);
}

/* ===== 聊天组件 ===== */

.chat-fab {
  --chat-fab-bg: #1f2021;
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: var(--chat-fab-bg);
  color: #fbf8f1;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.chat-fab:hover { --chat-fab-bg: #111111; transform: translateY(-2px); box-shadow: 0 22px 48px rgba(0,0,0,0.28); }
.chat-fab__mark {
  display: block;
  width: 23px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 9px;
  position: relative;
}
.chat-fab__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -6px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: var(--chat-fab-bg);
  transform: rotate(-28deg) skewX(-12deg);
}
.chat-fab__badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 10px; height: 10px;
  background: #E53935;
  border-radius: var(--radius-full);
  border: 2px solid white;
  display: none;
}
.chat-fab__badge.visible { display: block; }

.chat-panel {
  position: fixed;
  bottom: calc(var(--space-8) + 64px);
  right: var(--space-8);
  width: 390px; height: 540px;
  z-index: 150;
  background:
    linear-gradient(90deg, rgba(17,17,17,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17,17,17,0.035) 1px, transparent 1px),
    #fbf8f1;
  background-size: 36px 36px;
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.24);
  border: 1px solid rgba(17,17,17,0.28);
  display: flex; flex-direction: column;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
  overflow: hidden;
}
.chat-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.13);
  background: #1f2021;
  color: #fbf8f1;
  flex-shrink: 0;
}
.chat-header__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: #fbf8f1;
}
.chat-header__sub {
  font-size: var(--text-xs);
  color: rgba(251,248,241,0.58);
  margin-top: 1px;
}
.chat-header__close {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.13);
  background: transparent;
  cursor: pointer; color: rgba(251,248,241,0.72);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  transition: background 0.15s;
}
.chat-header__close:hover { background: rgba(255,255,255,0.1); }

.chat-topic {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(17,17,17,0.12);
  background: rgba(251,248,241,0.78);
  flex-shrink: 0;
}
.chat-topic span {
  color: rgba(17,17,17,0.52);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chat-topic__select {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(17,17,17,0.18);
  background: rgba(255,255,255,0.62);
  color: #111111;
  padding: 0 10px;
  font-size: 13px;
}

.chat-usage {
  display: grid;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(17,17,17,0.1);
  background: rgba(255,255,255,0.46);
  flex-shrink: 0;
}
.chat-usage__bar {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17,17,17,0.1);
}
.chat-usage__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2d5a27;
  transition: width 0.22s ease;
}
.chat-usage[data-state="limit"] .chat-usage__bar span {
  background: #6f6a60;
}
.chat-usage__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(17,17,17,0.58);
  font-size: 11px;
  line-height: 1.35;
}
.chat-usage__meta span:first-child {
  color: #111111;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.chat-msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  word-break: break-word;
  white-space: pre-line;
}
.chat-msg--user {
  background: #111111;
  color: #fbf8f1;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}
.chat-msg--assistant {
  background: #f5f1e8;
  color: var(--color-text-primary);
  align-self: flex-start;
  border: 1px solid rgba(17,17,17,0.12);
  border-bottom-left-radius: 5px;
}
.chat-msg--human_agent {
  background: #eef2f5;
  color: #2c5f9f;
  align-self: flex-start;
  border: 1px solid rgba(44,95,159,0.16);
  border-bottom-left-radius: 5px;
}
.chat-msg--typing {
  background: #f5f1e8;
  color: #6f6a60;
  align-self: flex-start;
  border: 1px solid rgba(17,17,17,0.12);
  border-bottom-left-radius: 5px;
  font-style: italic;
}
.chat-notice {
  font-size: var(--text-xs);
  color: #6f6a60;
  background: rgba(222,212,194,0.42);
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 12px;
  padding: var(--space-2) var(--space-3);
  text-align: center;
  align-self: stretch;
}

.chat-input-row {
  display: flex; gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(17,17,17,0.16);
  flex-shrink: 0;
  background: rgba(251,248,241,0.8);
}
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid rgba(17,17,17,0.22);
  border-radius: 16px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  line-height: var(--leading-normal);
  max-height: 80px;
  overflow-y: auto;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: #111111; }
.chat-send-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: #111111;
  color: #fbf8f1; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  align-self: flex-end;
  transition: background 0.15s, opacity 0.15s;
}
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { background: #3a3a38; }

@media (max-width: 768px) {
  .pwa-install {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .pwa-install__panel {
    width: 100%;
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom));
  }
  .chat-fab {
    bottom: calc(var(--space-4) + 60px);
    right: var(--space-4);
  }
  .chat-panel {
    width: 100%;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    height: 70vh;
  }
}
