/* ============================================================
   tables-unified.css
   Estilos unificados para todas las tablas de datos de la plataforma eCert.
   Aplicar la clase "table-ecert" a la etiqueta <table>.
   ============================================================ */

/* ── Variables de color ──────────────────────────────────── */

:root {
  /* Fondo de encabezados de tabla y lista */
  --ecert-header-bg: #f0efef;
  /* Color de texto de encabezados */
  --ecert-header-text: #667085;
  /* Fondo de celdas de datos */
  --ecert-cell-bg: #fff;
  /* Color de texto dentro de celdas */
  --ecert-cell-text: #003;
  /* Color de bordes horizontales entre filas */
  --ecert-border: #f0efef;
  /* Fondo al pasar el mouse sobre una fila */
  --ecert-hover-bg: #fcfcfc;
  /* Color de texto al pasar el mouse sobre una fila */
  --ecert-hover-text: rgb(15, 15, 15);
  /* Borde exterior de las listas tipo tabla */
  --ecert-list-border: #ddd;
  /* Fondo de los badges / contadores de empleados */
  --ecert-badge-bg: #f3f3f3;
  /* Fondo de celdas con error o estado crítico */
  --ecert-red: #F78C82;
  /* Fondo de celdas con estado OK o positivo */
  --ecert-green: #C8E6C9;
  /* Fondo de filas alternas (DataTables pares) */
  --ecert-row-alt: #f9f9f9;

  /* ── Variantes de color de encabezado (tablas legacy) ── */
  /* Encabezado cyan */
  --ecert-header-cyan: #00BCD4;
  /* Encabezado teal */
  --ecert-header-teal: #009688;
  /* Encabezado verde */
  --ecert-header-green: #4CAF50;
  /* Encabezado verde lima */
  --ecert-header-lime: #8BC34A;
  /* Encabezado oliva */
  --ecert-header-olive: #C0CA33;

  /* Texto blanco para encabezados legacy de colores vivos */
  --ecert-legacy-header-text: var(--ecert-cell-bg);
}

/* ── Globales de tabla (antes en main.css) ──────────────── */
table {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  border-collapse: collapse !important;
  line-height: 120% !important;
}

table td {
  padding: 3px !important;
  line-height: 120% !important;
}

/* ── Base ────────────────────────────────────────────────── */
.table-ecert {
  width: auto !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
  font-family: verdana, sans-serif !important;
  font-size: 13px !important;
  margin: 10px auto !important;
  line-height: 120% !important;
}

/* ── Encabezados ─────────────────────────────────────────── */
.table-ecert thead th,
.table-ecert th {
  background: var(--ecert-header-bg) !important;
  color: var(--ecert-header-text) !important;
  padding: 8px 10px !important;
  text-align: left !important;
  font-weight: bold !important;
  word-wrap: break-word !important;
  border: none !important;
}

/* Bordes redondeados en la primera y última celda del thead */
.table-ecert thead tr th:first-child {
  border-top-left-radius: 5px !important;
}

.table-ecert thead tr th:last-child {
  border-top-right-radius: 5px !important;
}

/* ── Celdas de datos ──────────────────────────────────────── */
.table-ecert td {
  padding: 6px 10px !important;
  border-top: 1px solid var(--ecert-border) !important;
  background: var(--ecert-cell-bg) !important;
  color: var(--ecert-cell-text) !important;
  word-wrap: break-word !important;
}

/* ── Hover en filas ─────────────────────────────────────── */
.table-ecert tbody tr:hover td {
  background: var(--ecert-hover-bg) !important;
  color: var(--ecert-hover-text) !important;
}

