/* Banco de talentos: la lista de personas autorizadas, su ficha, la incorporación y las decisiones de Aromacom. Mismos tokens y componentes que el resto de Sofía
   (--ln, --bd, --r1…r3, --tx*, --e*, .hoja, .chip, .boton, .segmentos); todo acotado con el prefijo bt- para no tocar otras pantallas. El color vive solo en la raya de los chips. */

.banco-vista { display: flex; flex-direction: column; gap: var(--e4); min-width: 0; }
.bt-cuerpo { display: flex; flex-direction: column; gap: var(--e4); min-width: 0; }
.bt-pestanas { max-width: min(100%, 40rem); }
.bt-pestanas .segmento small { font-weight: 500; opacity: 0.8; }

/* ---------- Avisos y motivos ---------- */
.bt-bloqueo-nota { display: flex; align-items: flex-start; gap: var(--e2); margin: 0; padding: var(--e3) var(--e4); border: 1px dashed var(--bd); border-radius: 1rem; color: var(--tx-2); font-size: var(--paso--1); line-height: 1.5; max-width: 62rem; }
.bt-bloqueo-nota .icono { flex: none; width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; }
.bt-bloqueo-nota a { color: var(--tx); text-underline-offset: 3px; font-weight: 700; }
.bt-aviso { margin: 0; padding: var(--e3) var(--e4); border: 1px solid var(--bd); border-left: 4px solid var(--amarillo); border-radius: 0.8rem; font-size: var(--paso--1); line-height: 1.5; color: var(--tx); }
.bt-uso { display: flex; align-items: flex-start; gap: var(--e2); margin: 0; }
.bt-uso .icono { flex: none; width: 1rem; height: 1rem; margin-top: 0.15rem; }
.bt-motivo { color: var(--tx-2); font-size: var(--paso--1); }
.bt-error { margin: 0; color: var(--tx); font-weight: 700; font-size: var(--paso--1); padding: var(--e2) var(--e3); border: 1px solid var(--tx); border-radius: 0.8rem; }
.bt-error[hidden] { display: none; }
.bt-pendiente { font-size: 0.72rem; }

/* ---------- Estado bloqueado ---------- */
.bt-pendiente-hoja { max-width: 62rem; }
.bt-pendiente-hoja h2 { margin: 0; }
.bt-decisiones > li { justify-content: space-between; }
.bt-mientras h3 { font-size: var(--paso-0); margin: 0 0 var(--e2); }
.bt-lista-simple { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; color: var(--tx-2); font-size: var(--paso-0); }
.bt-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bt-lista > li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--e2) var(--e3); padding: 0.55rem 0; border-bottom: 1px solid var(--ln); min-width: 0; }
.bt-lista > li:last-child { border-bottom: 0; }
.bt-lista > li > span { min-width: 0; overflow-wrap: anywhere; }
.bt-lista > li > small { text-align: right; }
.bt-vacio { max-width: none; align-items: flex-start; }
.bt-vacio p { max-width: 62ch; }

/* ---------- Lista ---------- */
.bt-lista-hoja { padding: var(--e4); gap: var(--e3); }
.bt-cont { container: btl / inline-size; }
.bt-vistas { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bt-chip { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.35rem; padding: 0.2rem 0.5rem 0.2rem 0.9rem; border: 1px solid var(--ln); border-radius: 99px; background: var(--r1); color: var(--tx); font-size: var(--paso--1); font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: border-color 0.16s, background-color 0.16s, color 0.16s; }
.bt-chip:hover { border-color: var(--bd); background: var(--r3); }
.bt-chip:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
.bt-chip[aria-pressed="true"] { background: var(--tx); color: var(--fondo); border-color: var(--tx); }
.bt-chip-n { min-width: 1.6rem; padding: 0 0.45rem; border-radius: 99px; background: var(--r3); color: var(--tx); font-size: 0.75rem; font-weight: 800; line-height: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.bt-chip-n[data-cero] { opacity: 0.6; font-weight: 600; }
.bt-chip[aria-pressed="true"] .bt-chip-n { background: var(--fondo); color: var(--tx); }
.bt-chip[data-atencion] .bt-chip-n:not([data-cero]) { background: var(--tx); color: var(--fondo); }
.bt-chip[data-atencion][aria-pressed="true"] .bt-chip-n:not([data-cero]) { background: var(--fondo); color: var(--tx); }

.bt-barra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e2) var(--e3); }
.bt-buscar { position: relative; flex: 1 1 14rem; max-width: 26rem; display: block; }
.bt-buscar > .icono { position: absolute; left: 0.85rem; top: 50%; translate: 0 -50%; width: 1.05rem; height: 1.05rem; color: var(--tx-3); pointer-events: none; }
.bt-buscar input { padding-left: 2.5rem; border-radius: 99px; width: 100%; }
.bt-orden { display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--paso--1); font-weight: 700; color: var(--tx-2); min-width: 0; }
.bt-orden select { min-width: 12rem; max-width: 100%; }
.bt-filtros-n { min-width: 1.35rem; padding: 0 0.4rem; border-radius: 99px; background: var(--tx); color: var(--fondo); font-size: 0.6875rem; font-weight: 800; line-height: 1.35rem; text-align: center; }
.bt-filtros { display: flex; flex-direction: column; gap: var(--e3); padding: var(--e4); border: 1px solid var(--ln); border-radius: 1rem; background: var(--r1); }
.bt-filtros[hidden] { display: none; }
.bt-filtros-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: var(--e3); }
.bt-estado { margin: 0; }
.bt-estado:empty { display: none; }

