/* V92 — Unified compact professional tables. Keeps all functionality intact. */
#content .table-responsive,
#content .table-wrap,
#content .responsive-table-wrap,
#content .sa-table-wrap,
#content .pd-table-wrap{
  border-radius:15px!important;
  border:1px solid #dce6e2!important;
  background:#fff!important;
  box-shadow:0 7px 22px rgba(15,55,45,.055)!important;
}
#content .table-responsive > table,
#content .table-wrap > table,
#content .responsive-table-wrap > table,
#content .sa-table-wrap > table,
#content .pd-table-wrap > table,
#content table.med-record-table,
#content table.history-table{
  width:100%!important;
  max-width:100%!important;
  border-collapse:collapse!important;
  border-spacing:0!important;
  margin:0!important;
}
#content .table-responsive > table thead th,
#content .table-wrap > table thead th,
#content .responsive-table-wrap > table thead th,
#content .sa-table-wrap > table thead th,
#content .pd-table-wrap > table thead th,
#content table.med-record-table thead th,
#content table.history-table thead th{
  background:#173b78!important;
  color:#fff!important;
  border:0!important;
  border-bottom:1px solid #102d61!important;
  padding:9px 7px!important;
  font-size:clamp(8px,.58vw,10px)!important;
  font-weight:850!important;
  line-height:1.2!important;
  text-transform:uppercase!important;
  letter-spacing:.015em!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  vertical-align:middle!important;
}
#content .table-responsive > table tbody td,
#content .table-wrap > table tbody td,
#content .responsive-table-wrap > table tbody td,
#content .sa-table-wrap > table tbody td,
#content .pd-table-wrap > table tbody td,
#content table.med-record-table tbody td,
#content table.history-table tbody td{
  background:#fff!important;
  color:#1d2d43!important;
  border:0!important;
  border-bottom:1px solid #e6ece9!important;
  padding:8px 7px!important;
  font-size:clamp(8.5px,.64vw,11px)!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  vertical-align:middle!important;
}
#content .table-responsive > table tbody tr:nth-child(even) td,
#content .table-wrap > table tbody tr:nth-child(even) td,
#content .responsive-table-wrap > table tbody tr:nth-child(even) td,
#content .sa-table-wrap > table tbody tr:nth-child(even) td,
#content .pd-table-wrap > table tbody tr:nth-child(even) td,
#content table.med-record-table tbody tr:nth-child(even) td,
#content table.history-table tbody tr:nth-child(even) td{background:#fbfdfc!important}
#content .table-responsive > table tbody tr:hover td,
#content .table-wrap > table tbody tr:hover td,
#content .responsive-table-wrap > table tbody tr:hover td,
#content .sa-table-wrap > table tbody tr:hover td,
#content .pd-table-wrap > table tbody tr:hover td,
#content table.med-record-table tbody tr:hover td,
#content table.history-table tbody tr:hover td{background:#f1f8f5!important}
#content .table-responsive > table tbody tr:last-child td,
#content .table-wrap > table tbody tr:last-child td,
#content .responsive-table-wrap > table tbody tr:last-child td,
#content .sa-table-wrap > table tbody tr:last-child td,
#content .pd-table-wrap > table tbody tr:last-child td,
#content table.med-record-table tbody tr:last-child td,
#content table.history-table tbody tr:last-child td{border-bottom:0!important}
@media (min-width:901px){
  #content .table-responsive,
  #content .table-wrap,
  #content .responsive-table-wrap,
  #content .sa-table-wrap,
  #content .pd-table-wrap{overflow-x:hidden!important;width:100%!important;max-width:100%!important}
  #content .table-responsive > table,
  #content .table-wrap > table,
  #content .responsive-table-wrap > table,
  #content .sa-table-wrap > table,
  #content .pd-table-wrap > table,
  #content table.med-record-table,
  #content table.history-table{
    min-width:0!important;
    table-layout:fixed!important;
  }
  #content table.med-record-table .med-actions-row{display:flex!important;gap:3px!important;flex-wrap:nowrap!important;white-space:nowrap!important}
  #content table.med-record-table .med-action{padding:4px 6px!important;font-size:8.5px!important;white-space:nowrap!important}
  #content table.med-record-table .med-document-cell{display:flex!important;gap:3px!important;flex-wrap:wrap!important;white-space:normal!important}
}
@media(max-width:900px){
  #content .table-responsive,
  #content .table-wrap,
  #content .responsive-table-wrap,
  #content .sa-table-wrap,
  #content .pd-table-wrap{overflow-x:auto!important}
  #content .table-responsive > table,
  #content .table-wrap > table,
  #content .responsive-table-wrap > table,
  #content .sa-table-wrap > table,
  #content .pd-table-wrap > table{min-width:900px!important}
}
body.dark-mode #content .table-responsive,
body.dark-mode #content .table-wrap,
body.dark-mode #content .responsive-table-wrap,
body.dark-mode #content .sa-table-wrap,
body.dark-mode #content .pd-table-wrap{background:#0f172a!important;border-color:#334155!important}
body.dark-mode #content .table-responsive > table tbody td,
body.dark-mode #content .table-wrap > table tbody td,
body.dark-mode #content .responsive-table-wrap > table tbody td,
body.dark-mode #content .sa-table-wrap > table tbody td,
body.dark-mode #content .pd-table-wrap > table tbody td,
body.dark-mode #content table.med-record-table tbody td,
body.dark-mode #content table.history-table tbody td{background:#0f172a!important;color:#e5e7eb!important;border-bottom-color:#263449!important}

/* V93 — keep every system table readable and visually consistent with Records. */
@media (min-width:901px){
  #content .table-responsive > table:not(.km-v76-record-table),
  #content .table-wrap > table:not(.km-v76-record-table),
  #content .responsive-table-wrap > table:not(.km-v76-record-table),
  #content .sa-table-wrap > table:not(.km-v76-record-table),
  #content .pd-table-wrap > table:not(.km-v76-record-table),
  #content table.med-record-table,
  #content table.history-table{table-layout:fixed!important;font-size:11px!important}

  #content .table-responsive > table:not(.km-v76-record-table) thead th,
  #content .table-wrap > table:not(.km-v76-record-table) thead th,
  #content .responsive-table-wrap > table:not(.km-v76-record-table) thead th,
  #content .sa-table-wrap > table:not(.km-v76-record-table) thead th,
  #content .pd-table-wrap > table:not(.km-v76-record-table) thead th,
  #content table.med-record-table thead th,
  #content table.history-table thead th{
    background:#173b78!important;color:#fff!important;padding:11px 8px!important;
    font-size:10.5px!important;line-height:1.25!important;font-weight:900!important;
  }
  #content .table-responsive > table:not(.km-v76-record-table) tbody td,
  #content .table-wrap > table:not(.km-v76-record-table) tbody td,
  #content .responsive-table-wrap > table:not(.km-v76-record-table) tbody td,
  #content .sa-table-wrap > table:not(.km-v76-record-table) tbody td,
  #content .pd-table-wrap > table:not(.km-v76-record-table) tbody td,
  #content table.med-record-table tbody td,
  #content table.history-table tbody td{
    padding:11px 8px!important;font-size:11px!important;line-height:1.4!important;
    white-space:normal!important;overflow-wrap:anywhere!important;vertical-align:middle!important;
  }
}