/* ── Imágenes dentro de celdas ──────────────────────────── */
.table-ecert td img {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Variantes de color de encabezado ────────────────────── */
.table-ecert.table-header-cyan thead th {
  background: var(--ecert-header-cyan);
}

.table-ecert.table-header-teal thead th {
  background: var(--ecert-header-teal);
}

.table-ecert.table-header-green thead th {
  background: var(--ecert-header-green);
}

.table-ecert.table-header-lime thead th {
  background: var(--ecert-header-lime);
}

/* ── Utilidades de alineación ─────────────────────────────── */
.table-ecert .cell--align-left   { text-align: left !important;   }
.table-ecert .cell--align-center { text-align: center !important; }
.table-ecert .cell--align-right  { text-align: right !important;  }

/* ── Estados / colores de celda ─────────────────────────── */
.table-ecert td.red_cell  { background-color: var(--ecert-red) !important; }
.table-ecert td.green_cell { background-color: var(--ecert-green) !important; }

/* ── Clase standalone para tablas tipo import ──────────── */
.table-import {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  border-collapse: collapse !important;
  font-family: verdana, sans-serif !important;
  font-size: 13px !important;
  line-height: normal !important;
}

.table-import thead th,
.table-import th {
  padding: 5px 10px !important;
  background: var(--ecert-header-bg) !important;
  color: var(--ecert-header-text) !important;
  text-align: left !important;
  font-weight: bold !important;
  border: none !important;
}

.table-import td {
  padding: 5px 10px !important;
  background: var(--ecert-cell-bg) !important;
  border-top: 1px solid var(--ecert-border) !important;
  color: var(--ecert-cell-text) !important;
  line-height: normal !important;
}

.table-import tbody tr:hover td {
  background: var(--ecert-cell-bg) !important;
}

.table-import td img {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Modificador ancho automático (ajusta al contenido) ──── */
.table-ecert.table-ecert--fit {
  width: auto !important;
}

/* ============================================================
   LISTAS TIPO TABLA
   Para estructuras <ul><li> que se ven como tablas de datos.
   Aplicar la clase "list-ecert" a la etiqueta <ul>.
   ============================================================ */

.list-ecert {
  list-style: none !important;
  padding: 0 !important;
  margin: 10px auto !important;
  width: 1030px !important;
  border: 1px solid var(--ecert-list-border) !important;
  border-radius: 5px !important;
  overflow: hidden !important;
}

.list-ecert--fullwidth {
  width: 100% !important;
}

/* Header de la lista (primer li o li con clase .list-header) */
.list-ecert > li:first-child,
.list-ecert li.list-header {
  background: var(--ecert-header-bg) !important;
  color: var(--ecert-header-text) !important;
  font-weight: bold !important;
  line-height: 40px !important;
  padding-left: 20px !important;
  border-top-left-radius: 5px !important;
  border-top-right-radius: 5px !important;
}

/* Items de datos */
.list-ecert li {
  background: var(--ecert-cell-bg) !important;
  border-bottom: 1px solid var(--ecert-border) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Hover en items */
.list-ecert li:not(.list-header):hover {
  background: var(--ecert-cell-bg) !important;
}

/* Sub-listas anidadas (árbol jerárquico) */
.list-ecert li ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.list-ecert li ul li {
  background: var(--ecert-cell-bg) !important;
  border-bottom: 1px solid var(--ecert-border) !important;
}

/* El padding general va en la fila flex para no romper alineación */
.list-ecert li .list-ecert-row {
  padding: 10px 20px !important;
}

.list-ecert li.list-header .list-ecert-row {
  padding: 0 20px !important;
  height: 40px !important;
}

.list-ecert li.list-header .col-employees {
  white-space: nowrap !important;
}

.list-ecert li.list-header .col-employees strong {
  white-space: nowrap !important;
}

/* Indentación solo en la columna del nombre (mantiene columnas derechas alineadas) */
.list-ecert > li > ul > li .col-name { padding-left: 20px !important; }
.list-ecert > li > ul > li > ul > li .col-name { padding-left: 40px !important; }
.list-ecert > li > ul > li > ul > li > ul > li .col-name { padding-left: 60px !important; }
.list-ecert > li > ul > li > ul > li > ul > li > ul > li .col-name { padding-left: 80px !important; }

/* Layout flex para filas de lista */
.list-ecert-row {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.list-ecert .col-name {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.list-ecert .col-employees {
  width: 140px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.list-ecert .col-actions {
  width: 170px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 5px !important;
}

.list-ecert .col-actions a {
  display: inline-block !important;
}

/* Anula floats inline de los botones para que el ancho sea consistente */
.list-ecert .col-actions .button_save {
  float: none !important;
  margin-left: 0 !important;
  display: inline-block !important;
}

/* Badges / contadores */
.list-ecert .mark-employ {
  background-color: var(--ecert-badge-bg) !important;
  border-radius: 3px !important;
  padding: 3px 5px !important;
  width: 100px !important;
  display: block !important;
  text-align: center !important;
  margin: 0 auto !important;
}

/* ── Scroll horizontal ──────────────────────────────────── */
.table-scroll-wrapper {
  overflow: auto;
  width: 100%;
  max-height: calc(100vh - 280px);
}

.table-scroll-wrapper #rounded-corner,
.table-scroll-wrapper #rounded-corner-hist-obj,
.table-scroll-wrapper #task-table {
  max-width: none !important;
  width: max-content !important;
  min-width: 100% !important;
  table-layout: auto !important;
}

/* Encabezados pegajosos */
.table-scroll-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ============================================================
   LEGACY SUPPORT — migrado desde main.css
   Estas reglas mantienen compatibilidad con tablas que usan
   id="rounded-corner", id="rounded-corner-hist-obj" e
   id="task-table".  A largo plazo, migrar a class="table-ecert".
   ============================================================ */

/* ── rounded-corner (azul) ───────────────────────────────── */

#rounded-corner {
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif !important;
  font-size: 13px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 95% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

#rounded-corner thead th.rounded-company {
  background: var(--ecert-header-bg) !important;
  border-top-left-radius: 5px !important;
}

#rounded-corner thead th.rounded-q4 {
  background: var(--ecert-header-bg) !important;
  border-top-right-radius: 5px !important;
}

#rounded-corner th {
  padding: 5px 10px !important;
  font-weight: bold !important;
  color: var(--ecert-header-text) !important;
  background: var(--ecert-header-bg) !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

#rounded-corner td {
  font-size: 95% !important;
  background: var(--ecert-cell-bg) !important;
  border-top: 1px solid var(--ecert-border) !important;
  color: var(--ecert-cell-text) !important;
  padding: 5px 10px !important;
  margin: 0 !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

#rounded-corner .bigtable { max-width: 150px !important; }
#rounded-corner td img { padding: 0 !important; margin: 0 !important; }

#rounded-corner tfoot td.rounded-foot-left {
  background: var(--ecert-cell-bg) !important;
  border-bottom-left-radius: 5px !important;
}

#rounded-corner tfoot td.rounded-foot-right {
  background: var(--ecert-cell-bg) !important;
  border-bottom-right-radius: 5px !important;
}

#rounded-corner td.red_cell { background-color: var(--ecert-red) !important; }

/* ── rounded-corner-hist-obj (verde lima) ──────────────────── */
#rounded-corner-hist-obj {
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif !important;
  font-size: 13px !important;
  margin: 5px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 95% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

#rounded-corner-hist-obj thead th.rounded-company {
  background: var(--ecert-header-lime) !important;
  border-top-left-radius: 5px !important;
}

