/*css 初始化 */
html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img {
    margin: 0;
    padding: 0;
}

/*将标签原有的默认内外边距去掉*/

fieldset, img, input, button {
    border: none; /*去掉边框*/
    padding: 0;
    margin: 0;
    outline-style: none; /*去掉环绕边框*/
}

ul, ol {
    list-style: none; /*去掉原样式中的小黑点*/
    /*ctrl+alt+l*/
}

input {
    padding-top: 0;
    padding-bottom: 0;

}

select, input {
    vertical-align: middle; /*输入字居中显示*/
}

select, input, textarea {
    font-size: 14px;
    margin: 0;
}

/**/
textarea {
    resize: none; /*防止拖动*/
}

img {
    border: 0;
    vertical-align: middle; /*  去掉图片底部默认的3像素空白缝隙*/
}

table {
    border-collapse: collapse; /*合并外边线*/
}

body {
    font-family:  Microsoft YaHei, Arial, "\5b8b\4f53";
}

.clearfix:before, .clearfix:after {
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1; /*IE/7/6*/
    /*兼容IE6下的写法*/
}

h1, h2, h3, h4, h5, h6 {
    text-decoration: none; /**/
    font-weight: normal; /*不加粗*/
    font-size: 100%;
}
a{
    text-decoration: none;
}
s, i, em {
    /*一般起装饰作用*/
    font-style: normal; /*将字体变成正常字体*/
    text-decoration: none; /*去掉中划线*/
}
.fl{
    float: left;
}
.fr{
    float: right;
}

/* ==================== TreeSidebar 通用树形侧边栏组件 ==================== */
.tree-sidebar {
    padding: 10px 0;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.tree-sidebar .list-group {
    margin: 0;
    border-radius: 0;
}
.tree-sidebar .list-group-item {
    padding: 0;
    border: none;
    background: transparent;
    position: relative;
}

/* 节点行 */
.tree-sidebar .tree-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px 9px 18px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    border-radius: 0 10px 10px 0;
    margin: 3px 10px 3px 0;
    font-size: 13.5px;
    color: #475569;
    position: relative;
}
.tree-sidebar .tree-node:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    box-shadow: inset 2px 0 0 0 #cbd5e1;
}

/* 选中态：左侧竖条 + 浅蓝背景 */
.tree-sidebar .tree-node.active {
    background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    font-weight: 600;
    box-shadow: inset 3px 0 0 0 #3b82f6, 0 1px 2px rgba(59, 130, 246, 0.08);
}
.tree-sidebar .tree-node.top-level.active {
    color: #1d4ed8;
}
.tree-sidebar .tree-node.active:hover {
    background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
    box-shadow: inset 3px 0 0 0 #2563eb, 0 2px 4px rgba(37, 99, 235, 0.1);
}
.tree-sidebar .tree-node.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.35);
}

/* 标签区域 */
.tree-sidebar .tree-label {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    pointer-events: auto;
}

/* 全部节点特殊样式 */
.tree-sidebar .tree-all-label {
    font-weight: 600;
    color: #334155;
}
.tree-sidebar .tree-node.active .tree-all-label {
    color: #1d4ed8;
}

/* 图标 */
.tree-sidebar .tree-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 20px;
    height: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 5px;
}
.tree-sidebar .tree-icon i {
    font-size: 15px;
    line-height: 1;
}
/* 打开文件夹 — 琥珀色 */
.tree-sidebar .tree-icon .tree-icon-folder {
    color: #f59e0b;
}
/* 闭合文件夹 — 石板灰 */
.tree-sidebar .tree-icon .tree-icon-folder-closed {
    color: #94a3b8;
}
/* 选中态图标颜色加深 */
.tree-sidebar .tree-node.active .tree-icon .tree-icon-folder,
.tree-sidebar .tree-node.active .tree-icon .tree-icon-folder-closed {
    opacity: 1;
}
.tree-sidebar .tree-node.active .tree-icon .tree-icon-folder {
    color: #d97706;
}
.tree-sidebar .tree-node.active .tree-icon .tree-icon-folder-closed {
    color: #64748b;
}
/* hover 时图标微动 */
.tree-sidebar .tree-node:hover .tree-icon {
    transform: scale(1.1) rotate(-2deg);
}