.bt-tabla-caja { border: 1px solid var(--bd); border-radius: var(--radio); overflow: hidden; }
.bt-tabla { width: 100%; border-collapse: collapse; font-size: var(--paso-0); }
.bt-tabla th, .bt-tabla td { text-align: left; padding: 0.65rem 0.9rem; vertical-align: middle; border-bottom: 1px solid var(--ln); }
.bt-tabla thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-2); font-weight: 700; background: var(--r1); white-space: nowrap; }
.bt-tabla tbody tr:last-child > * { border-bottom: 0; }
.bt-tabla tbody tr:hover { background: var(--r1); }
.bt-tabla tbody tr[aria-current="true"] { background: var(--r3); box-shadow: inset 3px 0 0 var(--tx); }
.bt-tabla tbody tr[data-retirada] > * { color: var(--tx-2); }
.bt-tabla tbody th { font-weight: 700; }
.bt-tabla td { min-width: 0; }
.bt-tabla td > small, .bt-tabla th > small { display: block; margin-top: 0.1rem; font-size: 0.75rem; line-height: 1.35; }
.bt-tabla td > .chip { margin-bottom: 0.1rem; }
.bt-nombre { background: none; border: 0; padding: 0.15rem 0; margin: 0; font: inherit; font-weight: 700; color: var(--tx); text-align: left; text-decoration: underline; text-decoration-color: var(--bd); text-underline-offset: 4px; cursor: pointer; overflow-wrap: anywhere; }
.bt-nombre:hover { text-decoration-color: var(--tx); }
.bt-nombre:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 4px; }
.bt-acciones-caja { display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; }
.bt-acciones-caja .boton { justify-content: center; white-space: nowrap; }
.bt-tabla th:first-child, .bt-tabla tbody th { min-width: 8.5rem; }
.bt-tabla td, .bt-tabla th { padding-inline: 0.7rem; }
.bt-corto { white-space: nowrap; }
.bt-fecha { white-space: nowrap; color: var(--tx-2); font-size: var(--paso--1); }

/* Con poco ancho cada fila es una tarjetita con sus datos rotulados (nunca se corta ni se desborda la página) */
@container btl (max-width: 899px) {
  .bt-tabla thead th:nth-child(3), .bt-tabla tbody td:nth-child(3) { display: none; }
}
@container btl (max-width: 759px) {
  .bt-tabla-caja { border: 0; border-radius: 0; overflow: visible; }
  .bt-tabla, .bt-tabla tbody { display: block; }
  .bt-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bt-tabla tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e2) var(--e3); padding: var(--e3); margin-bottom: var(--e3); border: 1px solid var(--bd); border-radius: var(--radio); }
  .bt-tabla tbody tr:hover { background: transparent; }
  .bt-tabla tbody tr[aria-current="true"] { box-shadow: none; border-color: var(--tx); }
  .bt-tabla th, .bt-tabla td { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0; border: 0 !important; min-width: 0; }
  .bt-tabla tbody td:nth-child(3) { display: flex; }
  .bt-tabla tbody th { grid-column: 1 / -1; font-size: var(--paso-1); }
  .bt-tabla td[data-et="Le interesa"], .bt-tabla td[data-et="Qué pasó"], .bt-tabla tbody th[data-et] { grid-column: 1 / -1; }
  .bt-tabla td::before, .bt-tabla th[data-et]::before { content: attr(data-et); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-2); }
  .bt-tabla .bt-acciones { grid-column: 1 / -1; padding-top: var(--e2); }
  .bt-acciones-caja { flex-direction: row; flex-wrap: wrap; }
  .bt-tabla .bt-acciones .boton { min-height: 2.4rem; }
  .bt-fecha { white-space: normal; }
  .bt-tabla-h tbody tr { grid-template-columns: minmax(0, 1fr); }
  .bt-tabla-h tbody td, .bt-tabla-h tbody th { grid-column: 1 / -1; }
}
@container btl (max-width: 460px) {
  .bt-orden select { min-width: 0; width: 100%; }
  .bt-orden { flex: 1 1 100%; }
  .bt-buscar { flex: 1 1 100%; max-width: none; }
  .bt-tabla tbody tr { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .bt-lista-hoja { padding: var(--e3); }
  .bt-chip { min-height: 2.5rem; }
}

/* ---------- Ficha y formularios (dentro del panel lateral) ---------- */
.bt-seccion { border-bottom: 1px solid var(--ln); }
.bt-seccion:last-of-type { border-bottom: 0; }
.bt-seccion > summary { display: flex; align-items: center; justify-content: space-between; min-height: 2.9rem; cursor: pointer; list-style: none; }
.bt-seccion > summary::-webkit-details-marker { display: none; }
.bt-seccion > summary h3 { margin: 0; font-size: var(--paso-0); font-weight: 800; }
.bt-seccion > summary::after { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--tx-2); border-bottom: 2px solid var(--tx-2); rotate: 45deg; translate: 0 -25%; transition: rotate 0.2s; }
.bt-seccion[open] > summary::after { rotate: -135deg; translate: 0 25%; }
.bt-seccion > summary:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
.bt-seccion-cuerpo { display: flex; flex-direction: column; gap: var(--e3); padding: 0 0 var(--e4); min-width: 0; }
.bt-datos { display: grid; gap: 0.55rem; margin: 0; }
.bt-dato { display: grid; grid-template-columns: minmax(7rem, 9.5rem) minmax(0, 1fr); gap: var(--e3); align-items: baseline; }
.bt-dato dt { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-2); font-weight: 700; }
.bt-dato dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.bt-texto { border: 1px solid var(--ln); border-radius: 0.8rem; padding: 0.35rem var(--e3); }
.bt-texto > summary { cursor: pointer; font-size: var(--paso--1); font-weight: 700; min-height: 2rem; display: flex; align-items: center; gap: var(--e2); flex-wrap: wrap; }
.bt-texto > summary:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
.bt-texto-cuerpo { margin: var(--e2) 0; white-space: pre-wrap; line-height: 1.55; font-size: var(--paso--1); overflow-wrap: anywhere; }
.bt-grupo-perfil h4 { margin: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-2); }
.bt-restricciones .chip { margin-right: 0.4rem; }
.bt-historial > li { align-items: flex-start; }

