/* Jobs — portal layout */

.jobs-page { max-width: none; width: 100%; }
.jobs-page-wide {
  max-width: none !important;
  width: 100%;
}
.app-shell.jobs-portal .main.jobs-page-wide {
  max-width: none;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 1200px) {
  .app-shell.jobs-portal .main.jobs-page-wide {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.jobs-page-public {
  max-width: none;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
.jobs-page-public.jobs-page-wide {
  max-width: none;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

/* Header */
.jp-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.jp-head h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -.03em;
}
.jp-head p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  max-width: 40rem;
}
.jp-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Filter bar */
.jp-filter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.jp-filter-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.9fr 0.75fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.jp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.jp-field label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}
.jp-field input,
.jp-field select {
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: .92rem;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
.jp-field input:focus,
.jp-field select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.jp-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.jp-grow { min-width: 160px; }

.jp-results-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: .9rem;
  color: #475569;
}
.jp-filtered { color: #4f46e5; font-weight: 700; }
.jp-active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.jp-tag {
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .1);
  color: #3730a3;
  border: 1px solid rgba(99, 102, 241, .2);
}

/* List */
.jobs-list { display: grid; gap: 12px; }
.jobs-list-portal { gap: 14px; }

.job-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
  border-color: rgba(99, 102, 241, .28);
  text-decoration: none;
  color: inherit;
}
.job-card-portal {
  align-items: flex-start;
  padding: 20px 22px;
}
.job-card-portal.is-premium {
  border-color: rgba(245, 158, 11, .35);
  background: linear-gradient(135deg, #fff, #fffbeb);
}
.job-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.job-card-top h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -.02em;
}
.job-badge {
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.job-badge.premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(234, 88, 12, .15));
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, .35);
}
.job-company {
  margin: 0 0 8px;
  font-weight: 700;
  color: #4f46e5;
  font-size: .92rem;
}
.job-excerpt {
  margin: 0 0 12px;
  color: #64748b;
  font-size: .88rem;
  line-height: 1.45;
  max-width: 52rem;
}
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: .82rem;
  color: #64748b;
}
.job-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: .78rem;
  color: #334155;
}
.job-chip.salary {
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .25);
  color: #166534;
}
.job-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
  flex-shrink: 0;
}
.job-date {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
}
.job-cta {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  background: #4f46e5;
  padding: 8px 14px;
  border-radius: 10px;
}
.job-card:hover .job-cta {
  background: #4338ca;
}

.jobs-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 18px;
}
.jobs-empty-icon { font-size: 2rem; margin-bottom: 10px; }
.jobs-empty h2 { margin: 0 0 8px; font-size: 1.15rem; }
.jobs-empty p { margin: 0 0 16px; color: var(--muted); }

/* Public dark theme */
body.jobs-public { background: #0f172a; min-height: 100vh; }
body.jobs-public .jp-head h1 { color: #fff; }
body.jobs-public .jp-head p { color: #94a3b8; }
body.jobs-public .jp-filter {
  background: rgba(15, 23, 42, .9);
  border-color: rgba(255, 255, 255, .1);
}
body.jobs-public .jp-field label { color: #94a3b8; }
body.jobs-public .jp-field input,
body.jobs-public .jp-field select {
  background: #0f172a;
  border-color: rgba(255, 255, 255, .12);
  color: #e2e8f0;
}
body.jobs-public .jp-results-bar { color: #94a3b8; }
body.jobs-public .job-card {
  background: rgba(15, 23, 42, .85);
  border-color: rgba(255, 255, 255, .08);
  color: #e2e8f0;
}
body.jobs-public .job-card-top h2 { color: #fff; }
body.jobs-public .job-excerpt { color: #94a3b8; }
body.jobs-public .job-chip {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
  color: #cbd5e1;
}
body.jobs-public .job-card-portal.is-premium {
  background: linear-gradient(135deg, rgba(15, 23, 42, .95), rgba(120, 53, 15, .25));
}
body.jobs-public .jobs-empty {
  background: rgba(15, 23, 42, .8);
  border-color: rgba(255, 255, 255, .1);
  color: #e2e8f0;
}

@media (max-width: 1100px) {
  .jp-filter-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .jp-field.jp-actions { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .jp-filter-row { grid-template-columns: 1fr; }
  .job-card-side {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .jp-head h1 { font-size: 1.3rem; }
}

/* ——— Micro-interactions: job cards ——— */
@media (prefers-reduced-motion: no-preference) {
  .job-card {
    transition:
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.22s ease,
      border-color 0.18s ease;
  }
  .job-card:hover {
    transform: translateY(-3px);
  }
  .job-card:active {
    transform: translateY(-1px) scale(0.995);
  }

  .job-cta {
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }
  .job-card:hover .job-cta {
    transform: translateX(2px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
  }

  .job-chip {
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .job-card:hover .job-chip {
    background: #e2e8f0;
  }

  .jobs-list-portal .job-card {
    animation: jobCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .jobs-list-portal .job-card:nth-child(1) { animation-delay: 0.02s; }
  .jobs-list-portal .job-card:nth-child(2) { animation-delay: 0.05s; }
  .jobs-list-portal .job-card:nth-child(3) { animation-delay: 0.08s; }
  .jobs-list-portal .job-card:nth-child(4) { animation-delay: 0.11s; }
  .jobs-list-portal .job-card:nth-child(5) { animation-delay: 0.14s; }
  .jobs-list-portal .job-card:nth-child(n+6) { animation-delay: 0.17s; }
}

@keyframes jobCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.job-card:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.5);
  outline-offset: 3px;
}

.jp-filter input:focus,
.jp-filter select:focus {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .job-card { transition: none !important; animation: none !important; }
  .job-card:hover { transform: none; }
}
