/* ============================================================
   Mikroverso — Formulario de Empleo (publico) + Panel de Postulaciones
   Usa los tokens de main.css (--accent, --border, --text-1, ...)
   ============================================================ */

/* ---------- Contenedor / Wizard ---------- */
.job-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.job-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, .04);
}

@media (max-width: 640px) {
  .job-wrap { padding: 0 14px 70px; }
  .job-card { padding: 20px 16px; border-radius: 12px; }
}

/* ---------- Barra de progreso por pasos ---------- */
.job-steps {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.job-steps::-webkit-scrollbar { display: none; }

.job-step {
  flex: 1 1 0;
  min-width: 72px;
  text-align: center;
  position: relative;
  cursor: default;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
}
.job-step .js-dot {
  width: 30px; height: 30px;
  margin: 0 auto 7px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  background: var(--bg-3);
  color: var(--text-3);
  border: 2px solid transparent;
  transition: all .25s var(--ease);
}
.job-step .js-label {
  font-size: .66rem;
  line-height: 1.3;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .01em;
  display: block;
}
/* linea que une los pasos */
.job-step::after {
  content: '';
  position: absolute;
  top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 2px;
  background: var(--bg-3);
}
.job-step:last-child::after { display: none; }

.job-step.done .js-dot   { background: var(--accent); color: #fff; }
.job-step.done::after     { background: var(--accent); }
.job-step.done .js-label  { color: var(--text-2); }
.job-step.active .js-dot  { background: var(--accent-10); color: var(--accent); border-color: var(--accent); }
.job-step.active .js-label{ color: var(--accent); }
.job-step.clickable { cursor: pointer; }

/* ---------- Paneles de paso ---------- */
.job-panel { display: none; animation: jobFade .3s var(--ease); }
.job-panel.active { display: block; }

@keyframes jobFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.job-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.job-panel-desc {
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 26px;
}

/* ---------- Campos ---------- */
.job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.job-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.job-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .job-grid, .job-grid.cols-3 { grid-template-columns: 1fr; }
  .job-grid .span-2 { grid-column: auto; }
}

.job-field { display: flex; flex-direction: column; gap: 6px; }
.job-field > label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-1);
}
.job-field .req { color: #d24b4b; margin-left: 2px; }
.job-hint { font-size: .72rem; color: var(--text-3); }

.job-input,
.job-select,
.job-textarea {
  width: 100%;
  font-family: var(--font);
  font-size: .88rem;
  color: var(--text-1);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 11px 13px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.job-textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.job-select { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
}
.job-input:focus, .job-select:focus, .job-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-10);
}
.job-input.invalid, .job-select.invalid, .job-textarea.invalid {
  border-color: #d24b4b;
  box-shadow: 0 0 0 3px rgba(210, 75, 75, .1);
}
.job-err {
  font-size: .72rem;
  color: #d24b4b;
  font-weight: 600;
  display: none;
}
.job-err.show { display: block; }

/* ---------- Casillas y opciones ---------- */
.job-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.job-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .8rem;
  cursor: pointer;
  user-select: none;
  transition: all .2s var(--ease);
  background: var(--bg);
}
.job-check:hover { border-color: var(--border-g); }
.job-check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; margin: 0; }
.job-check.checked {
  background: var(--accent-10);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Si / No */
.job-yesno { display: inline-flex; gap: 6px; }
.job-yn-btn {
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.job-yn-btn:hover { border-color: var(--border-g); }
.job-yn-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.job-yn-btn.on.no { background: #d24b4b; border-color: #d24b4b; }

.job-row-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.job-row-q:last-child { border-bottom: none; }
.job-row-q > span { font-size: .84rem; font-weight: 500; flex: 1 1 240px; }

/* ---------- Bloques agrupados ---------- */
.job-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 18px;
  margin-top: 18px;
}
.job-block > h4 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  margin-bottom: 14px;
}

/* ---------- Navegacion ---------- */
.job-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.job-btn {
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-1);
  cursor: pointer;
  transition: all .2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.job-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.job-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.job-btn.primary:hover:not(:disabled) { filter: brightness(1.08); color: #fff; }
.job-btn:disabled { opacity: .5; cursor: not-allowed; }
.job-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Mapa ---------- */
.job-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-10);
  border: 1px solid var(--border-g);
  border-radius: var(--radius-s);
  padding: 9px 15px;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s var(--ease);
}
.job-map-toggle:hover { background: var(--accent-20); }
.job-map-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.job-map-box { display: none; margin-top: 14px; }
.job-map-box.open { display: block; }

