/* Hub interno de eliezerlopez.eu. Tokens de DESIGN.md; sin fuentes remotas
   (Inter si está instalada, si no la del sistema). Sin CSS inline: la CSP
   solo admite 'self'. */

:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F6F7F9;
  --ink: #14181D; --ink-2: #4A5561; --ink-3: #7A8591; --line: #E6E9ED;
  --accent: #C4460A; --accent-hover: #AD3D09; --accent-soft: #FFF1E8; --accent-ink: #FFFFFF;
  --ok: #1B7F4C; --ok-soft: #DDF3E6; --warn: #9A5B00; --warn-soft: #FBEBD0;
  --error: #B42318; --error-soft: #FEE4E2;
  --shadow: 0 10px 40px -14px rgba(20,24,29,.18);
  --radius: 10px; --radius-card: 16px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417; --surface: #1A1D21; --surface-2: #22262B;
    --ink: #F1F3F5; --ink-2: #A9B1BA; --ink-3: #737C86; --line: #2B3037;
    --accent: #FF8A3D; --accent-hover: #FF9C5A; --accent-soft: #3A2210; --accent-ink: #1A1207;
    --ok: #5FD08E; --ok-soft: #14301F; --warn: #F0B35A; --warn-soft: #3A2A0E;
    --error: #F97066; --error-soft: #3B1512;
    --shadow: 0 10px 40px -14px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 58px; min-width: 0; }
