/* Itinero Careers — jobs board (jobs.html) */
body.page-jobs {
  padding-top: 64px;
  background: #e8ecf2;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(247, 117, 23, 0.06), transparent 50%);
  --jobs-max: 1320px;
}

body.page-jobs .site-nav-inner,
body.page-jobs .jobs-page-header-inner,
body.page-jobs .hub {
  max-width: var(--jobs-max);
}

/* Hub */
.hub {
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  margin-top: -1.25rem;
  position: relative;
  z-index: 1;
}

.jobs-filters {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}
.jobs-filters-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 0.65rem;
}
.search-wrap { position: relative; width: 100%; }
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.search-input {
  width: 100%; padding: 12px 14px 12px 44px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 0.9rem; font-family: inherit; background: #f8fafc;
  color: var(--text); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.search-input::placeholder { color: #94a3b8; }
.search-input:hover { background: #fff; }
.search-input:focus {
  outline: none; background: #fff;
  border-color: var(--saffron);
  box-shadow: 0 0 0 4px var(--saffron-dim);
}

.jobs-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) {
  .jobs-shell { grid-template-columns: 1fr; }
  .jobs-shell.mobile-job-open .jobs-list-panel { display: none; }
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(0, 14, 42, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Job list */
.jobs-list-panel {
  max-height: calc(100vh - 180px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 80px;
}
.jobs-list-header {
  padding: 1rem 1.25rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%);
  flex-shrink: 0;
}
#jobs-list {
  overflow-y: auto;
  flex: 1;
}

.job-list-item {
  display: block; width: 100%; text-align: left;
  padding: 1.1rem 1.25rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
}
.job-list-item:last-child { border-bottom: none; }
.job-list-item:hover { background: #f8fafc; }
.job-list-item.active {
  background: linear-gradient(90deg, #fff8f3 0%, #fff 100%);
  box-shadow: inset 4px 0 0 var(--saffron);
}
.job-list-row { display: flex; gap: 0.85rem; align-items: flex-start; }
.job-list-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px; object-fit: cover;
  border: 1px solid rgba(0, 14, 42, 0.08);
  box-shadow: 0 2px 10px rgba(0, 14, 42, 0.1);
}
.job-list-body { flex: 1; min-width: 0; }
.job-list-item h3 {
  font-size: 0.98rem; font-weight: 700; margin-bottom: 0.15rem;
  color: var(--text); letter-spacing: -0.01em;
}
.job-list-item.active h3 { color: var(--navy); }
.job-list-item .co {
  font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.45rem;
}
.job-list-item .summary {
  font-size: 0.8rem; color: #64748b; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 0.5rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip-sm {
  font-size: 0.65rem; font-weight: 600; padding: 4px 9px; border-radius: 6px;
  letter-spacing: 0.02em;
}
.chip-sm.chip-remote { background: #eff6ff; color: #1d4ed8; }
.chip-sm.chip-warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* Job detail */
.job-detail-panel { min-height: 480px; }
.job-placeholder, .job-loading {
  padding: 5rem 2rem; text-align: center; color: var(--text-secondary);
}
.job-placeholder-inner {
  max-width: 320px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.job-placeholder-icon {
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 14, 42, 0.12);
}
.job-placeholder p { line-height: 1.65; font-size: 0.95rem; }
.job-loading .spinner-lg {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--saffron); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.job-detail-inner[hidden] { display: none !important; }
.job-detail-inner.visible { display: block; }

.job-header {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.job-header-top { display: flex; gap: 1.15rem; align-items: flex-start; }
.company-logo {
  width: 64px; height: 64px; border-radius: 14px;
  flex-shrink: 0; overflow: hidden;
  border: 1px solid rgba(0, 14, 42, 0.08);
  box-shadow: 0 6px 20px rgba(0, 14, 42, 0.12);
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-header h2 {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.2; color: var(--navy); margin-bottom: 0.2rem;
}
.job-header .company-name {
  font-size: 0.9rem; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.chip {
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  display: inline-flex; align-items: center;
}
.chip-remote { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.chip-warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.chip-dept { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }

/* Stacked layout: full-width JD, then full-width apply (no narrow side-by-side scroll) */
.job-body-layout {
  display: flex;
  flex-direction: column;
}

.job-description {
  padding: 2rem 2.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.jd-section { margin-bottom: 2.25rem; }
.jd-section:last-child { margin-bottom: 0; }
.jd-section h2 {
  font-size: 1.1rem; font-weight: 800; margin-bottom: 1rem;
  color: var(--navy); letter-spacing: -0.02em;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
}
.jd-section h3 {
  font-size: 0.95rem; font-weight: 700; margin: 1.25rem 0 0.5rem;
  color: var(--text);
}
.jd-section p, .jd-section li {
  font-size: 0.92rem; color: #475569; line-height: 1.75;
}
.jd-section p { margin-bottom: 0.85rem; }
.jd-section ul { margin: 0 0 0.75rem 1.25rem; }
.jd-section li { margin-bottom: 0.4rem; }
.jd-notice {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1.25rem 0;
}
.jd-notice p { margin: 0; color: #78350f; font-size: 0.88rem; line-height: 1.65; }

/* Apply section — full width of detail panel */
.apply-section {
  padding: 2rem 2.25rem 2.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f4f8 100%);
}
.apply-section-head {
  margin-bottom: 1.5rem;
}
.apply-section-head h3 {
  font-size: 1.35rem; font-weight: 800; color: var(--navy);
  letter-spacing: -0.02em; margin-bottom: 0.35rem;
}
.apply-sub {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; margin: 0 0 1rem;
}
.role-lock {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--saffron);
  background: var(--saffron-dim);
  border: 1px solid rgba(247, 117, 23, 0.25);
  padding: 8px 14px; border-radius: 8px;
}
.role-lock::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saffron);
}

.apply-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 14, 42, 0.06);
}

.apply-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
@media (max-width: 640px) {
  .apply-form-grid { grid-template-columns: 1fr; }
}
.apply-form-grid .fg-span-2 { grid-column: 1 / -1; }
.apply-form-grid .fg { margin-bottom: 0; }

.fg { margin-bottom: 1rem; }
.fg label {
  display: block; font-size: 0.78rem; font-weight: 600;
  margin-bottom: 0.4rem; color: var(--navy);
}
.fg label .r { color: var(--saffron); }
.fc {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; font-size: 0.875rem;
  font-family: inherit; background: #fafbfc;
  color: var(--text); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.fc:hover { background: #fff; }
.fc:focus {
  outline: none; background: #fff;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px var(--saffron-dim);
}
textarea.fc { min-height: 120px; resize: vertical; line-height: 1.55; }

.file-zone {
  border: 2px dashed #cbd5e1; border-radius: 12px;
  padding: 1.5rem 1.25rem; text-align: center;
  cursor: pointer; font-size: 0.85rem; color: var(--text-secondary);
  background: #fafbfc; transition: border-color 0.15s, background 0.15s;
}
.file-zone strong { color: var(--navy); display: block; margin-bottom: 0.35rem; font-size: 0.95rem; }
.file-zone span { display: block; font-size: 0.8rem; }
.file-zone:hover, .file-zone.drag {
  border-color: var(--saffron); background: #fffaf5;
}
.file-zone input { display: none; }
.file-picked {
  display: none; margin-top: 0.5rem; padding: 10px 12px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px;
  font-size: 0.8rem; align-items: center; justify-content: space-between;
}
.file-picked.show { display: flex; }
.fp-rm {
  border: none; background: rgba(0,0,0,0.06); cursor: pointer;
  font-size: 1rem; color: var(--text-secondary);
  width: 28px; height: 28px; border-radius: 8px;
}

.btn-submit {
  width: 100%; background: var(--saffron); color: #fff;
  font-weight: 700; font-size: 0.95rem; padding: 14px;
  border: none; border-radius: 12px; cursor: pointer; margin-top: 0.5rem;
  box-shadow: 0 6px 20px rgba(247, 117, 23, 0.35);
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.btn-submit:hover:not(:disabled) {
  background: var(--saffron-dk);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(247, 117, 23, 0.4);
}
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.form-note {
  font-size: 0.72rem; color: var(--text-secondary);
  margin-top: 1rem; line-height: 1.55; text-align: center;
}
.form-note a { color: var(--saffron); font-weight: 600; text-decoration: none; }
.form-note a:hover { text-decoration: underline; }

.draft-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.draft-hint.show { display: block; opacity: 1; }
.resume-restore-warn {
  display: none;
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}
.resume-restore-warn.show { display: block; }

.success-box { display: none; text-align: center; padding: 2rem 0.5rem; }
.success-box.show { display: block; }
.success-box h3 { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-bottom: 0.5rem; }
.success-box p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.success-id-row { margin-top: 1rem; }
.success-id-row.hidden { display: none; }
.success-id-row code {
  font-size: 0.8rem;
  word-break: break-all;
  background: #f1f5f9;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: var(--navy);
}
.success-track { margin-top: 1rem; }
.track-link-btn {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--saffron);
  text-decoration: none;
}
.track-link-btn:hover { text-decoration: underline; }

/* Track application page */
.page-track .track-main {
  padding: 6.5rem 1.5rem 3rem;
  min-height: calc(100vh - 120px);
}
.track-inner {
  max-width: 520px;
  margin: 0 auto;
}
.page-track .breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.page-track .breadcrumb a { color: var(--saffron); text-decoration: none; font-weight: 600; }
.page-track .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.35rem;
}
.page-track h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--navy);
  margin-bottom: 0.65rem;
}
.track-lead {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.track-card { margin-top: 0.5rem; }
.track-form .fg { margin-bottom: 1.1rem; }
.track-field-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}
.track-result {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.track-result h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}
.track-status-dl {
  display: grid;
  gap: 0.85rem;
}
.track-status-dl dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}
.track-status-dl dd {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}
.track-status-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.track-status-pill.ts-new { background: #eff6ff; color: #1d4ed8; }
.track-status-pill.ts-reviewing { background: #fef9c3; color: #a16207; }
.track-status-pill.ts-shortlisted { background: #ecfdf5; color: #047857; }
.track-status-pill.ts-rejected { background: #f1f5f9; color: #64748b; }
.track-status-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.track-error {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}
.track-help {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}
.track-help a {
  color: var(--saffron);
  font-weight: 600;
  text-decoration: none;
}
.track-help a:hover { text-decoration: underline; }
.success-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: #ecfdf5; color: #059669; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
}

.mobile-back {
  display: none; width: 100%; padding: 0.9rem 1.25rem;
  border: none; border-bottom: 1px solid var(--border);
  background: #f8fafc; font-weight: 600; font-size: 0.88rem;
  color: var(--navy); cursor: pointer; font-family: inherit; text-align: left;
}
@media (max-width: 960px) { .mobile-back.show { display: block; } }

.mobile-apply-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 14, 42, 0.1);
}
.mobile-apply-bar .btn-submit { margin-top: 0; border-radius: 12px; }
@media (max-width: 960px) {
  .mobile-apply-bar.show { display: block; }
  body.has-mobile-bar { padding-bottom: 80px; }
  .job-description,
  .apply-section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .apply-card { padding: 1.25rem; }
}

/* Modal */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 14, 42, 0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.overlay.open { opacity: 1; pointer-events: all; }
.confirm-card {
  background: #fff; border-radius: var(--radius-lg); padding: 2rem;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.confirm-card h2 {
  font-size: 1.2rem; font-weight: 800; color: var(--navy);
  margin-bottom: 0.75rem; letter-spacing: -0.02em;
}
.confirm-card p {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 0.65rem;
}
.confirm-card .hl { color: var(--saffron); font-weight: 700; }
.btn-row { display: flex; gap: 0.65rem; margin-top: 1.5rem; }
.btn-sec {
  flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; font-weight: 600; cursor: pointer; font-family: inherit;
  color: var(--text-secondary); transition: background 0.15s;
}
.btn-sec:hover { background: #f8fafc; }
.btn-ok {
  flex: 1.35; padding: 12px; border: none; border-radius: 12px;
  background: var(--saffron); color: #fff; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 16px rgba(247, 117, 23, 0.35);
}

.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy); color: #fff; padding: 12px 22px;
  border-radius: 12px; font-size: 0.85rem; font-weight: 500; z-index: 600;
  box-shadow: var(--shadow-lg); transition: transform 0.25s;
  max-width: 90%; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: #991b1b; }

.spinner-inline {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block; vertical-align: middle;
}

.empty-list {
  padding: 2.5rem 1.25rem; text-align: center;
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6;
}

/* Landing-only helpers (careers.html) */
.section-alt { background: #eef1f6; }
.roles-loading {
  grid-column: 1 / -1; text-align: center; color: var(--text-secondary);
  padding: 2rem; font-size: 0.9rem;
}
.roles-loading a { color: var(--saffron); }

/* Jobs nav active state */
body.page-jobs .nav-actions a.active {
  color: var(--text-on-dark);
  position: relative;
}
body.page-jobs .nav-actions a.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--saffron); border-radius: 2px;
}