#rounded-corner-hist-obj thead th.rounded-q4 {
  background: var(--ecert-header-lime) !important;
  border-top-right-radius: 5px !important;
}

#rounded-corner-hist-obj th {
  padding: 5px 10px !important;
  font-weight: bold !important;
  color: var(--ecert-legacy-header-text) !important;
  background: var(--ecert-header-lime) !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
  font-size: 16px !important;
}

#rounded-corner-hist-obj td {
  font-size: 14px !important;
  background: var(--ecert-cell-bg) !important;
  border-top: 1px solid var(--ecert-border) !important;
  color: var(--ecert-cell-text) !important;
  padding: 5px 10px !important;
  margin: 0 !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

#rounded-corner-hist-obj .bigtable { max-width: 150px !important; }
#rounded-corner-hist-obj td img { padding: 0 !important; margin: 0 !important; }

#rounded-corner-hist-obj tfoot td.rounded-foot-left {
  background: var(--ecert-cell-bg) !important;
  border-bottom-left-radius: 5px !important;
}

#rounded-corner-hist-obj tfoot td.rounded-foot-right {
  background: var(--ecert-cell-bg) !important;
  border-bottom-right-radius: 5px !important;
}

#rounded-corner-hist-obj td.red_cell { background-color: var(--ecert-red) !important; }

