/* === JOBS LISTING PAGE === */

.jobs-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.jobs-hero {
  text-align: center;
  padding: 48px 0 40px;
}

.jobs-title {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
}

.jobs-subtitle {
  font-size: 17px;
  color: var(--fg-2);
  margin-bottom: 36px;
}

/* Search bar */
.search-form {
  margin-bottom: 24px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  max-width: 600px;
  margin: 0 auto;
}

.search-bar:focus-within {
  border-color: rgba(240, 180, 41, 0.4);
}

.search-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.search-bar input::placeholder { color: var(--fg-3); }

.search-btn {
  background: var(--amber);
  color: #080b15;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.search-btn:hover { opacity: 0.88; }

/* Filter chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.chip-label {
  font-size: 13px;
  color: var(--fg-3);
  font-weight: 500;
}

.chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg-2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover { border-color: rgba(255,255,255,0.15); color: var(--fg); }
.chip.active {
  background: var(--amber-dim);
  border-color: rgba(240, 180, 41, 0.4);
  color: var(--amber);
}

/* Results meta */
.jobs-meta {
  font-size: 14px;
  color: var(--fg-3);
  margin: 28px 0 16px;
  padding-left: 4px;
}

/* Job cards */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}

.job-card:hover {
  border-color: rgba(240, 180, 41, 0.25);
  transform: translateY(-1px);
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.job-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.job-card-company {
  font-size: 14px;
  color: var(--fg-2);
  font-weight: 500;
}

.job-card-match {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.match-score {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Fraunces', serif;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-high { background: rgba(52,211,153,0.15); color: #34d399; }
.score-med  { background: var(--amber-dim); color: var(--amber); }
.score-low  { background: rgba(255,255,255,0.05); color: var(--fg-3); }

.match-label {
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 2px;
}

.job-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.job-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--fg-2);
}

.remote-remote { color: #34d399; font-weight: 500; }
.remote-hybrid { color: var(--amber); font-weight: 500; }
.remote-onsite { color: var(--fg-3); }

.job-card-skills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.skill-tag {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--fg-2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}

.skill-more {
  color: var(--fg-3);
  border-style: dashed;
}

.job-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-card-source {
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.job-card-apply {
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
}

/* Empty / loading states */
.jobs-loading, .jobs-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-3);
}

.jobs-empty p { font-size: 15px; }

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === JOB DETAIL PAGE === */

.detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.detail-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-3);
}

.detail-error {
  text-align: center;
  padding: 80px 20px;
}

.detail-error h2 { font-family: 'Fraunces', serif; font-size: 28px; margin-bottom: 12px; }
.detail-error p { color: var(--fg-2); margin-bottom: 28px; }

.back-link {
  display: inline-block;
  color: var(--fg-3);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--fg-2); }

/* Two-column layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
}

.detail-main { min-width: 0; }

/* Detail header */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

.detail-title {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.detail-company {
  font-size: 17px;
  color: var(--fg-2);
  font-weight: 500;
}

/* Match panel */
.match-panel {
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  min-width: 150px;
}

.match-score-big {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.match-score-big.score-high { color: #34d399; }
.match-score-big.score-med  { color: var(--amber); }
.match-score-big.score-low  { color: var(--fg-3); }

.score-denom { font-size: 20px; font-weight: 400; }

.match-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 6px;
}

.match-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-2);
}

.match-row span:last-child { font-weight: 600; color: var(--fg); }

.match-note {
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 6px;
}

/* Meta bar */
.detail-meta-bar {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-2);
}

.detail-meta-item svg { color: var(--fg-3); flex-shrink: 0; }

.remote-badge {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
}

.remote-badge.remote-remote { color: #34d399; }
.remote-badge.remote-hybrid { color: var(--amber); }
.remote-badge.remote-onsite { color: var(--fg-3); }

.seniority-badge {
  background: var(--amber-dim);
  color: var(--amber);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

/* Sections */
.detail-section { margin-bottom: 32px; }

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  font-weight: 600;
  margin-bottom: 12px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--fg-2);
  max-width: 680px;
}

.job-description p { margin-bottom: 14px; }
.job-description h1, .job-description h2, .job-description h3 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin: 20px 0 8px;
}
.job-description ul, .job-description ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.job-description li { margin-bottom: 6px; }

.detail-source {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.source-link {
  color: var(--amber);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}

.source-link:hover { text-decoration: underline; }

/* === APPLY PANEL === */

.detail-sidebar { position: sticky; top: 80px; }

.apply-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.apply-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 20px;
}

.applied-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34d399;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.apply-match-banner {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-bottom: 20px;
}

.apply-match-score {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 2px;
}

.apply-match-banner p {
  font-size: 12px;
  color: var(--fg-3);
  margin: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(240, 180, 41, 0.5);
}

.form-group textarea { resize: vertical; }

.apply-btn {
  width: 100%;
  background: var(--amber);
  color: #080b15;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.apply-btn:hover:not(:disabled) { opacity: 0.88; }
.apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.apply-note {
  font-size: 12px;
  color: var(--fg-3);
  text-align: center;
  margin-top: 10px;
}

.apply-success {
  text-align: center;
  padding: 8px 0;
}

.apply-success h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin: 14px 0 8px;
}

.apply-success p {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 20px;
}

.success-link {
  color: var(--amber);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.success-link:hover { text-decoration: underline; }

.apply-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}

/* === PROFILE COMPLETENESS STRIP (shown on jobs page) === */

.completeness-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 24px;
}

.strip-ring-wrap {
  position: relative;
  flex-shrink: 0;
}

.strip-ring {
  transform: rotate(-90deg);
  display: block;
}

.strip-ring-bg {
  fill: none;
  stroke: var(--bg-3);
  stroke-width: 4;
}

.strip-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.strip-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.strip-pct {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}

.strip-denom {
  font-size: 8px;
  color: var(--fg-3);
  margin-top: 1px;
}

.strip-mid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.strip-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.level-excellent { background: rgba(52,211,153,0.15); color: #34d399; }
.level-good      { background: var(--amber-dim); color: var(--amber); }
.level-partial   { background: rgba(99,179,237,0.15); color: #63b3ed; }
.level-sparse    { background: rgba(255,255,255,0.05); color: var(--fg-3); }

.strip-hint {
  font-size: 13px;
  color: var(--fg-3);
}

.strip-link {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.strip-link:hover { text-decoration: underline; }

/* === PAGINATION (candidate-jobs page) === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg-2);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
  border-color: rgba(240, 180, 41, 0.4);
  color: var(--amber);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-info {
  font-size: 13px;
  color: var(--fg-3);
}