/**
 * 表格层：自 admin-theme 抽离，行为与级联与迁移前 admin-theme 内嵌片段一致。
 * 须紧跟 admin-theme 之后、portal 之前加载（见 platform_layout.html）。
 */

/* Global platform table baseline: Tabler dark tables, low-noise separators. */
.table-platform,
.page .table,
.app-table-card .table,
.table-scfi,
.analytics-table {
  --tblr-table-bg: var(--color-table-bg);
  --tblr-table-accent-bg: transparent;
  --tblr-table-striped-bg: transparent;
  --tblr-table-hover-bg: var(--color-table-row-hover);
  --tblr-table-border-color: var(--color-table-border);
  width: 100%;
  margin-bottom: 0;
  color: var(--color-text-primary);
  background: var(--color-table-bg);
  border-color: var(--color-table-border);
  border-collapse: collapse;
}

.table-platform thead th,
.page .table thead th {
  padding: var(--density-table-cell-y) var(--density-table-cell-x);
  font-size: var(--font-label);
  font-weight: var(--font-weight-label);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: var(--color-text-secondary);
  background: var(--color-table-head-bg);
  border-color: var(--color-table-border-strong);
  border-bottom-width: 1px;
  vertical-align: middle;
}

.table-platform tbody tr,
.page .table tbody tr {
  transition: var(--transition-hover-fast);
}

.table-platform tbody tr > *,
.page .table tbody tr > * {
  border-color: var(--color-table-border);
  background-color: var(--color-table-row-base);
}

.table-platform tbody td,
.page .table tbody td {
  min-height: var(--density-table-row-height);
  padding: var(--density-table-cell-y) var(--density-table-cell-x);
  font-size: var(--font-toolbar);
  line-height: var(--line-height-caption);
  vertical-align: middle;
}

.table-platform.table-hover tbody tr:hover > *,
.page .table-hover tbody tr:hover > *,
.table-interactive tbody tr:hover > *,
.clickable-row:hover > *,
.news-flash-row:hover > *,
.news-reports-row:hover > * {
  --tblr-table-accent-bg: var(--color-table-row-hover);
  background-color: var(--color-table-row-hover);
}

.table-vcenter td,
.table-vcenter th {
  vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.table-striped > tbody > tr:nth-of-type(even) > * {
  --tblr-table-accent-bg: var(--color-table-row-base);
  background-color: var(--color-table-row-base);
}

.table-scfi-wrap {
  overflow-x: auto;
}

.table-scfi-card .btn-outline-success {
  color: var(--color-success);
  border-color: var(--color-border-success-strong);
  background: var(--color-surface-default);
}

.table-scfi-card .btn-outline-success:hover,
.table-scfi-card .btn-outline-success:focus-visible,
.table-scfi-card .btn-outline-success:active,
.table-scfi-card .btn-outline-success.active {
  color: var(--color-text-inverse);
  background: var(--color-success);
  border-color: var(--color-success);
  box-shadow: none;
}

.table-scfi-card .btn-outline-success:focus-visible {
  box-shadow: var(--shadow-focus-success-sm);
}

.table-scfi {
  min-width: 980px;
  background: transparent;
}

.table-scfi.table-scfi--wide {
  min-width: 1280px;
}

.table-scfi th,
.table-scfi td {
  white-space: nowrap;
  border-color: var(--color-table-border);
}

.table-scfi tbody td {
  color: var(--color-text-primary);
}

.table-scfi thead th {
  background: var(--color-table-head-bg);
}

.table-scfi-value {
  color: var(--color-text-primary);
}

.table-scfi-sub {
  font-size: 12px;
  margin-top: 2px;
  vertical-align: top;
}

.table-scfi-compare {
  font-size: 12px;
  vertical-align: top;
}

.table-scfi-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table-scfi-stack__line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.table-scfi-stack__label {
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.app-table-card {
  overflow: hidden;
}

.app-table-responsive {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.app-table-card .app-table-mobile {
  display: none;
}

.app-table-card .table thead th {
  padding-top: var(--density-table-cell-y);
  padding-bottom: var(--density-table-cell-y);
  font-size: var(--font-label);
  font-weight: var(--font-weight-label);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  vertical-align: middle;
}

.app-table-card .table tbody td {
  padding-top: var(--density-table-cell-y);
  padding-bottom: var(--density-table-cell-y);
  vertical-align: middle;
}

.app-table-card .table-hover tbody tr:hover > * {
  --tblr-table-accent-bg: var(--color-table-row-hover);
  background-color: var(--color-table-row-hover);
}

.app-table-card .table-hover.table-interactive tbody tr:hover > * {
  --tblr-table-accent-bg: var(--color-table-row-hover);
  background-color: var(--color-table-row-hover);
  box-shadow: none;
}

.app-table-card .table-vcenter td,
.app-table-card .table-vcenter th {
  vertical-align: middle;
}

.app-table-text-muted {
  color: var(--tblr-secondary);
}

.table-cell-max-10 {
  max-width: 10rem;
}

.table-cell-max-14 {
  max-width: 14rem;
}

.table .col-actions {
  text-align: center;
  vertical-align: middle;
}

.table:not(.table-scfi) td:last-child,
.table:not(.table-scfi) th:last-child {
  text-align: center;
}

.app-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
}

.app-pagination-left,
.app-pagination-center,
.app-pagination-right {
  display: flex;
  align-items: center;
}

.app-pagination-center {
  flex: 1;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.app-pagination-left,
.app-pagination-right {
  flex-shrink: 0;
}

.intel-pagination .pagination {
  margin-bottom: 0;
}

.app-pagination-center .pagination {
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.intel-pagination .page-item.disabled .page-link {
  pointer-events: none;
  opacity: 0.45;
}

.intel-pagination .page-link {
  min-width: 2.25rem;
  text-align: center;
}

.pagination .page-link {
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
}

.pagination .page-link:hover {
  color: var(--color-text-primary);
  background-color: var(--color-surface-hover);
  border-color: var(--color-border-default);
}

.pagination .page-item.active .page-link {
  color: var(--color-text-inverse);
  background-color: var(--color-success);
  border-color: var(--color-success);
}

.pagination .page-link:focus {
  box-shadow: var(--shadow-focus-success);
}

.intel-pagination .intel-pagination-nav {
  flex: 1;
}

.intel-pagination .intel-pagination-goto {
  flex-shrink: 0;
  gap: 8px;
}

.intel-pagination .intel-pagination-input {
  width: 60px;
}

.jump-input {
  height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-control);
}

.app-pagination-right input {
  width: 60px;
  height: 38px;
}

.app-pagination-right .btn {
  height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .app-pagination-left {
    font-size: 12px;
  }

  .app-pagination-center .pagination {
    gap: 4px;
  }

  .app-pagination-right input {
    width: 50px;
  }
}

@media (max-width: 767.98px) {
  .app-table-card .app-table-responsive {
    display: none;
  }

  .app-table-card .app-table-mobile {
    display: block;
  }
}

/* 使用分析排名表：局部链接样式（暗色主题白字，不修改全局 a） */
.table-user-name--link {
  color: var(--color-text-primary);
  text-decoration: none;
}

.table-user-name--link:hover,
.table-user-name--link:focus-visible {
  color: var(--color-text-primary);
  text-decoration: none;
}

.table-page-path--link {
  color: var(--color-text-primary);
  text-decoration: none;
}

.table-page-path--link:hover,
.table-page-path--link:focus-visible {
  color: var(--color-text-primary);
  text-decoration: none;
}

