/* Shared profile tables; state colors remain the underlying background. */
body :is(#oldTable table, .farm-table table, .verif-table table, #accountsTable).profile-data-table {
  border-collapse: separate;
  border-spacing: 0;
  --account-active-border: #8ab4f8;
}
body table.profile-data-table > :is(thead, tbody) > tr > :first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 2;
  background-color: var(--row-bg, #171b22);
}
body table.profile-data-table > thead > tr > :first-child { z-index: 4; }
body :is(#oldTable table, .farm-table table, .verif-table table, #accountsTable).profile-data-table > tbody > tr.account-zebra > td {
  background-image: linear-gradient(#ffffff09, #ffffff09) !important;
}
body :is(#oldTable table, .farm-table table, .verif-table table, #accountsTable).profile-data-table > tbody > tr.account-active > td {
  box-shadow: inset 0 2px var(--account-active-border), inset 0 -2px var(--account-active-border) !important;
}
body :is(#oldTable table, .farm-table table, .verif-table table, #accountsTable).profile-data-table > tbody > tr.account-active > td:first-child {
  box-shadow: inset 2px 0 var(--account-active-border), inset 0 2px var(--account-active-border), inset 0 -2px var(--account-active-border) !important;
}
body :is(#oldTable table, .farm-table table, .verif-table table, #accountsTable).profile-data-table > tbody > tr.account-active > td:last-child {
  box-shadow: inset -2px 0 var(--account-active-border), inset 0 2px var(--account-active-border), inset 0 -2px var(--account-active-border) !important;
}
body .verif-table table.profile-data-table th:first-child,
body .verif-table table.profile-data-table td:first-child { width: 1%; min-width: 200px; max-width: 250px; }

/* One vertical viewport keeps column labels and the top scrollbar together. */
body .table-wrap.profile-table-scroll {
  max-height: 65dvh;
  overflow: auto;
}
body table.profile-data-table > thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #20252e;
}
body table.profile-data-table > thead > tr > th {
  position: static;
}
body table.profile-data-table > thead > .profile-scroll-row > td {
  position: sticky !important;
  left: 0 !important;
  height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: #20252e !important;
  overflow: visible !important;
  line-height: 0 !important;
}
.profile-top-scroll {
  position: sticky;
  left: 0;
  height: 18px;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-color: #7c91ae #20252e;
  scrollbar-width: auto;
}
.profile-top-scroll > div { height: 1px; }
.profile-top-scroll::-webkit-scrollbar { height: 14px; }
.profile-top-scroll::-webkit-scrollbar-track { background: #20252e; }
.profile-top-scroll::-webkit-scrollbar-thumb { background: #7c91ae; border: 3px solid #20252e; border-radius: 8px; }
.profile-top-scroll:focus-visible { outline: 2px solid #8ab4f8; outline-offset: -2px; }

/* Size names from their content; leave room for other fields on small screens. */
body table.profile-data-table > thead > tr:first-child > th:first-child,
body table.profile-data-table > tbody > tr:not(.group):not([data-work-divider]) > td:first-child {
  width: var(--profile-name-width, 180px) !important;
  min-width: var(--profile-name-width, 180px) !important;
  max-width: var(--profile-name-width, 180px) !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body table.profile-data-table > thead > tr:first-child > th:first-child { line-height: 1.35; }
body .farm-table table.profile-data-table td:first-child > input[type=checkbox] {
  float: left;
  margin: 9px 6px 0 0;
}
body .farm-table table.profile-data-table td:first-child .profile-name {
  display: block;
  margin-left: 24px;
  padding: 5px 0;
  max-width: calc(100% - 24px);
  white-space: normal;
  overflow-wrap: anywhere;
}
body table.profile-data-table td:first-child .cell-copy {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body .verif-table table.profile-data-table > thead > tr:first-child > th:first-child,
body .verif-table table.profile-data-table > tbody > tr > td:first-child {
  width: 1% !important;
}