/* 前缀 └ ├ — 拐角字符，等宽字体 */
.tree-sidebar .tree-prefix {
    color: #cbd5e1;
    font-size: 12px;
    font-family: "SF Mono", Monaco, "Consolas", monospace;
    flex-shrink: 0;
    user-select: none;
    line-height: 1;
}
/* 连接横线 ─ */
.tree-sidebar .tree-line {
    color: #cbd5e1;
    font-size: 12px;
    font-family: "SF Mono", Monaco, "Consolas", monospace;
    flex-shrink: 0;
    user-select: none;
    margin-right: 4px;
    line-height: 1;
}
/* 树节点选中态 — 拐角和连线随背景变亮 */
.tree-sidebar .tree-node.active .tree-prefix,
.tree-sidebar .tree-node.active .tree-line {
    color: #93bbfd;
}

/* 分隔线 */
.tree-sidebar .tree-divider {
    height: 1px;
    margin: 8px 16px;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

/* ===== 竖直连接线 ===== */
/* 子节点容器 */
.tree-sidebar .tree-child-item {
    position: relative;
}
/* 竖线：从上一个同级节点延伸到当前节点 */
.tree-sidebar .tree-child-item::before {
    content: '';
    position: absolute;
    left: calc(var(--tree-line-x, 20px) - 1px);
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #e2e8f0;
}
/* 最后一个子节点 — 竖线只到节点中部 */
.tree-sidebar .tree-child-item.tree-child-last::before {
    height: 50%;
    bottom: auto;
}
/* 选中态竖线 */
.tree-sidebar .tree-child-item:has(.tree-node.active)::before {
    background: #93c5fd;
}

/* 操作按钮 */
.tree-sidebar .tree-actions {
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
    display: flex;
    gap: 5px;
}
@media (hover: hover) {
    .tree-sidebar .tree-actions {
        opacity: 0;
        transform: translateX(4px);
    }
    .tree-sidebar .tree-node:hover .tree-actions {
        opacity: 1;
        transform: translateX(0);
    }
}
.tree-sidebar .tree-actions button {
    padding: 4px 7px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.15s ease;
    cursor: pointer;
    min-width: 26px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.tree-sidebar .tree-actions button:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.14);
}

/* 空状态 */
.tree-sidebar .tree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}
.tree-sidebar .tree-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: #cbd5e1;
}
.tree-sidebar .tree-actions button:active {
    transform: translateY(0);
    box-shadow: none;
}
.tree-sidebar .tree-node.active .tree-actions button {
    background: rgba(255, 255, 255, 0.5);
    border-color: #bfdbfe;
    color: #3b82f6;
}
.tree-sidebar .tree-node.active .tree-actions button:hover {
    background-color: #fff;
    border-color: #60a5fa;
    color: #1e40af;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
}

.modal-form-aligned .form-group .col-sm-10 > .form-control {
    width: calc(100% - 38px);
}
.modal-form-aligned .form-group .col-sm-10 > .input-group {
    width: 100%;
}

/* ==================== 页面标题与面包屑 ==================== */
.page-header {
    padding: 18px 24px 14px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 16px;
}
.page-header .page-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
}
.page-header .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
}
.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: #cbd5e1;
}
.page-header .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}
.page-header .breadcrumb-item a:hover {
    color: #0d9488;
}
.page-header .breadcrumb-item.active {
    color: #94a3b8;
}

/* ==================== 顶部导航栏中的标题与面包屑 ==================== */
.lyear-layout-header .navbar {
    position: relative;
}
.navbar-center {
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: calc(100% - 420px);
    text-align: left;
    pointer-events: none;
}
.navbar-center .page-title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.navbar-center .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.4;
}
.navbar-center .breadcrumb-item + .breadcrumb-item::before {
    color: #cbd5e1;
    font-size: 11px;
}
.navbar-center .breadcrumb-item.active {
    color: #94a3b8;
}
.navbar-center .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    pointer-events: auto;
}
.navbar-center .breadcrumb-item a:hover {
    color: #2563eb;
}

/* 小窗口下隐藏顶部导航栏中的面包屑，仅保留页面标题 */
@media (max-width: 768px) {
    .navbar-center .breadcrumb {
        display: none !important;
    }
}

/* ==================== 字段编辑按钮 / 修改标记（多页面共用） ==================== */
.field-edit-btn {
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s;
}