/* ── task-table (oliva) ────────────────────────────────────── */
#task-table {
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif !important;
  font-size: 13px !important;
  margin: 5px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 95% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

#task-table thead th.rounded-company {
  background: var(--ecert-header-olive) !important;
  border-top-left-radius: 5px !important;
}

#task-table thead th.rounded-q4 {
  background: var(--ecert-header-olive) !important;
  border-top-right-radius: 5px !important;
}

#task-table th {
  padding: 5px 10px !important;
  font-weight: bold !important;
  color: var(--ecert-legacy-header-text) !important;
  background: var(--ecert-header-olive) !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

#task-table td {
  font-size: 95% !important;
  background: var(--ecert-cell-bg) !important;
  border-top: 1px solid var(--ecert-border) !important;
  color: var(--ecert-cell-text) !important;
  padding: 5px 10px !important;
  margin: 0 !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

#task-table .bigtable { max-width: 150px !important; }
#task-table td img { padding: 0 !important; margin: 0 !important; }

#task-table tfoot td.rounded-foot-left {
  background: var(--ecert-cell-bg) !important;
  border-bottom-left-radius: 5px !important;
}

#task-table tfoot td.rounded-foot-right {
  background: var(--ecert-cell-bg) !important;
  border-bottom-right-radius: 5px !important;
}

#task-table td.red_cell { background-color: var(--ecert-red) !important; }

/* ── DataTables Bootstrap compatibilidad ─────────────────── */
.table-ecert.dataTable {
  width: 100% !important;
  margin: 0 !important;
  table-layout: auto !important;
}

.table-ecert.dataTable thead th {
  background: var(--ecert-header-bg) !important;
  color: var(--ecert-header-text) !important;
  font-family: verdana, sans-serif !important;
  font-weight: bold !important;
  border-bottom: 1px solid var(--ecert-border) !important;
}

.table-ecert.dataTable tbody td {
  background: var(--ecert-cell-bg) !important;
  color: var(--ecert-cell-text) !important;
  font-family: verdana, sans-serif !important;
  border-top: 1px solid var(--ecert-border) !important;
}

.table-ecert.dataTable tbody tr:nth-child(even) td {
  background: var(--ecert-row-alt) !important;
}

