/* CFA v10.24.30 · estándar transversal de tablas
   - Usa todo el ancho útil cuando la tabla cabe.
   - Conserva mínimos legibles y crea scroll horizontal dentro del contenedor cuando no cabe.
   - No comprime tipografía, botones ni encabezados para forzar el contenido. */
.table-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.table-wrap > table,
.table-wrap table {
  /* La tabla llena el ancho disponible. Los mínimos específicos de cada módulo
     siguen gobernando el desbordamiento horizontal cuando el contenido no cabe. */
  width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
  border-collapse: collapse;
}
.table-wrap th,
.table-wrap td {
  box-sizing: border-box;
  min-width: 96px;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
.table-wrap th {
  white-space: nowrap !important;
}
.table-wrap td.money-cell,
.table-wrap td.percent-cell,
.table-wrap td.center-cell,
.table-wrap td.code-cell,
.table-wrap td.date-cell,
.table-wrap td.status-cell,
.table-wrap td.actions-cell,
.table-wrap .btn,
.table-wrap button,
.table-wrap .pill,
.table-wrap .badge,
.table-wrap code {
  white-space: nowrap !important;
}
.table-wrap td.text-cell,
.table-wrap td.wrap-cell,
.table-wrap td.description-cell,
.table-wrap td.detail-cell,
.table-wrap td.notes-cell,
.table-wrap td.observations-cell,
.table-wrap td[data-wrap="true"] {
  white-space: normal !important;
  min-width: 180px;
  max-width: 420px;
}
.table-wrap:focus-visible {
  outline: 3px solid rgba(216,16,56,.25);
  outline-offset: 2px;
}
.table-wrap[data-horizontal-scroll="true"] {
  padding-bottom: 4px;
}
.table-wrap::-webkit-scrollbar {
  height: 13px;
  width: 11px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #f1f3f6;
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #737b87;
  border: 3px solid #f1f3f6;
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #404854;
}
/* Teachers oficiales: ocupa el contenedor completo en pantallas amplias y conserva scroll al reducirlo. */
#teachers .table-wrap > table {
  min-width: max(100%, 1450px) !important;
}
/* Rentabilidad Teacher: muchas columnas financieras; no se compactan. */
.dashboard-teacher-finance-wrap > table {
  min-width: max(100%, 2200px) !important;
}
#rentabilidadTeacherPanel .table-wrap > table {
  min-width: max(100%, 2900px) !important;
}
@media (max-width: 900px) {
  .table-wrap th,
  .table-wrap td { min-width: 110px; }
}