.field-edit-btn:hover {
    background-color: #e2e8f0;
}

.field-edit-btn.active {
    color: #2563eb;
    background-color: #eff6ff;
}

.field-modified .form-control {
    border-color: #f59e0b;
    background-color: #fffbeb;
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.15);
}

/* 全部账户 */
.tree-sidebar .tree-all-label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

/* 顶级分类 */
.tree-sidebar .tree-node.top-level {
    font-weight: 500;
    font-size: 13.5px;
    color: #334155;
    margin-top: 2px;
}

/* 分隔线 */
.tree-sidebar .tree-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
    margin: 6px 16px;
    border: none;
}

/* 滚动条美化 */
.tree-sidebar::-webkit-scrollbar {
    width: 5px;
}
.tree-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.tree-sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}
.tree-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* 空状态 */
.tree-sidebar .tree-empty {
    padding: 32px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.tree-sidebar .tree-empty-icon {
    font-size: 26px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.5;
    color: #a8b8c8;
}
.tree-sidebar .tree-empty-icon i {
    font-size: inherit;
}

/* =================================================================
 * 左侧导航菜单样式优化
 * 在 LightYear 框架基础上提升菜单的视觉层次、交互反馈与现代感
 * 主色调采用 teal(青绿) 系，与框架 #33cabb 保持一致
 * 说明：框架菜单展开使用 jQuery slideToggle，此处不覆盖
 *       display/height，仅优化视觉层，避免动画冲突
 * ================================================================= */

/* 侧边栏：更柔和、扩散的阴影 */
.lyear-layout-sidebar {
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.06);
}

/* Logo 区域底部分隔线 */
.sidebar-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.sidebar-header a img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.sidebar-header a:hover img {
    opacity: 0.85;
}

/* 一级菜单项：右侧圆角 + 左右留白 + 过渡（结构样式，兼容各主题） */
.nav-drawer > li > a {
    margin: 2px 10px 2px 8px;
    padding: 11px 16px 11px 50px;
    border-right: none;
    border-radius: 0 10px 10px 0;
    transition: background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.22s ease, padding-left 0.22s ease;
}

/* 菜单图标：垂直居中 + 透明度过渡 */
.nav-drawer > li > a > i {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.22s ease, color 0.22s ease;
    opacity: 0.75;
}

/* 展开/收起箭头：垂直居中 + 旋转过渡 */
.nav-item-has-subnav > a:after {
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
.nav-item-has-subnav.open > a:after {
    transform: translateY(-50%) rotate(90deg);
}

/* 子菜单容器：紧凑间距（不触碰 display/height，保持框架 slideToggle 动画） */
.nav-subnav {
    margin: 4px 0;
}

/* 子菜单项：圆角 + 留白 + 过渡 */
.nav-drawer .nav-subnav li a {
    padding: 9px 16px 9px 50px;
    font-size: 13px;
    font-weight: 400;
    border-radius: 0 8px 8px 0;
    margin: 1px 10px 1px 8px;
    transition: all 0.18s ease;
}

/* ---- 以下颜色样式仅默认(浅色)主题生效，不影响 dark / 半透明 / 彩色侧边栏主题 ---- */
/* 一级菜单项 hover */
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer > li > a:hover {
    background-color: #f1f5f9;
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer > li > a:hover > i {
    opacity: 1;
}

/* 一级菜单项 active：左侧渐变指示条 + 浅青绿背景
   注：框架 .nav-drawer > li.active > a 的 background-color 带 !important，
   故此处需用 !important 且选择器优先级更高方可覆盖 */
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer > li.active > a {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.14) 0%, rgba(45, 212, 191, 0.02) 100%) !important;
    color: #0d9488 !important;
    font-weight: 600;
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer > li.active > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: linear-gradient(180deg, #2dd4bf, #14b8a6);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.35);
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer > li.active > a > i {
    opacity: 1;
    color: #0d9488;
}

/* 子菜单项 hover / active */
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer .nav-subnav > li > a:hover {
    background-color: #f1f5f9;
    color: #0d9488;
    padding-left: 56px;
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .nav-drawer .nav-subnav > li.active > a {
    color: #0d9488;
    font-weight: 600;
    background-color: rgba(45, 212, 191, 0.08);
}

/* 侧边栏滚动条美化 */
.lyear-layout-sidebar-info::-webkit-scrollbar,
.lyear-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.lyear-layout-sidebar-info::-webkit-scrollbar-track,
.lyear-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.lyear-layout-sidebar-info::-webkit-scrollbar-thumb,
.lyear-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
}
.lyear-layout-sidebar-info::-webkit-scrollbar-thumb:hover,
.lyear-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 116, 139, 0.6);
}