.job-map-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.job-map-search .job-input { flex: 1; }

#job-map {
  height: 320px;
  width: 100%;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  z-index: 0;
}
.job-map-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}
.job-map-results:empty { display: none; }
.job-map-results li {
  padding: 10px 13px;
  font-size: .8rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}
.job-map-results li:last-child { border-bottom: none; }
.job-map-results li:hover { background: var(--accent-10); color: var(--accent); }
.job-map-note { font-size: .72rem; color: var(--text-3); margin-top: 8px; }

/* marcador propio (evita depender de imagenes de Leaflet) */
.job-pin {
  width: 20px; height: 20px;
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* ---------- Resumen final ---------- */
.job-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin-bottom: 20px;
}
.job-sum-sec {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.job-sum-sec:last-child { border-bottom: none; }
.job-sum-sec h5 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 9px;
}
.job-sum-row {
  display: flex;
  gap: 12px;
  font-size: .8rem;
  padding: 3px 0;
  flex-wrap: wrap;
}
.job-sum-row b { color: var(--text-2); font-weight: 500; min-width: 190px; flex: 0 0 auto; }
.job-sum-row span { color: var(--text-1); flex: 1 1 160px; }

/* ---------- Mensajes / exito ---------- */
.job-alert {
  border-radius: var(--radius-s);
  padding: 13px 16px;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
}
.job-alert.show { display: block; }
.job-alert.error   { background: rgba(210, 75, 75, .1);  color: #b83c3c; border: 1px solid rgba(210, 75, 75, .3); }
.job-alert.success { background: var(--accent-10);       color: var(--accent); border: 1px solid var(--border-g); }

.job-done { text-align: center; padding: 40px 20px; }
.job-done-icon {
  width: 74px; height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--accent-10);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.job-done-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 2.5; }
.job-done h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.02em; }
.job-done p  { font-size: .88rem; color: var(--text-2); max-width: 460px; margin: 0 auto 22px; line-height: 1.75; }
.job-folio {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-10);
  border: 1px dashed var(--border-g);
  border-radius: var(--radius-s);
  padding: 12px 26px;
  margin-bottom: 24px;
  letter-spacing: .04em;
}

/* Aviso de guardado automatico */
.job-autosave {
  font-size: .72rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.job-autosave .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   PANEL ADMIN — Vacantes y Postulaciones
   (el panel usa fondo claro propio, no los tokens del sitio)
   ============================================================ */
.ap-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  padding: 16px;
}
.ap-tool { display: flex; flex-direction: column; gap: 5px; }
.ap-tool label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #777;
}
.ap-tool input, .ap-tool select {
  font-family: inherit;
  font-size: .82rem;
  padding: 9px 11px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 9px;
  background: #fff;
  color: #111;
  min-width: 150px;
}
.ap-tool input:focus, .ap-tool select:focus { outline: 2px solid rgba(45, 158, 107, .4); outline-offset: -1px; }

