/* ================================================================
   formularios.css — lista (formularios.js), editor (formulario-editor.js)
   y vista previa (formularios-render.js) de candidaturas dinámicas.
   Prefijos: fe- (lista y comunes), fd- (editor), frm- (lo que ve el
   candidato).
   ================================================================ */

/* Los modales van fuera de .fe-page: necesitan las mismas variables. */
.fe-page, .fe-modal {
  --fe-surface: #ffffff;
  --fe-surface-2: #f3f6f8;
  --fe-border: #e1e6ea;
  --fe-text: #1a1f36;
  --fe-muted: #6b778c;
  --fe-accent: #0e7490;
  --fe-accent-soft: #e3f2f6;
  --fe-ok: #12b76a;
  --fe-ok-soft: #e8f8f0;
  --fe-warn: #b54708;
  --fe-warn-soft: #fff6e5;
  --fe-bad: #d92d20;
  --fe-bad-soft: #fef1f0;
  --fe-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .04);
  --fe-radius: 14px;
}
.fe-page {
  color: var(--fe-text);
  padding: 20px 24px 40px;
}
[data-theme="dark"] .fe-page, [data-theme="dark"] .fe-modal {
  --fe-surface: #172033;
  --fe-surface-2: #121a2a;
  --fe-border: #2a3650;
  --fe-text: #e8edf6;
  --fe-muted: #8b98b0;
  --fe-accent: #3fb6cc;
  --fe-accent-soft: #0f2f37;
  --fe-ok: #32d583;
  --fe-ok-soft: #10301f;
  --fe-warn: #fdb022;
  --fe-warn-soft: #3a2a0c;
  --fe-bad: #f97066;
  --fe-bad-soft: #3b1714;
  --fe-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* ── Botones, chips, pestañas (comunes) ── */
.fe-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--fe-border); background: var(--fe-surface); color: var(--fe-text);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.fe-btn:hover { border-color: var(--fe-accent); color: var(--fe-accent); text-decoration: none; }
.fe-btn:disabled { opacity: .55; cursor: not-allowed; }
.fe-btn-primario { background: var(--fe-accent); border-color: var(--fe-accent); color: #fff; }
.fe-btn-primario:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.fe-btn-sec { background: var(--fe-accent-soft); border-color: transparent; color: var(--fe-accent); }
.fe-icono-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid var(--fe-border); border-radius: 9px; background: var(--fe-surface); color: var(--fe-muted);
  cursor: pointer; text-decoration: none; transition: color .15s, border-color .15s;
}
.fe-icono-btn:hover { color: var(--fe-accent); border-color: var(--fe-accent); }
.fe-icono-btn--peligro:hover { color: var(--fe-bad); border-color: var(--fe-bad); }

.fe-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: var(--fe-surface-2); color: var(--fe-muted);
  border: 1px solid var(--fe-border); white-space: nowrap;
}
.fe-chip--ok { background: var(--fe-ok-soft); color: var(--fe-ok); border-color: transparent; }
.fe-chip--borrador { background: var(--fe-warn-soft); color: var(--fe-warn); border-color: transparent; }
.fe-chip--off { background: var(--fe-bad-soft); color: var(--fe-bad); border-color: transparent; }

.fe-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--fe-surface-2); border: 1px solid var(--fe-border); flex-wrap: wrap;
}
.fe-tab {
  border: 0; background: transparent; color: var(--fe-muted); font-weight: 600; font-size: 14px;
  padding: 7px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.fe-tab:hover { color: var(--fe-text); }
.fe-tab.is-activo { background: var(--fe-surface); color: var(--fe-accent); box-shadow: var(--fe-shadow); }

.fe-intro { color: var(--fe-muted); font-size: 14px; margin: 14px 0 18px; max-width: 900px; }
.fe-error { color: var(--fe-bad); font-size: 13px; min-height: 18px; margin-top: 8px; }
.fe-cargando { color: var(--fe-muted); padding: 30px; display: flex; gap: 8px; align-items: center; }
.fe-vacio {
  grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--fe-muted);
  border: 1px dashed var(--fe-border); border-radius: var(--fe-radius); background: var(--fe-surface);
}
.fe-vacio > .mdi { font-size: 40px; display: block; margin-bottom: 8px; color: var(--fe-accent); }
.fe-vacio--error { color: var(--fe-bad); border-color: var(--fe-bad); }

/* ── Lista ── */
.fe-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.fe-toolbar-derecha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fe-buscar {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--fe-border); background: var(--fe-surface);
  border-radius: 10px; padding: 0 10px; color: var(--fe-muted);
}
.fe-buscar input { border: 0; background: transparent; outline: none; padding: 8px 0; color: var(--fe-text); width: 200px; }
.fe-check { display: inline-flex; gap: 6px; align-items: center; color: var(--fe-muted); font-size: 14px; margin: 0; }

.fe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.fe-card {
  background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius);
  box-shadow: var(--fe-shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.fe-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.fe-card.is-inactivo { opacity: .65; }
.fe-card-cab { display: flex; justify-content: space-between; align-items: center; }
.fe-card-icono {
  width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--fe-accent-soft); color: var(--fe-accent); font-size: 21px;
}
.fe-card-acciones { display: flex; gap: 6px; }
.fe-card-titulo { font-size: 17px; font-weight: 700; margin: 0; }
.fe-card-desc { color: var(--fe-muted); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fe-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fe-card-pie { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--fe-border); }
.fe-uso { color: var(--fe-muted); font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }

.fe-modal .modal-content, .fe-modal { border-radius: 16px; }
.fe-label { font-size: 13px; font-weight: 600; color: var(--fe-muted); margin-bottom: 6px; display: block; }
.fe-plantillas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fe-plantilla { cursor: pointer; margin: 0; }
.fe-plantilla input { position: absolute; opacity: 0; }
.fe-plantilla-cuerpo {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: 12px;
  border: 2px solid var(--fe-border, #e6e9f2); transition: border-color .15s, background .15s;
}
.fe-plantilla-cuerpo .mdi { font-size: 22px; color: var(--fe-accent, #5b4bff); }
.fe-plantilla-cuerpo small { color: var(--fe-muted, #6b778c); }
.fe-plantilla input:checked + .fe-plantilla-cuerpo { border-color: var(--fe-accent, #5b4bff); background: var(--fe-accent-soft, #f0eeff); }
.fe-plantilla input:focus-visible + .fe-plantilla-cuerpo { outline: 2px solid var(--fe-accent, #5b4bff); outline-offset: 2px; }

/* ── Editor: barra superior ── */
.fd-barra {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius);
  padding: 14px 16px; box-shadow: var(--fe-shadow); margin-bottom: 14px;
  position: sticky; top: 70px; z-index: 20;
}
.fd-barra-izq { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fd-barra-der { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-nombre-fila, .fd-version-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd-nombre { font-size: 19px; font-weight: 700; margin: 0; }
.fd-version-fila { margin-top: 4px; }
.fd-select-version {
  border: 1px solid var(--fe-border); background: var(--fe-surface-2); color: var(--fe-text);
  border-radius: 8px; padding: 3px 8px; font-size: 13px;
}
.fd-sin-guardar { color: var(--fe-warn); font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.fd-sin-guardar .mdi { font-size: 9px; }

.fd-aviso, .fd-errores {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 10px; font-size: 14px;
}
.fd-aviso { background: var(--fe-accent-soft); color: var(--fe-text); }
.fd-aviso .mdi { color: var(--fe-accent); font-size: 18px; }
.fd-errores { background: var(--fe-bad-soft); color: var(--fe-text); flex-direction: column; border: 1px solid var(--fe-bad); }
.fd-errores-cab { color: var(--fe-bad); display: flex; gap: 6px; align-items: center; }
.fd-errores ul { margin: 0; padding-left: 20px; max-height: 160px; overflow: auto; }
.fd-error-link { border: 0; background: none; padding: 0; color: inherit; text-align: left; font-size: 13px; cursor: pointer; }
.fd-error-link:hover { text-decoration: underline; }
.fd-tabs { margin-bottom: 14px; }

/* ── Editor: diseño ── */
.fd-diseno { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.fd-arbol, .fd-props {
  background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius);
  box-shadow: var(--fe-shadow); padding: 12px;
}
.fd-arbol { position: sticky; top: 170px; max-height: calc(100vh - 190px); overflow: auto; }
.fd-arbol-titulo { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fe-muted); font-weight: 700; margin: 14px 6px 6px; }
.fd-nodo {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 9px; cursor: pointer;
  font-size: 14px; color: var(--fe-text); border: 1px solid transparent; position: relative;
}
.fd-nodo:hover { background: var(--fe-surface-2); }
.fd-nodo:focus-visible { outline: 2px solid var(--fe-accent); }
.fd-nodo.is-activo { background: var(--fe-accent-soft); border-color: var(--fe-accent); }
.fd-nodo.con-error { box-shadow: inset 3px 0 0 var(--fe-bad); }
.fd-nodo-icono { color: var(--fe-accent); font-size: 17px; flex-shrink: 0; }
.fd-nodo-texto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-nodo-meta { color: var(--fe-muted); font-size: 12px; flex-shrink: 0; }
.fd-nodo-error { color: var(--fe-bad); }
.fd-obl { color: var(--fe-bad); font-weight: 700; }
.fd-nodo-acciones { display: none; gap: 2px; }
.fd-nodo:hover .fd-nodo-acciones, .fd-nodo.is-activo .fd-nodo-acciones { display: inline-flex; }
.fd-grupo { margin-bottom: 4px; }
.fd-hijos { margin-left: 16px; padding-left: 8px; border-left: 2px solid var(--fe-border); }
.fd-mini {
  border: 0; background: transparent; color: var(--fe-muted); width: 24px; height: 24px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.fd-mini:hover { background: var(--fe-surface); color: var(--fe-accent); }
.fd-mini--peligro:hover { color: var(--fe-bad); }
.fd-anadir-btn {
  border: 1px dashed var(--fe-border); background: transparent; color: var(--fe-accent); font-weight: 600; font-size: 13px;
  border-radius: 9px; padding: 6px 10px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; margin: 6px 0;
}
.fd-anadir-btn:hover { border-color: var(--fe-accent); background: var(--fe-accent-soft); }
.fd-anadir-raiz { width: 100%; justify-content: center; }
.fd-anadir-menu { max-height: 360px; overflow: auto; }
.fd-anadir-menu .dropdown-item { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.fd-anadir-menu .dropdown-item .mdi { color: var(--fe-accent, #5b4bff); }

.fd-props { padding: 18px 20px; min-height: 300px; }
.fd-props-titulo { font-size: 18px; font-weight: 700; margin: 0 0 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd-props-titulo .mdi { color: var(--fe-accent); }
.fd-bloque { border-top: 1px solid var(--fe-border); padding: 14px 0 6px; }
.fd-bloque:first-of-type { border-top: 0; padding-top: 0; }
.fd-bloque-titulo { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fe-muted); margin: 0 0 10px; }
.fd-campo { margin-bottom: 12px; }
.fd-label { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: block; }
.fd-ayuda { font-size: 12.5px; color: var(--fe-muted); margin-top: 4px; }
.fd-campo-error { color: var(--fe-bad); font-size: 12.5px; }
.fd-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fd-textarea { resize: vertical; }
.fd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.fd-sub { font-size: 13px; font-weight: 600; margin: 10px 0 6px; }
.fd-switch { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; cursor: pointer; font-size: 14px; }
.fd-switch input { width: 34px; height: 18px; appearance: none; background: var(--fe-border); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.fd-switch input::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; }
.fd-switch input:checked { background: var(--fe-accent); }
.fd-switch input:checked::after { left: 18px; }
.fd-switch input:disabled { opacity: .5; cursor: not-allowed; }
.fd-switch input:focus-visible { outline: 2px solid var(--fe-accent); outline-offset: 2px; }
.fd-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.fd-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; margin: 0; }
.fd-fila-personal { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.fd-fila-personal strong { min-width: 90px; }
.fd-enlace { border: 0; background: none; color: var(--fe-accent); font-size: 13px; padding: 0; cursor: pointer; margin-top: 6px; }
.fd-enlace:hover { text-decoration: underline; }

.fd-cond { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--fe-surface-2); border-radius: 10px; padding: 10px; }
.fd-cond > select, .fd-cond > input { flex: 1 1 170px; width: auto; min-width: 0; max-width: 100%; }
.fd-checks--cond { margin: 0; }

.fd-tabla-wrap { overflow-x: auto; margin-bottom: 8px; }
.fd-tabla { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.fd-tabla th { font-size: 12px; color: var(--fe-muted); font-weight: 600; padding: 0 6px; text-align: left; }
.fd-tabla td { padding: 0 4px; vertical-align: middle; }
.fd-tabla-acc { white-space: nowrap; text-align: right; }
.fd-col-mini { width: 60px; text-align: center !important; }
.fd-tabla-ofertas { border-spacing: 0; }
.fd-tabla-ofertas td, .fd-tabla-ofertas th { padding: 10px 8px; border-bottom: 1px solid var(--fe-border); }
.fd-tabla-ofertas tr.is-este td { background: var(--fe-accent-soft); }

.fd-alerta { border: 1px solid var(--fe-border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--fe-surface-2); }
.fd-alerta-cab { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

.fd-errores-locales {
  background: var(--fe-bad-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; color: var(--fe-bad);
  display: flex; gap: 8px; font-size: 13px;
}
.fd-errores-locales ul { margin: 0; padding-left: 16px; }
.fd-aviso-terminos { background: var(--fe-warn-soft); color: var(--fe-warn); border-radius: 10px; padding: 8px 12px; font-size: 13px; display: flex; gap: 8px; margin: -4px 0 12px; }

.fd-json {
  width: 100%; min-height: 60vh; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  border: 1px solid var(--fe-border); border-radius: 12px; padding: 14px; background: var(--fe-surface); color: var(--fe-text);
}
.fd-json-acciones { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.fd-json-acciones .fe-error { margin: 0 auto 0 0; }

/* ── Editor: simulador ── */
.fd-sim { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 16px; align-items: start; }
.fd-sim-preview, .fd-sim-resultado {
  background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius); box-shadow: var(--fe-shadow); padding: 16px;
}
.fd-sim-resultado { position: sticky; top: 170px; max-height: calc(100vh - 190px); overflow: auto; }
.fd-sim-cab { display: flex; justify-content: space-between; align-items: center; color: var(--fe-muted); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.fd-sim-calcular { width: 100%; justify-content: center; padding: 11px; }
.fd-sim-nota-aviso, .fd-sim-vacio { color: var(--fe-muted); font-size: 12.5px; margin: 8px 0 12px; }
.fd-sim-aviso { color: var(--fe-warn); font-size: 13px; display: flex; gap: 6px; }
.fd-res-nota { border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 14px; }
.fd-res-nota--ok { background: var(--fe-ok-soft); }
.fd-res-nota--aviso { background: var(--fe-warn-soft); }
.fd-res-nota--mal { background: var(--fe-bad-soft); }
.fd-res-num { font-size: 40px; font-weight: 800; line-height: 1; }
.fd-res-num small { font-size: 16px; color: var(--fe-muted); font-weight: 600; }
.fd-res-estado { font-weight: 700; margin-top: 6px; }
.fd-res-nota--ok .fd-res-estado { color: var(--fe-ok); }
.fd-res-nota--aviso .fd-res-estado { color: var(--fe-warn); }
.fd-res-nota--mal .fd-res-estado { color: var(--fe-bad); }
.fd-res-sub { font-size: 12.5px; color: var(--fe-muted); margin-top: 6px; }
.fd-res-barra { position: relative; height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .08); margin-top: 12px; }
.fd-res-barra span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: currentColor; color: var(--fe-accent); }
.fd-res-barra i { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--fe-text); }
.fd-res-bloque { margin-bottom: 14px; }
.fd-res-bloque h5 { font-size: 13px; font-weight: 700; margin: 0 0 6px; }
.fd-res-alerta { font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--fe-warn-soft); color: var(--fe-warn); margin-bottom: 4px; display: flex; gap: 6px; }
.fd-res-alerta.is-critica { background: var(--fe-bad-soft); color: var(--fe-bad); }
.fd-res-ok { font-size: 13px; color: var(--fe-ok); }
.fd-res-tabla { width: 100%; font-size: 13px; }
.fd-res-tabla td { padding: 6px 0; border-bottom: 1px solid var(--fe-border); vertical-align: top; }
.fd-res-pts { text-align: right; white-space: nowrap; font-weight: 700; padding-left: 8px !important; }
.fd-res-pts small { color: var(--fe-muted); font-weight: 500; }
.fd-res-resp { color: var(--fe-muted); font-size: 12px; }

/* ── Lo que ve el candidato (formularios-render.js) ── */
.frm { --frm-acento: var(--fe-accent, #5b4bff); max-width: 760px; margin: 0 auto; color: var(--fe-text, #1a1f36); }
.frm-cabecera { margin-bottom: 18px; }
.frm-titulo { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.frm-descripcion, .frm-enunciado { color: var(--fe-muted, #6b778c); white-space: pre-wrap; }
.frm-enunciado { background: var(--fe-surface-2, #f8f9fc); border-radius: 10px; padding: 12px; margin-bottom: 12px; color: var(--fe-text, #1a1f36); font-size: 14px; }
.frm-meta { color: var(--fe-muted, #6b778c); font-size: 13px; }
.frm-progreso { position: relative; height: 26px; margin-bottom: 14px; background: var(--fe-surface-2, #f1f3f8); border-radius: 999px; overflow: hidden; }
.frm-progreso-barra { position: absolute; inset: 0 auto 0 0; background: var(--frm-acento); opacity: .18; transition: width .2s; }
.frm-progreso-texto { position: relative; font-size: 12.5px; font-weight: 700; line-height: 26px; padding-left: 12px; }
.frm-seccion { border: 1px solid var(--fe-border, #e6e9f2); border-radius: calc(var(--frm-radio, 10px) * 1.4); padding: 18px; margin-bottom: 14px; }
.frm-seccion-titulo { font-size: 17px; font-weight: 700; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.frm-seccion-desc { color: var(--fe-muted, #6b778c); font-size: 14px; }
.frm-ej-num { width: 26px; height: 26px; border-radius: 8px; background: var(--frm-acento, var(--fe-accent, #5b4bff)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.frm-chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fe-surface-2, #f1f3f8); color: var(--fe-muted, #6b778c); }
.frm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.frm-pregunta { margin-bottom: 16px; }
.frm-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.frm-obl { color: var(--fe-bad, #d92d20); }
/* dashboard.css pone un " *" a cualquier label seguido de un campo
   required; aquí el asterisco ya lo pinta el propio renderizador. */
.frm .frm-label::after { content: none !important; }
.frm-ayuda { color: var(--fe-muted, #6b778c); font-size: 12.5px; margin: -2px 0 6px; }
.frm-input {
  width: 100%; border: 1px solid var(--fe-border, #d0d5dd); border-radius: var(--frm-radio, 10px); padding: 10px 12px; font-size: 15px; font-family: inherit;
  background: var(--fe-surface, #fff); color: var(--fe-text, #1a1f36); min-height: 44px;
}
.frm-input:focus { outline: none; border-color: var(--frm-acento); box-shadow: 0 0 0 3px rgba(91, 75, 255, .18); }
.frm-textarea { min-height: 110px; resize: vertical; }
.frm-codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 180px; tab-size: 4; border-top-left-radius: 0; border-top-right-radius: 0; }
.frm-codigo-cab { font-size: 12px; font-weight: 700; color: #fff; background: #1f2937; padding: 4px 10px; border-radius: 10px 10px 0 0; display: inline-flex; gap: 4px; }
.frm-con-unidad { display: flex; gap: 8px; align-items: center; }
.frm-unidad { color: var(--fe-muted, #6b778c); font-size: 14px; white-space: nowrap; }
.frm-opciones { display: flex; flex-direction: column; gap: 6px; }
.frm-opcion { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--fe-border, #e6e9f2); border-radius: var(--frm-radio, 10px); cursor: pointer; margin: 0; min-height: 44px; }
.frm-opcion:hover { border-color: var(--frm-acento); }
.frm-opcion input { width: 18px; height: 18px; accent-color: var(--frm-acento); flex-shrink: 0; }
.frm-opcion:has(input:checked) { border-color: var(--frm-acento); background: rgba(91, 75, 255, .06); }
.frm-escala { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.frm-escala .frm-opciones { flex-direction: row; flex-wrap: wrap; }
.frm-escala .frm-opcion { padding: 8px 14px; }
.frm-escala-extremo { font-size: 13px; color: var(--fe-muted, #6b778c); }
.frm-matriz-wrap { overflow-x: auto; }
.frm-matriz { border-collapse: collapse; min-width: 100%; font-size: 14px; }
.frm-matriz th, .frm-matriz td { padding: 8px 10px; border-bottom: 1px solid var(--fe-border, #e6e9f2); text-align: center; }
.frm-matriz th[scope="row"] { text-align: left; font-weight: 600; }
.frm-matriz input { width: 18px; height: 18px; accent-color: var(--frm-acento); }
.frm-informativo { background: var(--fe-surface-2, #f1f3f8); border-left: 4px solid var(--frm-acento); padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; font-size: 14px; }
.frm-error { color: var(--fe-bad, #d92d20); font-size: 13px; min-height: 0; margin-top: 4px; }
.frm-error:empty { display: none; }
.frm-privacidad { margin: 16px 0; }
.frm-pasos-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
/* Fallback: los botones también se usan fuera de .frm (página pública). */
.frm-btn { border: 0; background: var(--frm-acento, var(--fe-accent, #5b4bff)); color: #fff; font-weight: 700; padding: 11px 20px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.frm-btn:disabled { opacity: .45; cursor: not-allowed; }
.frm-btn-sec { background: var(--fe-surface-2, #f1f3f8); color: var(--fe-text, #1a1f36); }
.frm-revisor { margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--fe-accent-soft, #f0eeff); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.frm-revisor label { font-size: 13px; font-weight: 600; margin: 0; }
.frm-revisor .frm-input { width: 110px; min-height: 36px; padding: 6px 10px; }

/* ── Móvil ── */
@media (max-width: 992px) {
  .fd-diseno, .fd-sim { grid-template-columns: 1fr; }
  .fd-arbol, .fd-sim-resultado { position: static; max-height: none; }
  .fd-barra { position: static; }
}
@media (max-width: 576px) {
  .fe-page { padding: 14px 16px 30px; }
  .fe-buscar input { width: 140px; }
  .fe-plantillas { grid-template-columns: 1fr; }
  .fd-barra-der .fe-btn { flex: 1; justify-content: center; }
}

/* Publicación en la web (pestaña Ofertas del editor) */
.fd-web { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.fd-web-acciones { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fd-url { font-size: 12px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); border-radius: 6px; padding: 3px 8px; color: var(--fe-text); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Casos de prueba del baremo (pestaña del editor) ── */
.fd-tab-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--fe-ok-soft); color: var(--fe-ok); margin-left: 4px; }
.fd-tab-badge.is-aviso { background: var(--fe-warn-soft); color: var(--fe-warn); }
.fd-casos-resumen { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.fd-casos-resumen.is-ok { background: var(--fe-ok-soft); color: var(--fe-ok); }
.fd-casos-resumen.is-aviso { background: var(--fe-warn-soft); color: var(--fe-warn); }
.fd-casos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.fd-caso { background: var(--fe-surface); border: 1px solid var(--fe-border); border-left: 4px solid var(--fe-ok); border-radius: var(--fe-radius); padding: 14px 16px; box-shadow: var(--fe-shadow); display: flex; flex-direction: column; gap: 10px; }
.fd-caso.is-cambia { border-left-color: var(--fe-warn); }
.fd-caso-cab { display: flex; gap: 8px; align-items: center; }
.fd-caso-icono { font-size: 20px; color: var(--fe-ok); }
.fd-caso.is-cambia .fd-caso-icono { color: var(--fe-warn); }
.fd-caso-nombre { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-caso-acc { display: inline-flex; gap: 4px; }
.fd-caso-cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.fd-caso-flecha { align-self: center; color: var(--fe-muted); font-size: 18px; }
.fd-caso-res { background: var(--fe-surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd-caso-res.is-cambia { background: var(--fe-warn-soft); }
.fd-caso-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fe-muted); }
.fd-caso-nota { font-size: 22px; font-weight: 800; line-height: 1.1; }
.fd-caso-res.is-cambia .fd-caso-nota { color: var(--fe-warn); }
.fd-caso-estado { font-size: 12.5px; color: var(--fe-muted); }
.fd-caso-cambios { margin: 0; padding-left: 18px; font-size: 13px; color: var(--fe-warn); }
.fd-caso-pie { display: flex; justify-content: flex-end; }
.fd-sim-caso { border-top: 1px solid var(--fe-border); margin-top: 6px; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fd-sim-caso .fe-btn { justify-content: center; }
.fd-sim-cargado { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; background: var(--fe-accent-soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.fd-sim-cargado .mdi { color: var(--fe-accent); }

/* Campos dentro del modal de confirmación (pedirCampos) y listas en él */
.fd-pedir-campo { text-align: left; margin: 10px 0 4px; }
.fd-pedir-campo .fd-label { display: block; font-weight: 600; font-size: 13px; color: #334155; margin-bottom: 4px; }
.fd-pedir-campo .fd-ayuda { font-size: 12px; margin-top: 4px; }
.fd-confirmar-casos { text-align: left; margin: 6px 0 10px; padding-left: 18px; font-size: 13px; }

/* ── Banco de preguntas ── */
.fd-banco-buscar { width: 100%; margin-bottom: 8px; }
.fd-banco-buscar input { width: 100%; }
.fd-banco-lista { display: flex; flex-direction: column; gap: 6px; }
.fd-banco-grupo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fe-muted); margin: 10px 0 2px; }
.fd-banco-item { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--fe-border); background: var(--fe-surface); color: var(--fe-text); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.fd-banco-item:hover, .fd-banco-item:focus-visible { border-color: var(--fe-accent); background: var(--fe-accent-soft); outline: none; }
.fd-banco-icono { font-size: 20px; color: var(--fe-accent); }
.fd-banco-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fd-banco-texto small { color: var(--fe-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-banco-mas { font-size: 18px; color: var(--fe-muted); }
.fd-banco-origen { display: flex; gap: 8px; align-items: center; font-size: 13.5px; background: var(--fe-accent-soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.fd-banco-origen .mdi { color: var(--fe-accent); font-size: 18px; }
.fd-aviso-banco { background: var(--fe-warn-soft); color: var(--fe-warn); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; display: flex; gap: 6px; }
.fe-btn-link { border-color: transparent; background: none; color: var(--fe-muted); padding-left: 4px; padding-right: 4px; }
.fe-btn-link:hover { border-color: transparent; color: var(--fe-bad); }

/* Pestaña "Banco de preguntas" de la lista */
.fe-banco-grupo-titulo { grid-column: 1 / -1; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fe-muted); margin: 6px 0 -4px; }
.fe-banco-enunciado { font-size: 13.5px; color: var(--fe-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 576px) {
  .fd-casos-lista { grid-template-columns: 1fr; }
  .fd-caso-cmp { grid-template-columns: 1fr; }
  .fd-caso-flecha { transform: rotate(90deg); justify-self: center; }
}
.fe-banco-clave { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-banco-fecha { white-space: nowrap; flex-shrink: 0; padding-left: 8px; }

/* ── Página pública: estilos de opciones, aviso de mínimo e índice ──
   (opciones estiloOpciones / indice / progreso de renderFormulario) */
.frm-opciones--tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.frm-opciones--tarjetas .frm-opcion { font-weight: 600; border-width: 1.5px; }
.frm-opciones--lista { gap: 2px; }
.frm-opciones--lista .frm-opcion { border-color: transparent; padding: 6px 4px; min-height: 36px; }
.frm-opciones--lista .frm-opcion:has(input:checked) { background: none; border-color: transparent; font-weight: 600; }
.frm-aviso-min { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 10px 12px; border-radius: var(--frm-radio, 10px); font-size: 14px; line-height: 1.4;
  background: var(--fe-warn-soft, #fff6e5); color: var(--fe-warn, #b54708); }
.frm-aviso-min[hidden] { display: none; }
.frm-aviso-ico { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.frm-aviso-min--importante { background: var(--fe-bad-soft, #fef1f0); color: var(--fe-bad, #d92d20); }
.frm-aviso-min--info { background: var(--fe-accent-soft, #f0eeff); color: var(--frm-acento, #5b4bff); }
.frm-aviso-min--neutro { background: transparent; color: var(--fe-muted, #6b778c); border: 1px solid var(--fe-border, #e6e9f2); }
.frm-avisos-resumen { margin: 6px 0 12px; padding: 12px 14px; border-radius: var(--frm-radio, 10px); background: var(--fe-warn-soft, #fff6e5); color: var(--fe-warn, #b54708); font-size: 14px; }
.frm-avisos-resumen[hidden] { display: none; }
.frm-avisos-resumen ul { margin: 6px 0 0; padding-left: 18px; }
.frm-progreso--oculta { display: none; }
.frm-con-indice { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.frm-indice { position: sticky; top: 12px; display: grid; gap: 2px; }
.frm-indice button { display: flex; align-items: center; gap: 9px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--frm-radio, 10px);
  cursor: pointer; color: var(--fe-muted, #6b778c); font-weight: 600; font-size: 14px; font-family: inherit; }
.frm-indice button:hover { background: var(--fe-surface-2, #f1f3f8); }
.frm-indice button.is-actual { background: var(--fe-surface, #fff); color: var(--fe-text, #1a1f36); box-shadow: var(--fe-shadow, 0 1px 3px rgba(16, 24, 40, .08)); }
.frm-indice-marca { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fe-border, #e6e9f2); display: grid; place-items: center; font-size: 11px; }
.frm-indice .is-actual .frm-indice-marca { border-color: var(--frm-acento, #5b4bff); }
.frm-indice .is-hecho .frm-indice-marca { background: var(--fe-ok, #12b76a); border-color: var(--fe-ok, #12b76a); color: #fff; }
@media (max-width: 760px) {
  .frm-con-indice { grid-template-columns: 1fr; gap: 10px; }
  .frm-indice { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .frm-indice button { white-space: nowrap; }
  .frm-opciones--tarjetas { grid-template-columns: 1fr; }
}

/* Aviso al candidato en el panel de la pregunta (editor) */
.fd-aviso-cand { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); display: flex; flex-direction: column; gap: 6px; }
.fd-estilos-aviso { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fd-estilo-aviso { position: relative; cursor: pointer; margin: 0; }
.fd-estilo-aviso input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fd-estilo-aviso .frm-aviso-min { margin: 0; font-size: 12.5px; font-weight: 600; outline: 2px solid transparent; outline-offset: 1px; }
.fd-estilo-aviso input:checked + .frm-aviso-min { outline-color: var(--fe-accent); }
.fd-estilo-aviso input:focus-visible + .frm-aviso-min { outline: 2px dashed var(--fe-accent); }

/* ── Página de empleo: aspecto (apariencia-empleo.js) ── */
.ae-barra { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.ae-que { display: flex; flex-direction: column; gap: 4px; min-width: min(360px, 100%); }
.ae-que .fe-label { margin: 0; }
.ae-barra-der { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ae-cuerpo { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ae-ajustes { background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius); box-shadow: var(--fe-shadow); padding: 16px;
  position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ae-ajustes .fe-intro { margin: 0; font-size: 13px; }
.ae-grupo { border-top: 1px solid var(--fe-border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ae-grupo:first-of-type { border-top: 0; padding-top: 0; }
.ae-grupo-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ae-grupo-cab h2 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--fe-muted); }
.ae-grupo-cab small { color: var(--fe-muted); font-size: 12px; }
.ae-grupo-cuerpo { display: flex; flex-direction: column; gap: 12px; }
.ae-campo { display: flex; flex-direction: column; gap: 5px; }
.ae-campo .fe-label { margin: 0; }
.ae-seg { display: inline-flex; border: 1px solid var(--fe-border); border-radius: 10px; padding: 2px; background: var(--fe-surface-2); flex-wrap: wrap; }
.ae-seg button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--fe-muted); font-size: 12.5px; white-space: nowrap; }
.ae-seg button[aria-pressed="true"] { background: var(--fe-surface); color: var(--fe-accent); box-shadow: var(--fe-shadow); }
.ae-seg button:disabled { cursor: default; }
.ae-seg--lleno { display: flex; }
.ae-seg--lleno button { flex: 1; }
.ae-sw { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; cursor: pointer; margin: 0; }
.ae-sw input { appearance: none; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 99px; background: var(--fe-border); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.ae-sw input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ae-sw input:checked { background: var(--fe-accent); }
.ae-sw input:checked::after { transform: translateX(14px); }
.ae-sw input:focus-visible { outline: 2px solid var(--fe-accent); outline-offset: 2px; }
.ae-sw--heredar { background: var(--fe-accent-soft); border-radius: 10px; padding: 7px 10px; }
.ae-colores { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ae-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--fe-surface); box-shadow: 0 0 0 1px var(--fe-border); cursor: pointer; padding: 0; }
.ae-color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--fe-text); }
.ae-colores input[type=color] { width: 34px; height: 30px; border: 1px solid var(--fe-border); border-radius: 8px; padding: 2px; background: var(--fe-surface-2); cursor: pointer; }
.ae-imagen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ae-imagen img, .ae-imagen-vacia { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--fe-surface-2); border: 1px solid var(--fe-border); display: grid; place-items: center; color: var(--fe-muted); font-size: 20px; }
.ae-imagen .fe-btn { cursor: pointer; margin: 0; }
.ae-bloque { display: flex; flex-direction: column; gap: 5px; }
.ae-bloque-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ae-bloque-cab .fe-label { margin: 0; }
.ae-bloque-cab select { width: auto; }
.ae-previa { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ae-previa-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ae-ver-con { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--fe-muted); }
.ae-ver-con select { width: auto; max-width: 260px; }
.ae-previa-barra #ae-abrir { margin-left: auto; }
.ae-marco { border: 1px solid var(--fe-border); border-radius: var(--fe-radius); overflow: hidden; background: var(--fe-surface-2); height: calc(100vh - 190px); min-height: 520px;
  transition: max-width .25s; width: 100%; margin: 0 auto; }
.ae-marco.is-movil { max-width: 400px; border: 8px solid #1b2233; border-radius: 28px; }
.ae-marco iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.ae-marco .fe-vacio { margin: 24px; }
@media (max-width: 1100px) {
  .ae-cuerpo { grid-template-columns: 1fr; }
  .ae-ajustes { position: static; max-height: none; }
  .ae-marco { height: 80vh; }
}

/* Al publicar: elegir qué ofertas pasan a la versión nueva */
.fd-publicar-ofertas { text-align: left; margin-top: 14px; padding: 12px; border-radius: 12px; background: #f6f7fb; border: 1px solid #e3e7f1; font-size: 13px; color: #334155; }
.fd-publicar-ofertas p { margin: 4px 0 8px; }
.fd-publicar-oferta { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; cursor: pointer; margin: 0; }
.fd-publicar-oferta input { margin-top: 3px; width: 16px; height: 16px; flex: 0 0 auto; }
[data-theme="dark"] .fd-publicar-ofertas { background: #192335; border-color: #26324a; color: #cbd5e1; }
/* Plantillas (apariencia-empleo.js): miniatura de cada estilo */
.ae-plantillas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ae-plantilla { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 1px solid var(--fe-border); background: var(--fe-surface); border-radius: 12px; padding: 8px; cursor: pointer; }
.ae-plantilla:hover, .ae-plantilla:focus-visible { border-color: var(--fe-accent); outline: none; box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.ae-plantilla strong { font-size: 13px; }
.ae-plantilla small { font-size: 11.5px; color: var(--fe-muted); line-height: 1.25; }
.ae-mini { display: flex; flex-direction: column; gap: 4px; height: 70px; padding: 6px; border-radius: 8px; background: var(--fe-surface-2); overflow: hidden; margin-bottom: 4px; }
.ae-mini-cab { height: 16px; border-radius: 4px; background: var(--fe-accent); flex: 0 0 auto; }
.ae-mini-cab.con-titulo { height: 22px; background: linear-gradient(var(--fe-accent), var(--fe-accent)) padding-box; position: relative; }
.ae-mini-cab.con-titulo::after { content: ""; position: absolute; left: 6px; bottom: 5px; width: 40%; height: 4px; border-radius: 2px; background: #fff; }
.ae-mini-tarjeta { display: flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 4px; background: var(--fe-surface); }
.ae-mini-tarjeta.centro { align-items: center; }
.ae-mini-tarjeta i { display: block; height: 3px; width: 60%; border-radius: 2px; background: var(--fe-muted); opacity: .5; }
.ae-mini-tarjeta i + i { width: 35%; }
.ae-mini-campos { display: flex; gap: 4px; }
.ae-mini-campos i { flex: 1; height: 8px; border-radius: 3px; border: 1px solid var(--fe-border); background: var(--fe-surface); }
.ae-mini-campos.relleno i { border-color: transparent; background: var(--fe-border); }
.ae-mini-campos.subrayado i { border: 0; border-bottom: 2px solid var(--fe-muted); border-radius: 0; background: none; }
.ae-mini-boton { width: 34%; height: 8px; border-radius: 3px; background: var(--fe-accent); margin-top: auto; }
.ae-mini-boton.pildora { border-radius: 99px; }
.ae-mini-boton.contorno { background: none; box-shadow: inset 0 0 0 1.5px var(--fe-accent); }
.ae-mini--minimalista .ae-mini-tarjeta { background: none; padding-left: 0; }
.ae-mini--corporativa .ae-mini-cab { border-radius: 2px; }
.ae-mini--tarjetas .ae-mini-tarjeta { margin-top: -8px; position: relative; }
.ae-color--auto { background: var(--fe-surface-2); color: var(--fe-muted); font-size: 11px; font-weight: 800; }
/* Opciones en tarjetas: columnas que dejan leer el texto (antes con
   textos largos salían cuatro columnas estrechas y muy altas). */
.frm-opciones--tarjetas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.frm-opciones--tarjetas.frm-opciones--largas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.frm-opciones--tarjetas .frm-opcion { line-height: 1.35; }
.ae-plantilla-activa { color: var(--fe-accent); }
.ae-mini--clasica .ae-mini-cab { height: 10px; background: color-mix(in srgb, var(--fe-accent) 25%, var(--fe-surface)); }
.ae-mini--clasica .ae-mini-tarjeta { border-top: 2px solid var(--fe-accent); }
.ae-mini--moderna .ae-mini-cab { height: 26px; border-radius: 0; margin: -6px -6px 0; background: linear-gradient(120deg, var(--fe-accent), #22d3ee); }
.ae-mini--moderna .ae-mini-boton { background: linear-gradient(90deg, var(--fe-accent), #22d3ee); }

/* Contenido de la oferta: etiquetas y filas (apariencia-empleo.js) */
.ae-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--fe-border); border-radius: 10px; background: var(--fe-surface); min-height: 42px; }
.ae-etiquetas:focus-within { border-color: var(--fe-accent); box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.ae-etiqueta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--fe-accent-soft); color: var(--fe-accent); font-size: 12.5px; font-weight: 700; }
.ae-etiqueta button { border: 0; background: none; color: inherit; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ae-etiqueta button:hover { background: color-mix(in srgb, var(--fe-accent) 18%, transparent); }
.ae-etiqueta-nueva { flex: 1; min-width: 120px; border: 0; outline: none; background: none; color: var(--fe-text); font-size: 13px; padding: 4px; }
.ae-sugerencias { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; color: var(--fe-muted); }
.ae-sugerencias button { border: 1px dashed var(--fe-border); background: none; border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--fe-muted); cursor: pointer; }
.ae-sugerencias button:hover { border-color: var(--fe-accent); color: var(--fe-accent); }
.ae-filas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ae-fila { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.ae-fila-num { width: 22px; height: 22px; margin-top: 5px; border-radius: 50%; background: var(--fe-surface-2); border: 1px solid var(--fe-border); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--fe-muted); }
.ae-fila-campos { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ae-fila-detalle { font-size: 12.5px; }
.ae-fila-acc { display: inline-flex; gap: 2px; margin-top: 2px; }
.ae-fila-acc .fd-mini:disabled { opacity: .3; cursor: default; }
.ae-anadir { align-self: flex-start; border: 1px dashed var(--fe-border); background: none; border-radius: 10px; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--fe-accent); cursor: pointer; }
.ae-anadir:hover { border-color: var(--fe-accent); background: var(--fe-accent-soft); }
.ae-tipico { align-self: flex-start; }
.ae-nota-contenido { padding: 8px 10px; border-radius: 10px; background: var(--fe-surface-2); }
.ae-contenido { border-top: 0; padding-top: 0; }

/* Plantillas compactas: una fila de 4 botones pequeños */
.ae-plantillas-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: -6px; }
.ae-plantillas-cab .fe-label { margin: 0; }
.ae-plantillas-cab .fd-ayuda { margin: 0; font-size: 11.5px; }
.ae-plantillas { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ae-plantilla { padding: 5px; gap: 3px; align-items: center; text-align: center; border-radius: 10px; }
.ae-plantilla > span:last-child { font-size: 11.5px; font-weight: 700; }
.ae-plantilla .ae-mini { height: 36px; padding: 4px; gap: 2px; margin: 0; width: 100%; }
.ae-plantilla .ae-mini-cab { height: 7px; }
.ae-plantilla .ae-mini-cab.con-titulo { height: 10px; }
.ae-plantilla .ae-mini-cab.con-titulo::after { display: none; }
.ae-plantilla .ae-mini-tarjeta { padding: 2px; gap: 2px; }
.ae-plantilla .ae-mini-tarjeta i { height: 2px; }
.ae-plantilla .ae-mini-campos i { height: 5px; }
.ae-plantilla .ae-mini-boton { height: 5px; }
.ae-plantilla.is-activa { border-color: var(--fe-accent); box-shadow: 0 0 0 2px var(--fe-accent-soft); }
.ae-plantilla.is-activa > span:last-child { color: var(--fe-accent); }
.ae-mini--moderna .ae-mini-cab { margin: -4px -4px 0; }

/* Grupos plegables (acordeón) */
.ae-grupo { padding-top: 0; gap: 0; border-top: 1px solid var(--fe-border); }
.ae-grupo:first-of-type { border-top: 1px solid var(--fe-border); }
.ae-grupo-toggle { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 12px 2px; text-align: left; cursor: pointer; color: var(--fe-text); }
.ae-grupo-toggle:hover .ae-grupo-nombre strong { color: var(--fe-accent); }
.ae-grupo-nombre { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ae-grupo-nombre strong { font-size: 13.5px; }
.ae-grupo-nombre small { font-size: 11.5px; color: var(--fe-muted); font-weight: 500; }
.ae-grupo-estado { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fe-surface-2); color: var(--fe-muted); white-space: nowrap; }
.ae-grupo-estado.is-propio { background: var(--fe-accent-soft); color: var(--fe-accent); }
.ae-grupo-toggle .mdi { color: var(--fe-muted); font-size: 20px; transition: transform .15s; }
.ae-grupo.is-abierto .ae-grupo-toggle .mdi { transform: rotate(180deg); }
.ae-grupo-cuerpo { padding-bottom: 14px; }
.ae-grupo.ae-contenido { border-top: 1px solid var(--fe-border); }
.form-range { accent-color: var(--fe-accent); }
.ae-contenido-cuerpo { display: flex; flex-direction: column; gap: 14px; }

/* Acciones automáticas por opción (editor) */
.fd-acciones { display: flex; flex-direction: column; gap: 6px; }
.fd-accion { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--fe-border); margin: 0; font-size: 13px; }
.fd-accion span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-accion--descartar { border-color: var(--fe-bad); background: var(--fe-bad-soft); }
.fd-accion--favorito { border-color: var(--fe-warn); background: var(--fe-warn-soft); }
.fd-accion--prioridad { border-color: var(--fe-ok); background: var(--fe-ok-soft); }
/* Número de pregunta: solo lo enseña la página pública con "numerar" (empleo.css) */
.frm-num { display: none; }
.ae-contraste { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--fe-warn-soft); color: var(--fe-warn); font-size: 13px; }
.ae-contraste .mdi { font-size: 18px; }
.ae-contraste ul { margin: 4px 0 0; padding-left: 18px; }
.ae-copiar { align-self: flex-start; }
/* Historial del aspecto (modal) */
.ae-versiones { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; text-align: left; }
.ae-version { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3e7f1; border-radius: 10px; }
.ae-version small { display: block; color: #64748b; font-size: 12px; }
[data-theme="dark"] .ae-version { border-color: #26324a; }
[data-theme="dark"] .ae-version small { color: #94a3b8; }

/* Descripción en Markdown de la oferta (apariencia-empleo.js) */
.ae-md { border: 1px solid var(--fe-border); border-radius: 10px; overflow: hidden; background: var(--fe-surface); }
.ae-md:focus-within { border-color: var(--fe-accent); box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.ae-md-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--fe-border); background: var(--fe-surface-2); }
.ae-md-barra button { border: 0; background: none; width: 30px; height: 30px; border-radius: 6px; color: var(--fe-text); display: inline-grid; place-items: center; font-size: 17px; cursor: pointer; }
.ae-md-barra button:hover, .ae-md-barra button:focus-visible { background: var(--fe-surface); color: var(--fe-accent); }
.ae-md-barra .ae-md-ejemplo { width: auto; margin-left: auto; padding: 0 9px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; color: var(--fe-accent); }
.ae-md-sep { width: 1px; height: 18px; background: var(--fe-border); margin: 0 4px; }
.ae-md .ae-md-texto { border: 0; border-radius: 0; box-shadow: none !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6; resize: vertical; min-height: 200px; }
.ae-md-pie { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 5px 9px; font-size: 11.5px; color: var(--fe-muted); border-top: 1px solid var(--fe-border); background: var(--fe-surface-2); }
.ae-md-pie code { font-size: 11px; background: var(--fe-surface); padding: 0 4px; border-radius: 4px; }
.ae-fila-etq { font-weight: 600; }

/* =====================================================================
   Formularios y pruebas: lista en filas, flecha de volver, "se usa en"
   y pestañas del panel de una pregunta. Sobrio: bordes finos, sin sombras.
   ===================================================================== */
.ae-barra .ae-volver { align-self: flex-end; margin-bottom: 2px; }
.fl-cuenta { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--fe-surface-2); color: var(--fe-muted); }
.fl-cuenta:empty { display: none; }
.fe-tab.is-activo .fl-cuenta { background: var(--fe-accent-soft); color: var(--fe-accent); }

.fe-grid.fl-lista { display: block; background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: var(--fe-radius); overflow: hidden; }
.fl-fila {
  display: grid; grid-template-columns: minmax(220px, 2fr) minmax(130px, auto) minmax(200px, 2fr) 96px auto; gap: 14px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--fe-border); cursor: pointer; transition: background .12s;
}
.fl-fila:first-child { border-top: 0; }
.fl-fila:hover { background: var(--fe-surface-2); }
.fl-fila.is-inactivo { opacity: .6; }
.fl-fila-principal { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fl-fila-nombre { font-weight: 700; color: var(--fe-text); text-decoration: none; font-size: 15px; }
.fl-fila-nombre:hover, .fl-fila-nombre:focus-visible { color: var(--fe-accent); }
.fl-fila-desc { color: var(--fe-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-fila-estado { display: flex; flex-wrap: wrap; gap: 4px; }
.fl-estado { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--fe-muted); }
.fl-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fl-estado--ok { color: var(--fe-ok); }
.fl-estado--borrador { color: var(--fe-warn); }
.fl-fila-usos { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; min-width: 0; }
.fl-oferta { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fl-oferta > a:first-child { color: var(--fe-text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.fl-oferta > a:first-child:hover { color: var(--fe-accent); text-decoration: underline; }
.fl-web { font-size: 11px; font-weight: 700; color: var(--fe-ok); }
.fl-oferta-pagina { color: var(--fe-accent); font-size: 12px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px; border-radius: 6px; }
.fl-oferta-pagina:hover, .fl-oferta-pagina:focus-visible { color: var(--fe-accent); background: var(--fe-accent-soft); }
.fl-sin-oferta { color: var(--fe-muted); font-size: 12.5px; }
.fl-sin-oferta a { color: var(--fe-accent); font-weight: 600; }
.fl-fila-cifras { color: var(--fe-muted); font-size: 12px; text-align: right; line-height: 1.4; }
.fl-fila-acc { display: flex; gap: 4px; justify-content: flex-end; }
.fl-fila-acc .fe-icono-btn { opacity: .55; }
.fl-fila:hover .fl-fila-acc .fe-icono-btn, .fl-fila-acc .fe-icono-btn:focus-visible { opacity: 1; }
@media (max-width: 1100px) {
  .fl-fila { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p acc" "e e" "u u"; gap: 8px 12px; }
  .fl-fila-principal { grid-area: p; } .fl-fila-acc { grid-area: acc; } .fl-fila-estado { grid-area: e; } .fl-fila-usos { grid-area: u; }
  .fl-fila-cifras { display: none; }
  .fl-fila-acc .fe-icono-btn { opacity: 1; }
}

/* Editor: "Se usa en" bajo el título */
.fd-uso { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.fd-uso:empty { display: none; }
.fd-uso-etq { color: var(--fe-muted); font-size: 12px; }
.fd-uso-nada { color: var(--fe-muted); display: inline-flex; align-items: center; gap: 5px; }
.fd-uso-oferta { display: inline-flex; align-items: center; gap: 8px; }
.fd-uso-oferta > a:first-child { font-weight: 700; color: var(--fe-text); text-decoration: none; }
.fd-uso-oferta > a:first-child:hover { color: var(--fe-accent); text-decoration: underline; }
.fd-uso-v { color: var(--fe-muted); font-size: 12px; }
.fd-uso-web { color: var(--fe-ok); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.fd-uso-noweb { color: var(--fe-muted); font-size: 12px; }
.fd-uso-pagina { display: inline-flex; align-items: center; gap: 3px; color: var(--fe-accent); font-weight: 600; text-decoration: none; font-size: 12.5px; }
.fd-uso-pagina:hover { text-decoration: underline; }
.fd-uso-btn { border: 0; background: none; color: var(--fe-accent); font: inherit; font-size: 12.5px; font-weight: 700; padding: 2px 0; cursor: pointer; }
.fd-uso-btn:hover { text-decoration: underline; }

/* Panel de una pregunta: estado de un vistazo + pestañas */
.fd-pp-estado { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.fd-pp-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--fe-border); background: none; color: var(--fe-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fd-pp-chip .mdi { font-size: 14px; }
.fd-pp-chip.is-on { border-style: solid; border-color: color-mix(in srgb, var(--fe-accent) 35%, var(--fe-border)); background: var(--fe-accent-soft); color: var(--fe-accent); }
.fd-pp-chip:hover { border-color: var(--fe-accent); color: var(--fe-accent); }
.fd-pp-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--fe-border); margin: 0 0 14px; }
.fd-pp-tab { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--fe-muted); padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; }
.fd-pp-tab:hover { color: var(--fe-text); }
.fd-pp-tab.is-activo { color: var(--fe-accent); border-bottom-color: var(--fe-accent); }


/* =====================================================================
   Formularios y pruebas, diseño «rejilla» (L1): cada formulario es una
   tarjeta con su oferta, la web y la página dentro (formularios.js).
   ===================================================================== */
/* Columnas fijas: 4 en pantallas grandes, 3 en medianas, 2 y 1 en pequeñas
   (con «las que quepan» salían 5 en monitores anchos y quedaban estrechas). */
.fe-grid.k2-envoltorio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1500px) { .fe-grid.k2-envoltorio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .fe-grid.k2-envoltorio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .fe-grid.k2-envoltorio { grid-template-columns: 1fr; } }
.k2-card { background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.k2-card:hover { border-color: color-mix(in srgb, var(--fe-accent) 30%, var(--fe-border)); box-shadow: 0 6px 18px rgba(16, 40, 52, .07); }
.k2-card.is-inactivo { opacity: .65; }
.k2-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.k2-card-n { color: var(--fe-muted); font-size: 11.5px; white-space: nowrap; }
.k2-card-n b { color: var(--fe-text); font-size: 13px; }
.k2-estado { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fe-surface-2); color: var(--fe-muted); white-space: nowrap; }
.k2-estado--borrador { background: var(--fe-warn-soft); color: var(--fe-warn); }
.k2-estado--web { background: var(--fe-ok-soft); color: color-mix(in srgb, var(--fe-ok) 75%, #000); }
.k2-estado--pub { background: var(--fe-accent-soft); color: var(--fe-accent); }
.k2-card-titulo { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.k2-card-titulo a { color: var(--fe-text); text-decoration: none; }
.k2-card-titulo a:hover { color: var(--fe-accent); }
.k2-sub { color: var(--fe-muted); font-size: 12.5px; }
.k2-card-titulo + .k2-sub { display: block; margin-top: 1px; font-size: 11.5px; }
.k2-filas { background: var(--fe-surface-2); border-radius: 9px; padding: 0 10px; }
.k2-fila { display: flex; align-items: center; gap: 8px; padding: 6px 0; min-height: 22px; }
.k2-fila + .k2-fila { border-top: 1px solid var(--fe-border); }
.k2-fila-etq { flex: 0 0 60px; color: var(--fe-muted); font-size: 11.5px; }
.k2-fila-valor { flex: 1; min-width: 0; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k2-fila-valor a { color: var(--fe-text); text-decoration: none; }
.k2-fila-valor a:hover { color: var(--fe-accent); text-decoration: underline; }
.k2-fila-valor .k2-sub { font-weight: 400; }
.k2-link { border: 0; background: none; padding: 0; color: var(--fe-accent); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.k2-link:hover { text-decoration: underline; }
.k2-switch { width: 32px; height: 18px; border-radius: 9px; border: 0; padding: 3px; background: #c9d0d6; display: flex; justify-content: flex-start; cursor: pointer; flex: 0 0 auto; }
.k2-switch span { width: 12px; height: 12px; border-radius: 50%; background: #fff; display: block; }
.k2-switch.is-on { background: var(--fe-accent); justify-content: flex-end; }
.k2-switch:disabled { opacity: .45; cursor: default; }
.k2-aviso { background: var(--fe-warn-soft); color: var(--fe-warn); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; line-height: 1.4; }
.k2-aviso a { color: inherit; font-weight: 700; }
.k2-card-pie { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.k2-card-pie > .fe-btn { flex: 1 1 0; min-width: 0; white-space: nowrap; justify-content: center; height: 30px; padding: 0 8px; font-size: 12.5px; border-radius: 8px; }
.k2-card-pie .k2-menu > summary { width: 30px; height: 30px; }
.k2-copiar { width: 22px; height: 22px; font-size: 13px; }
.k2-menu { position: relative; }
.k2-menu > summary { list-style: none; }
.k2-menu > summary::-webkit-details-marker { display: none; }
.k2-menu-caja { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 200px; background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 40, 52, .14); padding: 6px; display: flex; flex-direction: column; }
.k2-menu-caja button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--fe-text); text-align: left; cursor: pointer; }
.k2-menu-caja button:hover { background: var(--fe-surface-2); }
.k2-menu-caja button.is-peligro { color: var(--fe-bad); }

/* Cabecera de la lista (C2): pestañas con contador, acciones, búsqueda y ayuda */
.k2-barra { background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 16px; padding: 0 20px; margin-bottom: 20px; }
.k2-barra-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.k2-barra-fila:first-child { border-bottom: 1px solid var(--fe-border); }
.k2-tabs { display: flex; gap: 24px; flex-wrap: wrap; }
.k2-tabs .k2-tab { background: none; border-radius: 0; padding: 18px 0 15px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 14.5px; color: var(--fe-muted); box-shadow: none; }
.k2-tabs .k2-tab:hover { color: var(--fe-text); }
.k2-tabs .k2-tab.is-activo { color: var(--fe-text); border-bottom-color: var(--fe-accent); background: none; box-shadow: none; }
.k2-tabs .fl-cuenta { min-width: 22px; height: 20px; font-size: 11.5px; }
.k2-barra-acc { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0; }
.k2-barra-fila--buscar { padding: 14px 0 0; }
.k2-buscar { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--fe-border); border-radius: 10px; background: var(--fe-surface-2); color: var(--fe-muted); margin: 0; }
.k2-buscar:focus-within { border-color: var(--fe-accent); background: var(--fe-surface); box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.k2-buscar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--fe-text); }
.k2-interruptor { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--fe-muted); cursor: pointer; user-select: none; }
.k2-interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.k2-interruptor-caja { width: 36px; height: 20px; border-radius: 10px; background: #c9d0d6; padding: 3px; display: flex; transition: background .15s; }
.k2-interruptor-caja span { width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.k2-interruptor input:checked + .k2-interruptor-caja { background: var(--fe-accent); }
.k2-interruptor input:checked + .k2-interruptor-caja span { transform: translateX(16px); }
.k2-interruptor input:focus-visible + .k2-interruptor-caja { outline: 3px solid var(--fe-accent-soft); outline-offset: 2px; }
.k2-ayuda { margin: 0; padding: 10px 0 14px; color: var(--fe-muted); font-size: 12.5px; }
.k2-ayuda:empty { display: none; }
@media (max-width: 760px) { .k2-tabs { gap: 18px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .k2-tabs .k2-tab { white-space: nowrap; flex: 0 0 auto; } .k2-barra-fila:first-child { flex-direction: column; align-items: stretch; } .k2-barra-acc { width: 100%; } }
/* Diseño de la lista de ofertas (lista-empleo.js) */
.le-titulo { font-size: 15px; }
.le-nota { display: block; margin: -4px 0 14px; }
.le-nota .mdi { margin-right: 4px; }
.le-nota a { font-weight: 600; }
.le-filtros .ae-fila { align-items: center; }
.le-filtros .ae-fila.is-apagado { opacity: .6; }
.le-filtro { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; cursor: pointer; }
.le-ejemplo { margin: 0; gap: 8px; }
.le-boton { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
@media (max-width: 560px) { .le-boton { grid-template-columns: 1fr; } }
/* Tarjeta con varias ofertas: una lista compacta */
.k2-ofs { padding: 8px 0 6px; }
.k2-ofs + .k2-fila { border-top: 1px solid var(--fe-border); }
.k2-ofs-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.k2-ofs-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.k2-of { display: flex; align-items: center; gap: 8px; padding: 6px 0; min-width: 0; }
.k2-of + .k2-of, .k2-ofs-mas .k2-of:first-child { border-top: 1px dashed var(--fe-border); }
.k2-of-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.k2-of-texto a { font-weight: 600; font-size: 12.5px; color: var(--fe-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k2-of-texto a:hover { color: var(--fe-accent); text-decoration: underline; }
.k2-of-estado { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--fe-muted); }
.k2-punto { width: 7px; height: 7px; border-radius: 50%; background: #c9d0d6; flex: 0 0 auto; }
.k2-punto.is-web { background: var(--fe-ok); }
.k2-ofs-mas summary { cursor: pointer; list-style: none; padding: 4px 0 0; color: var(--fe-accent); font-size: 12px; font-weight: 600; }
.k2-ofs-mas summary::-webkit-details-marker { display: none; }
.k2-ofs-mas[open] summary { display: none; }

/* =====================================================================
   Editores de /empleo/ (Portada, Formulario, Lista): diseño «D2», con el
   mismo aspecto que el resto del módulo (la tarjeta de cabecera de
   Formularios y pruebas): pestañas de las tres partes, una barra con un
   botón por grupo que abre su panel flotante, y la página en grande.
   ===================================================================== */
.ed2 { display: flex; flex-direction: column; gap: 0; }
.ed2-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 18px; background: var(--fe-surface); border: 1px solid var(--fe-border); border-bottom: 0; border-radius: 16px 16px 0 0; }
.ed2-top-izq, .ed2-top-der { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ed2-top-der { padding: 8px 0; }
.ed2-top .jv-volver { margin-right: 6px; }
.ed2-tabs { display: flex; gap: 22px; }
.ed2-tab { display: inline-flex; align-items: center; padding: 16px 0 13px; border-bottom: 2px solid transparent; color: var(--fe-muted); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.ed2-tab:hover { color: var(--fe-text); }
.ed2-tab.is-activa { color: var(--fe-text); border-bottom-color: var(--fe-accent); }
.ed2-nivel { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--fe-muted); font-weight: 600; }
.ed2-nivel .form-select { min-width: 220px; max-width: 320px; }
.ed2-estado { font-size: 12.5px; font-weight: 700; color: var(--fe-warn); display: inline-flex; align-items: center; gap: 5px; }
.ed2-estado .mdi { font-size: 9px; }
.ed2-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--fe-border); border-radius: 10px; background: var(--fe-surface); color: var(--fe-text); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; }
.ed2-btn:hover { border-color: color-mix(in srgb, var(--fe-accent) 45%, var(--fe-border)); color: var(--fe-accent); }
.ed2-btn--primario { background: var(--fe-accent); border-color: var(--fe-accent); color: #fff; }
.ed2-btn--primario:hover { color: #fff; filter: brightness(1.08); }

.ed2-herr { position: relative; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 18px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); border-radius: 0 0 16px 16px; margin-bottom: 16px; }
.ed2-grupos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed2-herr-der { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed2-herr-der .ae-ver-con { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fe-muted); }
.ed2-herr-der .ae-ver-con label { margin: 0; }
.ed2-herr-der .ae-ver-con .form-select { max-width: 220px; }
/* Cada grupo: su botón en la barra y su cuerpo como panel flotante */
.ed2-grupos .ae-grupo { border: 0 !important; padding: 0; position: static; }
.ed2-grupos .ae-grupo-toggle { width: auto; height: 36px; padding: 0 12px; gap: 6px; border: 1px solid var(--fe-border); border-radius: 10px; background: var(--fe-surface); }
.ed2-grupos .ae-grupo-toggle:hover { border-color: color-mix(in srgb, var(--fe-accent) 50%, var(--fe-border)); }
.ed2-grupos .ae-grupo.is-abierto .ae-grupo-toggle { background: var(--fe-accent-soft); border-color: var(--fe-accent); }
.ed2-grupos .ae-grupo.is-abierto .ae-grupo-nombre strong { color: var(--fe-accent); }
.ed2-grupos .ae-grupo-nombre { flex-direction: row; }
.ed2-grupos .ae-grupo-nombre small { display: none; }
.ed2-grupos .ae-grupo-estado { padding: 1px 6px; font-size: 10.5px; }
.ed2-grupos .ae-grupo-toggle .mdi { font-size: 18px; }
.ed2-grupos .ae-grupo-cuerpo {
  position: absolute; top: calc(100% + 8px); left: 18px; width: min(460px, calc(100% - 36px)); max-height: min(70vh, 680px); overflow: auto;
  background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 16px; box-shadow: 0 24px 50px rgba(16, 40, 52, .22);
  padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px;
}
.ed2-grupos .ae-grupo-cuerpo[hidden] { display: none; }
.ed2-grupos .ae-plantillas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed2-avisos:empty { display: none; }
.ed2-avisos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ed2-avisos .fd-aviso, .ed2-avisos .ae-contraste { margin: 0; }
.ed2-previa { padding: 0; }
.ed2 .ae-marco { height: calc(100vh - 290px); min-height: 560px; margin: 0 auto; border-radius: 16px; background: #fff; }
/* Móvil de la vista previa: pantalla de 390 × 844 con su marco, la isla de
   arriba y la barra de abajo; se encoge (--escala, ajustarMovil()) para caber. */
.ed2 .ae-marco.is-movil {
  position: relative; width: 414px; max-width: none; height: 868px; min-height: 0; padding: 12px; box-sizing: border-box;
  background: #0f172a; border: 0; border-radius: 54px; overflow: visible;
  box-shadow: 0 0 0 2px #334155, 0 0 0 9px #e2e8f0, 0 34px 70px -10px rgba(15, 23, 42, .45);
  transform: scale(var(--escala, 1)); transform-origin: top center; margin-bottom: calc((var(--escala, 1) - 1) * 868px); margin-top: 6px;
}
.ed2 .ae-marco.is-movil::before { content: ""; position: absolute; z-index: 2; top: 23px; left: 50%; width: 112px; height: 32px; transform: translateX(-50%); border-radius: 20px; background: #0f172a; }
.ed2 .ae-marco.is-movil::after { content: ""; position: absolute; z-index: 2; bottom: 20px; left: 50%; width: 134px; height: 5px; transform: translateX(-50%); border-radius: 3px; background: rgba(15, 23, 42, .32); }
.ed2 .ae-marco.is-movil iframe { border-radius: 42px; border-top: 44px solid #fff; box-sizing: border-box; }
.ed2 .ae-marco.is-movil .fe-vacio { background: #fff; border-radius: 42px; height: 100%; margin: 0; }
.ed2-previa:has(.ae-marco.is-movil) { display: flex; justify-content: center; padding-top: 6px; }
@media (max-width: 760px) {
  .ed2-top .jv-volver { margin-top: 10px; }
  .ed2-tabs { gap: 16px; overflow-x: auto; }
  .ed2-grupos .ae-grupo-cuerpo { left: 8px; width: calc(100% - 16px); }
  .ed2-nivel .form-select { min-width: 0; }
}

/* =====================================================================
   Página de empleo (pagina-empleo.js): una tarjeta por editor con su
   miniatura en vivo, y la marca común.
   ===================================================================== */
.pe-page { display: flex; flex-direction: column; gap: 20px; }
.pe-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.pe-cab h1 { margin: 6px 0 4px; font-size: 26px; font-weight: 700; }
.pe-cab p { margin: 6px 0 0; color: var(--fe-muted); font-size: 14.5px; }
.pe-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.pe-tarjeta { display: flex; flex-direction: column; background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 18px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.pe-tarjeta:hover { border-color: color-mix(in srgb, var(--fe-accent) 35%, var(--fe-border)); box-shadow: 0 12px 28px rgba(16, 40, 52, .1); }
.pe-mini { position: relative; display: block; height: 240px; overflow: hidden; background: var(--fe-surface-2); border-bottom: 1px solid var(--fe-border); }
.pe-mini iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 1000px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.pe-mini-vacia { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; color: var(--fe-muted); font-size: 13px; }
.pe-cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pe-cuerpo h2 { margin: 0; font-size: 18px; font-weight: 700; }
.pe-cuerpo p { margin: 0; color: var(--fe-muted); font-size: 13.5px; line-height: 1.5; }
.pe-meta { font-size: 12.5px; color: var(--fe-muted); }
.pe-cuerpo .fe-btn { margin-top: auto; align-self: flex-start; margin-top: 12px; }
.pe-marca { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; background: var(--fe-surface); border: 1px solid var(--fe-border); border-radius: 18px; padding: 18px 20px; }
.pe-marca-texto { flex: 1 1 240px; }
.pe-marca-texto h2 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.pe-marca-texto p { margin: 0; color: var(--fe-muted); font-size: 13px; }
.pe-marca-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pe-estado { font-size: 12.5px; font-weight: 700; color: var(--fe-warn); display: inline-flex; align-items: center; gap: 5px; }
.pe-estado .mdi { font-size: 9px; }
.pe-marca-campo { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; }

/* Botón de volver: el mismo en todo Candidaturas y formularios (clase jv-volver,
   también en detalles-candidatura.css). Dice adónde vuelve. */
.jv-volver { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; max-width: 100%; height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--fe-border, #e1e6ea); border-radius: 10px; background: var(--fe-surface, #fff); color: var(--fe-text, #14181f); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; }
.jv-volver .mdi { font-size: 18px; transition: transform .15s; }
.jv-volver span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jv-volver:hover { border-color: var(--fe-accent, #0e7490); color: var(--fe-accent, #0e7490); text-decoration: none; }
.jv-volver:hover .mdi { transform: translateX(-2px); }
.jv-volver:focus-visible { outline: 3px solid var(--fe-accent-soft, #d5edf2); outline-offset: 2px; }
.jv-volver[hidden] { display: none; }
/* «Repite el correo» (formularios-render.js) */
.frm-label--repetir { margin-top: 10px; }

/* =====================================================================
   Nota en el editor (formulario-editor.js: propsNota, cabeceraPuntos):
   lo que aporta cada pregunta, la importancia y los automáticos.
   ===================================================================== */
.fd-nodo-pct { margin-left: auto; flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--fe-accent-soft); color: var(--fe-accent); font-variant-numeric: tabular-nums; }
.fd-nodo-pct.is-cero { background: var(--fe-surface-2); color: var(--fe-muted); }
.fd-nota-escala { position: relative; height: 10px; border-radius: 999px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); margin: 30px 4px 14px; }
.fd-nota-escala-relleno { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: color-mix(in srgb, var(--fe-warn) 22%, transparent); }
.fd-nota-marca { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--fe-accent); transform: translateX(-1px); }
.fd-nota-marca > span { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--fe-accent); }
.fd-nota-marca.is-prioridad { background: var(--fe-ok); }
.fd-nota-marca.is-prioridad > span { color: var(--fe-ok); }
.fd-nota-sug { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--fe-accent-soft); color: var(--fe-text); margin-top: 6px; }
.fd-nota-sug > .mdi { font-size: 20px; color: var(--fe-accent); }
.fd-nota-sug > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.fd-nota-sug span { color: var(--fe-muted); font-size: 12.5px; }
.fd-nota-sec { border: 1px solid var(--fe-border); border-radius: 12px; padding: 6px 12px 8px; margin-bottom: 10px; background: var(--fe-surface); }
.fd-nota-sec-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fe-muted); border-bottom: 1px solid var(--fe-border); margin-bottom: 4px; }
.fd-nota-fila { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(60px, 1fr) 70px auto; align-items: center; gap: 6px 10px; padding: 6px 0; }
.fd-nota-fila + .fd-nota-fila { border-top: 1px dashed var(--fe-border); }
.fd-nota-fila.is-cero { opacity: .65; }
.fd-nota-nombre { border: 0; background: none; padding: 0; text-align: left; font: inherit; font-size: 13px; font-weight: 600; color: var(--fe-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fd-nota-nombre:hover { color: var(--fe-accent); text-decoration: underline; }
.fd-nota-barra { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--fe-surface-2); overflow: hidden; }
.fd-nota-barra > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--fe-accent); transition: width .2s; }
.fd-nota-pct { font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd-imp { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); }
.fd-imp button { border: 0; background: none; padding: 3px 8px; border-radius: 7px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--fe-muted); cursor: pointer; white-space: nowrap; }
.fd-imp button[aria-pressed="true"] { background: var(--fe-surface); color: var(--fe-accent); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.fd-imp button:disabled { cursor: default; }
@media (max-width: 1200px) { .fd-nota-fila { grid-template-columns: minmax(0, 1fr) 70px; } .fd-nota-fila .fd-nota-barra { grid-column: 1 / -1; grid-row: 2; } .fd-nota-fila .fd-imp { grid-column: 1 / -1; } }
.fd-nota-mini { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--fe-accent-soft); }
.fd-nota-mini-txt { font-size: 14px; }
.fd-nota-mini-txt span { color: var(--fe-muted); font-size: 12.5px; }
.fd-nota-mini .fd-nota-barra { background: var(--fe-surface); }
.fd-nota-mini-pct { font-weight: 700; color: var(--fe-accent); white-space: nowrap; }
.fd-auto { border: 1px dashed color-mix(in srgb, var(--fe-accent) 45%, var(--fe-border)); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 10px; }
.fd-auto-cab { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.fd-auto-cab .mdi { color: var(--fe-accent); }
.fd-auto-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.fd-auto-campo { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; font-weight: 600; color: var(--fe-muted); max-width: 220px; }
.fd-auto-fila .fd-auto-campo { max-width: none; }
.fd-auto-botones { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-auto .fe-btn { align-self: flex-start; }
/* «Tus datos» en el árbol del editor: los campos fijos */
.fd-arbol-titulo-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--fe-muted); margin-left: 4px; }
.fd-nodo--fijo { cursor: pointer; }
.fd-nodo--fijo .fd-nodo-texto { color: var(--fe-text); }
.fd-arbol-ayuda { padding: 4px 8px 8px 28px; }
.fd-bloque.is-resaltado { box-shadow: 0 0 0 3px var(--fe-accent-soft); border-radius: 12px; transition: box-shadow .3s; }
/* «Nuevo formulario › Por puesto» */
.fe-puesto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--fe-accent-soft); }
.fe-puesto[hidden] { display: none; }
.fe-puesto .fe-label { margin-top: 0; }
.fe-puesto-ayuda { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--fe-muted); }
.fd-anadir-menu--datos { max-height: 420px; overflow: auto; }
.fd-anadir-menu .fd-ya { color: var(--fe-muted); font-size: 11px; margin-left: 4px; }
/* Editor: una sola fila de pestañas por pregunta, con lo que tiene cada una */
.fd-pp-marca { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--fe-accent-soft); color: var(--fe-accent); }
.fd-avanzado { margin-top: 6px; }
.fd-avanzado > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--fe-muted); padding: 4px 0; }
.fd-avanzado[open] > summary { margin-bottom: 6px; }
.fd-donde { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 4px; }
.fd-donde-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px dashed var(--fe-border); border-radius: 9px; background: var(--fe-surface-2); color: var(--fe-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fd-donde-btn:hover { border-color: var(--fe-accent); color: var(--fe-accent); }
button.fd-nodo-pct { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
button.fd-nodo-pct:hover { filter: brightness(.95); text-decoration: underline; }
.fe-necesidades { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.fe-chips-caja { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 6px 8px; border: 1px solid var(--fe-border); border-radius: 10px; background: var(--fe-surface); cursor: text; }
.fe-chips-caja:focus-within { border-color: var(--fe-accent); box-shadow: 0 0 0 3px var(--fe-accent-soft); }
.fe-chips-caja input { flex: 1 1 200px; min-width: 120px; border: 0; outline: none; background: transparent; font: inherit; font-size: 13.5px; color: var(--fe-text); }
.fe-chip-nec { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 4px 0 9px; border-radius: 999px; background: var(--fe-surface-2); border: 1px solid var(--fe-border); font-size: 12.5px; font-weight: 600; }
.fe-chip-nec.is-importante { background: var(--fe-accent-soft); border-color: color-mix(in srgb, var(--fe-accent) 40%, var(--fe-border)); }
.fe-chip-nec .mdi { color: var(--fe-accent); }
.fe-chip-nec button { border: 0; background: none; padding: 0 3px; color: var(--fe-muted); cursor: pointer; line-height: 1; }
.fe-chip-nec button:hover { color: var(--fe-bad); }
.fe-sugerencias { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--fe-muted); }
.fe-sugerencias button { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px; border: 1px dashed var(--fe-border); border-radius: 999px; background: var(--fe-surface); color: var(--fe-text); font: inherit; font-size: 12px; cursor: pointer; }
.fe-sugerencias button:hover { border-color: var(--fe-accent); color: var(--fe-accent); }
.fe-puesto .fe-puesto-ayuda .mdi { color: var(--fe-accent); }
/* Modal «Nuevo formulario»: ancha y baja (sin scroll en un portátil) */
.fe-modal-nuevo-dlg { max-width: min(1060px, calc(100vw - 32px)); }
#fe-modal-nuevo .fe-plantillas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#fe-modal-nuevo .fe-plantilla-cuerpo { padding: 12px 14px; gap: 4px; }
#fe-modal-nuevo .fe-plantilla-cuerpo small { font-size: 12.5px; line-height: 1.4; }
#fe-modal-nuevo .fe-puesto { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 18px; row-gap: 8px; }
#fe-modal-nuevo .fe-puesto > div:nth-child(1) { grid-column: 1; grid-row: 1; }
#fe-modal-nuevo .fe-puesto > div:nth-child(2) { grid-column: 1; grid-row: 2; }
#fe-modal-nuevo .fe-necesidades { grid-column: 2; grid-row: 1 / span 3; }
#fe-modal-nuevo #fe-puesto-ayuda { grid-column: 1; grid-row: 3; align-self: start; }
@media (max-width: 860px) {
  #fe-modal-nuevo .fe-plantillas { grid-template-columns: 1fr; }
  #fe-modal-nuevo .fe-puesto { grid-template-columns: 1fr; }
  #fe-modal-nuevo .fe-puesto > div, #fe-modal-nuevo .fe-necesidades, #fe-modal-nuevo #fe-puesto-ayuda { grid-column: 1; grid-row: auto; }
}

/* ── Banco: añadir varias con vista previa / guardar varias ── */
.fd-banco-dlg { max-width: min(1040px, calc(100vw - 32px)); }
.fd-banco-destino { font-weight: 500; color: inherit; opacity: .85; font-size: .9em; }
.fd-banco-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 18px; height: min(62vh, 560px); padding-bottom: 8px; }
.fd-banco-cols > * { min-height: 0; }
.fd-banco-izq { display: flex; flex-direction: column; min-height: 0; }
.fd-banco-izq .fd-banco-lista { overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; gap: 5px; }
.fd-banco-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fd-banco-cat { border: 1px solid var(--fe-border); background: var(--fe-surface); color: var(--fe-text); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.fd-banco-cat[aria-pressed="true"] { background: var(--fe-accent); border-color: var(--fe-accent); color: #fff; }
.fd-banco-grupo { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--fe-surface, #fff); z-index: 1; padding: 6px 0 2px; margin: 4px 0 0; }
.fd-banco-todas { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; border: 0; background: none; color: var(--fe-accent); cursor: pointer; padding: 0; }
.fd-banco-item { padding: 8px 10px; margin: 0; }
.fd-banco-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--fe-accent); flex: none; margin: 0; }
.fd-banco-item.is-foco { border-color: var(--fe-accent); }
.fd-banco-item:has(input:checked) { background: var(--fe-accent-soft); border-color: var(--fe-accent); }
.fd-banco-item.is-ya { opacity: .6; cursor: default; }
.fd-banco-der { border: 1px solid var(--fe-border); border-radius: 14px; padding: 16px; overflow-y: auto; background: color-mix(in srgb, var(--fe-accent-soft) 35%, var(--fe-surface, #fff)); }
.fd-bp-cab { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.fd-bp-cab strong { font-size: 16px; }
.fd-bp-tipo { font-size: 12px; color: var(--fe-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.fd-bp-muestra { background: var(--fe-surface, #fff); border: 1px dashed var(--fe-border); border-radius: 12px; padding: 12px 14px; }
.fd-bp-etq { display: block; font-size: 11.5px; color: var(--fe-muted); margin-bottom: 6px; }
.fd-bp-muestra .frm { padding: 0; background: none; box-shadow: none; max-width: none; }
.fd-bp-datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0 0; font-size: 13px; }
.fd-bp-datos dt { color: var(--fe-muted); font-weight: 600; }
.fd-bp-datos dd { margin: 0; }
.fd-banco-pie { gap: 8px; }
.fd-banco-nota { margin: 0 auto 0 0; }
.fd-bg-lista { display: flex; flex-direction: column; gap: 6px; max-height: min(56vh, 520px); overflow-y: auto; }
.fd-bg-fila { display: grid; grid-template-columns: 22px minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.fd-bg-fila input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--fe-accent); }
.fd-bg-cab { font-size: 12px; font-weight: 700; color: var(--fe-muted); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--fe-surface, #fff); }
.fd-bg-fila.is-ya { opacity: .65; }
@media (max-width: 760px) {
  .fd-banco-cols { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .fd-banco-izq .fd-banco-lista { max-height: 45vh; }
  .fd-banco-der { display: none; }
  .fd-banco-nota { display: none; }
  .fd-bg-fila { grid-template-columns: 22px 1fr; }
  .fd-bg-fila > :nth-child(3) { grid-column: 2; }
}

/* ── Banco: editor de pregunta con vista previa, usos ── */
.fe-bq-dlg { max-width: min(1080px, calc(100vw - 32px)); }
.fe-bq-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 20px; height: min(66vh, 600px); }
.fe-bq-cols > * { min-height: 0; }
.fe-bq-form .fe-btn-link { font-size: 13px; align-self: flex-start; border: 0; background: none; color: var(--fe-accent); font-weight: 600; padding: 2px 0; cursor: pointer; }
.fe-bq-form { overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 10px; }
.fe-bq-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fe-bq-fila--3 { grid-template-columns: repeat(3, 1fr); }
.fe-bq-fila--4 { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
.fe-bq-campo { display: flex; flex-direction: column; min-width: 0; }
.fe-bq-campo .fd-label { margin-bottom: 3px; }
.fe-bq-campo--btn { flex-direction: row; gap: 8px; align-items: center; }
.fe-bq-check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.fe-bq-check input, .fe-bq-cumple input { accent-color: var(--fe-accent); width: 16px; height: 16px; }
.fe-bq-sub { border: 1px solid var(--fe-border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.fe-bq-sub-tit { font-size: 12.5px; font-weight: 700; color: var(--fe-text); }
.fe-bq-sub-tit small { font-weight: 500; color: var(--fe-muted); }
.fe-bq-ops { display: flex; flex-direction: column; gap: 6px; }
.fe-bq-op { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto auto auto; gap: 6px; align-items: center; }
.fe-bq-pts { text-align: right; }
.fe-bq-pts-u { font-size: 12px; color: var(--fe-muted); }
.fe-bq-cumple { display: flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--fe-muted); white-space: nowrap; }
.fe-bq-previa { border: 1px solid var(--fe-border); border-radius: 14px; padding: 16px; background: color-mix(in srgb, var(--fe-accent-soft) 35%, var(--fe-surface)); overflow-y: auto; }
.fe-bq-previa-etq { display: block; font-size: 11.5px; color: var(--fe-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.fe-bq-muestra { background: var(--fe-surface); border: 1px dashed var(--fe-border); border-radius: 12px; padding: 12px 14px; }
.fe-bq-muestra .frm { padding: 0; background: none; box-shadow: none; max-width: none; }
.fe-bq-errores { margin-right: auto; color: #b42318; font-size: 13px; max-width: 60%; }
.fe-bq-errores ul { margin: 4px 0 0; padding-left: 18px; }
.fe-banco-titulo-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fe-banco-titulo-btn:hover { color: var(--fe-accent); text-decoration: underline; }
.fe-banco-usos { border: 0; background: none; cursor: pointer; padding: 0; color: var(--fe-muted); font-size: 13px; }
.fe-banco-usos:hover { color: var(--fe-accent); }
.fe-banco-usos.is-aviso { color: #b54708; font-weight: 600; }
.fe-chip--aviso { background: #fef0c7; color: #93370d; border-color: #fedf89; }
.fe-usos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fe-uso-fila { display: flex; gap: 8px; align-items: center; border: 1px solid var(--fe-border); border-radius: 10px; padding: 8px 10px; }
.fe-uso-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 760px) {
  .fe-bq-cols { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .fe-bq-previa { order: -1; }
  .fe-bq-fila, .fe-bq-fila--3, .fe-bq-fila--4 { grid-template-columns: 1fr; }
  .fe-uso-fila { flex-wrap: wrap; }
}

/* ── Tarjeta «H» (banda teñida según el estado) ──
   Las MISMAS reglas están en candidaturas.css y en formularios.css: cada
   página carga un solo CSS. Si cambias una, cambia la otra. */
.th-card {
  --th-surface: #fff; --th-border: #eceef2; --th-text: #111827; --th-muted: #6b7280; --th-faint: #9aa1ad; --th-sep: #f1f2f5;
  --th-web: #ecfaf1; --th-web-tx: #15803d; --th-neutra: #f1f3f6; --th-neutra-tx: #4b5563;
  --th-pausa: #fff6e8; --th-pausa-tx: #b45309; --th-pub: #eef3ff; --th-pub-tx: #1d4ed8; --th-link: #1d4ed8;
  background: var(--th-surface); border: 1px solid var(--th-border); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; color: var(--th-text); cursor: pointer; min-width: 0;
  transition: box-shadow .2s, transform .2s; animation: th-entra .3s ease backwards;
}
.th-card:hover { box-shadow: 0 16px 34px -20px rgba(16, 24, 40, .3); transform: translateY(-2px); }
.th-card.is-inactivo { opacity: .6; }
@keyframes th-entra { from { opacity: 0; transform: translateY(6px); } }
.th-banda { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 66px; box-sizing: border-box; }
.th-banda.is-web { background: var(--th-web); color: var(--th-web-tx); }
.th-banda.is-cerrada { background: var(--th-neutra); color: var(--th-neutra-tx); }
/* Abierta pero fuera de la web: el mismo azul que «Publicado» en Formularios. */
.th-banda.is-neutra { background: var(--th-pub); color: var(--th-pub-tx); }
.th-banda.is-pausa { background: var(--th-pausa); color: var(--th-pausa-tx); }
.th-banda.is-pub { background: var(--th-pub); color: var(--th-pub-tx); }
.th-icono { width: 38px; height: 38px; border-radius: 50%; background: var(--th-surface); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.th-estado { flex: 1 1 auto; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-huecos { flex: none; display: flex; gap: 4px; align-items: center; }
.th-mas { font-size: 11.5px; font-weight: 600; margin-left: 2px; }
.th-hueco { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.th-hueco.is-lleno { background: currentColor; }
/* Editar y eliminar aparecen encima de los puntos al pasar el ratón (no quitan sitio al estado). */
.th-acciones { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: inherit; opacity: 0; pointer-events: none; transition: opacity .15s; }
.th-banda.is-web .th-acciones { background: var(--th-web); }
.th-banda.is-cerrada .th-acciones { background: var(--th-neutra); }
.th-banda.is-neutra .th-acciones { background: var(--th-pub); }
.th-banda.is-pausa .th-acciones { background: var(--th-pausa); }
.th-banda.is-pub .th-acciones { background: var(--th-pub); }
.th-card:hover .th-acciones, .th-card:focus-within .th-acciones { opacity: 1; pointer-events: auto; }
.th-accion { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; }
.th-accion:hover { background: var(--th-surface); }
.th-accion.is-peligro:hover { color: #b42318; }
.th-cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.th-titulo { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--th-text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-titulo:hover { color: var(--th-link); }
.th-desc { font-size: 13.5px; color: var(--th-muted); line-height: 1.55; margin: 6px 0 0; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-desc.is-vacia { color: var(--th-faint); font-style: italic; }
.th-pie { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--th-muted); }
.th-pie b { color: var(--th-text); font-weight: 600; }
.th-sep { color: #d1d5db; }
.th-fecha { margin-left: auto; color: var(--th-faint); }
.th-lnk { border: 0; background: none; padding: 0; color: var(--th-link); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.th-lnk:hover { text-decoration: underline; }
[data-theme="dark"] .th-card {
  --th-surface: #172033; --th-border: #2a3650; --th-text: #e6ebf5; --th-muted: #9aa8bf; --th-faint: #7d8aa3; --th-sep: #24304a;
  --th-web: rgba(34, 197, 94, .14); --th-web-tx: #6ee7a0; --th-neutra: #1e2940; --th-neutra-tx: #b6c2d6;
  --th-pausa: rgba(245, 158, 11, .14); --th-pausa-tx: #fbbf6a; --th-pub: rgba(96, 140, 255, .16); --th-pub-tx: #9db8ff; --th-link: #9db8ff;
}
[data-theme="dark"] .th-sep { color: #3a4763; }

/* Lo propio de la tarjeta H en Formularios y pruebas */
article.th-card { cursor: default; }
.th-web { margin-left: auto; display: flex; }
.th-desc .th-oferta { color: var(--th-text); font-weight: 500; text-decoration: none; }
.th-desc .th-oferta:hover { color: var(--th-link); text-decoration: underline; }
.th-nota { margin: 8px 0 0; font-size: 12.5px; color: var(--th-pausa-tx); }
.th-cuerpo .k2-ofs { margin-top: 10px; }
.th-pie-acc { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.th-lnk.is-publicar { color: var(--th-pausa-tx); }
.th-pie .k2-menu > summary { width: 30px; height: 30px; }
.k2-menu-caja a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--fe-text); text-decoration: none; }
.k2-menu-caja a:hover { background: var(--fe-surface-2); }
.th-nota .th-lnk { font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; margin-left: 2px; }

/* Tarjetas de Formularios y pruebas más compactas que las de Candidaturas */
.fe-grid .th-card { border-radius: 14px; }
.fe-grid .th-banda { padding: 10px 14px; min-height: 52px; gap: 10px; }
.fe-grid .th-icono { width: 30px; height: 30px; font-size: 16px; }
.fe-grid .th-estado { font-size: 12.5px; }
.fe-grid .th-cuerpo { padding: 12px 14px 14px; }
.fe-grid .th-titulo { font-size: 15px; }
.fe-grid .th-desc { font-size: 13px; min-height: 0; margin-top: 4px; }
.fe-grid .th-nota { font-size: 12px; margin-top: 6px; }
.fe-grid .th-pie { padding-top: 12px; font-size: 12.5px; gap: 5px; }
.fe-grid .th-pie-acc { gap: 8px; }
.fe-grid .th-lnk { font-size: 13px; }
.fe-grid .th-pie .k2-menu > summary { width: 28px; height: 28px; }
.fe-grid .th-cuerpo .k2-ofs { margin-top: 8px; }
.th-ofs { margin-top: 4px; }
.th-ofs > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--th-muted); padding: 2px 0; }
.th-ofs > summary::-webkit-details-marker { display: none; }
.th-ofs > summary b { color: var(--th-text); font-weight: 600; }
.th-ofs > summary .mdi { margin-left: auto; font-size: 18px; transition: transform .15s; }
.th-ofs[open] > summary .mdi { transform: rotate(180deg); }
.th-ofs > summary:hover { color: var(--th-link); }
.th-ofs .k2-ofs-lista { max-height: 230px; overflow-y: auto; margin-top: 6px; padding-right: 4px; }
.fd-uso-n { font-weight: 700; color: var(--fe-text); }

/* ── Modal de publicar (editor) ── */
.fe-btn-peligro { background: var(--fe-bad); border-color: var(--fe-bad); color: #fff; }
.fe-btn-peligro:hover { filter: brightness(.95); }
.fd-pub-dlg { max-width: min(760px, calc(100vw - 32px)); }
.fd-pub-cuerpo { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 210px); overflow-y: auto; }
.fd-pub-aviso { margin: 0; font-size: 14px; }
.fd-pub-aviso .mdi { margin-right: 6px; color: var(--fe-muted); }
.fd-pub-casos { background: var(--fe-surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.fd-pub-ofertas { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--fe-border); padding-top: 14px; min-height: 0; }
.fd-pub-cab { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.fd-pub-cab .fd-ayuda { margin: 4px 0 0; }
.fd-pub-cuenta { font-size: 13px; color: var(--fe-muted); white-space: nowrap; }
.fd-pub-herr { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fd-pub-buscar { flex: 1 1 220px; }
.fd-pub-buscar input { width: 100%; }
.fd-pub-atajos { display: flex; gap: 6px; flex-wrap: wrap; }
.fd-pub-atajos .fe-btn { height: 32px; font-size: 13px; }
.fd-pub-lista { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; border: 1px solid var(--fe-border); border-radius: 12px; }
.fd-pub-fila { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--fe-border); cursor: pointer; margin: 0; font-size: 14px; }
.fd-pub-fila:last-child { border-bottom: 0; }
.fd-pub-fila:hover { background: var(--fe-surface-2); }
.fd-pub-fila:has(input:checked) { background: var(--fe-accent-soft); }
.fd-pub-fila input { width: 16px; height: 16px; accent-color: var(--fe-accent); margin: 0; }
.fd-pub-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fd-pub-v { font-size: 12.5px; color: var(--fe-muted); white-space: nowrap; }
.fd-pub-lista > .fd-ayuda { padding: 12px; margin: 0; }
@media (max-width: 640px) { .fd-pub-fila { grid-template-columns: 18px 1fr; } .fd-pub-fila .fd-pub-v, .fd-pub-fila .fe-chip { grid-column: 2; justify-self: start; } }
/* Toda la tarjeta abre el editor */
article.th-card.th-card--abre { cursor: pointer; }
.th-card--abre:hover .th-titulo { color: var(--th-link); }
.th-card--abre .th-ofs-lista, .th-card--abre .k2-menu-caja { cursor: default; }

/* Banco de preguntas: tarjetas compactas, mismas columnas que los formularios */
.fe-grid.fe-grid--banco { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1200px) { .fe-grid.fe-grid--banco { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .fe-grid.fe-grid--banco { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .fe-grid.fe-grid--banco { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .fe-grid.fe-grid--banco { grid-template-columns: 1fr; } }
.fe-grid--banco .fe-banco-grupo-titulo { font-size: 12px; margin: 10px 0 -2px; }
.fe-grid--banco .fe-card { padding: 12px 14px; gap: 6px; border-radius: 12px; }
.fe-grid--banco .fe-card-icono { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.fe-grid--banco .fe-card-acciones { gap: 4px; }
.fe-grid--banco .fe-card-acciones .fe-icono-btn { width: 28px; height: 28px; font-size: 15px; }
.fe-grid--banco .fe-card-titulo { font-size: 14.5px; line-height: 1.35; }
.fe-grid--banco .fe-banco-enunciado { font-size: 12.5px; -webkit-line-clamp: 1; }
.fe-grid--banco .fe-chips { gap: 4px; }
.fe-grid--banco .fe-chip { font-size: 11px; padding: 2px 7px; }
.fe-grid--banco .fe-card-pie { padding-top: 8px; font-size: 12px; }
.fe-grid--banco .fe-banco-usos { font-size: 12px; }
.fe-grid--banco .fe-card-pie .fe-uso { font-size: 12px; }

/* ── Editor de sectores del asistente «Por puesto» ── */
.fe-sector-fila { display: flex; gap: 10px; align-items: center; }
.fe-sector-fila .form-select { flex: 1; min-width: 0; }
.fe-sectores-editar { white-space: nowrap; font-size: 13px; border: 0; background: none; color: var(--fe-accent); font-weight: 600; cursor: pointer; padding: 0; }
.fe-sectores-editar:hover { text-decoration: underline; }
.fe-sec-dlg { max-width: min(1040px, calc(100vw - 32px)); }
.fe-sec-cols { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 18px; height: min(68vh, 620px); }
.fe-sec-cols > * { min-height: 0; }
.fe-sec-lista { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; border-right: 1px solid var(--fe-border); padding-right: 12px; }
.fe-sec-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--fe-text); font: inherit; }
.fe-sec-item span { font-weight: 600; font-size: 14px; }
.fe-sec-item small { font-size: 12px; color: var(--fe-muted); }
.fe-sec-item:hover { background: var(--fe-surface-2); }
.fe-sec-item.is-activo { background: var(--fe-accent-soft); }
.fe-sec-item.is-activo span { color: var(--fe-accent); }
.fe-sec-anadir { margin-top: 8px; justify-content: center; }
.fe-sec-editor { overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 16px; }
.fe-sec-cab { display: flex; gap: 12px; align-items: flex-end; }
.fe-sec-cab .fe-sec-campo { flex: 1; }
.fe-sec-campo { display: flex; flex-direction: column; gap: 6px; }
.fe-sec-campo .fd-ayuda { margin: 0; }
.fe-sec-chips { min-height: 40px; }
.fe-sec-casos { display: flex; flex-direction: column; gap: 10px; }
.fe-sec-caso { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--fe-border); border-radius: 12px; background: var(--fe-surface-2); }
.fe-sec-caso-cab { display: flex; gap: 6px; align-items: center; }
.fe-sec-caso-cab input { font-weight: 600; }
.fe-sec-restablecer { margin-right: auto; border: 0; background: none; color: var(--fe-muted); font-size: 13px; cursor: pointer; padding: 0; }
.fe-sec-restablecer:hover { color: var(--fe-bad); }
.fe-sec-estado { font-size: 12.5px; color: var(--fe-muted); }
@media (max-width: 760px) {
  .fe-sec-cols { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .fe-sec-lista { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--fe-border); padding: 0 0 8px; }
  .fe-sec-item { width: auto; flex: none; }
  .fe-sec-anadir { margin: 0; flex: none; }
}

/* ── Modo oscuro: colores claros añadidos con el banco, el publicar y las tarjetas ── */
[data-theme="dark"] .fe-chip--aviso { background: rgba(245, 158, 11, .14); color: #fbbf6a; border-color: transparent; }
[data-theme="dark"] .fe-banco-usos.is-aviso { color: #fbbf6a; }
[data-theme="dark"] .fe-bq-errores { color: #fca5a5; }
[data-theme="dark"] .th-sep { color: #3a4763; }

/* «Color de las letras»: una fila por tipo de texto */
.ae-letras { display: flex; flex-direction: column; gap: 2px; }
.ae-letra { display: grid; grid-template-columns: minmax(0, 1fr) 34px 30px; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; }
.ae-letra:hover { background: var(--fe-surface-2); }
.ae-letra-nom { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; color: var(--fe-text); min-width: 0; }
.ae-letra-nom small { font-size: 11.5px; font-weight: 400; color: var(--fe-muted); }
.ae-letra input[type=color] { width: 34px; height: 28px; padding: 2px; border: 1px solid var(--fe-border); border-radius: 7px; background: var(--fe-surface); cursor: pointer; }
.ae-letra.is-auto input[type=color] { opacity: .35; }
.ae-letra-auto { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--fe-border); background: var(--fe-surface); color: var(--fe-muted); font: 700 12px inherit; font-family: inherit; cursor: pointer; }
.ae-letra-auto[aria-pressed="true"] { background: var(--fe-accent-soft); color: var(--fe-accent); border-color: var(--fe-accent); }

/* Barra de grupos y herramientas más compacta: grupos y herramientas de la
   vista previa en una sola línea en pantallas normales. */
.ed2-herr { flex-wrap: nowrap; gap: 8px 12px; }
.ed2-grupos { flex-wrap: wrap; gap: 5px; min-width: 0; }
.ed2-grupos .ae-grupo-toggle { height: 34px; padding: 0 9px 0 11px; gap: 3px; }
.ed2-grupos .ae-grupo-nombre strong { font-size: 13.5px; }
.ed2-grupos .ae-grupo-toggle .mdi { font-size: 16px; }
.ed2-herr-der { flex-wrap: nowrap; gap: 6px; flex: none; }
.ed2-herr-der .ae-ver-con .form-select { max-width: 160px; }
/* «Ver con»: la etiqueta solo para lectores de pantalla (el desplegable lleva título) */
.ed2-herr-der .ae-ver-con label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed2-herr-der .ae-seg button { width: 32px; height: 30px; }
.ed2-grupos { flex-wrap: nowrap; }
@media (max-width: 1400px) { .ed2-herr { flex-wrap: wrap; } .ed2-grupos { flex-wrap: wrap; } }

/* ── Tocar para diseñar: botón y recuadro junto a lo pinchado ── */
.ae-diseno-btn { width: 36px; padding: 0; justify-content: center; font-size: 17px; }
.ae-diseno-btn[aria-pressed="true"] { background: var(--fe-accent-soft); border-color: var(--fe-accent); color: var(--fe-accent); }
.ae-tocar { position: fixed; z-index: 1050; width: min(340px, calc(100vw - 20px)); max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--fe-surface); color: var(--fe-text); border: 1px solid var(--fe-border); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .35); animation: ae-tocar-entra .14s ease; }
@keyframes ae-tocar-entra { from { opacity: 0; transform: translateY(4px); } }
.ae-tocar-cab { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--fe-border); }
.ae-tocar-cab > .mdi { color: var(--fe-accent); font-size: 17px; }
.ae-tocar-cab strong { font-size: 14px; }
.ae-tocar-tema { font-size: 12px; color: var(--fe-muted); }
.ae-tocar-cerrar { margin-left: auto; border: 0; background: none; color: var(--fe-muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 17px; }
.ae-tocar-cerrar:hover { background: var(--fe-surface-2); color: var(--fe-text); }
.ae-tocar-cuerpo { padding: 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ae-tocar-cuerpo .ae-campo { margin: 0; }
.ae-tocar-cuerpo .ae-letras { margin: 0 -6px; }
.ae-tocar-pie { padding: 8px 12px; border-top: 1px solid var(--fe-border); }
.ae-tocar-pie .fe-btn-link { border: 0; background: none; padding: 0; color: var(--fe-accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.ed2-grupos { gap: 4px; }
.ed2-grupos .ae-grupo-toggle { padding: 0 8px 0 10px; }
.ed2-grupos .ae-grupo-nombre strong { font-size: 13px; }
.le-ejemplo { gap: 6px; }
.le-ejemplo > .mdi { font-size: 18px; color: var(--fe-muted); }

/* Cambiar el nombre interno del formulario (cabecera del editor) */
.fd-renombrar-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fd-renombrar-form input { width: min(420px, 70vw); font-weight: 600; }
.fd-errores-lista { margin: 8px 0 0; padding-left: 18px; text-align: left; font-size: 13px; }

/* Correo comprobado mientras se escribe: rojo hasta que está completo, verde
   cuando ya vale (y en «repite el correo», cuando además coincide). */
.frm-input.frm-input--mal { border-color: #d92d20; background: #fef3f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d92d20'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 40px; }
.frm-input.frm-input--ok { border-color: #12b76a; background: #ecfdf3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2312b76a'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-2 15-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9Z'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 40px; }
.frm-input.frm-input--mal:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, .15); }
.frm-input.frm-input--ok:focus { box-shadow: 0 0 0 3px rgba(18, 183, 106, .15); }
[data-theme="dark"] .frm-input.frm-input--mal, .emp-oscuro .frm-input.frm-input--mal { background-color: rgba(217, 45, 32, .12); }
[data-theme="dark"] .frm-input.frm-input--ok, .emp-oscuro .frm-input.frm-input--ok { background-color: rgba(18, 183, 106, .12); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .frm-input.frm-input--mal { background-color: rgba(217, 45, 32, .12); }
  html:not([data-theme="light"]) .frm-input.frm-input--ok { background-color: rgba(18, 183, 106, .12); }
}