/* 底部版权区域 */
.sidebar-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .sidebar-footer .copyright,
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .sidebar-footer .copyright a {
    color: #94a3b8;
    transition: color 0.2s ease;
}
html:not([data-theme='dark']):not([data-theme='translucent']):not([data-sidebarbg*='color_']) .sidebar-footer .copyright a:hover {
    color: #0d9488;
}

/* =================================================================
 * 统计表格层级样式 — 独立类 .statis-table，CSS class 驱动
 * ================================================================= */
.statis-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;   /* 不用 collapse，确保 tr 背景穿透 td */
    border-spacing: 0;
}
.statis-table th,
.statis-table td {
    padding: 6px 10px;
    vertical-align: middle;
    text-align: center;
    border-top: none;
    border-bottom: 1px solid #e9ecef;
}

/* ===== 行背景（tr 级别） ===== */
.statis-table tr.st-row-c0    { background-color: #e3f2fd; }  /* 第1级父分类-深蓝 */
.statis-table tr.st-row-c1    { background-color: #eef3fa; }  /* 第2级子分类-浅蓝 */
.statis-table tr.st-row-c2,
.statis-table tr.st-row-c3    { background-color: #f5f7fa; }  /* 第3级+子分类-极浅 */
.statis-table tr.st-row-total { background-color: #e8f5e9; }  /* 总账户-绿 */
.statis-table tr.st-row-acct  { background-color: #fff;    }  /* 账户行-白 */

/* ===== 名称列（第一列 td）—— 显式背景色继承 tr，避免 collapse 遮挡问题 ===== */
.statis-table td.st-name-c0,
.statis-table td.st-name-c1,
.statis-table td.st-name-c2,
.statis-table td.st-name-c3,
.statis-table td.st-name-total,
.statis-table td.st-name-acct {
    text-align: left !important;  /* 名称列始终左对齐 */
    overflow: visible;            /* 不截断 ├─ 前缀 */
    white-space: nowrap;
}

/* 第1级父分类名称 */
.statis-table td.st-name-c0 {
    background-color: #e3f2fd;
    font-weight: bold; font-size: 14px; color: #1565c0;
    border-left: 4px solid #2196f3; padding-left: 8px;
}
/* 第2级子分类名称 */
.statis-table td.st-name-c1 {
    background-color: #eef3fa;
    font-weight: bold; font-size: 13px; color: #546e7a;
    border-left: 3px solid #90caf9; padding-left: 20px;
}
/* 第3级子分类名称 */
.statis-table td.st-name-c2 {
    background-color: #f5f7fa;
    font-weight: bold; font-size: 12.5px; color: #78909c;
    border-left: 2px solid #b0bec5; padding-left: 36px;
}
/* 第4级+子分类名称 */
.statis-table td.st-name-c3 {
    background-color: #f5f7fa;
    font-weight: bold; font-size: 12.5px; color: #78909c;
    border-left: 2px solid #b0bec5; padding-left: 52px;
}
/* 总账户名称 */
.statis-table td.st-name-total {
    background-color: #e8f5e9;
    font-weight: bold; font-size: 14px; color: #2e7d32;
    border-left: 4px solid #4caf50; padding-left: 8px;
}
/* 账户名称：动态缩进通过 --indent 变量控制 */
.statis-table td.st-name-acct {
    background-color: #fff;
    font-weight: normal; font-size: 14px; color: #333;
    border-left: 2px solid #bdbdbd;
    padding-left: var(--indent, 20px);
}

/* ===== 数值列 td/th ===== */
.statis-table td.st-val-c0,
.statis-table th.st-th-c0    { background-color: #e3f2fd; }
.statis-table td.st-val-c1,
.statis-table th.st-th-c1    { background-color: #eef3fa; }
.statis-table td.st-val-c2,
.statis-table td.st-val-c3,
.statis-table th.st-th-c2,
.statis-table th.st-th-c3    { background-color: #f5f7fa; }
.statis-table td.st-val-total,
.statis-table th.st-th-total { background-color: #e8f5e9; }
.statis-table td.st-val-acct,
.statis-table th.st-th-acct  { background-color: #fff; }

/* ===== 列头（vd=2）装饰 ===== */
.statis-table th.st-th-c0 {
    border-bottom: 3px solid #2196f3; font-weight: bold; font-size: 14px; color: #1565c0;
}
.statis-table th.st-th-c1 {
    border-bottom: 2px solid #90caf9; font-weight: bold; font-size: 13px; color: #546e7a;
}
.statis-table th.st-th-c2,
.statis-table th.st-th-c3 {
    border-bottom: 1px solid #b0bec5; font-weight: bold; font-size: 12px; color: #78909c;
}
.statis-table th.st-th-total {
    border-bottom: 3px solid #4caf50; font-weight: bold; font-size: 14px; color: #2e7d32;
}
.statis-table th.st-th-acct {
    border-bottom: 1px solid #bdbdbd; font-weight: normal; color: #333;
}

/* ===== hover 效果 ===== */
.statis-table tbody tr:hover {
    filter: brightness(0.96);
}
/* 表头不动效 */
.statis-table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background-color: #f8f9fa;
}

/* 日期范围选择组件手机端适配 */
@media (max-width: 576px) {
    /* 面板固定为单面板宽度并水平居中，避免超出屏幕 */
    .layui-laydate-range {
        width: 300px !important;
        max-width: 300px !important;
        left: 50% !important;
        right: auto !important;
        margin-left: -150px !important;
        margin-right: 0 !important;
    }
    .layui-laydate-range .layui-laydate-main {
        display: block !important;
        margin: 0 auto !important;
    }
    /* 隐藏结束日期面板，只保留一个日历 */
    .layui-laydate-range .laydate-main-list-1 {
        display: none !important;
    }
    /* 恢复被 laydate 范围模式隐藏的"下月/下年"前进箭头 */
    .layui-laydate-range .laydate-main-list-0 .laydate-next-m,
    .layui-laydate-range .laydate-main-list-0 .laydate-next-y {
        display: inline-block !important;
    }
}

/* 日期范围输入框在小屏幕上占满一行 */
@media (max-width: 576px) {
    .form-inline .input-group,
    .form-inline .input-group .form-control {
        width: 100% !important;
        min-width: 0 !important;
    }
    .form-inline .btn,
    .form-inline .btn-group {
        width: 100% !important;
        margin-top: 0.5rem;
    }
    .form-inline .btn-group .btn {
        width: 50% !important;
        margin-top: 0;
    }
}

/* =================================================================
 * 通用表格组件样式 — genTable 配套
 * 与 LightYear 主题保持协调，主色 teal(#0d9488)
 * ================================================================= */

/* 工具栏 */
.gen-table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.gen-table-toolbar .btn-column-settings {
    padding: 5px 12px;
    font-size: 13px;
    color: #64748b;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.gen-table-toolbar .btn-column-settings:hover,
.gen-table-toolbar .btn-column-settings:focus,
.gen-table-toolbar.show .btn-column-settings {
    color: #0d9488;
    border-color: #99f6e4;
    background-color: #f0fdfa;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.12);
}
.gen-table-toolbar .btn-column-settings i {
    margin-right: 5px;
    font-size: 15px;
    vertical-align: middle;
}

/* 列设置下拉菜单 */
.gen-table-column-menu {
    padding: 8px 0;
    min-width: 170px;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.gen-table-column-menu label {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: background-color 0.12s ease;
    white-space: nowrap;
}
.gen-table-column-menu label:hover {
    background-color: #f0fdfa;
    color: #0f766e;
}
.gen-table-column-menu .gen-table-column-toggle {
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* 基础表格：行间距与分割线 */
.gen-table {
    width: 100%;
    font-size: 13px;
    color: #334155;
    margin-bottom: 0;
    border-collapse: collapse;
}
.gen-table thead th {
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}
.gen-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    background-color: #fff;
    transition: background-color 0.12s ease;
}
.gen-table tbody tr {
    background-color: #fff;
    transition: background-color 0.12s ease;
}
.gen-table tbody tr:hover {
    background-color: #f8fafc;
}
.gen-table-row-selected:hover {
    background-color: #e6f9f6 !important;
}

/* 选择列：表头/单元格居中 */
.gen-table-selection-header,
.gen-table-selection-cell {
    text-align: center !important;
    vertical-align: middle !important;
    width: 40px;
}
.gen-table-selection-header input[type="checkbox"],
.gen-table-selection-cell input[type="checkbox"],
.gen-table-selection-cell input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0d9488;
    margin: 0;
}

/* 选中行高亮 */
.gen-table-row-selected {
    background-color: #f0fdfa !important;
}
.gen-table-row-selected > td {
    border-top: 1px solid #ccfbf1;
    border-bottom: 1px solid #ccfbf1;
}

/* 展开按钮 */
.gen-table-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    color: #64748b;
    background-color: #f1f5f9;
    border-radius: 5px;
    transition: all 0.15s ease;
    vertical-align: middle;
}
.gen-table-expand-btn:hover {
    color: #0d9488;
    background-color: #ccfbf1;
    text-decoration: none;
}
.gen-table-expand-btn i {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* 空状态 */
.gen-table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    color: #94a3b8;
}
.gen-table-empty .gen-table-empty-icon {
    font-size: 52px;
    margin-bottom: 14px;
    color: #cbd5e1;
}
.gen-table-empty .gen-table-empty-text {
    font-size: 14px;
    color: #64748b;
}

/* loading 遮罩 */
.gen-table-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(1px);
}
.gen-table-loading .gen-table-loading-inner {
    text-align: center;
    color: #64748b;
    padding: 20px 26px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.gen-table-loading .gen-table-loading-inner i {
    font-size: 30px;
    color: #0d9488;
    display: block;
    margin-bottom: 8px;
}
.gen-table-loading .gen-table-loading-inner .gen-table-loading-text {
    font-size: 13px;
    color: #64748b;
}

/* 表格容器相对定位，便于 loading 绝对定位覆盖 */
.table-responsive:has(> .gen-table-loading) {
    position: relative;
}

/* 暗色主题适配 */
html[data-theme='dark'] .gen-table-toolbar .btn-column-settings {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
html[data-theme='dark'] .gen-table-toolbar .btn-column-settings:hover,
html[data-theme='dark'] .gen-table-toolbar .show .btn-column-settings {
    color: #2dd4bf;
    border-color: #115e59;
    background-color: #134e4a;
}
html[data-theme='dark'] .gen-table-column-menu {
    background-color: #1e293b;
    border-color: #334155;
}
html[data-theme='dark'] .gen-table-column-menu label {
    color: #cbd5e1;
}
html[data-theme='dark'] .gen-table-column-menu label:hover {
    background-color: #134e4a;
    color: #2dd4bf;
}
html[data-theme='dark'] .gen-table-row-selected {
    background-color: #134e4a !important;
}
html[data-theme='dark'] .gen-table-row-selected > td {
    border-color: #115e59;
}
html[data-theme='dark'] .gen-table-expand-btn {
    background-color: #334155;
    color: #94a3b8;
}
html[data-theme='dark'] .gen-table-expand-btn:hover {
    background-color: #115e59;
    color: #2dd4bf;
}
html[data-theme='dark'] .gen-table-empty .gen-table-empty-icon,
html[data-theme='dark'] .gen-table-empty .gen-table-empty-text {
    color: #64748b;
}
html[data-theme='dark'] .gen-table thead th {
    background-color: #0f172a;
    color: #cbd5e1;
    border-bottom-color: #334155;
}
html[data-theme='dark'] .gen-table tbody td {
    background-color: #0f172a;
    border-bottom-color: #334155;
}
html[data-theme='dark'] .gen-table tbody tr {
    background-color: #0f172a;
}
html[data-theme='dark'] .gen-table tbody tr:hover {
    background-color: #1e293b;
}
html[data-theme='dark'] .gen-table-loading {
    background: rgba(15, 23, 42, 0.72);
}
html[data-theme='dark'] .gen-table-loading .gen-table-loading-inner {
    background: #1e293b;
    color: #cbd5e1;
}
html[data-theme='dark'] .gen-table-loading .gen-table-loading-inner i {
    color: #2dd4bf;
}