.brand { font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand small { font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.nav .links { display: flex; gap: 4px; margin-left: 18px; }
.nav .links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.nav .links a:hover { background: var(--surface-2); color: var(--ink); }
.nav .links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; line-height: 1; }
@media (max-width: 560px) {
  .nav .wrap { gap: 8px; }
  .brand { font-size: 14px; }
  .brand small { display: none; }
  /* Los enlaces se desplazan dentro de la barra si no caben; la página nunca desborda. */
  .nav .links { margin-left: 0; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { padding: 6px 7px; font-size: 13.5px; white-space: nowrap; }
  .nav-end { gap: 6px; flex-shrink: 0; }
}
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-end .who { font-size: 13px; color: var(--ink-2); }
@media (max-width: 560px) { .nav-end .who { display: none; } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
main.wrap { padding-top: 28px; padding-bottom: 64px; }

/* ── Cabecera de página ──────────────────────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.page-head .count { font-size: 13px; color: var(--ink-2); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }

/* ── Botones ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius); font: 600 14px/1.2 var(--font);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--error); border-color: var(--line); }
.btn-danger:hover { background: var(--error-soft); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

/* ── Formularios ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 140px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.form-actions .right { margin-left: auto; }
.error-msg { display: none; color: var(--error); background: var(--error-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.error-msg.show { display: block; }
.ok-msg { display: none; color: var(--ok); background: var(--ok-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.ok-msg.show { display: block; }

/* ── Tarjeta ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.card-body { padding: 26px 24px; }
@media (max-width: 560px) { .card-body { padding: 20px 16px; } }

/* ── Buscador ────────────────────────────────────────────────────────────── */
.search { display: flex; gap: 10px; margin-bottom: 16px; }
.search input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Tabla de candidatos ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: var(--surface-2); }
table.list td a.name { color: var(--ink); font-weight: 600; text-decoration: none; }
table.list td a.name:hover { color: var(--accent); }
table.list .muted { color: var(--ink-2); font-size: 13.5px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
@media (max-width: 700px) { table.list .hide-sm { display: none; } }

/* ── Chips y estados ─────────────────────────────────────────────────────── */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 500; margin: 2px 4px 2px 0; white-space: nowrap; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
/* Estados de un proceso (candidato en una vacante). */
.status.no-presentado { background: var(--accent-soft); color: var(--accent); }
.status.presentado { background: var(--warn-soft); color: var(--warn); }
.status.aceptado { background: var(--ok-soft); color: var(--ok); }
.status.rechazado { background: var(--error-soft); color: var(--error); }
.status.retirado { background: var(--surface-2); color: var(--ink-2); }

/* ── Ficha (modo lectura) ────────────────────────────────────────────────── */
.brief { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 700px) { .brief { grid-template-columns: 1fr; } }
.brief-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.brief-row .k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.brief-row .v { color: var(--ink); overflow-wrap: anywhere; }
.brief-row .v:empty::before { content: "—"; color: var(--ink-3); }
h2.eyebrow { margin-top: 24px; }
.notas { white-space: pre-wrap; color: var(--ink-2); margin: 0; }
.meta { font-size: 13px; color: var(--ink-3); margin-top: 18px; }
.hidden { display: none !important; }

/* ── Documentos ──────────────────────────────────────────────────────────── */
.docs { margin-top: 20px; }
.docs-head { display: flex; align-items: start; gap: 16px; margin-bottom: 12px; }
.docs-head .hint { margin: 0; font-size: 13px; color: var(--ink-2); }
.docs .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.docs-upload { border-top: 1px solid var(--line); padding-top: 18px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 0 20px; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.field input[type="file"] { padding: 8px; }
.doc-actions { display: flex; gap: 6px; justify-content: end; white-space: nowrap; }
.tag.vigente { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.tag.tipo { background: var(--accent-soft); color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.doc-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-edit input, .doc-edit select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }

/* ── Buzón ───────────────────────────────────────────────────────────────── */
.tag.sug { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
table.list td.fecha { white-space: nowrap; }
.clamp { max-width: 38ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.historico { margin-top: 22px; }
.historico summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 8px 0; }
.historico .card { margin-top: 10px; }
.historico .hint { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.detalle-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detalle-grid { grid-template-columns: 1fr; } }
.brief.one-col { grid-template-columns: 1fr; }
h2.eyebrow.first { margin-top: 0; }
h3.sub { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
.cand-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.cand-row:first-child { border-top: 0; }
.cand-who { flex: 1; min-width: 0; }
.cand-who .muted { font-size: 13px; }
.cand-who a.name { color: var(--ink); font-weight: 600; text-decoration: none; }
.cand-who a.name:hover { color: var(--accent); }
.buscar-otro { margin-top: 14px; }
.buscar-otro .search { margin-bottom: 6px; }
.descartar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.descartar .hint { font-size: 12.5px; color: var(--ink-3); }

/* ── Vacantes ────────────────────────────────────────────────────────────── */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 500 13.5px/1.2 var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.status.publicada { background: var(--ok-soft); color: var(--ok); }
.status.borrador { background: var(--warn-soft); color: var(--warn); }
.status.cerrada { background: var(--surface-2); color: var(--ink-2); }
.codigo { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
table.list code, .brief code { font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.idiomas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 900px) { .idiomas { grid-template-columns: 1fr; } }
.titulo-v { font-size: 19px; font-weight: 700; margin: 4px 0 10px; }
.cuerpo { white-space: pre-wrap; font: inherit; color: var(--ink-2); margin: 0; }
h4.eyebrow { margin-top: 18px; }
input:read-only { background: var(--surface-2); color: var(--ink-2); }
.hint.aviso { color: var(--warn); }

/* ── Visor de PDF ────────────────────────────────────────────────────────── */
.visor { position: fixed; inset: 0; z-index: 50; background: rgba(20,24,29,.55); display: flex; flex-direction: column; padding: 24px; }
.visor-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-card) var(--radius-card) 0 0; padding: 10px 14px; }
.visor-titulo { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visor-marco { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 0 0 var(--radius-card) var(--radius-card); background: var(--surface-2); }
body.con-visor { overflow: hidden; }

/* ── Login ───────────────────────────────────────────────────────────────── */
body.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .card { width: 100%; max-width: 400px; }
.login h1 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 6px; }
.login .sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 22px; }
.login .btn { width: 100%; }

/* ── Procesos (candidato ↔ vacante) ─────────────────────────────────────── */
.procesos-card { margin-top: 20px; }
.procesos { list-style: none; margin: 0; padding: 0; }
.proceso { padding: 16px 0; border-top: 1px solid var(--line); }
.proceso:first-child { border-top: 0; padding-top: 4px; }
.proceso-head { display: flex; flex-wrap: wrap; align-items: start; gap: 10px 16px; }
.proceso-quien { flex: 1; min-width: 200px; }
.proceso-quien a.name { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 15.5px; }
.proceso-quien a.name:hover { color: var(--accent); }
.proceso-estado { display: flex; align-items: center; gap: 8px; }
.estado-sel, .comentar input, .estado-form input, .hist-edit input, .anadir-vacante select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px;
}
.estado-sel:focus, .comentar input:focus, .estado-form input:focus, .hist-edit input:focus, .anadir-vacante select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.estado-form { margin-top: 10px; padding: 12px; border-radius: var(--radius); background: var(--warn-soft); }
.estado-form .hint { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.estado-form-row, .comentar, .hist-edit, .anadir-vacante { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.estado-form-row input[type="text"], .comentar input[type="text"], .hist-edit input[type="text"] { flex: 1; min-width: 180px; }
.anadir-vacante select { flex: 1; min-width: 200px; }
.historial { list-style: none; margin: 12px 0 10px; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.hist-entrada { padding: 6px 0 6px 10px; }
.hist-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hist-fecha { font-size: 12.5px; color: var(--ink-3); }
.hist-cambio { display: inline-flex; align-items: center; gap: 4px; }
.hist-acciones { margin-left: auto; display: flex; gap: 4px; opacity: .55; }
.hist-entrada:hover .hist-acciones, .hist-entrada:focus-within .hist-acciones { opacity: 1; }
.hist-texto { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.hist-edit { margin-top: 6px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.comentar { margin-top: 4px; }
.incorporar { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.incorporar .search { margin-bottom: 6px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.tag.pendiente { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.tag.proc { background: var(--accent-soft); color: var(--accent); font-weight: 600; white-space: normal; }
.tag.aviso { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.small { font-size: 13px; }
.proceso-hint { margin: -6px 0 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); font-size: 13.5px; }
.slug-edit { display: flex; align-items: center; gap: 0; }
.slug-edit .slug-prefijo { padding: 10px 8px 10px 12px; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.slug-edit input { flex: 1; border-radius: 0 var(--radius) var(--radius) 0 !important; }
.fecha-hoy { display: flex; gap: 8px; align-items: center; }
.fecha-hoy input { flex: 1; }
@media (max-width: 560px) {
  .proceso-head { flex-direction: column; }
  .hist-acciones { margin-left: 0; opacity: 1; }
}

/* Beneficios de la vacante: casillas del catálogo, con valor en los variables. */
.beneficios { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; margin: 4px 0 18px; }
.beneficio { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.beneficio input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.beneficio .valor { width: 4.5em; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.beneficio .hint { font-size: 12.5px; color: var(--ink-3); }

/* Textos de la vacante plegados en lectura (los candidatos van primero). */
.textos { margin-top: 20px; }
.textos summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.textos summary::-webkit-details-marker { display: none; }
.textos summary::before { content: "▸"; color: var(--ink-3); font-size: 12px; transition: transform .15s ease; }
.textos[open] summary::before { transform: rotate(90deg); }
.textos summary .muted { font-weight: 500; }
.textos .idiomas { margin-top: 6px; }

/* Secciones del cuerpo de la vacante: filas en los dos idiomas. */
.secciones { display: grid; gap: 18px; margin: 4px 0 18px; }
.seccion { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; }
.seccion legend { font-weight: 600; padding: 0 6px; }
.seccion .filas { display: grid; gap: 6px; margin-bottom: 10px; }
.fila { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
.fila input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 0; }
.fila input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.fila-acciones { display: flex; gap: 2px; }
.filas-ver { margin: 4px 0 16px; padding-left: 22px; }
.filas-ver li { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (max-width: 700px) {
  .fila { grid-template-columns: 1fr; }
  .fila-acciones { justify-content: end; }
  .filas-ver li { grid-template-columns: 1fr; gap: 2px; }
}

/* Modalidad: casillas (una o varias). */
.field .label { font-size: 14px; font-weight: 600; }
.modalidades { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 8px 0 2px; font-size: 14px; }
.modalidades label { display: inline-flex; align-items: center; gap: 6px; }
.modalidades input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ── Ajustes · Tecnologías ─────────────────────────────────────────────── */
.intro { margin: -8px 0 18px; font-size: 14px; color: var(--ink-2); }
.alta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alta input[type="text"], .alta select { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.alta input[type="text"] { flex: 1; min-width: 200px; }
.alta input:focus, .alta select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.categorias { display: grid; gap: 14px; margin: 14px 0; }
.categoria .card-body { padding: 18px 22px; }
.categoria-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.categoria-head h2 { font-size: 17px; margin: 0; flex: 1; }
.categoria-acciones { display: flex; gap: 4px; }
.tecs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tec { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13.5px; }
.tec-nombre { font-weight: 500; }
/* En edición, cada chip es una fila con su nombre, su categoría y borrar. */
.en-edicion .tecs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 12px; }
.tec.editando { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; padding: 4px; border-radius: 10px; background: var(--surface); }
.tec-input, .tec-cat, .cat-input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 0; }
.tec-input:focus, .tec-cat:focus, .cat-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.cat-input { flex: 1; min-width: 180px; font-weight: 600; }
.fuera .tec-input, .fuera .cat-input { text-decoration: line-through; color: var(--ink-3); }
.tec.fuera { opacity: .6; }
.categoria.fuera { border-style: dashed; opacity: .75; }
.sin-categoria { border-style: dashed; }

/* Tecnologías del candidato: chips con buscador y sugerencias. */
#tecnologias { margin-top: 20px; }
#tecnologias .tec { padding-right: 4px; }
#tecnologias .tec .btn-xs { margin-left: 2px; }
.tec-buscar { position: relative; margin-top: 12px; max-width: 480px; }
.tec-buscar input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.tec-buscar input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.tec-sugerencias { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.tec-sugerencias li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.tec-sugerencias li:hover, .tec-sugerencias li.activa { background: var(--accent-soft); }

/* Tecnologías de la vacante: tipo en cada chip. */
.tec .tipo { border: 0; border-radius: 999px; padding: 2px 8px; font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; cursor: pointer; margin-left: 4px; }
.tec .tipo.obligatoria { background: var(--accent-soft); color: var(--accent); }
.tec .tipo.deseable { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.tec.deseable { border-style: dashed; }
.tec-buscar.con-tipo { display: flex; gap: 8px; max-width: 620px; }
.tec-buscar.con-tipo input { flex: 1; }
.tec-buscar.con-tipo select { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }

/* Match por stack: barra de obligatorias cubiertas. */
.match-datos { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; color: var(--ink-2); }
.match-barra { display: inline-block; width: 120px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.match-barra span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.match-barra .w-0 { width: 0; } .match-barra .w-1 { width: 10%; } .match-barra .w-2 { width: 20%; } .match-barra .w-3 { width: 30%; } .match-barra .w-4 { width: 40%; }
.match-barra .w-5 { width: 50%; } .match-barra .w-6 { width: 60%; } .match-barra .w-7 { width: 70%; } .match-barra .w-8 { width: 80%; } .match-barra .w-9 { width: 90%; } .match-barra .w-10 { width: 100%; }
