/* Jefe de Servicio: tabla contenida dentro de la tarjeta, sin scroll horizontal */
.chief-list,
.chief-list .table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.chief-list .table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

.chief-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

.chief-table th,
.chief-table td {
  box-sizing: border-box;
  min-width: 0 !important;
  padding: 6px !important;
}

.chief-table th:nth-child(1) { width: 8% !important; }
.chief-table th:nth-child(2) { width: 9% !important; }
.chief-table th:nth-child(3) { width: 14% !important; }
.chief-table th:nth-child(4) { width: 15% !important; }
.chief-table th:nth-child(5) { width: 16% !important; }
.chief-table th:nth-child(6) { width: 31% !important; }
.chief-table th:nth-child(7) { width: 7% !important; }

.chief-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(7)) {
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.chief-table td:nth-child(7) {
  overflow: visible !important;
  white-space: nowrap !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.chief-table .chief-inline-actions {
  width: 100%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
}

.chief-table .chief-inline-actions .compact-icon-button {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
}

/* Modal de decisión: identificación completa incluyendo prestador */
.chief-dialog .chief-patient-summary {
  grid-template-columns:
    minmax(90px,.75fr)
    minmax(150px,1.25fr)
    minmax(80px,.65fr)
    minmax(80px,.65fr)
    minmax(150px,1.2fr) !important;
  gap: 8px !important;
}

.chief-dialog .chief-provider-summary-item strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media(max-width:760px) {
  .chief-dialog .chief-patient-summary {
    grid-template-columns: 1fr 1fr !important;
  }
  .chief-dialog .chief-provider-summary-item {
    grid-column: 1 / -1;
  }
}