.ap-count { font-size: .8rem; color: #666; margin-bottom: 12px; }
.ap-count b { color: #111; }

.ap-table-wrap { overflow-x: auto; border: 1px solid rgba(0, 0, 0, .08); border-radius: 14px; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 860px; }
.ap-table th {
  text-align: left;
  padding: 12px 14px;
  background: #f0f0f0;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #666;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.ap-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  vertical-align: middle;
}
.ap-table tr:last-child td { border-bottom: none; }
.ap-table tbody tr:hover { background: rgba(45, 158, 107, .05); }
.ap-folio { font-family: var(--mono, monospace); font-size: .74rem; color: #2d9e6b; font-weight: 700; }
.ap-name { font-weight: 600; color: #111; }
.ap-sub { font-size: .72rem; color: #888; }
.ap-empty { padding: 44px 20px; text-align: center; color: #999; font-size: .85rem; }

.ap-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ap-badge.nuevo      { background: rgba(45, 158, 107, .14);  color: #1f7a51; }
.ap-badge.revisado   { background: rgba(60, 120, 220, .14);  color: #2f5fb0; }
.ap-badge.entrevista { background: rgba(220, 160, 40, .18);  color: #96690d; }
.ap-badge.contratado { background: rgba(45, 158, 107, .28);  color: #14603c; }
.ap-badge.descartado { background: rgba(0, 0, 0, .08);       color: #777; }

.ap-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-btn {
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.ap-btn:hover { border-color: #2d9e6b; color: #2d9e6b; }
.ap-btn.danger:hover { border-color: #d24b4b; color: #d24b4b; }

/* Paginacion */
.ap-pager {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.ap-page {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.ap-page:hover:not(:disabled) { border-color: #2d9e6b; color: #2d9e6b; }
.ap-page.active { background: #2d9e6b; border-color: #2d9e6b; color: #fff; }
.ap-page:disabled { opacity: .4; cursor: not-allowed; }
.ap-page.gap { border: none; background: none; cursor: default; }

/* Modal de detalle */
.ap-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
}
.ap-modal-overlay[hidden] { display: none; }
.ap-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.ap-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 2;
}
.ap-modal-head h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 3px; }
.ap-modal-body { padding: 22px 26px 26px; }
.ap-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
}
.ap-close:hover { color: #111; }

.ap-sec { margin-bottom: 22px; }
.ap-sec h4 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #2d9e6b;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.ap-kv { display: flex; gap: 12px; font-size: .82rem; padding: 5px 0; flex-wrap: wrap; }
.ap-kv b { color: #777; font-weight: 500; min-width: 200px; flex: 0 0 auto; }
.ap-kv span { color: #111; flex: 1 1 180px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chip {
  font-size: .72rem;
  background: rgba(45, 158, 107, .12);
  color: #1f7a51;
  border-radius: 999px;
  padding: 4px 11px;
  font-weight: 600;
}

/* ---------- Estados del pipeline (colores de cada etiqueta) ---------- */
.ap-badge.porLlamar  { background: rgba(230, 145, 20, .18);  color: #8a5a05; }
.ap-badge.contactado { background: rgba(60, 120, 220, .14);  color: #2f5fb0; }
.ap-badge.noContesta { background: rgba(200, 90, 90, .14);   color: #a54444; }
.ap-badge.pruebas    { background: rgba(150, 90, 220, .16);  color: #6b3fa8; }
.ap-badge.documentos { background: rgba(90, 130, 160, .18);  color: #3f6b88; }
.ap-badge.aprobado   { background: rgba(45, 158, 107, .22);  color: #176141; }
.ap-badge.enEspera   { background: rgba(120, 120, 120, .14); color: #5f5f5f; }

/* ---------- Puntitos de etapa en la tabla ---------- */
.ap-dots { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.ap-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: #ccc;
}
.ap-dot.d-pendiente { background: #e6a020; }
.ap-dot.d-agendado  { background: #3c78dc; }
.ap-dot.d-aprobado  { background: #2d9e6b; }
.ap-dot.d-rechazado { background: #d24b4b; }

.ap-vencida { color: #d24b4b !important; font-weight: 700; }

/* ---------- Formularios dentro de la ficha ---------- */
.ap-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.ap-form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .ap-form-grid { grid-template-columns: 1fr; }
  .ap-form-grid .span2 { grid-column: auto; }
}

.ap-fld { display: flex; flex-direction: column; gap: 5px; }
.ap-fld label, .ap-lbl {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #777;
}
.ap-fld input, .ap-fld select,
.ap-modal textarea {
  font-family: inherit;
  font-size: .84rem;
  color: #111;
  background: #fff;
  padding: 9px 11px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 9px;
  width: 100%;
}
.ap-modal textarea { resize: vertical; line-height: 1.6; margin-top: 5px; }
.ap-fld input:focus, .ap-fld select:focus, .ap-modal textarea:focus {
  outline: none;
  border-color: #2d9e6b;
  box-shadow: 0 0 0 3px rgba(45, 158, 107, .12);
}

.ap-sub-h {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #777;
  margin: 20px 0 10px;
}

/* ---------- Rejilla de etapas ---------- */
.ap-etapas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px 14px;
}
.ap-etapa { display: flex; flex-direction: column; gap: 4px; }
.ap-etapa label {
  font-size: .74rem;
  font-weight: 600;
  color: #444;
}
.ap-etapa select {
  font-family: inherit;
  font-size: .8rem;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .14);
  background: #fff;
  color: #111;
  cursor: pointer;
}
/* Semaforo: el color del borde y el fondo indican el resultado */
.ap-etapa select.et-pendiente { border-color: #e6a020; background: rgba(230, 160, 32, .10); color: #8a5a05; font-weight: 600; }
.ap-etapa select.et-agendado  { border-color: #3c78dc; background: rgba(60, 120, 220, .10); color: #2f5fb0; font-weight: 600; }
.ap-etapa select.et-aprobado  { border-color: #2d9e6b; background: rgba(45, 158, 107, .12); color: #176141; font-weight: 600; }
.ap-etapa select.et-rechazado { border-color: #d24b4b; background: rgba(210, 75, 75, .10); color: #a53a3a; font-weight: 600; }
.ap-etapa select.et-na        { color: #999; }

/* ---------- Botones y avisos de la ficha ---------- */
.ap-btn.primary {
  background: #2d9e6b;
  border-color: #2d9e6b;
  color: #fff;
}
.ap-btn.primary:hover { filter: brightness(1.08); color: #fff; border-color: #2d9e6b; }

.ap-edit-btn {
  float: right;
  margin-top: -4px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.ap-saved {
  font-size: .76rem;
  font-weight: 700;
  color: #2d9e6b;
  opacity: 0;
  transition: opacity .2s ease;
}
.ap-saved.show { opacity: 1; }
.ap-saved.err  { color: #d24b4b; }

/* Lista de vacantes en el admin */
.ap-job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  flex-wrap: wrap;
}
.ap-job-card h4 { font-size: .92rem; font-weight: 700; margin-bottom: 3px; }

/* =====================================================
   PRESENTACION ANIMADA AL ENTRAR
   Aparece encima de todo, escribe el mensaje y se va sola.
   ===================================================== */
.job-intro {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #123626 0%, #0a0a0a 70%);
  opacity: 1;
  transition: opacity .7s ease, visibility .7s ease;
}
.job-intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
.job-intro-inner { text-align: center; padding: 0 24px; max-width: 780px; }

.job-intro-badge {
  display: inline-block;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .22em;
  color: #4fd18e; border: 1px solid rgba(79,209,142,.45);
  background: rgba(79,209,142,.1);
  padding: 6px 18px; border-radius: 100px; margin-bottom: 26px;
  opacity: 0; animation: jiUp .7s .15s var(--ease) forwards;
}
.job-intro-title {
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  color: #fff; margin-bottom: 16px;
}
/* Cada palabra del titulo entra por separado (lo reparte el JS) */
.job-intro-title .jw {
  display: inline-block;
  opacity: 0; transform: translateY(24px);
  animation: jiWord .6s var(--ease) forwards;
}
.job-intro-sub {
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  color: rgba(255,255,255,.72); line-height: 1.7;
  opacity: 0; animation: jiUp .8s .9s var(--ease) forwards;
}
.job-intro-bar {
  width: 190px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.14);
  margin: 32px auto 0; overflow: hidden;
}
.job-intro-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #2d9e6b, #4fd18e);
  animation: jiBar 2.1s .3s var(--ease) forwards;
}
@keyframes jiWord { to { opacity: 1; transform: translateY(0); } }
@keyframes jiUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jiBar  { to { width: 100%; } }

/* Quien prefiera no ver animaciones, ve el mensaje quieto */
@media (prefers-reduced-motion: reduce) {
  .job-intro-title .jw,
  .job-intro-badge,
  .job-intro-sub { animation: none; opacity: 1; transform: none; }
  .job-intro-bar span { animation: none; width: 100%; }
}

/* =====================================================
   LOS DOS BOTONES  (Solicitar empleo / Empleos disponibles)
   ===================================================== */
.job-switch {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px;
}
.job-switch-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--radius-s);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-1); font-family: var(--font);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  transition: all .25s var(--ease);
}
.job-switch-btn svg {
  width: 17px; height: 17px; fill: none;
  stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto;
}
.job-switch-btn:hover {
  border-color: var(--border-g); color: var(--accent);
  background: var(--accent-10); transform: translateY(-2px);
}
.job-switch-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(45,158,107,.28);
}
.job-switch-btn.active:hover { color: #fff; transform: translateY(-2px); }
/* Mientras carga algo, el boton avisa en vez de quedarse mudo */
.job-switch-btn.loading { pointer-events: none; opacity: .75; }
.job-switch-btn.loading svg { animation: jSpin .8s linear infinite; }
@keyframes jSpin { to { transform: rotate(360deg); } }

.job-switch-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 100px; font-size: .72rem; font-weight: 700;
  background: var(--accent); color: #fff;
}
.job-switch-btn.active .job-switch-count { background: rgba(255,255,255,.25); }
/* display:inline-flex pisaba el atributo hidden y el contador salia
   con un 0 cuando no habia vacantes. */
.job-switch-count[hidden] { display: none; }

/* =====================================================
   LISTA DE VACANTES
   ===================================================== */
.job-list-head { margin-bottom: 24px; }
.job-list-head h2 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px;
}
.job-list-head p { font-size: .9rem; color: var(--text-2); line-height: 1.7; max-width: 620px; }

.job-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.job-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: all .25s var(--ease);
  text-align: left; font-family: var(--font); padding: 0;
}
.job-item:hover {
  border-color: var(--border-g); transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,.09);
}
/* contain, no cover: la imagen se ve ENTERA. Antes se recortaba a 16:9
   y a los carteles verticales les cortaba media cabeza. El fondo oscuro
   rellena lo que sobra y deja todas las tarjetas de la misma altura. */
.job-item-img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  background: linear-gradient(135deg, #123626, #0a0a0a);
  display: block;
}
.job-item-noimg {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #123626, #0a0a0a);
  display: flex; align-items: center; justify-content: center;
}
.job-item-noimg svg { width: 40px; height: 40px; fill: none; stroke: #4fd18e; stroke-width: 1.3; }
.job-item-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.job-item-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.job-item-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.job-item-tag {
  font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  background: var(--accent-10); color: var(--accent); border: 1px solid var(--border-g);
}
.job-item-tag.plain { background: var(--bg-3); color: var(--text-2); border-color: var(--border); }
.job-item-desc {
  font-size: .85rem; color: var(--text-2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.job-item-go {
  margin-top: auto; padding-top: 6px;
  font-size: .82rem; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.job-item-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.job-item:hover .job-item-go svg { transform: translateX(3px); transition: transform .2s; }

/* Aviso cuando no hay ninguna vacante publicada */
.job-list-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 44px 24px; text-align: center; color: var(--text-2); font-size: .9rem;
}

/* =====================================================
   ESQUELETOS DE CARGA
   Rellenan el hueco mientras Firebase responde, para que la
   pantalla nunca se quede en blanco esperando.
   ===================================================== */
.job-skel {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg);
}
.job-skel-img { width: 100%; aspect-ratio: 16 / 9; }
.job-skel-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.job-skel-line { height: 12px; border-radius: 6px; }
.job-skel-line.w80 { width: 80%; }
.job-skel-line.w55 { width: 55%; }
.job-skel-line.w95 { width: 95%; }
.job-skel-img, .job-skel-line {
  background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%);
  background-size: 420px 100%;
  animation: jShimmer 1.3s linear infinite;
}
@keyframes jShimmer { from { background-position: -210px 0; } to { background-position: 210px 0; } }

/* =====================================================
   DETALLE DE LA VACANTE
   ===================================================== */
.job-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: .86rem; font-weight: 700;
  color: var(--text-2); padding: 6px 0; margin-bottom: 20px;
  transition: color .2s;
}
.job-back:hover { color: var(--accent); }
.job-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* En la ficha se ve la imagen COMPLETA, a su tamano natural y centrada.
   Sin recortes: es donde el candidato se para a leer el cartel. */
.job-detail-hero {
  max-width: 100%; width: auto; height: auto; max-height: 620px;
  border-radius: var(--radius); margin: 0 auto 26px; display: block;
}
.job-detail-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15; margin-bottom: 12px;
}
.job-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.job-detail-text {
  font-size: .95rem; color: var(--text-2); line-height: 1.85;
  max-width: 720px; margin-bottom: 32px;
}
.job-detail-text p { margin-bottom: 14px; }
.job-detail-text p:last-child { margin-bottom: 0; }
.job-detail-none {
  font-style: italic; color: var(--text-3);
}
.job-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .job-switch { gap: 10px; }
  .job-switch-btn { flex: 1 1 100%; justify-content: center; }
  .job-list { grid-template-columns: 1fr; }
  .job-detail-hero { max-height: 220px; }
}