/* ── Tabla de objetivos (compacta) ────────────────────────── */
.table-objectives {
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif !important;
  font-size: 13px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 95% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

.table-objectives thead th {
  padding: 5px 8px !important;
  font-weight: bold !important;
  color: var(--ecert-header-text) !important;
  background: var(--ecert-header-bg) !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
}

.table-objectives td {
  font-size: 95% !important;
  background: var(--ecert-cell-bg) !important;
  border-top: 1px solid var(--ecert-border) !important;
  color: var(--ecert-cell-text) !important;
  padding: 3px 8px !important;
  margin: 0 !important;
  word-wrap: break-word !important;
  font-family: verdana, sans-serif !important;
  line-height: 1.3 !important;
}

.table-objectives td img {
  padding: 0 !important;
  margin: 0 !important;
}

/* Reporte de objetivos (evaluations/report): anchos por columna */
.table-objectives th.c-cat { width: 130px; }
.table-objectives th.c-pct { width: 70px; }
.table-objectives th.c-state { width: 105px; }
.table-objectives th.c-approve { width: 100px; }
.table-objectives th.c-name { width: 250px; }
.table-objectives th.c-role { width: 120px; }
.table-objectives th.c-competence { width: 150px; }
.table-objectives th.c-indicator { width: 200px; }
.table-objectives th.c-criteria { width: 170px; }
.table-objectives th.c-calc { width: 80px; }
.table-objectives th.c-baseline { width: 80px; }
.table-objectives th.c-goal { width: 90px; }
.table-objectives th.c-unit { width: 110px; }
.table-objectives th.c-period { width: 115px; }
.table-objectives th.c-followup { width: 160px; }
.table-objectives th.c-result { width: 105px; }
.table-objectives th.c-compliance { width: 125px; }
.table-objectives th.c-keyresults { width: 150px; }
.table-objectives th.c-limit { width: 95px; }
.table-objectives th.c-action { width: 80px; }
.table-objectives th.c-log { width: 48px; }
.table-objectives th.c-tasks { width: 80px; }

/* Botones dentro de la tabla: más compactos para que no desborden la columna */
#rounded-corner.table-objectives td.td-action {
  padding-left: 2px !important;
  padding-right: 2px !important;
  text-align: center !important;
}
.table-objectives td .btn-button,
.table-objectives td .button_save {
  font-size: 11px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 0 6px !important;
}
.table-objectives td .btn-button i,
.table-objectives td .button_save i {
  font-size: 11px !important;
  margin-right: 3px !important;
}
.table-objectives td.td-action .button_save {
  float: none !important;
  display: inline-block !important;
  margin: 0 !important;
}
.table-objectives td.td-action a {
  display: inline-block;
}

/* Fecha límite y botones de acción: sin saltos de línea, padding reducido */
#rounded-corner.table-objectives td.td-limit {
  white-space: nowrap !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
#rounded-corner.table-objectives th.c-action,
#rounded-corner.table-objectives th.c-log,
#rounded-corner.table-objectives th.c-tasks {
  padding-left: 2px !important;
  padding-right: 2px !important;
}

/* Encabezados: sin partir palabras, máximo dos líneas */
#rounded-corner.table-objectives thead th {
  padding: 5px 6px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
}

/* Todos los encabezados centrados; celdas % y Fecha límite centradas */
#rounded-corner.table-objectives thead th,
#rounded-corner.table-objectives td.td-weight,
#rounded-corner.table-objectives td.td-limit {
  text-align: center !important;
}

/* Seguimientos: botón y estado centrados y compactos */
.table-objectives .c-followup-cell a.btn-button {
  flex: none;
  margin-left: 10px;
}
.table-objectives .c-followup-cell .tag {
  margin: 0 0 0 8px !important;
}
#rounded-corner.table-objectives td.c-followup-cell {
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center !important;
}

/* Peso del objetivo: una sola línea */
#rounded-corner.table-objectives td.td-weight {
  white-space: nowrap !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Resultado y % cumplimiento (incluye "Sin resultados"): una línea, fuente menor */
#rounded-corner.table-objectives td.td-result {
  white-space: nowrap !important;
  font-size: 11px !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Bitácora / evidencias: iconos apilados y centrados en columna angosta */
#rounded-corner.table-objectives td.td-log {
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.table-objectives .log-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
/* Globitos del botón Tareas: esquinas superiores del botón, sin desbordar la columna */
.table-objectives td.td-action a.btn-button.button--cyan {
  position: relative;
}
.table-objectives .task-pending,
.table-objectives .task-notification {
  position: absolute;
  top: -7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
}
.table-objectives .task-pending {
  left: -7px;
  background-color: red;
}
.table-objectives .task-notification {
  right: -7px;
  background-color: blue;
}
.table-objectives .btn-other {
  white-space: nowrap;
}

/* Iconos de bitácora/evidencias y de estado de seguimiento: insignias redondeadas (mismos colores) */
.table-objectives .log-icons .tag:after,
.table-objectives .c-followup-cell .tag:after {
  display: none !important;
}
.table-objectives .log-icons .tag i,
.table-objectives .c-followup-cell .tag i {
  float: none !important;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}
