/* Authorization group table only; keep other compact admin tables unchanged. */
.admin-console .table-wrap:has(> table > tbody > tr > td[data-label="授权组名称"]) {
  overflow-x: hidden;
  overflow-y: auto;
  container-type: inline-size;
  container-name: authorization-groups;
  max-height: min(74vh, 960px);
  scrollbar-width: thin;
  scrollbar-color: #aab2bf transparent;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) > table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td) {
  padding: 14px 12px;
  vertical-align: middle;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: anywhere;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) th {
  white-space: normal;
  background: #f3f7ff;
  box-shadow: inset 0 -1px #e6eaf2;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(1) { width: 18%; }
.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(2) { width: 8%; text-align: center; }
.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(3) { width: 44%; }
.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(4) { width: 7%; text-align: center; }
.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(5) { width: 17%; }
.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td):nth-child(6) { width: 6%; text-align: center; }

.admin-console .table-wrap:has(td[data-label="授权组名称"]) tbody tr { height: auto; }

.admin-console .table-wrap:has(td[data-label="授权组名称"]) .table-cell-content {
  max-height: none;
  overflow: visible;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) td:first-child {
  font-weight: 600;
  color: #344054;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(td:nth-child(2), td:nth-child(5)) {
  font-variant-numeric: tabular-nums;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) .model-tags.compact {
  gap: 6px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) .model-tags.compact span {
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-weight: 600;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) .model-tags .muted {
  padding: 0;
  color: #667085;
  border: 0;
  background: transparent;
  font-weight: 400;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(.row-actions, .table-cell-actions) {
  justify-content: center;
}

.admin-console .table-wrap:has(td[data-label="授权组名称"]) tbody tr:hover td {
  background: #f8faff;
}

/* Use the available panel width, including at increased browser zoom. */
@container authorization-groups (max-width: 900px) {
  .admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(th, td) {
    padding-inline: 8px;
  }
}

@container authorization-groups (max-width: 760px) {
  .admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(table, tbody) {
    display: block;
    width: 100%;
  }

  .admin-console .table-wrap:has(td[data-label="授权组名称"]) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .admin-console .table-wrap:has(td[data-label="授权组名称"]) tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #e6eaf2;
  }

  .admin-console .table-wrap:has(td[data-label="授权组名称"]) td:nth-child(n) {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    padding: 6px 12px;
    border: 0;
    text-align: left;
  }

  .admin-console .table-wrap:has(td[data-label="授权组名称"]) td::before {
    content: attr(data-label);
    color: #667085;
    font-weight: 500;
  }

  .admin-console .table-wrap:has(td[data-label="授权组名称"]) :is(.row-actions, .table-cell-actions) {
    justify-content: flex-start;
  }
}

@supports selector(::-webkit-scrollbar) {
  .admin-console .table-wrap:has(td[data-label="授权组名称"]) { scrollbar-width: auto; scrollbar-color: auto; }
  .admin-console .table-wrap:has(td[data-label="授权组名称"])::-webkit-scrollbar { width: 6px; height: 6px; }
  .admin-console .table-wrap:has(td[data-label="授权组名称"])::-webkit-scrollbar-track { background: transparent; }
  .admin-console .table-wrap:has(td[data-label="授权组名称"])::-webkit-scrollbar-thumb { background: #aab2bf; border-radius: 6px; }
  .admin-console .table-wrap:has(td[data-label="授权组名称"])::-webkit-scrollbar-thumb:hover { background: #7f8998; }
  .admin-console .table-wrap:has(td[data-label="授权组名称"])::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}
