/*
 * Tabelas do módulo Alunos e Responsáveis.
 * Mantém nomes compactos sem quebrar badges, menus ou ações.
 */
@media (min-width: 768px) {
  body[data-people-module] table {
    table-layout: fixed;
    width: 100%;
  }

  body[data-people-module] table th,
  body[data-people-module] table td {
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  body[data-people-module] table td > *,
  body[data-people-module] table td a,
  body[data-people-module] table td p,
  body[data-people-module] table td div {
    min-width: 0;
    max-width: 100%;
  }

  body[data-people-module] table td p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Nunca cortar badges, tags, botões ou menus de ação. */
  body[data-people-module] table td [role="status"],
  body[data-people-module] table td .inline-flex,
  body[data-people-module] table td button {
    overflow: visible;
    text-overflow: clip;
  }

  /* Alunos: nome compacto, sem dominar a tabela. */
  body[data-people-module="students"] table th:first-child,
  body[data-people-module="students"] table td:first-child {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }

  body[data-people-module="students"] table td:first-child > a {
    width: 100%;
    overflow: hidden;
  }

  /* Responsáveis: proporções mais equilibradas. */
  body[data-people-module="guardians"] table th:first-child,
  body[data-people-module="guardians"] table td:first-child {
    width: 205px !important;
    min-width: 205px !important;
    max-width: 205px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(2),
  body[data-people-module="guardians"] table td:nth-child(2) {
    width: 112px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(3),
  body[data-people-module="guardians"] table td:nth-child(3) {
    width: 132px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(4),
  body[data-people-module="guardians"] table td:nth-child(4) {
    width: 180px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(5),
  body[data-people-module="guardians"] table td:nth-child(5) {
    width: 205px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(6),
  body[data-people-module="guardians"] table td:nth-child(6) {
    width: 88px !important;
  }

  body[data-people-module="guardians"] table th:nth-child(7),
  body[data-people-module="guardians"] table td:nth-child(7) {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    overflow: visible;
  }

  body[data-people-module="guardians"] table th:last-child,
  body[data-people-module="guardians"] table td:last-child {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    overflow: visible;
  }

  /* Autorizações e restrições. */
  body[data-people-module="authorizations"] table th:first-child,
  body[data-people-module="authorizations"] table td:first-child {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
  }

  body[data-people-module="authorizations"] table th:nth-child(2),
  body[data-people-module="authorizations"] table td:nth-child(2) {
    width: 115px !important;
  }

  body[data-people-module="authorizations"] table th:nth-child(3),
  body[data-people-module="authorizations"] table td:nth-child(3) {
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
  }

  body[data-people-module="authorizations"] table th:last-child,
  body[data-people-module="authorizations"] table td:last-child {
    width: 88px !important;
    overflow: visible;
  }
}
