/* ==========================================================================
   GestIA · Administración de personas y editor de la ficha del colaborador
   ========================================================================== */

.gap-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--tone-ink);
  background: var(--tone-soft);
}
.gap-chip .i { width: 13px; height: 13px; }
.chip-xs { height: 20px; font-size: 10.5px; }

/* Editor de la ficha */
dialog.modal-editor { width: min(860px, calc(100vw - 24px)); }
.employee-editor { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.employee-editor .modal-head .card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.employee-editor .modal-head h2 { overflow-wrap: anywhere; }
.editor-tabs { flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 22px 0; }
.editor-tabs button { white-space: normal; line-height: 1.2; }
.editor-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.editor-tabs button .i { width: 15px; height: 15px; }
.editor-tabs button:focus-visible { outline: 3px solid var(--blue-200); outline-offset: -3px; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-content: start; animation: fade .25s var(--ease); }
.editor-grid[hidden] { display: none; }
.field-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.field-hint .i { width: 13px; height: 13px; flex: none; }
.field-error { font-size: 11.5px; font-weight: 650; color: var(--red-500); animation: rise .2s var(--ease); }
.employee-editor [aria-invalid="true"] { border-color: var(--red-500); box-shadow: 0 0 0 3px var(--ring-danger); }
.manager-picker { display: grid; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.manager-tools { padding: 0 2px; }
.manager-tools summary { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--blue-700); cursor: pointer; list-style: none; }
.manager-tools summary::-webkit-details-marker { display: none; }
.manager-tools summary .i { width: 14px; height: 14px; }
.manager-tools[open] summary { margin-bottom: 7px; }
.manager-tools .control { animation: rise .2s var(--ease); }
.manager-tools > small { display: block; margin-top: 5px; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.manager-tools summary:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; border-radius: var(--r-sm); }
.editor-status { margin-right: auto; font-size: 12px; color: var(--green-700); }
@media (max-width: 640px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-tabs { margin: 10px 16px 0; }
  .editor-tabs button { font-size: 11.5px; }
}

/* Datos protegidos en las fichas */
.protected-facts { margin-top: 4px; }
.protected-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.protected-note .i { width: 13px; height: 13px; }

.own-protected { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.own-protected summary { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--blue-700); cursor: pointer; list-style: none; transition: background-color .15s var(--ease); }
.own-protected summary::-webkit-details-marker { display: none; }
.own-protected summary:hover { background: var(--blue-50); }
.own-protected summary:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.own-protected summary .i { width: 14px; height: 14px; }
.own-protected[open] [data-protected-facts] { animation: rise .25s var(--ease); }

/* Organigrama: marca de jefatura pendiente dentro de la tarjeta */
.org-card .org-gap { justify-self: center; height: 20px; font-size: 10.5px; }

/* Tabla de administración: acciones compactas para que la edición siempre quede a la vista */
.actions-cell { width: 1%; text-align: right; }
.edit-btn { color: var(--blue-700); background: var(--blue-50); }
.edit-btn:hover { color: var(--on-color); background: var(--blue-600); }
.truncate { display: block; max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