.table-objectives .log-icons .tag,
.table-objectives .c-followup-cell .tag {
  flex: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 28px !important;
  height: 22px;
  padding: 0 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.table-objectives .log-icons .tag {
  margin: 0 !important;
}
.table-objectives .log-icons a.tag:hover,
.table-objectives .log-icons .tag:hover,
.table-objectives .c-followup-cell .tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

/* ── Tabla de usuarios evaluados (evaluations/show) ───────────────────── */
.eval-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}
.eval-users-count {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #E8EAF6;
  color: #3F51B5;
  font-size: 13px;
  font-weight: bold;
  font-family: verdana, sans-serif;
}
.eval-users-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eval-users-actions .btn-button {
  margin: 0 !important;
  float: none !important;
}
.table-scroll-wrapper.eval-users-wrapper {
  max-height: calc(100vh - 220px);
}

/* Foto del usuario: miniatura circular pequeña */
#rounded-corner.table-evaluation-users th.eu-photo,
#rounded-corner.table-evaluation-users td.eu-photo {
  width: 44px;
  max-width: 44px;
  padding-left: 6px !important;
  padding-right: 6px !important;
  text-align: center;
}
#rounded-corner.table-evaluation-users td .eu-avatar {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Columnas de texto: ancho limitado con salto de línea; la primera letra de cada palabra viene en mayúscula desde la vista */
#rounded-corner.table-evaluation-users th,
#rounded-corner.table-evaluation-users td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
#rounded-corner.table-evaluation-users .eu-name { max-width: 190px; }
#rounded-corner.table-evaluation-users .eu-position { max-width: 160px; }
#rounded-corner.table-evaluation-users .eu-evaluator { max-width: 130px; }
#rounded-corner.table-evaluation-users .eu-company { max-width: 120px; }
#rounded-corner.table-evaluation-users .eu-area { max-width: 150px; }
#rounded-corner.table-evaluation-users .eu-group,
#rounded-corner.table-evaluation-users .eu-localization { max-width: 100px; }
#rounded-corner.table-evaluation-users .eu-status-box { width: auto; }
#rounded-corner.table-evaluation-users .eu-status-box > div {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

/* Encabezados: texto a la izquierda en columnas de texto, centrado en columnas de acciones */
#rounded-corner.table-evaluation-users thead th {
  vertical-align: middle;
  line-height: 1.25;
}
#rounded-corner.table-evaluation-users thead th.eu-name,
#rounded-corner.table-evaluation-users thead th.eu-position,
#rounded-corner.table-evaluation-users thead th.eu-evaluator,
#rounded-corner.table-evaluation-users thead th.eu-company,
#rounded-corner.table-evaluation-users thead th.eu-area,
#rounded-corner.table-evaluation-users thead th.eu-group,
#rounded-corner.table-evaluation-users thead th.eu-localization {
  text-align: center;
}
#rounded-corner.table-evaluation-users thead th.eu-status,
#rounded-corner.table-evaluation-users thead th.eu-action,
#rounded-corner.table-evaluation-users thead th.eu-check {
  text-align: center;
}

/* Botones compactos y celdas de acciones con poco padding */
#rounded-corner.table-evaluation-users td.eu-status,
#rounded-corner.table-evaluation-users td.eu-action,
#rounded-corner.table-evaluation-users td.eu-check {
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center;
}
#rounded-corner.table-evaluation-users td .btn-button,
#rounded-corner.table-evaluation-users td .btn.btn-sm {
  font-size: 11px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 0 6px !important;
}
#rounded-corner.table-evaluation-users td .btn-button i,
#rounded-corner.table-evaluation-users td .btn.btn-sm i {
  font-size: 11px !important;
  margin-right: 3px !important;
}
#rounded-corner.table-evaluation-users td .button--width--normal {
  width: 92px;
}
#rounded-corner.table-evaluation-users td.eu-check {
  width: 40px;
}
#rounded-corner.table-evaluation-users td.eu-status {
  padding-left: 12px !important;
  padding-right: 12px !important;
  text-align: left !important;
}
#rounded-corner.table-evaluation-users thead th.eu-status {
  text-align: center;
}
/* Botones de estado: todos del mismo tamaño, con holgura para el texto, alineados a la izquierda */
#rounded-corner.table-evaluation-users td.eu-status .btn-button {
  width: 114px !important;
  padding: 0 10px !important;
  text-align: center;
  white-space: nowrap;
}