.bt-form { display: flex; flex-direction: column; gap: var(--e3); padding: var(--e4) 0; border-top: 1px solid var(--bd); }
.bt-form[hidden] { display: none; }
.bt-grupo { display: flex; flex-direction: column; gap: var(--e3); margin: 0; padding: var(--e4); border: 1px solid var(--ln); border-radius: 1rem; min-width: 0; }
.bt-grupo > legend { padding: 0 var(--e2); font-weight: 800; font-size: var(--paso-0); }
.bt-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: var(--e3); }
.bt-marca { display: flex; align-items: flex-start; gap: var(--e2); min-height: 1.8rem; cursor: pointer; line-height: 1.4; }
.bt-marca input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--tx); }
.bt-marca span { min-width: 0; overflow-wrap: anywhere; }
.bt-opciones { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e4); }
.bt-manual { display: flex; flex-direction: column; gap: var(--e2); padding-top: var(--e2); border-top: 1px dashed var(--ln); }
.bt-elegida { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); flex-wrap: wrap; padding: var(--e2) var(--e3); border: 1px solid var(--tx); border-radius: 0.8rem; }
.bt-resultados { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e2); }
.bt-persona { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: var(--e2) var(--e3); border: 1px solid var(--ln); border-radius: 0.8rem; background: var(--r1); color: var(--tx); text-align: left; cursor: pointer; }
.bt-persona:hover:not(:disabled) { border-color: var(--tx); }
.bt-persona:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
.bt-persona:disabled { cursor: not-allowed; border-style: dashed; color: var(--tx-2); }
.bt-persona small { color: var(--tx-2); }
.bt-pie-motivo { flex: 1 1 100%; margin: 0; }
.bt-form-incorporar { display: flex; flex-direction: column; gap: var(--e4); }
#bt-resto { display: flex; flex-direction: column; gap: var(--e4); }

/* ---------- Configuración ---------- */
.bt-config { max-width: 62rem; }
.bt-form-cfg { display: flex; flex-direction: column; gap: var(--e4); }
.bt-form-cfg .campo > label { display: block; }
.bt-form-cfg .campo .chip { align-self: flex-start; }
.bt-aprobacion { display: flex; flex-direction: column; gap: var(--e3); padding-top: var(--e4); border-top: 1px solid var(--ln); }
.bt-aprobacion h3 { margin: 0; font-size: var(--paso-1); }
.bt-form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e3); }
.bt-form-inline .campo { flex: 1 1 16rem; }

@media (max-width: 520px) {
  .bt-dato { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .bt-grupo { padding: var(--e3); }
}

/* ---------- Estado de la autorización: el aviso trae su acción; configuración compacta (Sofía 4.4) ---------- */
.bt-aviso-accion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e2) var(--e3); }
.bt-aviso-accion > span { flex: 1 1 14rem; min-width: 0; }
.bt-aviso-accion .boton { flex: none; }
.bt-fila-cfg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: start; }
.bt-config .bt-form-cfg { gap: var(--e3); }
.bt-config .bt-aprobacion { gap: var(--e2); padding-top: var(--e3); }
.bt-usos { margin-top: var(--e1); }
.bt-config > .bt-aviso { align-self: stretch; }
