/* 主功能页的列表占满当前浏览器可用高度；表头、数据区和分页保持各自独立。 */
.admin-viewport-list {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: var(--admin-list-viewport-height, 520px);
  min-height: 280px;
  overflow: hidden;
}

.admin-viewport-list > :not(table):not(.layui-table-view) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.admin-viewport-list .layui-table-view {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100% !important;
  min-height: 0;
  margin: 0;
}

.admin-viewport-list .layui-table-box {
  flex: 1 1 auto;
  min-height: 0;
}

.admin-viewport-list .layui-table-box > .layui-table-main {
  height: calc(100% - var(--admin-list-head-height, 42px)) !important;
  min-height: 0;
  max-height: none !important;
  overflow: auto !important;
}

.admin-viewport-list .layui-table-page,
.admin-viewport-list .admin-managed-pager {
  box-sizing: border-box;
  flex: 0 0 var(--admin-list-pager-height, 58px);
  margin-top: 0;
}

.admin-viewport-list .admin-managed-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

@media (max-width: 700px) {
  .admin-viewport-list { min-height: 320px; }
}

/* 操作列始终贴在表格可视区右侧，避免横向滚到末尾才能点按钮。 */
.layui-table-view .layui-table th.admin-sticky-action,
.layui-table-view .layui-table td.admin-sticky-action,
.admin-managed-list th.admin-sticky-action,
.admin-managed-list td.admin-sticky-action {
  position: sticky;
  right: 0;
  z-index: 5;
  background: #fff;
  box-shadow: -6px 0 8px -6px rgba(20, 46, 78, 0.18);
}

.layui-table-header .layui-table th.admin-sticky-action,
.admin-managed-list thead th.admin-sticky-action {
  z-index: 6;
  background: #fafafa;
}

.layui-table-main tr:nth-child(even) td.admin-sticky-action,
.admin-managed-list tbody tr:nth-child(even) td.admin-sticky-action {
  background: #fbfdff;
}

.layui-table-main tr:hover td.admin-sticky-action,
.admin-managed-list tbody tr:hover td.admin-sticky-action {
  background: #eef7ff;
}

.layui-table-view .layui-table th.admin-sticky-action .layui-table-cell,
.layui-table-view .layui-table td.admin-sticky-action .layui-table-cell {
  overflow: visible;
}