/* Columna Adicionar/Retirar: botones más angostos (anula el ancho fijo de .btn-danger del parcial) */
#rounded-corner.table-evaluation-users td.eu-delete .btn-danger,
#rounded-corner.table-evaluation-users td.eu-delete .button--width--normal {
  width: 78px !important;
  height: 24px !important;
  padding: 0 6px !important;
  line-height: 22px !important;
  font-size: 11px !important;
}

/* Iconos de estado de seguimiento: mismas insignias que bitácora/evidencias */
#rounded-corner.table-evaluation-users .tag:after {
  display: none !important;
}
#rounded-corner.table-evaluation-users .tag i {
  float: none !important;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}
#rounded-corner.table-evaluation-users .tag {
  flex: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 28px !important;
  height: 22px;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
#rounded-corner.table-evaluation-users .tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

/* Botones Buscar / Limpiar / Exportar en una sola fila */
.filter-content__field.eval-filter-buttons {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: auto !important;
  max-width: none !important;
}
.filter-content__field.eval-filter-buttons .btn-button {
  margin: 0 !important;
  float: none !important;
  white-space: nowrap;
}

/* ── Tabla de usuarios (users/index) ──────────────────────────────────── */
#rounded-corner.table-users-index th.ui-photo,
#rounded-corner.table-users-index td.ui-photo {
  width: 44px;
  max-width: 44px;
  padding-left: 6px !important;
  padding-right: 6px !important;
  text-align: center !important;
}
#rounded-corner.table-users-index td .ui-avatar {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Botones compactos (incluye los generados por el script del layout a partir de imágenes) */
#rounded-corner.table-users-index td .btn-button,
#rounded-corner.table-users-index td .button_save,
#rounded-corner.table-users-index td .btn.btn-button {
  display: inline-block !important;
  font-size: 11px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 0 6px !important;
  margin: 0 !important;
  float: none !important;
  white-space: nowrap;
}
#rounded-corner.table-users-index td .btn-button i,
#rounded-corner.table-users-index td .button_save i {
  font-size: 11px !important;
  margin-right: 3px !important;
}
#rounded-corner.table-users-index td > div[style*="width"] {
  width: auto !important;
}

/* Enlace del nombre y modal de perfil de usuario */
#rounded-corner.table-users-index a.ui-user-link {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}
#rounded-corner.table-users-index a.ui-user-link:hover {
  color: #3F51B5;
  text-decoration: underline;
}
.user-profile-modal .modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  font-family: verdana, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.user-profile-modal__header {
  position: relative;
  padding: 24px 20px 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #3F51B5, #673AB7);
}
.user-profile-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
}
.user-profile-modal__close:hover {
  opacity: 1;
}
.user-profile-modal__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.user-profile-modal__name {
  margin: 12px 0 2px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}
.user-profile-modal__position {
  display: block;
  font-size: 12px;
  opacity: .9;
}
.user-profile-modal__body {
  padding: 16px 24px 20px;
  background: #fff;
}
.user-profile-modal__list {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}
.user-profile-modal__list dt {
  font-weight: bold;
  color: #3F51B5;
}
.user-profile-modal__list dd {
  margin: 0;
  color: #333;
  overflow-wrap: anywhere;
}

/* ── Fix jQuery UI Datepicker (evitar que las globales de tabla lo rompan) ── */
.ui-datepicker {
  box-sizing: border-box !important;
  width: 22.5em !important;
  padding: .35em .35em 0 !important;
}

.ui-datepicker table {
  width: 100% !important;
  margin: 0 0 .4em 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.ui-datepicker th {
  padding: .7em .3em !important;
  line-height: normal !important;
  text-align: center !important;
}

.ui-datepicker td {
  padding: 2px !important;
  line-height: normal !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.ui-datepicker td span,
.ui-datepicker td a {
  padding: .3em !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
