/* +----------------------------------------------------------------------
/* | Static Plugin for ThinkAdmin
/* +----------------------------------------------------------------------
/* | 官方网站: https://thinkadmin.top
/* +----------------------------------------------------------------------
/* | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
/* +----------------------------------------------------------------------
/* | 开源协议 ( https://mit-license.org )
/* | 免责声明 ( https://thinkadmin.top/disclaimer )
/* +----------------------------------------------------------------------
/* | gitee 代码仓库：https://gitee.com/zoujingli/think-plugs-static
/* | github 代码仓库：https://github.com/zoujingli/think-plugs-static
/* +----------------------------------------------------------------------
/* | 自定义后台扩展样式，需要在加载 console.css 后载入
/* | 使用 composer require zoujingli/think-plugs-static 时不会更新此文件
/* +---------------------------------------------------------------------- */
/* 0527添加*/
/* ===== 页面标签 Tab 条 ===== */
#page-tabs-bar {
    position: fixed;
    top: 55px;
    left: 200px;
    right: 0;
    height: 36px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    z-index: 10;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
#page-tabs-bar::-webkit-scrollbar { height: 3px; }
#page-tabs-bar::-webkit-scrollbar-thumb { background: #ccc; }

.tabs-nav {
    list-style: none;
    margin: 0;
    padding: 5px 6px 0;
    display: inline-flex;
    height: 100%;
    box-sizing: border-box;
}
.tabs-nav li {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    margin-right: 3px;
    background: #e8e8e8;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    max-width: 160px;
    height: 100%;
    box-sizing: border-box;
    user-select: none;
    transition: color .15s, background .15s;
}
.tabs-nav li:hover { color: #1e9fff; background: #f0f0f0; }
.tabs-nav li.tab-active { background: #fff; color: #1e9fff; }

.tab-title {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tab-close {
    margin-left: 7px;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    font-style: normal;
    color: #bbb;
    flex-shrink: 0;
}
.tab-close:hover { background: #ccc; color: #e00; }

/* 侧边栏 mini 时 Tab 条左移 */
.layui-layout-left-mini #page-tabs-bar { left: 55px; }
/* 侧边栏隐藏时 Tab 条左移 */
.layui-layout-left-hide #page-tabs-bar { left: 0; }

/* Body 整体下移 36px，腾出 Tab 条位置 */
.layui-layout-admin > .layui-body {
    top: 91px !important;
}
/* 每页固定在顶部的 Card 标题栏也需要下移 */
.layui-layout-admin .layui-body > .think-page-body > .layui-card > .layui-card-header {
    top: 91px !important;
}
/* 0527结束*/
/* ========== 全局基础重置 ========== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* ========== 外层容器 flex 化 ========== */
.layui-body > .think-page-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;          /* 防止 flex 溢出 */
}

.layui-body .layui-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.layui-body .layui-tab-content {
  flex: 1;
  display: flex;          /* 改为 flex，便于内部卡片撑开 */
  flex-direction: column;
  min-height: 0;
  overflow: auto;         /* 允许整体滚动（可选） */
  padding: 15px;
}

/* ========== 卡片区域占满且可伸缩 ========== */
.layui-tab-content .layui-card {
  display: flex;
  flex-direction: column;
  flex: 1;                /* 卡片填满剩余高度 */
  min-height: 0;
  margin-bottom: 0;
}

.layui-card > .layui-card-header {
  flex-shrink: 0;         /* 表头固定高度 */
}

.layui-card > .layui-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 15px;
}

/* ========== 表格容器（包裹表格的区域） ========== */
.layui-card-body > .layui-card-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ========== layui 表格视图容器 ========== */
.layui-card-table > .layui-table-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: none;           /* 去除边框，可选 */
}

/* ========== 表格盒子（包含表头和表体） ========== */
.layui-table-view > .layui-table-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ========== 表头固定 ========== */
.layui-table-box > .layui-table-header {
  flex-shrink: 0;
}

/* ========== 表体核心样式（高度自适应 + 滚动） ========== */
.layui-table-box > .layui-table-body {
  flex: 1 1 auto;                 /* 允许伸缩，自动分配剩余空间 */
  min-height: 0;                  /* 允许收缩 */
  height: 100% !important;        /* 覆盖 layui 可能设置的固定高度，确保由 flex 分配 */
  max-height: none !important;    /* 移除任何最大高度限制 */
  overflow-y: auto !important;    /* 强制纵向滚动 */
  overflow-x: auto !important;    /* 强制横向滚动 */
}

/* ========== 确保内部表格宽度由内容撑开（实现横向滚动） ========== */
.layui-table-body table {
  width: max-content !important;  /* 让表格宽度由内容决定，突破父容器限制 */
  min-width: 100%;                /* 至少和父容器等宽，避免列数少时空白 */
}

/* ========== 分页条等底部元素固定高度 ========== */
.layui-table-view > .layui-table-total,
.layui-table-view > .layui-table-page {
  flex-shrink: 0;
}

/* ========== 可选：表格内操作栏等布局微调 ========== */
.layui-table-body .layui-table-cell {
  white-space: nowrap;    /* 禁止换行，确保列宽稳定 */
}